Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,287 @@
|
||||
/* Metro module 11700; source: modules/app_launcher/native/options/AppLauncherCommandOption.tsx; dependencies: [31, 27, 1483, 33, 4501, 697, 1909, 11701, 11707, 11709, 11712, 11714, 11715, 11719, 6589, 11722, 11723, 11726, 5278, 6988, 2] */
|
||||
function _fun89692(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11886:6, offset: 0x0201a42c, size: 304 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(1483) /* metro dependency 1483: AppLauncherNativeConstants */).AppLauncherOptionAutoFocusType;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {'marginLeft': 8, 'marginRight': -4, 'padding': 4};
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
const env0_7 = Reflect.apply(createStyles, value, [{dismissableOptionWrapper: {'flexDirection': 'row',
|
||||
'alignItems': 'center'}, optionViewContainer: {flex: 1}, dismissButton: object, option: {flex: 1}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/options/AppLauncherCommandOption.tsx');
|
||||
exports.default = AppLauncherCommandOption;
|
||||
}
|
||||
|
||||
function AppLauncherCommandOption({option, onStartEditing, onEndEditing, onOptionValueChange, onPress, onPressAttachmentOption, onDismiss, onFocus, channel, autoFocusType, command, optionValues, hasError}) { // fn#89693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11886:521, offset: 0x0201a55c, size: 1933 bytes, params: 2, frame: 33
|
||||
var r7;
|
||||
var r10;
|
||||
var r1;
|
||||
var AppLauncherChannelOption;
|
||||
var current;
|
||||
var name;
|
||||
var OPTIONAL_OPTION_ADDED;
|
||||
var AppLauncherUserOption;
|
||||
var AppLauncherRoleOption;
|
||||
var AppLauncherBooleanOption;
|
||||
var defaultImport7;
|
||||
var defaultImport8;
|
||||
var defaultImport9;
|
||||
const styles = useStyles();
|
||||
const type = option.type;
|
||||
const ApplicationCommandOptionType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType;
|
||||
const STRING = ApplicationCommandOptionType.STRING;
|
||||
if (STRING === type) {
|
||||
if (option.choices != null) {
|
||||
defaultImport9 = importDefault(11701) /* metro dependency 11701: AppLauncherChoicesOption */;
|
||||
current = optionValues.current;
|
||||
name = option.name;
|
||||
r10 = current[name]?.[0];
|
||||
OPTIONAL_OPTION_ADDED = AppLauncherOptionAutoFocusType.OPTIONAL_OPTION_ADDED;
|
||||
name = option.name;
|
||||
r7 = ((Component) => <Component style={styles.option} option={option} initialValue={r10} onSelect={onSelect_89694} onOpenChoicesSheet={function() {
|
||||
onPress();
|
||||
onStartEditing(option);
|
||||
}} onDismissChoicesSheet={onDismissChoicesSheet} autoFocus={autoFocusType === OPTIONAL_OPTION_ADDED} hasError={hasError} key={name} />)(defaultImport9);
|
||||
} else if (option.autocomplete) {
|
||||
defaultImport8 = importDefault(11707) /* metro dependency 11707: AppLauncherAutocompleteOption */;
|
||||
current = optionValues.current;
|
||||
name = option.name;
|
||||
r1 = current[name]?.[0];
|
||||
OPTIONAL_OPTION_ADDED = AppLauncherOptionAutoFocusType.OPTIONAL_OPTION_ADDED;
|
||||
name = option.name;
|
||||
r7 = ((Component) => <Component style={styles.option} channel={channel} option={option} activeCommand={command} optionValues={optionValues} initialValue={r1} autoFocus={autoFocusType === OPTIONAL_OPTION_ADDED} onSelect={onSelect} onOpenAutocompleteSheet={onOpenAutocompleteSheet} onDismissAutocompleteSheet={onDismissAutocompleteSheet} hasError={hasError} key={name} />)(defaultImport8);
|
||||
} else {
|
||||
defaultImport7 = importDefault(11709) /* metro dependency 11709: AppLauncherTextInputOption */;
|
||||
var defaultImport7Props = {style: styles.option, option: option, guildId: channel.guild_id};
|
||||
current = optionValues.current;
|
||||
name = option.name;
|
||||
defaultImport7Props.initialValue = current[name]?.[0];
|
||||
defaultImport7Props.onEndEditing = onEndEditing;
|
||||
defaultImport7Props.onChangeText = onChangeText;
|
||||
defaultImport7Props.onFocus = onFocus;
|
||||
defaultImport7Props.autoFocus = [AppLauncherOptionAutoFocusType.FIRST_REQUIRED_OPTION,
|
||||
AppLauncherOptionAutoFocusType.OPTIONAL_OPTION_ADDED].includes(autoFocusType);
|
||||
defaultImport7Props.hasError = hasError;
|
||||
defaultImport7Props.onPressIn = onPress;
|
||||
name = option.name;
|
||||
r7 = ((Component) => <Component {...defaultImport7Props} key={name} />)(defaultImport7);
|
||||
}
|
||||
return onDismiss == null ? r7 : <View style={styles.dismissableOptionWrapper}><View style={styles.optionViewContainer}>{r7}</View>{((PressableOpacity) => <PressableOpacity style={styles.dismissButton} onPress={onPress_89712}>{((CircleXIcon) => <CircleXIcon size="md" />)((require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View>;
|
||||
}
|
||||
const INTEGER = ApplicationCommandOptionType.INTEGER;
|
||||
if (INTEGER === type) {
|
||||
if (option.choices != null) {
|
||||
defaultImport9 = importDefault(11701) /* metro dependency 11701: AppLauncherChoicesOption */;
|
||||
current = optionValues.current;
|
||||
name = option.name;
|
||||
r10 = current[name]?.[0];
|
||||
OPTIONAL_OPTION_ADDED = AppLauncherOptionAutoFocusType.OPTIONAL_OPTION_ADDED;
|
||||
name = option.name;
|
||||
r7 = ((Component) => <Component style={styles.option} option={option} initialValue={r10} onSelect={onSelect_89694} onOpenChoicesSheet={function() {
|
||||
onPress();
|
||||
onStartEditing(option);
|
||||
}} onDismissChoicesSheet={onDismissChoicesSheet} autoFocus={autoFocusType === OPTIONAL_OPTION_ADDED} hasError={hasError} key={name} />)(defaultImport9);
|
||||
} else if (option.autocomplete) {
|
||||
defaultImport8 = importDefault(11707) /* metro dependency 11707: AppLauncherAutocompleteOption */;
|
||||
current = optionValues.current;
|
||||
name = option.name;
|
||||
r1 = current[name]?.[0];
|
||||
OPTIONAL_OPTION_ADDED = AppLauncherOptionAutoFocusType.OPTIONAL_OPTION_ADDED;
|
||||
name = option.name;
|
||||
r7 = ((Component) => <Component style={styles.option} channel={channel} option={option} activeCommand={command} optionValues={optionValues} initialValue={r1} autoFocus={autoFocusType === OPTIONAL_OPTION_ADDED} onSelect={onSelect} onOpenAutocompleteSheet={onOpenAutocompleteSheet} onDismissAutocompleteSheet={onDismissAutocompleteSheet} hasError={hasError} key={name} />)(defaultImport8);
|
||||
} else {
|
||||
defaultImport7 = importDefault(11709) /* metro dependency 11709: AppLauncherTextInputOption */;
|
||||
var defaultImport7Props = {style: styles.option, option: option, guildId: channel.guild_id};
|
||||
current = optionValues.current;
|
||||
name = option.name;
|
||||
defaultImport7Props.initialValue = current[name]?.[0];
|
||||
defaultImport7Props.onEndEditing = onEndEditing;
|
||||
defaultImport7Props.onChangeText = onChangeText;
|
||||
defaultImport7Props.onFocus = onFocus;
|
||||
defaultImport7Props.autoFocus = [AppLauncherOptionAutoFocusType.FIRST_REQUIRED_OPTION,
|
||||
AppLauncherOptionAutoFocusType.OPTIONAL_OPTION_ADDED].includes(autoFocusType);
|
||||
defaultImport7Props.hasError = hasError;
|
||||
defaultImport7Props.onPressIn = onPress;
|
||||
name = option.name;
|
||||
r7 = ((Component) => <Component {...defaultImport7Props} key={name} />)(defaultImport7);
|
||||
}
|
||||
return onDismiss == null ? r7 : <View style={styles.dismissableOptionWrapper}><View style={styles.optionViewContainer}>{r7}</View>{((PressableOpacity) => <PressableOpacity style={styles.dismissButton} onPress={onPress_89712}>{((CircleXIcon) => <CircleXIcon size="md" />)((require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View>;
|
||||
}
|
||||
const NUMBER = ApplicationCommandOptionType.NUMBER;
|
||||
if (NUMBER === type) {
|
||||
if (option.choices != null) {
|
||||
defaultImport9 = importDefault(11701) /* metro dependency 11701: AppLauncherChoicesOption */;
|
||||
current = optionValues.current;
|
||||
name = option.name;
|
||||
r10 = current[name]?.[0];
|
||||
OPTIONAL_OPTION_ADDED = AppLauncherOptionAutoFocusType.OPTIONAL_OPTION_ADDED;
|
||||
name = option.name;
|
||||
r7 = ((Component) => <Component style={styles.option} option={option} initialValue={r10} onSelect={onSelect_89694} onOpenChoicesSheet={function() {
|
||||
onPress();
|
||||
onStartEditing(option);
|
||||
}} onDismissChoicesSheet={onDismissChoicesSheet} autoFocus={autoFocusType === OPTIONAL_OPTION_ADDED} hasError={hasError} key={name} />)(defaultImport9);
|
||||
} else if (option.autocomplete) {
|
||||
defaultImport8 = importDefault(11707) /* metro dependency 11707: AppLauncherAutocompleteOption */;
|
||||
current = optionValues.current;
|
||||
name = option.name;
|
||||
r1 = current[name]?.[0];
|
||||
OPTIONAL_OPTION_ADDED = AppLauncherOptionAutoFocusType.OPTIONAL_OPTION_ADDED;
|
||||
name = option.name;
|
||||
r7 = ((Component) => <Component style={styles.option} channel={channel} option={option} activeCommand={command} optionValues={optionValues} initialValue={r1} autoFocus={autoFocusType === OPTIONAL_OPTION_ADDED} onSelect={onSelect} onOpenAutocompleteSheet={onOpenAutocompleteSheet} onDismissAutocompleteSheet={onDismissAutocompleteSheet} hasError={hasError} key={name} />)(defaultImport8);
|
||||
} else {
|
||||
defaultImport7 = importDefault(11709) /* metro dependency 11709: AppLauncherTextInputOption */;
|
||||
var defaultImport7Props = {style: styles.option, option: option, guildId: channel.guild_id};
|
||||
current = optionValues.current;
|
||||
name = option.name;
|
||||
defaultImport7Props.initialValue = current[name]?.[0];
|
||||
defaultImport7Props.onEndEditing = onEndEditing;
|
||||
defaultImport7Props.onChangeText = onChangeText;
|
||||
defaultImport7Props.onFocus = onFocus;
|
||||
defaultImport7Props.autoFocus = [AppLauncherOptionAutoFocusType.FIRST_REQUIRED_OPTION,
|
||||
AppLauncherOptionAutoFocusType.OPTIONAL_OPTION_ADDED].includes(autoFocusType);
|
||||
defaultImport7Props.hasError = hasError;
|
||||
defaultImport7Props.onPressIn = onPress;
|
||||
name = option.name;
|
||||
r7 = ((Component) => <Component {...defaultImport7Props} key={name} />)(defaultImport7);
|
||||
}
|
||||
return onDismiss == null ? r7 : <View style={styles.dismissableOptionWrapper}><View style={styles.optionViewContainer}>{r7}</View>{((PressableOpacity) => <PressableOpacity style={styles.dismissButton} onPress={onPress_89712}>{((CircleXIcon) => <CircleXIcon size="md" />)((require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View>;
|
||||
}
|
||||
const ATTACHMENT = ApplicationCommandOptionType.ATTACHMENT;
|
||||
if (ATTACHMENT === type) {
|
||||
r7 = ((Component) => <Component style={styles.option} option={option} onSelectAttachment={function(a0) {
|
||||
var onEndEditingBinding = onEndEditing;
|
||||
var optionBinding = option;
|
||||
onEndEditingBinding(optionBinding);
|
||||
onOptionValueChange(optionBinding, a0 != null ? [{type: 'text', text: a0}] : []);
|
||||
}} channel={channel} autoFocus={autoFocusType === AppLauncherOptionAutoFocusType.OPTIONAL_OPTION_ADDED} hasError={hasError} onPress={onPressAttachmentOption} key={option.name} />)(importDefault(11712) /* metro dependency 11712: AppLauncherAttachmentOption */);
|
||||
return onDismiss == null ? r7 : <View style={styles.dismissableOptionWrapper}><View style={styles.optionViewContainer}>{r7}</View>{((PressableOpacity) => <PressableOpacity style={styles.dismissButton} onPress={onPress_89712}>{((CircleXIcon) => <CircleXIcon size="md" />)((require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View>;
|
||||
}
|
||||
const BOOLEAN = ApplicationCommandOptionType.BOOLEAN;
|
||||
if (BOOLEAN === type) {
|
||||
AppLauncherBooleanOption = importDefault(11714) /* metro dependency 11714: AppLauncherBooleanOption */;
|
||||
current = optionValues.current;
|
||||
name = option.name;
|
||||
r10 = current[name]?.[0];
|
||||
name = option.name;
|
||||
r7 = <AppLauncherBooleanOption style={styles.option} option={option} initialValue={r10} onPress={function(a0) {
|
||||
onPress();
|
||||
var onEndEditingBinding = onEndEditing;
|
||||
var optionBinding = option;
|
||||
onEndEditingBinding(optionBinding);
|
||||
onOptionValueChange(optionBinding, [{type: 'text', text: a0.toString()}]);
|
||||
}} hasError={hasError} key={name} />;
|
||||
return onDismiss == null ? r7 : <View style={styles.dismissableOptionWrapper}><View style={styles.optionViewContainer}>{r7}</View>{((PressableOpacity) => <PressableOpacity style={styles.dismissButton} onPress={onPress_89712}>{((CircleXIcon) => <CircleXIcon size="md" />)((require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View>;
|
||||
}
|
||||
const MENTIONABLE = ApplicationCommandOptionType.MENTIONABLE;
|
||||
if (MENTIONABLE === type) {
|
||||
r7 = ((Component) => <Component option={option} initialValue={optionValues.current[option.name]?.[0]} onMentionablePress={onMentionablePress} onActionSheetDismiss={function() {
|
||||
return onEndEditing(option);
|
||||
}} channel={channel} autoFocus={autoFocusType === AppLauncherOptionAutoFocusType.OPTIONAL_OPTION_ADDED} hasError={hasError} onPress={onPress} />)(importDefault(11715) /* metro dependency 11715: AppLauncherMentionableOption */);
|
||||
return onDismiss == null ? r7 : <View style={styles.dismissableOptionWrapper}><View style={styles.optionViewContainer}>{r7}</View>{((PressableOpacity) => <PressableOpacity style={styles.dismissButton} onPress={onPress_89712}>{((CircleXIcon) => <CircleXIcon size="md" />)((require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View>;
|
||||
}
|
||||
const ROLE = ApplicationCommandOptionType.ROLE;
|
||||
if (ROLE === type) {
|
||||
AppLauncherRoleOption = importDefault(11722) /* metro dependency 11722: AppLauncherRoleOption */;
|
||||
current = optionValues.current;
|
||||
name = option.name;
|
||||
r10 = current[name]?.[0];
|
||||
OPTIONAL_OPTION_ADDED = AppLauncherOptionAutoFocusType.OPTIONAL_OPTION_ADDED;
|
||||
name = option.name;
|
||||
r7 = <AppLauncherRoleOption style={styles.option} option={option} initialValue={r10} onRolePress={function({role}) {
|
||||
onOptionValueChange(option, role == null ? [] : [{type: 'roleMention', roleId: role.id}]);
|
||||
}} onActionSheetDismiss={onActionSheetDismiss_89707} channel={channel} autoFocus={autoFocusType === OPTIONAL_OPTION_ADDED} hasError={hasError} onPress={onPress} key={name} />;
|
||||
return onDismiss == null ? r7 : <View style={styles.dismissableOptionWrapper}><View style={styles.optionViewContainer}>{r7}</View>{((PressableOpacity) => <PressableOpacity style={styles.dismissButton} onPress={onPress_89712}>{((CircleXIcon) => <CircleXIcon size="md" />)((require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View>;
|
||||
}
|
||||
const USER = ApplicationCommandOptionType.USER;
|
||||
if (USER === type) {
|
||||
AppLauncherUserOption = importDefault(11723) /* metro dependency 11723: AppLauncherUserOption */;
|
||||
current = optionValues.current;
|
||||
name = option.name;
|
||||
r10 = current[name]?.[0];
|
||||
OPTIONAL_OPTION_ADDED = AppLauncherOptionAutoFocusType.OPTIONAL_OPTION_ADDED;
|
||||
name = option.name;
|
||||
r7 = <AppLauncherUserOption style={styles.option} option={option} initialValue={r10} onUserPress={function({user}) {
|
||||
var r1;
|
||||
var onOptionValueChangeBinding = onOptionValueChange;
|
||||
var optionBinding = option;
|
||||
if (user == null) {
|
||||
r1 = [];
|
||||
} else {
|
||||
r1 = typeof user === 'string' ? user : user.id;
|
||||
r1 = [{type: 'userMention', userId: r1}];
|
||||
}
|
||||
onOptionValueChangeBinding(optionBinding, r1);
|
||||
}} onActionSheetDismiss={onActionSheetDismiss_89709} channel={channel} autoFocus={autoFocusType === OPTIONAL_OPTION_ADDED} hasError={hasError} onPress={onPress} key={name} />;
|
||||
return onDismiss == null ? r7 : <View style={styles.dismissableOptionWrapper}><View style={styles.optionViewContainer}>{r7}</View>{((PressableOpacity) => <PressableOpacity style={styles.dismissButton} onPress={onPress_89712}>{((CircleXIcon) => <CircleXIcon size="md" />)((require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View>;
|
||||
}
|
||||
const CHANNEL = ApplicationCommandOptionType.CHANNEL;
|
||||
if (CHANNEL === type) {
|
||||
AppLauncherChannelOption = importDefault(11726) /* metro dependency 11726: AppLauncherChannelOption */;
|
||||
current = optionValues.current;
|
||||
name = option.name;
|
||||
r7 = current[name]?.[0];
|
||||
OPTIONAL_OPTION_ADDED = AppLauncherOptionAutoFocusType.OPTIONAL_OPTION_ADDED;
|
||||
name = option.name;
|
||||
r7 = <AppLauncherChannelOption style={styles.option} option={option} initialValue={r7} onChannelPress={function({channel}) {
|
||||
onOptionValueChange(option, channel != null ? [{type: 'channelMention', channelId: channel.id}] : []);
|
||||
}} onActionSheetDismiss={onActionSheetDismiss} channel={channel} autoFocus={autoFocusType === OPTIONAL_OPTION_ADDED} hasError={hasError} onPress={onPress} key={name} />;
|
||||
return onDismiss == null ? r7 : <View style={styles.dismissableOptionWrapper}><View style={styles.optionViewContainer}>{r7}</View>{((PressableOpacity) => <PressableOpacity style={styles.dismissButton} onPress={onPress_89712}>{((CircleXIcon) => <CircleXIcon size="md" />)((require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View>;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function AppLauncherCommandOptionOnSelect(a0) { // fn#89694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11886:1055, owner: AppLauncherCommandOption.onSelect, offset: 0x0201ace9, size: 85 bytes, params: 2, frame: 17
|
||||
const onEndEditingBinding = onEndEditing;
|
||||
const optionBinding = option;
|
||||
const value2 = undefined;
|
||||
onEndEditingBinding(optionBinding);
|
||||
onOptionValueChange(optionBinding, [{type: 'text', text: (a0 == null ? value2 : a0.displayName) ?? ''}]);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function AppLauncherCommandOptionOnChangeText(a0) { // fn#89701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11886:1808, owner: AppLauncherCommandOption.onChangeText, offset: 0x0201ad5a, size: 55 bytes, params: 2, frame: 14
|
||||
const onStartEditingBinding = onStartEditing;
|
||||
const optionBinding = option;
|
||||
onStartEditingBinding(optionBinding);
|
||||
onOptionValueChange(optionBinding, [{type: 'text', text: a0}]);
|
||||
}
|
||||
|
||||
function onMentionablePress({mentionable}) { // fn#89704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11886:2586, owner: AppLauncherCommandOption.onMentionablePress, offset: 0x0201ae1f, size: 418 bytes, params: 2, frame: 16
|
||||
var value;
|
||||
var type;
|
||||
const MentionableItemTypes = (require(11719) /* metro dependency 11719: AppLauncherMentionableListActionSheet */).MentionableItemTypes;
|
||||
var result;
|
||||
var text;
|
||||
if (mentionable != null) {
|
||||
type = mentionable.type;
|
||||
value = environment.__proto__;
|
||||
if (MentionableItemTypes.USER === type) {
|
||||
onOptionValueChange(option, [{type: 'userMention', userId: mentionable.result.user.id}]);
|
||||
} else if (MentionableItemTypes.ROLE === type) {
|
||||
onOptionValueChange(option, [{type: 'roleMention', roleId: mentionable.result.id}]);
|
||||
} else if (MentionableItemTypes.GLOBAL === type) {
|
||||
result = mentionable.result;
|
||||
text = result.text;
|
||||
value = importDefault(6589) /* metro dependency 6589: AutocompleteUtils */;
|
||||
if (text === value.MENTION_EVERYONE().text) {
|
||||
onOptionValueChange(option, [{'type': 'textMention', 'text': '@everyone'}]);
|
||||
} else {
|
||||
onOptionValueChange(option, [{type: 'text', text: result.text}]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
onOptionValueChange(option, []);
|
||||
}
|
||||
}
|
||||
|
||||
function AppLauncherCommandOptionOnPress_89712() { // fn#89712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11886:4354, owner: AppLauncherCommandOption.onPress, offset: 0x0201b0a2, size: 20 bytes, params: 1, frame: 11
|
||||
return onDismiss(option);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/* Metro module 11703; source: modules/app_launcher/native/options/AppLauncherCommandOptionActionSheet.tsx; dependencies: [31, 27, 1483, 33, 4501, 697, 6275, 6758, 6806, 4080, 1305, 2] */
|
||||
function _fun89730(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11889:6, offset: 0x0201bd26, size: 308 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const DEFAULT_CONTENT_PADDING = (require(1483) /* metro dependency 1483: AppLauncherNativeConstants */).DEFAULT_CONTENT_PADDING;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const MOBILE_KEYBOARD_PANEL_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_KEYBOARD_PANEL_BACKGROUND;
|
||||
const env0_5 = Reflect.apply(createStyles, createStylesModule,
|
||||
[{actionSheetBackground: {backgroundColor: MOBILE_KEYBOARD_PANEL_BACKGROUND},
|
||||
titleContainer: {backgroundColor: 'transparent'}, titleWrapper: {alignItems: 'center'},
|
||||
subtitleWrapper: {'paddingHorizontal': 12, 'textAlign': 'center'},
|
||||
contentContainer: {paddingHorizontal: DEFAULT_CONTENT_PADDING, paddingTop: DEFAULT_CONTENT_PADDING, flex: 1}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/options/AppLauncherCommandOptionActionSheet.tsx');
|
||||
exports.AppLauncherCommandOptionActionSheet = AppLauncherCommandOptionActionSheet;
|
||||
}
|
||||
|
||||
function AppLauncherCommandOptionActionSheet(a0) { // fn#89731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11889:628, offset: 0x0201be5a, size: 431 bytes, params: 2, frame: 27
|
||||
var environment;
|
||||
const value = Object.create(environment);
|
||||
const option = a0.option;
|
||||
const children = a0.children;
|
||||
const contentContainerStyles = a0.contentContainerStyles;
|
||||
let scrollable = a0.scrollable;
|
||||
scrollable = scrollable === undefined || scrollable;
|
||||
let startExpanded = a0.startExpanded;
|
||||
startExpanded = startExpanded === undefined || startExpanded;
|
||||
let object2 = {'option': 0, 'children': 0, 'contentContainerStyles': 0, 'scrollable': 0, 'startExpanded': 0};
|
||||
silentSetPrototypeOf(object2, null, undefined);
|
||||
const value4 = copyDataProperties({}, a0, object2, value);
|
||||
const styles = useStyles();
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const bottomSheetProps = {...value4};
|
||||
bottomSheetProps['backgroundStyles'] = styles.actionSheetBackground;
|
||||
bottomSheetProps['scrollable'] = scrollable;
|
||||
bottomSheetProps['startExpanded'] = startExpanded;
|
||||
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
|
||||
object2 = {titleContainerStyle: styles.titleContainer, titleWrapperStyle: styles.titleWrapper,
|
||||
subtitleStyle: styles.subtitleWrapper};
|
||||
const ActionSheetCloseButton = (require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton;
|
||||
object2.leading = <View style={{alignSelf: 'flex-start'}}><ActionSheetCloseButton onPress={onPress_89732} /></View>;
|
||||
object2.title = option.displayName;
|
||||
object2.subtitle = option.displayDescription;
|
||||
const Spacer = (require(1305) /* metro dependency 1305: native */).Spacer;
|
||||
object2.trailing = <Spacer size={24} />;
|
||||
bottomSheetProps['header'] = <BottomSheetTitleHeader {...object2} />;
|
||||
return (
|
||||
<BottomSheet {...bottomSheetProps} key={option.name}>
|
||||
<View style={[styles.contentContainer, contentContainerStyles]}>
|
||||
{children}
|
||||
</View>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function AppLauncherCommandOptionActionSheetOnPress() { // fn#89732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11889:1114, owner: AppLauncherCommandOptionActionSheet.onPress, offset: 0x0201c009, size: 70 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
if (env0_0.onDismiss != null) {
|
||||
env0_0.onDismiss();
|
||||
}
|
||||
}
|
||||
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
/* Metro module 11712; source: modules/app_launcher/native/options/attachment/AppLauncherAttachmentOption.tsx; dependencies: [31, 27, 4645, 4644, 33, 4501, 697, 11143, 10968, 566, 7879, 11713, 4650, 11135, 2] */
|
||||
function _fun89780(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11898:6, offset: 0x0201e21f, size: 355 bytes, params: 8, frame: 22
|
||||
var object4;
|
||||
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(4645) /* metro dependency 4645: DraftStore */).DraftType;
|
||||
const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */;
|
||||
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {'justifyContent': 'center', 'alignItems': 'center', 'backgroundColor': null, 'width': 32,
|
||||
'height': 32};
|
||||
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
|
||||
object5.backgroundColor = BACKGROUND_MOD_SUBTLE;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object4.imageIconWrapper = object5;
|
||||
const object6 = {'width': 32, 'height': 32};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object4.selectedImage = object6;
|
||||
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object4]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/options/attachment/AppLauncherAttachmentOption.tsx');
|
||||
exports.default = AppLauncherAttachmentOption;
|
||||
}
|
||||
|
||||
function AttachmentPreviewAppLauncher({uri, isImage, isVideo}) { // fn#89781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11898:421, offset: 0x0201e382, size: 162 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
let selectedImage = styles.selectedImage;
|
||||
const width = selectedImage.width;
|
||||
const height = selectedImage.height;
|
||||
const AttachmentPreview = importDefault(11143) /* metro dependency 11143: AttachmentPreview */;
|
||||
selectedImage = styles.selectedImage;
|
||||
const FileIcon = (require(10968) /* metro dependency 10968: FileIcon */).FileIcon;
|
||||
return (
|
||||
<AttachmentPreview
|
||||
uri={uri}
|
||||
isImage={isImage}
|
||||
isVideo={isVideo}
|
||||
width={width}
|
||||
height={height}
|
||||
style={selectedImage}
|
||||
defaultPreview={<FileIcon size="sm" />}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function AppLauncherAttachmentOption({option, channel, style, autoFocus, hasError, onPress, onSelectAttachment}) { // fn#89782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11898:792, offset: 0x0201e424, size: 517 bytes, params: 2, frame: 24
|
||||
const styles = useStyles();
|
||||
const upload = (require(566) /* metro dependency 566: flux */).useStateFromStores([UploadAttachmentStore],
|
||||
function() {
|
||||
return UploadAttachmentStore.getUpload(channel.id, option.name, DraftType.ApplicationLauncherCommand);
|
||||
});
|
||||
const binding = upload;
|
||||
binding.useEffect(function() {
|
||||
return _fun89785;
|
||||
}, [channel.id, option.name]);
|
||||
const env0_4 = binding.useRef(onSelectAttachment);
|
||||
binding.useEffect(_fun89786);
|
||||
binding.useEffect(_fun89787, [upload?.filename]);
|
||||
return ((Component) => <Component style={style} hasError={hasError} option={option} selected={upload != null} selectedItemName={upload?.filename} leading={upload == null ? <View style={styles.imageIconWrapper}>{((ImageFileIcon) => <ImageFileIcon size="sm" color="interactive-text-default" />)((require(11135) /* metro dependency 11135: ImageFileIcon */).ImageFileIcon)}</View> : upload.item.platform === (require(4650) /* metro dependency 4650: Upload */).UploadPlatform.REACT_NATIVE ? <AttachmentPreviewAppLauncher uri={upload.item.uri} isImage={upload.isImage} isVideo={upload.isVideo} /> : <View style={styles.imageIconWrapper}>{((ImageFileIcon) => <ImageFileIcon size="sm" color="interactive-text-default" />)((require(11135) /* metro dependency 11135: ImageFileIcon */).ImageFileIcon)}</View>} onPress={onPress} autoFocus={autoFocus} />)(importDefault(11713) /* metro dependency 11713: AppLauncherSelectOptionFormRow */);
|
||||
}
|
||||
|
||||
function _fun89784() { // fn#89784, offset: 0x0201e65e, size: 11 bytes, params: 1, frame: 1
|
||||
return function() {
|
||||
return importDefault(dependencyMap[10]).remove(channel.id, option.name, DraftType.ApplicationLauncherCommand);
|
||||
};
|
||||
}
|
||||
|
||||
function _fun89787() { // fn#89787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11898:1183, offset: 0x0201e6b0, size: 73 bytes, params: 1, frame: 13
|
||||
var binding;
|
||||
const uploadBinding = upload;
|
||||
const value2 = undefined;
|
||||
if ((uploadBinding == null ? value2 : upload.filename) != null) {
|
||||
if (env0_4.current != null) {
|
||||
binding = env0_4;
|
||||
binding.current(upload.filename);
|
||||
}
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
+280
@@ -0,0 +1,280 @@
|
||||
/* Metro module 11708; source: modules/app_launcher/native/options/autocomplete/AppLauncherAutocompleteActionSheet.tsx; dependencies: [57, 31, 27, 7167, 1867, 661, 5066, 33, 22, 8050, 4501, 697, 632, 4080, 11703, 11704, 1244, 44, 6238, 4242, 4573, 1305, 11705, 2] */
|
||||
function _fun89747(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11894:6, offset: 0x0201c96d, size: 475 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const applicationCommandAutocompleteStore = importDefault(7167) /* metro dependency 7167: ApplicationCommandAutocompleteStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).AutoCompleteResultTypes;
|
||||
const AUTOCOMPLETE_OPTION_DEBOUNCE_TIME = (require(5066) /* metro dependency 5066: ApplicationCommandConstants */).AUTOCOMPLETE_OPTION_DEBOUNCE_TIME;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
const env0_11 = value.debounce(importDefault(8050) /* metro dependency 8050: executeCommand */,
|
||||
AUTOCOMPLETE_OPTION_DEBOUNCE_TIME, {'leading': true, 'trailing': true});
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {};
|
||||
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
||||
object.backgroundColor = BACKGROUND_MOD_MUTED;
|
||||
object.height = 16;
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object.alignSelf = 'flex-start';
|
||||
const env0_12 = Reflect.apply(createStyles, value, [{commandChoiceLoadingContainer: {'flex': 1,
|
||||
'justifyContent': 'center'}, commandChoiceLoadingItem: object, emptyState: {backgroundColor: 'transparent'}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/options/autocomplete/AppLauncherAutocompleteActionSheet.tsx');
|
||||
exports.default = AppLauncherAutocompleteActionSheet;
|
||||
}
|
||||
|
||||
function Item({item, index, choices, onChoiceSelect}) { // fn#89748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11894:588, offset: 0x0201cb48, size: 352 bytes, params: 2, frame: 17
|
||||
let env0_4 = undefined;
|
||||
const defaultImport = importDefault(44) /* metro dependency 44 */;
|
||||
const type = item.type;
|
||||
let CHOICE = AutoCompleteResultTypes.CHOICE;
|
||||
let r2 = type === CHOICE || item.type === AutoCompleteResultTypes.CHOICE_LOADING;
|
||||
r2 = !r2 ? item.type === AutoCompleteResultTypes.LABEL : r2;
|
||||
defaultImport(r2, 'Invalid autocomplete result type');
|
||||
const env0_3 = useStyles();
|
||||
env0_4 = env0_4.useMemo(function() {
|
||||
var Math = global.Math;
|
||||
return 100 * Math.random() + 50;
|
||||
}, []);
|
||||
const value5 = (require(4242) /* metro dependency 4242 */).match(item);
|
||||
CHOICE = AutoCompleteResultTypes.CHOICE;
|
||||
const value6 = value5.with({type: CHOICE}, _fun89751);
|
||||
const LABEL = AutoCompleteResultTypes.LABEL;
|
||||
const value7 = value6.with({type: LABEL}, _fun89753);
|
||||
const CHOICE_LOADING = AutoCompleteResultTypes.CHOICE_LOADING;
|
||||
return value7.with({type: CHOICE_LOADING}, _fun89755).exhaustive();
|
||||
}
|
||||
|
||||
function AutocompleteFailedEmptyState() { // fn#89756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11894:1610, offset: 0x0201cf40, size: 151 bytes, params: 1, frame: 18
|
||||
const styles = useStyles();
|
||||
const EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
|
||||
const emptyStateProps2 = {style: styles.emptyState, lightSource: importDefault(11705) /* metro dependency 11705 */,
|
||||
darkSource: importDefault(11705) /* metro dependency 11705 */};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
emptyStateProps2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rTAbPn);
|
||||
return <EmptyState {...emptyStateProps2} />;
|
||||
}
|
||||
|
||||
function AppLauncherAutocompleteActionSheet({option, initChoice, onChoiceSelect, onDismissAutocompleteSheet, channel, activeCommand, optionValues}) { // fn#89757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11894:1930, offset: 0x0201cfd7, size: 763 bytes, params: 2, frame: 32
|
||||
const env0_3 = activeCommand;
|
||||
const env0_4 = optionValues;
|
||||
const binding = env0_4;
|
||||
const useState = binding.useState;
|
||||
const value5 = env0_3(Reflect.apply(useState, binding, [initChoice?.name ?? '']), 2);
|
||||
const property = value5[0];
|
||||
const property2 = value5[1];
|
||||
const value6 = env0_4.useRef(null);
|
||||
const {autocompleteResults,
|
||||
lastErrored} = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresObject([ApplicationCommandAutocompleteStore],
|
||||
_fun89758, [channel.id, option.name, property]);
|
||||
const value8 = env0_4.useMemo(_fun89759, [property, autocompleteResults, lastErrored]);
|
||||
let r7 = value8.length === 0 && !lastErrored;
|
||||
env0_4.useEffect(_fun89761, [channel, option.name, activeCommand, optionValues, property]);
|
||||
const value11 = env0_4.useCallback(_fun89762, [onChoiceSelect, value8]);
|
||||
const value12 = env0_4.useCallback(_fun89763, [onChoiceSelect, property]);
|
||||
const AppLauncherCommandOptionActionSheet = (require(11703) /* metro dependency 11703: AppLauncherCommandOptionActionSheet */).AppLauncherCommandOptionActionSheet;
|
||||
const AppLauncherListSearchBar = (require(11704) /* metro dependency 11704: AppLauncherList */).AppLauncherListSearchBar;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const Wuie9L = (require(1244) /* metro dependency 1244: indexNative */).t.Wuie9L;
|
||||
const items2 = [<AppLauncherListSearchBar placeholder={Reflect.apply(string, intl,
|
||||
[Wuie9L])} onChange={property2} autoFocus returnKeyType="done" onSubmitEditing={value12} />];
|
||||
r7 = r7 && ((AppLauncherListEmptyState) => <AppLauncherListEmptyState />)((require(11704) /* metro dependency 11704: AppLauncherList */).AppLauncherListEmptyState);
|
||||
items2[1] = r7;
|
||||
const AppLauncherList = (require(11704) /* metro dependency 11704: AppLauncherList */).AppLauncherList;
|
||||
items2[2] = <AppLauncherList ref={value6} keyExtractor={keyExtractor_89764} data={value8} renderItem={value11} scrollEnabled />;
|
||||
items2[3] = lastErrored && <AutocompleteFailedEmptyState />;
|
||||
return (
|
||||
<AppLauncherCommandOptionActionSheet option={option} onDismiss={onDismissAutocompleteSheet}>
|
||||
{items2}
|
||||
</AppLauncherCommandOptionActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function ItemListItem({label, onPress}) { // fn#89750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11894:817, owner: Item.ListItem, offset: 0x0201ccca, size: 107 bytes, params: 2, frame: 16
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const indexBinding = index;
|
||||
return (
|
||||
<TableRow
|
||||
label={label}
|
||||
onPress={onPress}
|
||||
start={indexBinding === 0}
|
||||
end={indexBinding === choices.length - 1}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun89751(a0) { // fn#89751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11894:959, offset: 0x0201cd35, size: 110 bytes, params: 2, frame: 17
|
||||
const env0_0 = a0;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<ItemListItem
|
||||
label={<Text lineClamp={1} variant="text-md/normal" color="mobile-text-heading-primary">{a0.choice.displayName}</Text>}
|
||||
onPress={onPress_89752}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun89753(a0) { // fn#89753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11894:1189, offset: 0x0201cded, size: 130 bytes, params: 2, frame: 19
|
||||
const env0_0 = a0;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<ItemListItem
|
||||
label={<Text lineClamp={1} variant="text-md/normal" color="mobile-text-heading-primary">{'"'}{a0.label}{'"'}</Text>}
|
||||
onPress={onPress_89754}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun89755() { // fn#89755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11894:1465, offset: 0x0201ced0, size: 112 bytes, params: 1, frame: 20
|
||||
return (
|
||||
<ItemListItem
|
||||
label={<View style={styles.commandChoiceLoadingContainer}><View style={[styles.commandChoiceLoadingItem,
|
||||
{width: env0_4}]} /></View>}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun89758() { // fn#89758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11894:2224, offset: 0x0201d2d2, size: 77 bytes, params: 1, frame: 17
|
||||
const getAutocompleteChoices = ApplicationCommandAutocompleteStore.getAutocompleteChoices;
|
||||
const channelBinding = channel;
|
||||
const getLastErrored = ApplicationCommandAutocompleteStore.getLastErrored;
|
||||
return {autocompleteResults: Reflect.apply(getAutocompleteChoices, ApplicationCommandAutocompleteStore,
|
||||
[channelBinding.id, option.name, env0_5]), lastErrored: Reflect.apply(getLastErrored,
|
||||
ApplicationCommandAutocompleteStore, [channelBinding.id])};
|
||||
}
|
||||
|
||||
function _fun89759() { // fn#89759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11894:2398, offset: 0x0201d31f, size: 231 bytes, params: 1, frame: 18
|
||||
var environment;
|
||||
var push;
|
||||
var value2;
|
||||
var array;
|
||||
var fill;
|
||||
var value3;
|
||||
var CHOICE_LOADING;
|
||||
var items2;
|
||||
var items3;
|
||||
const items4 = [];
|
||||
var value;
|
||||
if (env0_5 !== '') {
|
||||
push = items4.push;
|
||||
value2 = environment.__proto__;
|
||||
Reflect.apply(push, items4, [{type: AutoCompleteResultTypes.LABEL, label: env0_5}]);
|
||||
}
|
||||
if (autocompleteResults != null) {
|
||||
if (autocompleteResults != null) {
|
||||
push = items4.push;
|
||||
value = autocompleteResults.map(function(a0) {
|
||||
return {type: AutoCompleteResultTypes.CHOICE, choice: a0};
|
||||
});
|
||||
items3 = [];
|
||||
arraySpread(items3, value, 0, undefined);
|
||||
apply(push, items3, items4, undefined);
|
||||
}
|
||||
} else if (lastErrored) {
|
||||
if (autocompleteResults != null) {
|
||||
push = items4.push;
|
||||
value = autocompleteResults.map(_fun89760);
|
||||
items3 = [];
|
||||
arraySpread(items3, value, 0, undefined);
|
||||
apply(push, items3, items4, undefined);
|
||||
}
|
||||
} else {
|
||||
push = items4.push;
|
||||
array = new global.Array(4);
|
||||
fill = array.fill;
|
||||
value3 = environment.__proto__;
|
||||
CHOICE_LOADING = AutoCompleteResultTypes.CHOICE_LOADING;
|
||||
array = Reflect.apply(fill, array, [{type: CHOICE_LOADING}]);
|
||||
items2 = [];
|
||||
arraySpread(items2, array, 0, CHOICE_LOADING);
|
||||
apply(push, items2, items4, CHOICE_LOADING);
|
||||
}
|
||||
return items4;
|
||||
}
|
||||
|
||||
function _fun89761() { // fn#89761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11894:2626, offset: 0x0201d423, size: 142 bytes, params: 1, frame: 14
|
||||
const getGuild = GuildStore.getGuild;
|
||||
const channelBinding = channel;
|
||||
env1_11({command: activeCommand, optionValues: optionValues, context: {channel: channelBinding,
|
||||
guild: Reflect.apply(getGuild, GuildStore, [channelBinding.guild_id]), autocomplete: {name: option.name,
|
||||
query: env0_5}}});
|
||||
const current = env0_6.current;
|
||||
if (current != null) {
|
||||
current.scrollToOffset({'offset': 0, 'animated': false});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun89762({item, index}) { // fn#89762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11894:2858, offset: 0x0201d4b1, size: 65 bytes, params: 2, frame: 14
|
||||
return (
|
||||
<Item
|
||||
item={item}
|
||||
index={index}
|
||||
onChoiceSelect={onChoiceSelect}
|
||||
choices={env0_9}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun89763() { // fn#89763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11894:2955, offset: 0x0201d4f2, size: 101 bytes, params: 1, frame: 12
|
||||
var value;
|
||||
if (env0_5 !== '') {
|
||||
if (onChoiceSelect != null) {
|
||||
onChoiceSelect({name: env0_5, value: env0_5, displayName: env0_5});
|
||||
}
|
||||
value = environment.__proto__;
|
||||
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
value.hideActionSheet();
|
||||
}
|
||||
}
|
||||
|
||||
function AppLauncherAutocompleteActionSheetKeyExtractor(a0, a1) { // fn#89764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11894:3380, owner: AppLauncherAutocompleteActionSheet.keyExtractor, offset: 0x0201d557, size: 73 bytes, params: 3, frame: 15
|
||||
const type = a0.type;
|
||||
const value = environment.__proto__;
|
||||
const CHOICE = AutoCompleteResultTypes.CHOICE;
|
||||
return '' + (type !== CHOICE ? 'placeholder' : a0.choice.name) + '_' + a1;
|
||||
}
|
||||
|
||||
function onPress_89752() { // fn#89752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11894:1110, offset: 0x0201cda3, size: 74 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__;
|
||||
if (onChoiceSelect != null) {
|
||||
onChoiceSelect(env0_0.choice);
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function onPress_89754() { // fn#89754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11894:1337, offset: 0x0201ce6f, size: 97 bytes, params: 1, frame: 12
|
||||
var object2;
|
||||
var binding;
|
||||
var label;
|
||||
let value = environment.__proto__;
|
||||
let onChoiceSelectBinding = onChoiceSelect;
|
||||
if (onChoiceSelectBinding != null) {
|
||||
onChoiceSelectBinding = onChoiceSelect;
|
||||
object2 = {};
|
||||
binding = env0_0;
|
||||
label = binding.label;
|
||||
object2.name = label;
|
||||
label = binding.label;
|
||||
object2.value = label;
|
||||
label = binding.label;
|
||||
object2.displayName = label;
|
||||
onChoiceSelectBinding(object2);
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function _fun89760(a0) { // fn#89760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11894:2494, offset: 0x0201d406, size: 29 bytes, params: 2, frame: 2
|
||||
const CHOICE = AutoCompleteResultTypes.CHOICE;
|
||||
return {type: CHOICE, choice: a0};
|
||||
}
|
||||
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
/* Metro module 11707; source: modules/app_launcher/native/options/autocomplete/AppLauncherAutocompleteOption.tsx; dependencies: [57, 31, 661, 33, 4501, 697, 1848, 4080, 11708, 1962, 11706, 5278, 4573, 2] */
|
||||
function _fun89742(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11893:6, offset: 0x0201c557, size: 370 bytes, params: 8, frame: 24
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object3 = {};
|
||||
const object5 = {'width': '100%', 'backgroundColor': null, 'borderRadius': null, 'padding': 12, 'borderWidth': 2,
|
||||
'borderColor': 'transparent', 'flexDirection': 'row', 'alignItems': 'center'};
|
||||
const INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
|
||||
object5.backgroundColor = INPUT_BACKGROUND_DEFAULT;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object3.container = object5;
|
||||
const BORDER_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_FEEDBACK_CRITICAL;
|
||||
object3.hasError = {borderColor: BORDER_FEEDBACK_CRITICAL, padding: 12};
|
||||
const object6 = {'fontSize': 16, 'alignSelf': 'center'};
|
||||
const PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
|
||||
object6.fontFamily = PRIMARY_MEDIUM;
|
||||
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
object6.color = TEXT_DEFAULT;
|
||||
object3.inputText = object6;
|
||||
const env0_6 = Reflect.apply(createStyles, createStylesModule, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/options/autocomplete/AppLauncherAutocompleteOption.tsx');
|
||||
exports.default = AppLauncherAutocompleteOption;
|
||||
}
|
||||
|
||||
function AppLauncherAutocompleteOption({style, option, onSelect, onOpenAutocompleteSheet, onDismissAutocompleteSheet, channel, activeCommand, optionValues, initialValue, autoFocus, hasError}) { // fn#89743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11893:680, offset: 0x0201c6c9, size: 363 bytes, params: 2, frame: 21
|
||||
const [property, env0_9] = onDismissAutocompleteSheet(channel.useState(function() {
|
||||
if (initialValue != null) {
|
||||
if (initialValue.type !== 'text') {
|
||||
return undefined;
|
||||
}
|
||||
initialValueBinding = initialValue;
|
||||
if (initialValueBinding.text !== '') {
|
||||
initialValueBinding = initialValue;
|
||||
return {displayName: initialValueBinding.text, name: initialValueBinding.text,
|
||||
value: initialValueBinding.text};
|
||||
}
|
||||
}
|
||||
}), 2);
|
||||
const styles = useStyles();
|
||||
const closure = onPress_89745;
|
||||
(require(11706) /* metro dependency 11706: useAnimationDelayedAutoFocus */).useAnimationDelayedAutoFocus(autoFocus,
|
||||
closure);
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const items2 = [styles.container];
|
||||
hasError = hasError && styles.hasError;
|
||||
items2[1] = hasError;
|
||||
items2[2] = style;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<PressableOpacity onPress={closure} style={items2}>
|
||||
<Text variant="text-md/normal" style={styles.inputText}>
|
||||
{property != null ? property.displayName : ' '}
|
||||
</Text>
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function AppLauncherAutocompleteOptionOnPress() { // fn#89745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11893:1040, owner: AppLauncherAutocompleteOption.onPress, offset: 0x0201c88a, size: 199 bytes, params: 1, frame: 17
|
||||
if (onOpenAutocompleteSheet != null) {
|
||||
onOpenAutocompleteSheet();
|
||||
}
|
||||
require(dependencyMap[6]).dismissGlobalKeyboard();
|
||||
const defaultImport = importDefault(dependencyMap[7]);
|
||||
defaultImport.openLazy(require(dependencyMap[9])(dependencyMap[8], dependencyMap.paths),
|
||||
'AppLauncherAutocompleteActionSheet', {option: option, initChoice: env0_8, onChoiceSelect: onChoiceSelect_89746,
|
||||
channel: channel, activeCommand: activeCommand, onDismissAutocompleteSheet: onDismissAutocompleteSheet,
|
||||
optionValues: optionValues.current});
|
||||
}
|
||||
|
||||
function onPressOnChoiceSelect(a0) { // fn#89746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11893:1204, owner: AppLauncherAutocompleteOption.onPress.onChoiceSelect, offset: 0x0201c951, size: 28 bytes, params: 2, frame: 12
|
||||
env1_9(a0);
|
||||
onSelect(a0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/* Metro module 11714; source: modules/app_launcher/native/options/boolean/AppLauncherBooleanOption.tsx; dependencies: [57, 31, 33, 4501, 697, 7972, 2] */
|
||||
function _fun89791(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11900:6, offset: 0x0201e9a9, size: 255 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object = {'flexDirection': 'row', 'width': '100%', 'backgroundColor': null, 'borderRadius': null,
|
||||
'alignItems': 'center'};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{container: object}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/options/boolean/AppLauncherBooleanOption.tsx');
|
||||
exports.default = AppLauncherBooleanOption;
|
||||
}
|
||||
|
||||
function AppLauncherBooleanOption({style, option, initialValue, onPress, hasError}) { // fn#89792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11900:422, offset: 0x0201eaa8, size: 208 bytes, params: 2, frame: 20
|
||||
const styles = useStyles();
|
||||
const [property, env0_3] = env0_2(env0_3Binding.useState(_fun89793), 2);
|
||||
const FormCheckboxRow = (require(7972) /* metro dependency 7972: native */).FormCheckboxRow;
|
||||
return (
|
||||
<FormCheckboxRow
|
||||
start
|
||||
end
|
||||
style={[styles.container, style]}
|
||||
hasError={hasError}
|
||||
label={option.displayName}
|
||||
selected={property}
|
||||
onPress={onPress_89794}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun89793() { // fn#89793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11900:536, offset: 0x0201eb78, size: 55 bytes, params: 1, frame: 4
|
||||
return initialValue != null && initialValue.type === 'text' && initialValue.text === 'true';
|
||||
}
|
||||
|
||||
function AppLauncherBooleanOptionOnPress() { // fn#89794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11900:729, owner: AppLauncherBooleanOption.onPress, offset: 0x0201ebaf, size: 35 bytes, params: 1, frame: 13
|
||||
const binding = env0_3;
|
||||
const value2 = !env0_2;
|
||||
binding(value2);
|
||||
onPress(value2);
|
||||
}
|
||||
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
/* Metro module 11727; source: modules/app_launcher/native/options/channel/AppLauncherChannelListActionSheet.tsx; dependencies: [57, 31, 1867, 33, 4501, 697, 6691, 6647, 11716, 6526, 4080, 11703, 11704, 4805, 6238, 4573, 2] */
|
||||
function _fun89871(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11913:6, offset: 0x02021c57, size: 285 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const closure = ChannelIcon;
|
||||
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 guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
|
||||
const env0_8 = Reflect.apply(createStyles, value, [{channelIconWrapper: {backgroundColor: BACKGROUND_MOD_SUBTLE}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/options/channel/AppLauncherChannelListActionSheet.tsx');
|
||||
exports.default = AppLauncherChannelListActionSheet;
|
||||
exports.APP_LAUNCHER_CHANNEL_LIST_ACTION_SHEET_KEY = 'AppLauncherChannelListActionSheet';
|
||||
exports.ChannelIcon = closure;
|
||||
}
|
||||
|
||||
function ChannelIcon({channel, size, wrapperSize}) { // fn#89872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11913:291, offset: 0x02021d74, size: 246 bytes, params: 2, frame: 22
|
||||
size = size === undefined ? 'sm' : size;
|
||||
wrapperSize = wrapperSize === undefined ? 32 : wrapperSize;
|
||||
const styles = useStyles();
|
||||
const TextIcon = (require(6691) /* metro dependency 6691: TextIcon */).TextIcon;
|
||||
return ((Component) => <Component icon={((Component) => <Component size={size} color="interactive-text-default" />)(channel == null ? TextIcon : (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIconComponentWithGuild(channel,
|
||||
GuildStore.getGuild(channel.getGuildId())) ?? (require(6691) /* metro dependency 6691: TextIcon */).TextIcon)} wrapperStyle={styles.channelIconWrapper} wrapperSize={wrapperSize} />)(importDefault(11716) /* metro dependency 11716: AppLauncherOptionIcon */);
|
||||
}
|
||||
|
||||
function ChannelListItem({channel, index, totalCount, onPress}) { // fn#89873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11913:627, offset: 0x02021e6a, size: 198 bytes, params: 2, frame: 23
|
||||
const value2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const object2 = {onPress: onPress};
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
object2.label = <Text lineClamp={1} variant="text-md/semibold" color="mobile-text-heading-primary">{value2}</Text>;
|
||||
object2.icon = <ChannelIcon channel={channel} />;
|
||||
object2.start = index === 0;
|
||||
object2.end = index === totalCount - 1;
|
||||
return <TableRow {...object2} key={channel.id} />;
|
||||
}
|
||||
|
||||
function AppLauncherChannelListActionSheet({onChannelPress, onActionSheetDismiss, channel, option}) { // fn#89874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11913:1052, offset: 0x02021f30, size: 407 bytes, params: 2, frame: 24
|
||||
const env0_3 = option;
|
||||
const binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value2 = Reflect.apply(useState, binding, ['']);
|
||||
const binding2 = env0_3;
|
||||
const value3 = binding2(value2, 2);
|
||||
const property = value3[0];
|
||||
const env0_5 = value3[1];
|
||||
const value4 = binding.useRef(null);
|
||||
useState = binding.useState;
|
||||
const value5 = binding2(Reflect.apply(useState, binding, [[]]), 2);
|
||||
const property2 = value5[0];
|
||||
const env0_8 = value5[1];
|
||||
const length = property2.length;
|
||||
binding.useEffect(_fun89875, [property, channel, option]);
|
||||
const handleChannelPress = function({channel}) {
|
||||
onChannelPress({channel: channel});
|
||||
importDefault(dependencyMap[10]).hideActionSheet('AppLauncherChannelListActionSheet');
|
||||
onActionSheetDismiss();
|
||||
};
|
||||
const AppLauncherCommandOptionActionSheet = (require(11703) /* metro dependency 11703: AppLauncherCommandOptionActionSheet */).AppLauncherCommandOptionActionSheet;
|
||||
const AppLauncherListSearchBar = (require(11704) /* metro dependency 11704: AppLauncherList */).AppLauncherListSearchBar;
|
||||
return (
|
||||
<AppLauncherCommandOptionActionSheet onDismiss={onActionSheetDismiss} option={option}>
|
||||
<AppLauncherListSearchBar onChange={onChange_89877} />
|
||||
{length === 0 ? ((AppLauncherListEmptyState) => <AppLauncherListEmptyState />)((require(11704) /* metro dependency 11704: AppLauncherList */).AppLauncherListEmptyState) : ((AppLauncherList) => <AppLauncherList ref={value4} data={property2} renderItem={renderItem_89878} />)((require(11704) /* metro dependency 11704: AppLauncherList */).AppLauncherList)}
|
||||
</AppLauncherCommandOptionActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun89875() { // fn#89875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11913:1286, offset: 0x020220c7, size: 103 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = Reflect.apply((importDefault(6526) /* metro dependency 6526: AutocompleteUtils */).queryApplicationCommandChannelResults,
|
||||
value, [{query: env0_4, channel: channel, channelTypes: option.channelTypes, limit: null,
|
||||
allowSnowflake: true}]);
|
||||
env0_8(value.channels);
|
||||
}
|
||||
|
||||
function AppLauncherChannelListActionSheetRenderItem({item, index}) { // fn#89878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11913:1854, owner: AppLauncherChannelListActionSheet.renderItem, offset: 0x0202217c, size: 78 bytes, params: 2, frame: 15
|
||||
return (
|
||||
<ChannelListItem
|
||||
channel={item}
|
||||
index={index}
|
||||
totalCount={env0_7.length}
|
||||
onPress={function() {
|
||||
handleChannelPress({channel: item});
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
/* Metro module 11726; source: modules/app_launcher/native/options/channel/AppLauncherChannelOption.tsx; dependencies: [57, 31, 1379, 33, 566, 4805, 11713, 11727, 4080, 11727, 1962, 2] */
|
||||
function _fun89864(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11912:6, offset: 0x020218cd, size: 174 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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/options/channel/AppLauncherChannelOption.tsx');
|
||||
exports.default = AppLauncherChannelOption;
|
||||
}
|
||||
|
||||
function AppLauncherChannelOption({style, option, initialValue, onChannelPress, onActionSheetDismiss, channel, autoFocus, hasError, onPress}) { // fn#89865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11912:257, offset: 0x0202197b, size: 389 bytes, params: 2, frame: 26
|
||||
const binding = channel;
|
||||
const [property, env0_7] = onActionSheetDismiss(binding.useState(function() {
|
||||
var initialValueBinding = initialValue;
|
||||
var value2 = null;
|
||||
return value2 != initialValueBinding ? initialValue.type !== 'channelMention' ? value2 : initialValue.channelId : value2;
|
||||
}), 2);
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun89867,
|
||||
[property]);
|
||||
binding.useEffect(_fun89868, [onChannelPress, property, value5]);
|
||||
const value6 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(value5);
|
||||
const AppLauncherSelectOptionFormRow = importDefault(11713) /* metro dependency 11713: AppLauncherSelectOptionFormRow */;
|
||||
const r7 = value5 != null ? value6 : undefined;
|
||||
const ChannelIcon = (require(11727) /* metro dependency 11727: AppLauncherChannelListActionSheet */).ChannelIcon;
|
||||
return (
|
||||
<AppLauncherSelectOptionFormRow
|
||||
style={style}
|
||||
option={option}
|
||||
hasError={hasError}
|
||||
selected={value5 != null}
|
||||
selectedItemName={r7}
|
||||
leading={<ChannelIcon channel={value5} />}
|
||||
onPress={onPress_89869}
|
||||
autoFocus={autoFocus}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun89867() { // fn#89867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11912:542, offset: 0x02021b30, size: 26 bytes, params: 1, frame: 11
|
||||
return ChannelStore.getChannel(env0_6);
|
||||
}
|
||||
|
||||
function _fun89868() { // fn#89868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11912:581, offset: 0x02021b4a, size: 57 bytes, params: 1, frame: 12
|
||||
if (env0_6 != null && env0_8 == null) {
|
||||
env0_7(null);
|
||||
onChannelPress({channel: null});
|
||||
}
|
||||
}
|
||||
|
||||
function AppLauncherChannelOptionOnPress() { // fn#89869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11912:808, owner: AppLauncherChannelOption.onPress, offset: 0x02021b83, size: 157 bytes, params: 1, frame: 19
|
||||
if (onPress != null) {
|
||||
onPress();
|
||||
}
|
||||
const defaultImport = importDefault(dependencyMap[8]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
const value3 = require(dependencyMap[10])(dependencyMap[9], dependencyMap.paths);
|
||||
const APP_LAUNCHER_CHANNEL_LIST_ACTION_SHEET_KEY = require(dependencyMap[7]).APP_LAUNCHER_CHANNEL_LIST_ACTION_SHEET_KEY;
|
||||
Reflect.apply(openLazy, defaultImport, [value3, APP_LAUNCHER_CHANNEL_LIST_ACTION_SHEET_KEY, {option: option,
|
||||
channel: channel, onChannelPress: onChannelPress_89870, onActionSheetDismiss: onActionSheetDismiss}]);
|
||||
}
|
||||
|
||||
function onPressOnChannelPress({channel}) { // fn#89870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11912:952, owner: AppLauncherChannelOption.onPress.onChannelPress, offset: 0x02021c20, size: 55 bytes, params: 2, frame: 14
|
||||
env1_7(channel?.id);
|
||||
onChannelPress({channel: channel});
|
||||
}
|
||||
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
/* Metro module 11702; source: modules/app_launcher/native/options/choices/AppLauncherChoicesActionSheet.tsx; dependencies: [57, 31, 27, 1483, 33, 4501, 697, 4584, 3860, 8416, 1585, 477, 1478, 6526, 7972, 4080, 7556, 11703, 11704, 2] */
|
||||
function _fun89719(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11888:6, offset: 0x0201b50e, size: 452 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_6 = (require(1483) /* metro dependency 1483: AppLauncherNativeConstants */).DEFAULT_CONTENT_PADDING;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.listItemContainer = {overflow: 'hidden'};
|
||||
const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
|
||||
object2.listItem = {backgroundColor: CARD_BACKGROUND_DEFAULT};
|
||||
const object3 = {};
|
||||
object3.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
|
||||
object3.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
|
||||
object2.firstItem = object3;
|
||||
const object6 = {};
|
||||
object6.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
|
||||
object6.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
|
||||
object2.lastItem = object6;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object2.divider = {backgroundColor: BORDER_SUBTLE, marginLeft: 16};
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/options/choices/AppLauncherChoicesActionSheet.tsx');
|
||||
exports.default = AppLauncherChoicesActionSheet;
|
||||
}
|
||||
|
||||
function FlashListWrapper(a0) { // fn#89720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11888:570, offset: 0x0201b6d2, size: 131 bytes, params: 2, frame: 17
|
||||
const scrollable = a0.scrollable;
|
||||
const value = Object.create(null);
|
||||
value.scrollable = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const flashListModule = require(8416) /* metro dependency 8416: flashList */;
|
||||
return scrollable ? <flashListModule.BottomSheetFlashList preserveScrollMomentum {...value2} /> : <flashListModule.FlashList scrollEnabled={false} {...value2} />;
|
||||
}
|
||||
|
||||
function AppLauncherChoicesActionSheet({option, initChoiceIndex, onChoiceSelect, onDismiss}) { // fn#89721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11888:858, offset: 0x0201b755, size: 861 bytes, params: 2, frame: 31
|
||||
const env0_3 = undefined;
|
||||
let env0_4 = undefined;
|
||||
const styles = useStyles();
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
const r16 = platformUtilsModule.isIOS() ? bottom : bottom + DEFAULT_CONTENT_PADDING;
|
||||
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
|
||||
const binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value5 = Reflect.apply(useState, binding, [function() {
|
||||
return _fun89723(option.choices);
|
||||
}]);
|
||||
const binding2 = env0_3;
|
||||
const value6 = binding2(value5, 2);
|
||||
const property = value6[0];
|
||||
env0_4 = value6[1];
|
||||
useState = binding.useState;
|
||||
const value7 = binding2(Reflect.apply(useState, binding, [initChoiceIndex]), 2);
|
||||
const property2 = value7[0];
|
||||
const env0_6 = value7[1];
|
||||
const value8 = binding.useCallback(_fun89725, [option.choices]);
|
||||
const value9 = binding.useCallback(_fun89726, [onChoiceSelect, property2, styles, property]);
|
||||
const value10 = binding.useCallback(_fun89728, [styles.divider]);
|
||||
const r15 = option.choices != null && option.choices?.length >= ((importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)() ? 10 : 5);
|
||||
const value15 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
let useToken = useTokenModule.useToken;
|
||||
const TABLE_ROW_HEIGHT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_HEIGHT;
|
||||
const value16 = Reflect.apply(useToken, useTokenModule, [TABLE_ROW_HEIGHT]);
|
||||
const moduleValue4 = useTokenModule;
|
||||
useToken = moduleValue4.useToken;
|
||||
const TABLE_ROW_CONTENT_HEIGHT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_CONTENT_HEIGHT;
|
||||
const value17 = Reflect.apply(useToken, moduleValue4, [TABLE_ROW_CONTENT_HEIGHT]);
|
||||
const Math = global.Math;
|
||||
const value18 = value16 + Math.max(value15 * value17 - value17, 0);
|
||||
const length = property.length;
|
||||
const AppLauncherCommandOptionActionSheet = (require(11703) /* metro dependency 11703: AppLauncherCommandOptionActionSheet */).AppLauncherCommandOptionActionSheet;
|
||||
return (
|
||||
<AppLauncherCommandOptionActionSheet
|
||||
option={option}
|
||||
startExpanded={r15}
|
||||
onDismiss={onDismiss}
|
||||
scrollable={r15}
|
||||
>
|
||||
{r15 && ((AppLauncherListSearchBar) => <AppLauncherListSearchBar onChange={value8} />)((require(11704) /* metro dependency 11704: AppLauncherList */).AppLauncherListSearchBar)}
|
||||
{length === 0 ? ((AppLauncherListEmptyState) => <AppLauncherListEmptyState />)((require(11704) /* metro dependency 11704: AppLauncherList */).AppLauncherListEmptyState) : <FlashListWrapper scrollable={r15} contentContainerStyle={{paddingBottom: r16}} scrollIndicatorInsets={{bottom: r16}} keyExtractor={function(a0) {
|
||||
return '' + a0.choice.name + '_' + a0.originalIndex;
|
||||
}} data={property} renderItem={value9} ItemSeparatorComponent={value10} accessibilityRole="radiogroup" estimatedItemSize={value18} estimatedListSize={{height: value18 * property.length,
|
||||
width: width}} />}
|
||||
</AppLauncherCommandOptionActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun89722() { // fn#89722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11888:1046, offset: 0x0201bab2, size: 31 bytes, params: 1, frame: 11
|
||||
return ((a0) => (a0 ?? []).map(_fun89724))(option.choices);
|
||||
}
|
||||
|
||||
function _fun89725(a0) { // fn#89725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11888:1238, offset: 0x0201bb07, size: 89 bytes, params: 2, frame: 16
|
||||
let value = environment.__proto__;
|
||||
value = Reflect.apply((importDefault(6526) /* metro dependency 6526: AutocompleteUtils */).queryChoice, value,
|
||||
[{query: a0, choices: option.choices ?? [], limit: null}]);
|
||||
env0_4(value);
|
||||
}
|
||||
|
||||
function _fun89726({item, index}) { // fn#89726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11888:1363, offset: 0x0201bb60, size: 258 bytes, params: 2, frame: 22
|
||||
let r5 = env0_3 != null && index === env0_3.length - 1;
|
||||
const binding = env0_5;
|
||||
const originalIndex = item.originalIndex;
|
||||
const items2 = [styles.listItemContainer];
|
||||
items2[1] = index === 0 && styles.firstItem;
|
||||
r5 = r5 && styles.lastItem;
|
||||
items2[2] = r5;
|
||||
const FormRadioRow = (require(7972) /* metro dependency 7972: native */).FormRadioRow;
|
||||
return (
|
||||
<View style={items2}>
|
||||
<FormRadioRow
|
||||
style={[styles.listItem]}
|
||||
label={item.choice.displayName}
|
||||
align="right"
|
||||
selected={binding === originalIndex}
|
||||
onPress={onPress_89727}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun89728() { // fn#89728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11888:1736, offset: 0x0201bcb6, size: 62 bytes, params: 1, frame: 14
|
||||
const FormDivider = (require(7972) /* metro dependency 7972: native */).FormDivider;
|
||||
return <FormDivider style={styles.divider} />;
|
||||
}
|
||||
|
||||
function toChoicesWithIndex(a0) { // fn#89723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11888:1050, offset: 0x0201bad1, size: 34 bytes, params: 2, frame: 11
|
||||
return (a0 ?? []).map(function(a0, a1) {
|
||||
return {choice: a0, originalIndex: a1};
|
||||
});
|
||||
}
|
||||
|
||||
function onPress_89727() { // fn#89727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11888:1622, offset: 0x0201bc62, size: 84 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
const binding = env1_6;
|
||||
const itemBinding = item;
|
||||
binding(itemBinding.originalIndex);
|
||||
onChoiceSelect(itemBinding.choice, itemBinding.originalIndex);
|
||||
value = environment.__proto__.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
/* Metro module 11701; source: modules/app_launcher/native/options/choices/AppLauncherChoicesOption.tsx; dependencies: [57, 31, 33, 4501, 697, 1848, 4080, 11702, 1962, 11706, 7972, 4573, 2] */
|
||||
function _fun89713(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11887:6, offset: 0x0201b0b6, size: 255 bytes, params: 8, frame: 22
|
||||
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(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object = {};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object.alignItems = 'center';
|
||||
object.padding = 12;
|
||||
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{container: object}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/options/choices/AppLauncherChoicesOption.tsx');
|
||||
exports.default = AppLauncherChoicesOption;
|
||||
}
|
||||
|
||||
function AppLauncherChoicesOption({style, option, initialValue, onSelect, onOpenChoicesSheet, onDismissChoicesSheet, autoFocus, hasError}) { // fn#89714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11887:401, offset: 0x0201b1b5, size: 502 bytes, params: 2, frame: 26
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const env0_3 = onOpenChoicesSheet;
|
||||
const env0_4 = onDismissChoicesSheet;
|
||||
const styles = useStyles();
|
||||
const binding = env0_4;
|
||||
const [property, env0_6] = env0_3(binding.useState(function() {
|
||||
var r3;
|
||||
var object;
|
||||
if (initialValue != null) {
|
||||
if (initialValue.type !== 'text') {
|
||||
return undefined;
|
||||
}
|
||||
r3 = option.choices?.find(_fun89716);
|
||||
if (r3 != null) {
|
||||
object = {choice: r3};
|
||||
object.index = option.choices.indexOf(r3);
|
||||
return object;
|
||||
}
|
||||
}
|
||||
}), 2);
|
||||
const value6 = binding.useCallback(_fun89717, [onDismissChoicesSheet, onOpenChoicesSheet, onSelect, option,
|
||||
property?.index]);
|
||||
(require(11706) /* metro dependency 11706: useAnimationDelayedAutoFocus */).useAnimationDelayedAutoFocus(autoFocus,
|
||||
value6);
|
||||
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
|
||||
const formRowProps2 = {'start': true, 'end': true, style: [styles.container, style], hasError: hasError,
|
||||
label: <Text variant={property == null ? 'text-md/medium' : 'text-sm/medium'} color={property == null ? 'text-default' : 'interactive-text-default'} lineClamp={1}>{option.displayName}</Text>,
|
||||
subLabel: property != null ? <Text variant="text-md/medium" color="text-default" lineClamp={1}>{property.choice.displayName}</Text> : null};
|
||||
const FormArrow = (require(7972) /* metro dependency 7972: native */).FormArrow;
|
||||
formRowProps2.trailing = <FormArrow />;
|
||||
formRowProps2.onPress = value6;
|
||||
return <FormRow {...formRowProps2} />;
|
||||
}
|
||||
|
||||
function _fun89715() { // fn#89715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11887:573, offset: 0x0201b3ab, size: 111 bytes, params: 1, frame: 14
|
||||
var r3;
|
||||
var object2;
|
||||
if (initialValue != null) {
|
||||
if (initialValue.type !== 'text') {
|
||||
return undefined;
|
||||
}
|
||||
r3 = option.choices?.find(function({displayName}) {
|
||||
return displayName === initialValue.text;
|
||||
});
|
||||
if (r3 != null) {
|
||||
object2 = {choice: r3};
|
||||
object2.index = option.choices.indexOf(r3);
|
||||
return object2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun89717() { // fn#89717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11887:777, offset: 0x0201b434, size: 176 bytes, params: 1, frame: 18
|
||||
const onOpenChoicesSheetBinding = onOpenChoicesSheet;
|
||||
const value2 = undefined;
|
||||
onOpenChoicesSheetBinding();
|
||||
require(dependencyMap[5]).dismissGlobalKeyboard();
|
||||
const defaultImport = importDefault(dependencyMap[6]);
|
||||
defaultImport.openLazy(require(dependencyMap[8])(dependencyMap[7], dependencyMap.paths),
|
||||
'AppLauncherChoicesActionSheet', {option: option, initChoiceIndex: env0_5 == null ? value2 : env0_5.index,
|
||||
onChoiceSelect: onChoiceSelect, onDismiss: onDismissChoicesSheet});
|
||||
return value2;
|
||||
}
|
||||
|
||||
function onChoiceSelect(a0, a1) { // fn#89718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11887:953, offset: 0x0201b4e4, size: 42 bytes, params: 3, frame: 13
|
||||
env1_6({choice: a0, index: a1});
|
||||
onSelect(a0);
|
||||
}
|
||||
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
/* Metro module 11719; source: modules/app_launcher/native/options/mentionable/AppLauncherMentionableListActionSheet.tsx; dependencies: [57, 31, 661, 33, 5065, 6526, 4080, 11703, 11704, 7707, 4573, 3995, 11720, 6589, 11716, 11717, 6238, 2] */
|
||||
function _fun89809(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11905:6, offset: 0x0201f56d, size: 243 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/options/mentionable/AppLauncherMentionableListActionSheet.tsx');
|
||||
exports.default = AppLauncherMentionableListActionSheet;
|
||||
exports.APP_LAUNCHER_MENTIONABLE_LIST_ACTION_SHEET_KEY = 'AppLauncherMentionableListActionSheet';
|
||||
exports.MentionableItemTypes = {USER: 'user', ROLE: 'role', GLOBAL: 'global'};
|
||||
}
|
||||
|
||||
function AppLauncherMentionableListActionSheet({onMentionablePress, onActionSheetDismiss, channel, option}) { // fn#89810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11905:421, offset: 0x0201f660, size: 405 bytes, params: 2, frame: 24
|
||||
const env0_3 = option;
|
||||
const binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value2 = Reflect.apply(useState, binding, ['']);
|
||||
const binding2 = env0_3;
|
||||
const value3 = binding2(value2, 2);
|
||||
const property = value3[0];
|
||||
const env0_5 = value3[1];
|
||||
const value4 = binding.useRef(null);
|
||||
useState = binding.useState;
|
||||
const value5 = binding2(Reflect.apply(useState, binding, [[]]), 2);
|
||||
const property2 = value5[0];
|
||||
const env0_8 = value5[1];
|
||||
const env0_9 = channel.guild_id;
|
||||
const length = property2.length;
|
||||
binding.useEffect(_fun89811, [property, option, channel]);
|
||||
const AppLauncherCommandOptionActionSheet = (require(11703) /* metro dependency 11703: AppLauncherCommandOptionActionSheet */).AppLauncherCommandOptionActionSheet;
|
||||
const AppLauncherListSearchBar = (require(11704) /* metro dependency 11704: AppLauncherList */).AppLauncherListSearchBar;
|
||||
return (
|
||||
<AppLauncherCommandOptionActionSheet option={option} onDismiss={onActionSheetDismiss}>
|
||||
<AppLauncherListSearchBar onChange={onChange_89815} />
|
||||
{length === 0 ? ((AppLauncherListEmptyState) => <AppLauncherListEmptyState />)((require(11704) /* metro dependency 11704: AppLauncherList */).AppLauncherListEmptyState) : ((AppLauncherList) => <AppLauncherList ref={value4} data={property2} renderItem={renderItem_89816} />)((require(11704) /* metro dependency 11704: AppLauncherList */).AppLauncherList)}
|
||||
</AppLauncherCommandOptionActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun89811() { // fn#89811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11905:683, offset: 0x0201f7f5, size: 283 bytes, params: 1, frame: 19
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const applicationCommandOptionQueryOptions = (require(5065) /* metro dependency 5065: ApplicationCommandUtils */).getApplicationCommandOptionQueryOptions(option);
|
||||
value = Reflect.apply((importDefault(6526) /* metro dependency 6526: AutocompleteUtils */).queryMentionResults,
|
||||
value, [{query: env0_4, channel: channel,
|
||||
canMentionEveryone: applicationCommandOptionQueryOptions.canMentionEveryone,
|
||||
canMentionHere: applicationCommandOptionQueryOptions.canMentionHere,
|
||||
canMentionUsers: applicationCommandOptionQueryOptions.canMentionUsers,
|
||||
canMentionRoles: applicationCommandOptionQueryOptions.canMentionRoles,
|
||||
includeAllGuildUsers: applicationCommandOptionQueryOptions.canMentionAnyGuildUser,
|
||||
includeNonMentionableRoles: applicationCommandOptionQueryOptions.canMentionNonMentionableRoles, request: true,
|
||||
limit: 10, allowSnowflake: true}]);
|
||||
const binding = env0_8;
|
||||
const users = value.users;
|
||||
const value4 = users.map(_fun89812);
|
||||
items = [];
|
||||
const value5 = arraySpread(items, value4, 0, undefined);
|
||||
const roles = value.roles;
|
||||
const value6 = arraySpread(items, roles.map(_fun89813), value5, roles);
|
||||
const globals = value.globals;
|
||||
arraySpread(items, globals.map(_fun89814), value6, roles);
|
||||
binding(items);
|
||||
}
|
||||
|
||||
function AppLauncherMentionableListActionSheetRenderItem({item, index}) { // fn#89816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11905:1547, owner: AppLauncherMentionableListActionSheet.renderItem, offset: 0x0201f9a8, size: 659 bytes, params: 2, frame: 23
|
||||
var r9;
|
||||
var result;
|
||||
var text;
|
||||
var TableRow;
|
||||
var object2;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var user;
|
||||
const object4 = {onPress: function() {
|
||||
onMentionablePress({mentionable: item});
|
||||
importDefault(dependencyMap[6]).hideActionSheet('AppLauncherMentionableListActionSheet');
|
||||
onActionSheetDismiss();
|
||||
}, start: index === 0};
|
||||
var value;
|
||||
object4.end = index === env0_7.length - 1;
|
||||
const type = item.type;
|
||||
const USER = env1_8.USER;
|
||||
if (USER === type) {
|
||||
result = item.result;
|
||||
user = result.user;
|
||||
return ((Component) => <Component type={RelationshipTypes.NONE} user={user} nickname={result.nick} guildId={guild_id} subLabel={<Text color="text-subtle" variant="text-xs/normal">{(require(3995) /* metro dependency 3995: UserUtils */).getUserTag(user)}</Text>} {...object4} key={user.id} />)(importDefault(7707) /* metro dependency 7707: UserRow */);
|
||||
}
|
||||
const ROLE = env1_8.ROLE;
|
||||
if (ROLE === type) {
|
||||
result = item.result;
|
||||
const RoleRow = (require(11720) /* metro dependency 11720: AppLauncherRoleListActionSheet */).RoleRow;
|
||||
return (
|
||||
<RoleRow
|
||||
guildRole={result}
|
||||
guildId={guild_id}
|
||||
{...object4}
|
||||
key={result.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
const GLOBAL = env1_8.GLOBAL;
|
||||
if (GLOBAL === type) {
|
||||
result = item.result;
|
||||
text = result.text;
|
||||
value = importDefault(6589) /* metro dependency 6589: AutocompleteUtils */;
|
||||
if (text === value.MENTION_EVERYONE().text) {
|
||||
const RoleIcon = (require(11720) /* metro dependency 11720: AppLauncherRoleListActionSheet */).RoleIcon;
|
||||
r9 = <RoleIcon />;
|
||||
} else {
|
||||
value = importDefault(11716) /* metro dependency 11716: AppLauncherOptionIcon */;
|
||||
value = ((Component) => <Component icon={((UserCircleIcon) => <UserCircleIcon size="sm" color="interactive-text-default" />)((require(11717) /* metro dependency 11717: UserCircleIcon */).UserCircleIcon)} />)(value);
|
||||
r9 = value;
|
||||
}
|
||||
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
object2 = {};
|
||||
text = result.text;
|
||||
object2.label = <Text lineClamp={1} variant="text-md/semibold" color="mobile-text-heading-primary">{text}</Text>;
|
||||
object2.icon = r9;
|
||||
copyDataProperties(object2, object4, undefined);
|
||||
text = result.text;
|
||||
return <TableRow {...object2} key={text} />;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun89812(a0) { // fn#89812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11905:1098, offset: 0x0201f910, size: 29 bytes, params: 2, frame: 2
|
||||
const USER = env2_8.USER;
|
||||
return {type: USER, result: a0};
|
||||
}
|
||||
|
||||
function _fun89813(a0) { // fn#89813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11905:1144, offset: 0x0201f92d, size: 29 bytes, params: 2, frame: 2
|
||||
const ROLE = env2_8.ROLE;
|
||||
return {type: ROLE, result: a0};
|
||||
}
|
||||
|
||||
function _fun89814(a0) { // fn#89814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11905:1192, offset: 0x0201f94a, size: 29 bytes, params: 2, frame: 2
|
||||
const GLOBAL = env2_8.GLOBAL;
|
||||
return {type: GLOBAL, result: a0};
|
||||
}
|
||||
|
||||
+156
@@ -0,0 +1,156 @@
|
||||
/* Metro module 11715; source: modules/app_launcher/native/options/mentionable/AppLauncherMentionableOption.tsx; dependencies: [57, 31, 4502, 1938, 1878, 482, 33, 4501, 697, 566, 11716, 11717, 11719, 1305, 11720, 11721, 11713, 4080, 11719, 1962, 2] */
|
||||
function _fun89795(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11901:6, offset: 0x0201ebd2, size: 301 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 accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_8 = (require(482) /* metro dependency 482: Constants */).StatusTypes;
|
||||
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
|
||||
const env0_10 = Reflect.apply(createStyles, createStylesModule,
|
||||
[{iconWrapper: {backgroundColor: BACKGROUND_MOD_SUBTLE}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/options/mentionable/AppLauncherMentionableOption.tsx');
|
||||
exports.default = AppLauncherMentionableOption;
|
||||
}
|
||||
|
||||
function MentionableIcon({mentionable, guildId}) { // fn#89796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11901:275, offset: 0x0201ecff, size: 423 bytes, params: 2, frame: 22
|
||||
const styles = useStyles();
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const AppLauncherOptionIcon = importDefault(11716) /* metro dependency 11716: AppLauncherOptionIcon */;
|
||||
const UserCircleIcon = (require(11717) /* metro dependency 11717: UserCircleIcon */).UserCircleIcon;
|
||||
const appLauncherOptionIcon = <AppLauncherOptionIcon icon={<UserCircleIcon size="sm" color="interactive-text-default" />} wrapperStyle={styles.iconWrapper} />;
|
||||
if (mentionable != null) {
|
||||
var type = mentionable.type;
|
||||
var MentionableItemTypes = (require(11719) /* metro dependency 11719: AppLauncherMentionableListActionSheet */).MentionableItemTypes;
|
||||
var USER = MentionableItemTypes.USER;
|
||||
if (USER === type) {
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
return (
|
||||
<Avatar
|
||||
user={mentionable.result.user}
|
||||
guildId={guildId}
|
||||
animate={!useReducedMotion}
|
||||
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32}
|
||||
/>
|
||||
);
|
||||
}
|
||||
MentionableItemTypes = (require(11719) /* metro dependency 11719: AppLauncherMentionableListActionSheet */).MentionableItemTypes;
|
||||
var ROLE = MentionableItemTypes.ROLE;
|
||||
if (ROLE === type) {
|
||||
const RoleIcon = (require(11720) /* metro dependency 11720: AppLauncherRoleListActionSheet */).RoleIcon;
|
||||
return <RoleIcon role={mentionable.result} />;
|
||||
}
|
||||
MentionableItemTypes = (require(11719) /* metro dependency 11719: AppLauncherMentionableListActionSheet */).MentionableItemTypes;
|
||||
MentionableItemTypes.GLOBAL;
|
||||
}
|
||||
return appLauncherOptionIcon;
|
||||
}
|
||||
|
||||
function AppLauncherMentionableOption({style, option, initialValue, onMentionablePress, onActionSheetDismiss, channel, autoFocus, hasError, onPress}) { // fn#89798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11901:988, offset: 0x0201eea6, size: 344 bytes, params: 2, frame: 23
|
||||
const env0_4 = channel;
|
||||
const guild_id = channel.guild_id;
|
||||
const binding = env0_4;
|
||||
const [property, env0_8] = onActionSheetDismiss(binding.useState(_fun89799), 2);
|
||||
binding.useEffect(_fun89800, [onMentionablePress, option.name, initialValue, property]);
|
||||
return ((Component) => <Component style={style} option={option} hasError={hasError} selected={property != null} selectedItemName={property != null ? binding.useMemo(_fun89801,
|
||||
[property,
|
||||
guild_id]) : undefined} leading={<MentionableIcon mentionable={property} guildId={guild_id} />} onPress={onPress_89802} autoFocus={autoFocus} />)(importDefault(11713) /* metro dependency 11713: AppLauncherSelectOptionFormRow */);
|
||||
}
|
||||
|
||||
function _fun89799() { // fn#89799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11901:1179, offset: 0x0201effe, size: 359 bytes, params: 1, frame: 17
|
||||
var object3;
|
||||
const MentionableItemTypes = (require(11719) /* metro dependency 11719: AppLauncherMentionableListActionSheet */).MentionableItemTypes;
|
||||
var value3;
|
||||
var value4;
|
||||
var value;
|
||||
if (initialValue == null) {
|
||||
return null;
|
||||
}
|
||||
if (initialValue.type === 'roleMention') {
|
||||
value4 = environment.__proto__;
|
||||
value = GuildRoleStore.getRole(guild_id, initialValue.roleId);
|
||||
if (value != null) {
|
||||
return {type: MentionableItemTypes.ROLE, result: value};
|
||||
}
|
||||
return null;
|
||||
}
|
||||
if (initialValue.type === 'userMention') {
|
||||
value3 = environment.__proto__;
|
||||
value = UserStore.getUser(initialValue.userId);
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
object3 = {};
|
||||
object3.type = MentionableItemTypes.USER;
|
||||
object3.result = {user: value, score: 0, status: StatusTypes.UNKNOWN, nick: ''};
|
||||
} else {
|
||||
if (initialValue.type !== 'textMention') {
|
||||
return null;
|
||||
}
|
||||
object3 = {};
|
||||
var GLOBAL = MentionableItemTypes.GLOBAL;
|
||||
object3.type = GLOBAL;
|
||||
var object4 = {};
|
||||
initialValueBinding = initialValue;
|
||||
var text = initialValueBinding.text;
|
||||
object4.text = text;
|
||||
text = initialValueBinding.text;
|
||||
object4.test = text;
|
||||
object4.description = '';
|
||||
object3.result = object4;
|
||||
}
|
||||
return object3;
|
||||
}
|
||||
|
||||
function _fun89800() { // fn#89800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11901:1664, offset: 0x0201f165, size: 49 bytes, params: 1, frame: 12
|
||||
if (initialValue != null && env0_7 == null) {
|
||||
onMentionablePress({mentionable: null});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun89801() { // fn#89801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11901:1744, offset: 0x0201f196, size: 231 bytes, params: 1, frame: 17
|
||||
if (env0_7 == null) {
|
||||
return null;
|
||||
}
|
||||
const type = env0_7.type;
|
||||
const MentionableItemTypes = (require(11719) /* metro dependency 11719: AppLauncherMentionableListActionSheet */).MentionableItemTypes;
|
||||
const USER = MentionableItemTypes.USER;
|
||||
if (USER === type) {
|
||||
return ((Component) => <Component guildId={guild_id} user={env0_7.result.user} />)(importDefault(11721) /* metro dependency 11721: UsernameText */);
|
||||
}
|
||||
const ROLE = MentionableItemTypes.ROLE;
|
||||
if (ROLE === type) {
|
||||
return env0_7.result.name;
|
||||
}
|
||||
const GLOBAL = MentionableItemTypes.GLOBAL;
|
||||
if (GLOBAL === type) {
|
||||
return env0_7.result.text;
|
||||
}
|
||||
}
|
||||
|
||||
function AppLauncherMentionableOptionOnPress() { // fn#89802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11901:2178, owner: AppLauncherMentionableOption.onPress, offset: 0x0201f27d, size: 157 bytes, params: 1, frame: 19
|
||||
if (onPress != null) {
|
||||
onPress();
|
||||
}
|
||||
const defaultImport = importDefault(dependencyMap[17]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
const value3 = require(dependencyMap[19])(dependencyMap[18], dependencyMap.paths);
|
||||
const APP_LAUNCHER_MENTIONABLE_LIST_ACTION_SHEET_KEY = require(dependencyMap[12]).APP_LAUNCHER_MENTIONABLE_LIST_ACTION_SHEET_KEY;
|
||||
Reflect.apply(openLazy, defaultImport, [value3, APP_LAUNCHER_MENTIONABLE_LIST_ACTION_SHEET_KEY, {option: option,
|
||||
channel: channel, onMentionablePress: onMentionablePress_89803, onActionSheetDismiss: onActionSheetDismiss}]);
|
||||
}
|
||||
|
||||
function onPressOnMentionablePress({mentionable}) { // fn#89803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11901:2333, owner: AppLauncherMentionableOption.onPress.onMentionablePress, offset: 0x0201f31a, size: 41 bytes, params: 2, frame: 12
|
||||
env1_8(mentionable);
|
||||
onMentionablePress({mentionable: mentionable});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
/* Metro module 11720; source: modules/app_launcher/native/options/role/AppLauncherRoleListActionSheet.tsx; dependencies: [57, 31, 6737, 1939, 1938, 661, 33, 11716, 9097, 566, 6738, 6238, 4573, 6699, 6590, 4080, 11703, 11704, 2] */
|
||||
function _fun89818(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11906:6, offset: 0x0201fc89, size: 304 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const getRoleColor = function(a0) {
|
||||
return a0.colorString ?? DEFAULT_ROLE_COLOR_HEX;
|
||||
};
|
||||
const closure = RoleIcon_89820;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
const guildRoleMemberCountStore = importDefault(6737) /* metro dependency 6737: GuildRoleMemberCountStore */;
|
||||
const env0_7 = (require(1939) /* metro dependency 1939: GuildRoleRecord */).isEveryoneRole;
|
||||
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
const env0_9 = (require(661) /* metro dependency 661: Constants */).DEFAULT_ROLE_COLOR_HEX;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
const closure2 = RoleRow;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/options/role/AppLauncherRoleListActionSheet.tsx');
|
||||
exports.default = AppLauncherRoleListActionSheet;
|
||||
exports.APP_LAUNCHER_ROLE_LIST_ACTION_SHEET_KEY = 'AppLauncherRoleListActionSheet';
|
||||
exports.RoleIcon = closure;
|
||||
exports.RoleRow = closure2;
|
||||
}
|
||||
|
||||
function RoleIcon_89820({role}) { // fn#89820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11906:324, offset: 0x0201fdd9, size: 151 bytes, params: 2, frame: 20
|
||||
var r4;
|
||||
let object2 = {};
|
||||
if (role == null) {
|
||||
r4 = object2;
|
||||
} else {
|
||||
object2 = {};
|
||||
object2.backgroundColor = getRoleColor(role);
|
||||
r4 = object2;
|
||||
}
|
||||
const AppLauncherOptionIcon = importDefault(11716) /* metro dependency 11716: AppLauncherOptionIcon */;
|
||||
const ShieldUserIcon = (require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon;
|
||||
return (
|
||||
<AppLauncherOptionIcon
|
||||
icon={<ShieldUserIcon size="sm" color={role != null ? 'white' : 'interactive-text-default'} />}
|
||||
wrapperStyle={r4}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function RoleRow(a0) { // fn#89821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11906:547, offset: 0x0201fe70, size: 409 bytes, params: 2, frame: 25
|
||||
var object2;
|
||||
var r6;
|
||||
const guildRole = a0.guildRole;
|
||||
const guildId = a0.guildId;
|
||||
let value = null;
|
||||
const value2 = Object.create(value);
|
||||
value2.guildRole = 0;
|
||||
value2.guildId = 0;
|
||||
const value3 = copyDataProperties({}, a0, value2, undefined);
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleMemberCountStore],
|
||||
function() {
|
||||
return GuildRoleMemberCountStore.getRoleMemberCount(guildId)?.[guildRole.id];
|
||||
});
|
||||
const isEveryoneRole2 = isEveryoneRole(guildRole);
|
||||
env0_5.useEffect(_fun89823, [guildId]);
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
object2 = {};
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
object2.label = <Text lineClamp={1} variant="text-md/semibold" color="mobile-text-heading-primary">{guildRole.name}</Text>;
|
||||
object2.icon = <RoleIcon_89820 role={guildRole} />;
|
||||
if (isEveryoneRole2) {
|
||||
r6 = value;
|
||||
} else if (value == value5) {
|
||||
r6 = value;
|
||||
} else {
|
||||
const GroupIcon = (require(6699) /* metro dependency 6699: GroupIcon */).GroupIcon;
|
||||
value = <GroupIcon size="xxs" color="text-muted" />;
|
||||
value = <Text variant="text-sm/normal" color="text-muted">{value}{' '}{value5}</Text>;
|
||||
r6 = value;
|
||||
}
|
||||
object2.trailing = r6;
|
||||
copyDataProperties(object2, value3, value2);
|
||||
return <TableRow {...object2} key={guildRole.id} />;
|
||||
}
|
||||
|
||||
function AppLauncherRoleListActionSheet({onRolePress, onActionSheetDismiss, channel, option}) { // fn#89824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11906:1212, offset: 0x02020069, size: 418 bytes, params: 2, frame: 24
|
||||
const env0_2 = channel.guild_id;
|
||||
const binding = env0_5;
|
||||
const [property, env0_4] = env0_4Binding(binding.useState(''), 2);
|
||||
const value4 = binding.useRef(null);
|
||||
const value5 = binding.useMemo(function() {
|
||||
return sortedRoles.filter(_fun89827);
|
||||
}, [(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore], function() {
|
||||
return GuildRoleStore.getSortedRoles(guild_id);
|
||||
}), property]);
|
||||
const length = value5.length;
|
||||
const handleRolePress = function({role}) {
|
||||
onRolePress({role: role});
|
||||
importDefault(dependencyMap[15]).hideActionSheet('AppLauncherRoleListActionSheet');
|
||||
onActionSheetDismiss();
|
||||
};
|
||||
const AppLauncherCommandOptionActionSheet = (require(11703) /* metro dependency 11703: AppLauncherCommandOptionActionSheet */).AppLauncherCommandOptionActionSheet;
|
||||
const AppLauncherListSearchBar = (require(11704) /* metro dependency 11704: AppLauncherList */).AppLauncherListSearchBar;
|
||||
return (
|
||||
<AppLauncherCommandOptionActionSheet option={option} onDismiss={onActionSheetDismiss}>
|
||||
<AppLauncherListSearchBar onChange={onChange_89829} />
|
||||
{length === 0 ? ((AppLauncherListEmptyState) => <AppLauncherListEmptyState />)((require(11704) /* metro dependency 11704: AppLauncherList */).AppLauncherListEmptyState) : ((AppLauncherList) => <AppLauncherList ref={value4} data={value5} renderItem={renderItem_89830} />)((require(11704) /* metro dependency 11704: AppLauncherList */).AppLauncherList)}
|
||||
</AppLauncherCommandOptionActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun89823() { // fn#89823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11906:715, offset: 0x0202003c, size: 45 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__;
|
||||
value = importAll(6738) /* metro dependency 6738: GuildRoleMemberActionCreators */;
|
||||
value.fetchMemberCounts(guildId);
|
||||
}
|
||||
|
||||
function _fun89826() { // fn#89826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11906:1458, offset: 0x02020226, size: 28 bytes, params: 1, frame: 11
|
||||
return sortedRoles.filter(_fun89827);
|
||||
}
|
||||
|
||||
function AppLauncherRoleListActionSheetOnChange(a0) { // fn#89829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11906:1756, owner: AppLauncherRoleListActionSheet.onChange, offset: 0x020202e6, size: 65 bytes, params: 2, frame: 12
|
||||
env0_4(a0.toLowerCase());
|
||||
const current = env0_5.current;
|
||||
if (current != null) {
|
||||
current.scrollToOffset({'offset': 0, 'animated': false});
|
||||
}
|
||||
}
|
||||
|
||||
function AppLauncherRoleListActionSheetRenderItem({item, index}) { // fn#89830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11906:1945, owner: AppLauncherRoleListActionSheet.renderItem, offset: 0x02020327, size: 103 bytes, params: 2, frame: 17
|
||||
return (
|
||||
<RoleRow
|
||||
guildId={guild_id}
|
||||
guildRole={item}
|
||||
onPress={function() {
|
||||
handleRolePress({role: item});
|
||||
}}
|
||||
start={index === 0}
|
||||
end={index === env0_7.length - 1}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun89827(a0) { // fn#89827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11906:1472, offset: 0x02020242, size: 84 bytes, params: 2, frame: 15
|
||||
var r0;
|
||||
var value3;
|
||||
var defaultImport;
|
||||
var name;
|
||||
let value = environment.__proto__;
|
||||
const value2 = env1_3 === a0.id;
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
} else {
|
||||
value3 = environment.__proto__.__proto__;
|
||||
defaultImport = importDefault(6590) /* metro dependency 6590 */;
|
||||
value = env1_3.trim();
|
||||
name = a0.name;
|
||||
value = defaultImport(value, name.toLowerCase());
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/* Metro module 11722; source: modules/app_launcher/native/options/role/AppLauncherRoleOption.tsx; dependencies: [57, 31, 1938, 33, 632, 11713, 4080, 11720, 1962, 11720, 2] */
|
||||
function _fun89834(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11908:6, offset: 0x02020611, size: 174 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 guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/options/role/AppLauncherRoleOption.tsx');
|
||||
exports.default = AppLauncherRoleOption;
|
||||
}
|
||||
|
||||
function AppLauncherRoleOption({style, option, initialValue, onRolePress, onActionSheetDismiss, channel, autoFocus, hasError, onPress}) { // fn#89835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11908:251, offset: 0x020206bf, size: 384 bytes, params: 2, frame: 24
|
||||
const env0_4 = channel;
|
||||
const env0_6 = channel.guild_id;
|
||||
const binding = env0_4;
|
||||
const [property, env0_8] = onActionSheetDismiss(binding.useState(function() {
|
||||
var initialValueBinding = initialValue;
|
||||
var value2 = null;
|
||||
return value2 != initialValueBinding ? initialValue.type !== 'roleMention' ? value2 : initialValue.roleId : value2;
|
||||
}), 2);
|
||||
const value5 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildRoleStore],
|
||||
_fun89837);
|
||||
binding.useEffect(_fun89838, [onRolePress, option.name, value5, property]);
|
||||
const AppLauncherSelectOptionFormRow = importDefault(11713) /* metro dependency 11713: AppLauncherSelectOptionFormRow */;
|
||||
const defaultImportProps = {style: style, option: option, hasError: hasError, selected: value5 != null,
|
||||
selectedItemName: value5?.name, onPress: onPress_89839};
|
||||
const RoleIcon = (require(11720) /* metro dependency 11720: AppLauncherRoleListActionSheet */).RoleIcon;
|
||||
defaultImportProps.leading = <RoleIcon role={value5} />;
|
||||
defaultImportProps.autoFocus = autoFocus;
|
||||
return <AppLauncherSelectOptionFormRow {...defaultImportProps} />;
|
||||
}
|
||||
|
||||
function _fun89837() { // fn#89837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11908:537, offset: 0x02020870, size: 59 bytes, params: 1, frame: 14
|
||||
if (env0_7 != null) {
|
||||
return guild_id != null ? GuildRoleStore.getRole(guild_id, env0_7) : undefined;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun89838() { // fn#89838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11908:613, offset: 0x020208ab, size: 49 bytes, params: 1, frame: 12
|
||||
if (env0_7 != null && env0_9 == null) {
|
||||
onRolePress({role: null});
|
||||
}
|
||||
}
|
||||
|
||||
function AppLauncherRoleOptionOnPress() { // fn#89839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11908:772, owner: AppLauncherRoleOption.onPress, offset: 0x020208dc, size: 157 bytes, params: 1, frame: 19
|
||||
if (onPress != null) {
|
||||
onPress();
|
||||
}
|
||||
const defaultImport = importDefault(dependencyMap[6]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
const value3 = require(dependencyMap[8])(dependencyMap[7], dependencyMap.paths);
|
||||
const APP_LAUNCHER_ROLE_LIST_ACTION_SHEET_KEY = require(dependencyMap[9]).APP_LAUNCHER_ROLE_LIST_ACTION_SHEET_KEY;
|
||||
Reflect.apply(openLazy, defaultImport, [value3, APP_LAUNCHER_ROLE_LIST_ACTION_SHEET_KEY, {option: option,
|
||||
channel: channel, onRolePress: onRolePress_89840, onActionSheetDismiss: onActionSheetDismiss}]);
|
||||
}
|
||||
|
||||
function onPressOnRolePress({role}) { // fn#89840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11908:909, owner: AppLauncherRoleOption.onPress.onRolePress, offset: 0x02020979, size: 46 bytes, params: 2, frame: 13
|
||||
env1_8(role.id);
|
||||
onRolePress({role: role});
|
||||
}
|
||||
|
||||
+167
@@ -0,0 +1,167 @@
|
||||
/* Metro module 11709; source: modules/app_launcher/native/options/text_input/AppLauncherTextInputOption.tsx; dependencies: [57, 31, 27, 1881, 33, 4501, 697, 8774, 1909, 8535, 11706, 8048, 1305, 11710, 477, 11711, 1848, 8529, 2] */
|
||||
function _fun89765(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11895:6, offset: 0x0201d5a0, size: 381 bytes, params: 8, frame: 22
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_6 = (require(1881) /* metro dependency 1881: EmojiConstants */).EmojiIntention;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {'width': '100%', 'backgroundColor': null, 'borderRadius': null, 'padding': 14, 'borderWidth': 2,
|
||||
'borderColor': 'transparent', 'flexDirection': 'row', 'alignItems': 'center'};
|
||||
const INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
|
||||
object4.backgroundColor = INPUT_BACKGROUND_DEFAULT;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object3.container = object4;
|
||||
const BORDER_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_FEEDBACK_CRITICAL;
|
||||
object3.hasError = {borderColor: BORDER_FEEDBACK_CRITICAL};
|
||||
object3.stringOptionInput = {'maxHeight': 100, 'flex': 1, 'padding': 0, 'paddingTop': 0};
|
||||
object3.expressionButton = {'marginVertical': -8, 'marginRight': -8};
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/options/text_input/AppLauncherTextInputOption.tsx');
|
||||
exports.default = AppLauncherTextInputOption;
|
||||
}
|
||||
|
||||
function AppLauncherTextInputOption({option, onChangeText, onFocus, onEndEditing, guildId, style, autoFocus, initialValue, hasError, onPressIn}) { // fn#89766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11895:712, offset: 0x0201d71d, size: 892 bytes, params: 2, frame: 33
|
||||
var r5;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const binding = env0_4;
|
||||
var [property, env0_4] = env0_3(binding.useState(function() {
|
||||
var initialValueBinding = initialValue;
|
||||
var value2 = '';
|
||||
return initialValueBinding != null ? initialValue.type !== 'text' ? value2 : initialValue.text : value2;
|
||||
}), 2);
|
||||
const appLauncherContextModule = require(8774) /* metro dependency 8774: AppLauncherContext */;
|
||||
const useAppLauncherContext = appLauncherContextModule.useAppLauncherContext;
|
||||
const entrypoint = Reflect.apply(useAppLauncherContext, appLauncherContextModule, []).entrypoint;
|
||||
const env0_5 = binding.useRef({'start': 0, 'end': 0});
|
||||
const value5 = binding.useRef(null);
|
||||
let type = option.type;
|
||||
const ApplicationCommandOptionType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType;
|
||||
let STRING = ApplicationCommandOptionType.STRING;
|
||||
const value6 = type === STRING;
|
||||
const value7 = binding.useCallback(_fun89768, [onChangeText]);
|
||||
const env0_9 = binding.useCallback(_fun89769, [value7, property]);
|
||||
const env0_10 = binding.useCallback(_fun89770, []);
|
||||
binding.useEffect(_fun89771, [guildId, value6]);
|
||||
(require(11706) /* metro dependency 11706: useAnimationDelayedAutoFocus */).useAnimationDelayedAutoFocus(autoFocus,
|
||||
_fun89772);
|
||||
const AppLauncherEntrypoint = (require(8048) /* metro dependency 8048: AppLauncherTypes */).AppLauncherEntrypoint;
|
||||
const VOICE = AppLauncherEntrypoint.VOICE;
|
||||
const r8 = entrypoint === VOICE ? (require(1305) /* metro dependency 1305: native */).TextInput : importDefault(11710) /* metro dependency 11710: BottomSheetTextInput */;
|
||||
const items2 = [styles.container];
|
||||
hasError = hasError && styles.hasError;
|
||||
items2[1] = hasError;
|
||||
items2[2] = style;
|
||||
const r8Props = {ref: value5, autoFocus: false, value: property, style: styles.stringOptionInput};
|
||||
type = option.type;
|
||||
STRING = ApplicationCommandOptionType.STRING;
|
||||
r8Props.maxLength = type !== STRING ? undefined : option.maxLength;
|
||||
r8Props.autoComplete = 'off';
|
||||
r8Props.onChangeText = value7;
|
||||
r8Props.onSelectionChange = onSelectionChange_89773;
|
||||
r8Props.onFocus = onFocus;
|
||||
r8Props.onEndEditing = onEndEditing;
|
||||
r8Props.textAlignVertical = 'center';
|
||||
r8Props.returnKeyType = 'done';
|
||||
r8Props.multiline = true;
|
||||
type = option.type;
|
||||
const INTEGER = ApplicationCommandOptionType.INTEGER;
|
||||
r8Props.keyboardType = type === INTEGER ? (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 'numeric' : 'numbers-and-punctuation' : option.type !== (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType.NUMBER ? 'default' : (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 'numeric' : 'numbers-and-punctuation';
|
||||
r8Props.onPressIn = onPressIn;
|
||||
const value11 = ((Component) => <Component {...r8Props} />)(r8);
|
||||
if (value6) {
|
||||
value = importDefault(11711) /* metro dependency 11711: ChatInputExpressionButton */;
|
||||
value = ((Component) => <Component style={styles.expressionButton} onPress={onPress_89774} />)(value);
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = value6;
|
||||
}
|
||||
return (
|
||||
<View style={items2}>
|
||||
{value11}
|
||||
{r5}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun89768(a0) { // fn#89768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11895:1118, offset: 0x0201dacf, size: 28 bytes, params: 2, frame: 12
|
||||
env0_4(a0);
|
||||
onChangeText(a0);
|
||||
}
|
||||
|
||||
function _fun89769(a0) { // fn#89769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11895:1156, offset: 0x0201daeb, size: 309 bytes, params: 2, frame: 21
|
||||
var r8;
|
||||
var length;
|
||||
var surrogates;
|
||||
let binding = env0_3;
|
||||
const substring = binding.substring;
|
||||
const binding2 = env0_5;
|
||||
let current = binding2.current;
|
||||
const value2 = Reflect.apply(substring, binding, [0, current.start]);
|
||||
const value3 = binding.substring(binding2.current.end ?? env0_5.current.start);
|
||||
env0_5.current.start;
|
||||
if (a0.id != null) {
|
||||
r8 = a0.uniqueName == null ? a0.name : a0.uniqueName !== '' ? a0.uniqueName : a0.name;
|
||||
env0_8(value2 + (':' + r8 + ': ') + value3);
|
||||
length = (value2 + (':' + r8 + ': ')).length;
|
||||
} else {
|
||||
surrogates = a0.surrogates;
|
||||
if (surrogates != null) {
|
||||
binding = env0_8;
|
||||
surrogates = a0.surrogates;
|
||||
binding(value2 + surrogates + value3);
|
||||
surrogates = a0.surrogates;
|
||||
length = (value2 + surrogates).length;
|
||||
} else {
|
||||
r8 = a0.uniqueName == null ? a0.name : a0.uniqueName !== '' ? a0.uniqueName : a0.name;
|
||||
env0_8(value2 + (':' + r8 + ': ') + value3);
|
||||
length = (value2 + (':' + r8 + ': ')).length;
|
||||
}
|
||||
}
|
||||
env0_5.current = {start: length, end: length};
|
||||
current = env0_6.current;
|
||||
if (current != null) {
|
||||
current.focus();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun89770() { // fn#89770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11895:1548, offset: 0x0201dc20, size: 32 bytes, params: 1, frame: 9
|
||||
const current = env0_6.current;
|
||||
if (current != null) {
|
||||
current.focus();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun89771() { // fn#89771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11895:1609, offset: 0x0201dc40, size: 54 bytes, params: 1, frame: 12
|
||||
var value2;
|
||||
var moduleValue;
|
||||
if (result) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(8535) /* metro dependency 8535: TopEmojisUtils */;
|
||||
moduleValue.maybeFetchTopEmojisByGuild(guildId);
|
||||
}
|
||||
}
|
||||
|
||||
function AppLauncherTextInputOptionOnSelectionChange({nativeEvent}) { // fn#89773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11895:2075, owner: AppLauncherTextInputOption.onSelectionChange, offset: 0x0201dc76, size: 32 bytes, params: 2, frame: 2
|
||||
env0_5.current = nativeEvent.selection;
|
||||
}
|
||||
|
||||
function AppLauncherTextInputOptionOnPress() { // fn#89774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11895:2450, owner: AppLauncherTextInputOption.onPress, offset: 0x0201dc96, size: 119 bytes, params: 1, frame: 14
|
||||
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
|
||||
const openEmojiPickerActionSheetModule = require(8529) /* metro dependency 8529: openEmojiPickerActionSheet */;
|
||||
const openEmojiPickerActionSheet = openEmojiPickerActionSheetModule.openEmojiPickerActionSheet;
|
||||
const CHAT = EmojiIntention.CHAT;
|
||||
Reflect.apply(openEmojiPickerActionSheet, openEmojiPickerActionSheetModule, [{'pickerIntention': null,
|
||||
'autoFocus': false, 'startExpanded': false, pickerIntention: CHAT, onPressEmoji: env0_9, guildId: guildId,
|
||||
onClose: env0_10}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
/* Metro module 11724; source: modules/app_launcher/native/options/user/AppLauncherUserListActionSheet.tsx; dependencies: [31, 1483, 33, 4501, 4080, 5065, 1305, 11705, 1244, 11703, 11725, 11382, 11704, 6238, 2] */
|
||||
function _fun89847(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11910:6, offset: 0x02020e22, size: 231 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const DEFAULT_CONTENT_PADDING = (require(1483) /* metro dependency 1483: AppLauncherNativeConstants */).DEFAULT_CONTENT_PADDING;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({emptyState: {paddingHorizontal: DEFAULT_CONTENT_PADDING,
|
||||
paddingTop: DEFAULT_CONTENT_PADDING, flex: 1}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/options/user/AppLauncherUserListActionSheet.tsx');
|
||||
exports.default = AppLauncherUserListActionSheet;
|
||||
exports.APP_LAUNCHER_USER_LIST_ACTION_SHEET_KEY = 'AppLauncherUserListActionSheet';
|
||||
}
|
||||
|
||||
function EmptyStateWithSnowflakeQuery({query, onPressRow}) { // fn#89848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11910:268, offset: 0x02020f09, size: 129 bytes, params: 2, frame: 17
|
||||
const styles = useStyles();
|
||||
const AppLauncherList = (require(11704) /* metro dependency 11704: AppLauncherList */).AppLauncherList;
|
||||
return (
|
||||
<AppLauncherList
|
||||
contentContainerStyle={styles.emptyState}
|
||||
data={[query]}
|
||||
renderItem={renderItem_89849}
|
||||
keyboardShouldPersistTaps="always"
|
||||
keyboardDismissMode="on-drag"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function AppLauncherUserListActionSheet({onUserPress, onActionSheetDismiss, channel, option}) { // fn#89850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11910:686, offset: 0x02020fdc, size: 350 bytes, params: 2, frame: 23
|
||||
var r4;
|
||||
const guild_id = channel.guild_id;
|
||||
const id = channel.id;
|
||||
var value;
|
||||
const binding = env0_3;
|
||||
const value3 = binding.useCallback(_fun89852, [binding.useCallback(_fun89851, [onActionSheetDismiss]), onUserPress]);
|
||||
const value4 = binding.useCallback(_fun89853, [value3]);
|
||||
const AppLauncherCommandOptionActionSheet = (require(11703) /* metro dependency 11703: AppLauncherCommandOptionActionSheet */).AppLauncherCommandOptionActionSheet;
|
||||
if (channel.isPrivate()) {
|
||||
value = importDefault(11725) /* metro dependency 11725: PrivateChannelUserList */;
|
||||
value = ((Component) => <Component channelId={id} disableStickySections hideTitle headerShown={false} inActionSheet onUserPress={value3} opensUserProfileOnUserPress={false} />)(value);
|
||||
r4 = value;
|
||||
} else {
|
||||
value = importDefault(11382) /* metro dependency 11382: GuildChannelUserList */;
|
||||
value = ((Component) => <Component channelId={id} guildId={guild_id} searchable searchableEmptyState={value4} headerShown={false} opensUserProfileOnUserPress={false} onUserPress={value3} inActionSheet disableThemedGradient />)(value);
|
||||
r4 = value;
|
||||
}
|
||||
return (
|
||||
<AppLauncherCommandOptionActionSheet
|
||||
onDismiss={onActionSheetDismiss}
|
||||
option={option}
|
||||
contentContainerStyles={{paddingHorizontal: 0}}
|
||||
>
|
||||
{r4}
|
||||
</AppLauncherCommandOptionActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function EmptyStateWithSnowflakeQueryRenderItem({item}) { // fn#89849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11910:430, owner: EmptyStateWithSnowflakeQuery.renderItem, offset: 0x02020f8a, size: 82 bytes, params: 2, frame: 14
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
return (
|
||||
<TableRow
|
||||
label={item}
|
||||
start
|
||||
end
|
||||
onPress={onPressRow}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun89851() { // fn#89851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11910:826, offset: 0x0202113a, size: 55 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('AppLauncherUserListActionSheet');
|
||||
onActionSheetDismiss();
|
||||
}
|
||||
|
||||
function _fun89852({user}) { // fn#89852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11910:886, offset: 0x02021171, size: 38 bytes, params: 2, frame: 12
|
||||
onUserPress({user: user});
|
||||
env0_2();
|
||||
}
|
||||
|
||||
function _fun89853(a0) { // fn#89853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11910:941, offset: 0x02021197, size: 270 bytes, params: 2, frame: 22
|
||||
var environment;
|
||||
var r0;
|
||||
var EmptyState;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const env0_0 = a0;
|
||||
const value = environment.__proto__;
|
||||
if ((require(5065) /* metro dependency 5065: ApplicationCommandUtils */).isSnowflake(a0)) {
|
||||
r0 = <EmptyStateWithSnowflakeQuery query={a0} onPressRow={onPressRow} />;
|
||||
} else {
|
||||
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
|
||||
r0 = <EmptyState style={{paddingTop: 80}} lightSource={importDefault(11705) /* metro dependency 11705 */} darkSource={importDefault(11705) /* metro dependency 11705 */} title={intl.string(t.vYocDz)} body={intl.string(t.V6nAfF)} />;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function onPressRow() { // fn#89854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11910:1018, offset: 0x020212a5, size: 29 bytes, params: 1, frame: 11
|
||||
return env1_3({user: env0_0});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
/* Metro module 11723; source: modules/app_launcher/native/options/user/AppLauncherUserOption.tsx; dependencies: [57, 31, 4502, 33, 4501, 697, 566, 11713, 1848, 4080, 11724, 1962, 11724, 1305, 11716, 11717, 11721, 4573, 2] */
|
||||
function _fun89841(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11909:6, offset: 0x020209a7, size: 236 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 accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
|
||||
const env0_7 = Reflect.apply(createStyles, createStylesModule,
|
||||
[{iconWrapper: {backgroundColor: BACKGROUND_MOD_SUBTLE}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/options/user/AppLauncherUserOption.tsx');
|
||||
exports.default = AppLauncherUserOption;
|
||||
}
|
||||
|
||||
function AppLauncherUserOption({style, option, initialValue, onUserPress, onActionSheetDismiss, channel, autoFocus, hasError, onPress}) { // fn#89842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11909:344, offset: 0x02020a93, size: 597 bytes, params: 2, frame: 28
|
||||
var r5;
|
||||
const env0_4 = channel;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const guild_id = channel.guild_id;
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
let value2 = Reflect.apply(useState, binding, [function() {
|
||||
var initialValueBinding = initialValue;
|
||||
var value2 = null;
|
||||
return value2 != initialValueBinding ? initialValue.type !== 'userMention' ? value2 : initialValue.userId : value2;
|
||||
}]);
|
||||
const binding2 = onActionSheetDismiss;
|
||||
const value3 = binding2(value2, 2);
|
||||
const property = value3[0];
|
||||
const env0_6 = value3[1];
|
||||
useState = binding.useState;
|
||||
const value5 = binding2(Reflect.apply(useState, binding, [null]), 2);
|
||||
const property2 = value5[0];
|
||||
const env0_7 = value5[1];
|
||||
const AppLauncherSelectOptionFormRow = importDefault(11713) /* metro dependency 11713: AppLauncherSelectOptionFormRow */;
|
||||
const defaultImportProps = {style: style, option: option, hasError: hasError,
|
||||
selected: property2 != null || property != null, onPress: onPress_89845,
|
||||
leading: property2 != null ? ((Avatar) => <Avatar user={property2} guildId={guild_id} animate={!useReducedMotion} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} />)((require(1305) /* metro dependency 1305: native */).Avatar) : ((Component) => <Component icon={((UserCircleIcon) => <UserCircleIcon size="sm" color="interactive-text-default" />)((require(11717) /* metro dependency 11717: UserCircleIcon */).UserCircleIcon)} wrapperStyle={styles.iconWrapper} />)(importDefault(11716) /* metro dependency 11716: AppLauncherOptionIcon */)};
|
||||
if (property2 != null) {
|
||||
value = importDefault(11721) /* metro dependency 11721: UsernameText */;
|
||||
value = ((Component) => <Component guildId={guild_id} user={property2} />)(value);
|
||||
r5 = value;
|
||||
} else if (property != null) {
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
r5 = <Text variant="text-md/medium" color="text-default">{property}</Text>;
|
||||
} else {
|
||||
r5 = null;
|
||||
}
|
||||
defaultImportProps.selectedItemName = r5;
|
||||
defaultImportProps.autoFocus = autoFocus;
|
||||
return <AppLauncherSelectOptionFormRow {...defaultImportProps} />;
|
||||
}
|
||||
|
||||
function AppLauncherUserOptionOnPress() { // fn#89845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11909:783, owner: AppLauncherUserOption.onPress, offset: 0x02020d1a, size: 179 bytes, params: 1, frame: 19
|
||||
if (onPress != null) {
|
||||
onPress();
|
||||
}
|
||||
require(dependencyMap[8]).dismissGlobalKeyboard();
|
||||
const defaultImport = importDefault(dependencyMap[9]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
const value3 = require(dependencyMap[11])(dependencyMap[10], dependencyMap.paths);
|
||||
const APP_LAUNCHER_USER_LIST_ACTION_SHEET_KEY = require(dependencyMap[12]).APP_LAUNCHER_USER_LIST_ACTION_SHEET_KEY;
|
||||
Reflect.apply(openLazy, defaultImport, [value3, APP_LAUNCHER_USER_LIST_ACTION_SHEET_KEY, {option: option,
|
||||
channel: channel, onUserPress: onUserPress_89846, onActionSheetDismiss: onActionSheetDismiss}]);
|
||||
}
|
||||
|
||||
function onPressOnUserPress({user}) { // fn#89846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11909:955, owner: AppLauncherUserOption.onPress.onUserPress, offset: 0x02020dcd, size: 85 bytes, params: 2, frame: 13
|
||||
var value;
|
||||
if (typeof user === 'string') {
|
||||
value = environment.__proto__;
|
||||
env1_6(user);
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
env1_6(user.id);
|
||||
env1_7(user);
|
||||
}
|
||||
onUserPress({user: user});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user