Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,11 @@
|
||||
/* Metro module 8041; source: modules/application_commands/AgeRestrictedApplicationCommandsExperiment.tsx; dependencies: [1358, 2] */
|
||||
function _fun63743(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8219:6, offset: 0x01b8f161, size: 142 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importDefault(1358) /* metro dependency 1358: ApexExperiment */;
|
||||
value = value({'kind': 'user', 'name': '2026-05-age-restricted-application-commands',
|
||||
defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/AgeRestrictedApplicationCommandsExperiment.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,204 @@
|
||||
/* Metro module 7166; source: modules/application_commands/ApplicationCommandActionCreators.tsx; dependencies: [1226, 7167, 661, 44, 5068, 694, 507, 21, 1909, 2] */
|
||||
function _fun57508(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:6, offset: 0x013e757b, size: 293 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = updateOptionStates;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const applicationCommandAutocompleteStore = importDefault(7167) /* metro dependency 7167: ApplicationCommandAutocompleteStore */;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).Endpoints;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandActionCreators.tsx');
|
||||
exports.setActiveCommand = setActiveCommand;
|
||||
exports.setPreferredCommandId = setPreferredCommandId;
|
||||
exports.updateOptionStates = closure;
|
||||
exports.updateOptionValidationStates = updateOptionValidationStates;
|
||||
exports.updateChannelState = updateChannelState;
|
||||
exports.updateApplicationGuildCommandPermissions = function(a0, a1, a2, a3) {
|
||||
var HTTP = require(dependencyMap[6]).HTTP;
|
||||
var object = {};
|
||||
object.body = {permissions: a3};
|
||||
object.url = Endpoints.APPLICATION_BOT_GUILD_COMMAND_PERMISSIONS(a0, a1, a2);
|
||||
object.rejectWithError = false;
|
||||
return HTTP.put(object);
|
||||
};
|
||||
exports.performAutocomplete = performAutocomplete;
|
||||
exports.fetchCommand = fetchCommand;
|
||||
exports.fetchCommands = fetchCommands;
|
||||
exports.fetchCommandsForApplication = fetchCommandsForApplication;
|
||||
exports.updateRegistry = updateRegistry;
|
||||
exports.setAppLauncherActiveCommand = setAppLauncherActiveCommand;
|
||||
}
|
||||
|
||||
function updateOptionStates(a0, a1) { // fn#57509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:136, offset: 0x013e76a0, size: 64 bytes, params: 3, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'APPLICATION_COMMAND_UPDATE_OPTIONS',
|
||||
channelId: a0, changedOptionStates: a1});
|
||||
}
|
||||
|
||||
function setActiveCommand({channelId, command, section, location, initialValues, triggerSection, queryLength, sectionName, query, searchResultsPosition, source, commandOrigin}) { // fn#57510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:383, offset: 0x013e76e0, size: 257 bytes, params: 2, frame: 27
|
||||
if (command != null) {
|
||||
(importDefault(44) /* metro dependency 44 */)(command.inputType !== (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandInputType.PLACEHOLDER,
|
||||
|
||||
'command should not be placeholder');
|
||||
}
|
||||
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
dispatcher.dispatch({type: 'APPLICATION_COMMAND_SET_ACTIVE_COMMAND', channelId: channelId, command: command,
|
||||
section: section, initialValues: initialValues, location: location, triggerSection: triggerSection,
|
||||
queryLength: queryLength, sectionName: sectionName, query: query, searchResultsPosition: searchResultsPosition,
|
||||
source: source, commandOrigin: commandOrigin});
|
||||
}
|
||||
|
||||
function setPreferredCommandId(a0, a1) { // fn#57511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:941, offset: 0x013e77e1, size: 64 bytes, params: 3, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'APPLICATION_COMMAND_SET_PREFERRED_COMMAND',
|
||||
channelId: a0, commandId: a1});
|
||||
}
|
||||
|
||||
function updateOptionValidationStates(a0, a1) { // fn#57512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:1142, offset: 0x013e7821, size: 76 bytes, params: 3, frame: 15
|
||||
var value;
|
||||
const updateOptionStatesBinding = updateOptionStates;
|
||||
const Object = global.Object;
|
||||
const fromEntries = Object.fromEntries;
|
||||
const Object2 = global.Object;
|
||||
value = Reflect.apply(fromEntries, Object, [Reflect.apply(Object2.entries(a1).map, value, [function(a0) {
|
||||
var r0;
|
||||
var r2;
|
||||
var r3;
|
||||
var item3;
|
||||
var value3;
|
||||
var iterator = a0[Symbol.iterator]();
|
||||
var iterator2 = iterator.next;
|
||||
var item2 = Reflect.apply(iterator2, iterator, []);
|
||||
var item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
var value = undefined;
|
||||
var value2 = item2 === value;
|
||||
var r1 = value2 ? value : item;
|
||||
if (value2) {
|
||||
r0 = item2;
|
||||
r2 = value;
|
||||
r3 = value2;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r0 = item3;
|
||||
r2 = value;
|
||||
r3 = value3;
|
||||
} else {
|
||||
r0 = item3;
|
||||
r2 = item;
|
||||
r3 = value3;
|
||||
}
|
||||
}
|
||||
if (!r3) {
|
||||
r0.return();
|
||||
}
|
||||
return [r1, {lastValidationResult: r2}];
|
||||
}])]);
|
||||
updateOptionStatesBinding(a0, value);
|
||||
}
|
||||
|
||||
function updateChannelState({channelId, command, section, preferredCommandId, location, changedOptionStates}) { // fn#57514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:1312, offset: 0x013e78c1, size: 112 bytes, params: 2, frame: 19
|
||||
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
dispatcher.dispatch({type: 'APPLICATION_COMMAND_UPDATE_CHANNEL_STATE', channelId: channelId, command: command,
|
||||
section: section, preferredCommandId: preferredCommandId, location: location,
|
||||
changedOptionStates: changedOptionStates});
|
||||
}
|
||||
|
||||
function performAutocomplete(a0, a1, a2) { // fn#57516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:1831, offset: 0x013e7990, size: 433 bytes, params: 4, frame: 23
|
||||
var id;
|
||||
var defaultImport3;
|
||||
var dispatch;
|
||||
var object3;
|
||||
var getAutocompleteChoices;
|
||||
var HTTP;
|
||||
var post;
|
||||
var object4;
|
||||
var guild;
|
||||
const value2 = undefined;
|
||||
const defaultImport = importDefault(44) /* metro dependency 44 */;
|
||||
let autocomplete = a1.autocomplete;
|
||||
defaultImport(autocomplete != null, 'Missing autocomplete context');
|
||||
autocomplete = a1.autocomplete;
|
||||
const query = autocomplete.query;
|
||||
const name = autocomplete.name;
|
||||
const defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
const fromTimestamp = defaultImport2.fromTimestamp;
|
||||
const Date = global.Date;
|
||||
const value3 = Reflect.apply(fromTimestamp, defaultImport2, [Date.now()]);
|
||||
let channel = a1.channel;
|
||||
if (channel != null) {
|
||||
defaultImport3 = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
dispatch = defaultImport3.dispatch;
|
||||
object3 = {type: 'APPLICATION_COMMAND_AUTOCOMPLETE_REQUEST', nonce: value3};
|
||||
channel = a1.channel;
|
||||
id = channel.id;
|
||||
object3.channelId = id;
|
||||
object3.query = query;
|
||||
object3.name = name;
|
||||
Reflect.apply(dispatch, defaultImport3, [object3]);
|
||||
getAutocompleteChoices = ApplicationCommandAutocompleteStore.getAutocompleteChoices;
|
||||
channel = a1.channel;
|
||||
id = channel.id;
|
||||
if (Reflect.apply(getAutocompleteChoices, ApplicationCommandAutocompleteStore, [id, name, query]) == null) {
|
||||
HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
||||
post = HTTP.post;
|
||||
object3 = {};
|
||||
object3.url = Endpoints.INTERACTIONS;
|
||||
object4 = {};
|
||||
object4.type = (require(1909) /* metro dependency 1909: Server */).InteractionTypes.APPLICATION_COMMAND_AUTOCOMPLETE;
|
||||
object4.application_id = a0.applicationId;
|
||||
guild = a1.guild;
|
||||
id = guild == null ? value2 : guild.id;
|
||||
object4.guild_id = id;
|
||||
id = a1.channel.id;
|
||||
object4.channel_id = id;
|
||||
object4.session_id = AuthenticationStore.getSessionId();
|
||||
object4.data = a2;
|
||||
object4.nonce = value3;
|
||||
object3.body = object4;
|
||||
object3.timeout = 3000;
|
||||
object3.rejectWithError = true;
|
||||
Reflect.apply(post, HTTP, [object3]).catch(_fun57517);
|
||||
}
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function fetchCommand(a0, a1, a2) { // fn#57518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:2557, offset: 0x013e7b7c, size: 71 bytes, params: 4, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'APPLICATION_COMMAND_FETCH',
|
||||
channelId: a1, commandId: a2, guildId: a0});
|
||||
}
|
||||
|
||||
function fetchCommands(a0, a1, a2) { // fn#57519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:2690, offset: 0x013e7bc3, size: 71 bytes, params: 4, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'APPLICATION_COMMANDS_FETCH',
|
||||
channelId: a1, commandIds: a2, guildId: a0});
|
||||
}
|
||||
|
||||
function fetchCommandsForApplication({guildId, channelId, applicationId}) { // fn#57520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:2840, offset: 0x013e7c0a, size: 79 bytes, params: 2, frame: 16
|
||||
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
dispatcher.dispatch({type: 'APPLICATION_COMMANDS_FETCH_FOR_APPLICATION', channelId: channelId, guildId: guildId,
|
||||
applicationId: applicationId});
|
||||
}
|
||||
|
||||
function updateRegistry(a0, a1, a2) { // fn#57521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:3044, offset: 0x013e7c59, size: 72 bytes, params: 4, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'APPLICATION_COMMAND_REGISTRY_UPDATE',
|
||||
applications: a1, commands: a0, channelId: a2});
|
||||
}
|
||||
|
||||
function setAppLauncherActiveCommand(a0, a1) { // fn#57522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:3207, offset: 0x013e7ca1, size: 143 bytes, params: 3, frame: 16
|
||||
if (a1 != null) {
|
||||
(importDefault(44) /* metro dependency 44 */)(a1.inputType !== (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandInputType.PLACEHOLDER,
|
||||
|
||||
'command should not be placeholder');
|
||||
}
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'APP_LAUNCHER_SET_ACTIVE_COMMAND',
|
||||
channelId: a0, command: a1});
|
||||
}
|
||||
|
||||
function _fun57517() { // fn#57517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:2477, offset: 0x013e7b41, size: 59 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'INTERACTION_FAILURE', nonce: env0_0});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,320 @@
|
||||
/* Metro module 7167; source: modules/application_commands/ApplicationCommandAutocompleteStore.tsx; dependencies: [6, 7, 15, 17, 18, 7168, 661, 477, 1909, 4863, 566, 694, 2] */
|
||||
function _fun57523(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:6, offset: 0x013e7d30, size: 508 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const closure = CONNECTION_OPEN_57528;
|
||||
const closure2 = APPLICATION_COMMAND_SET_ACTIVE_COMMAND;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
const applicationCommandStore = importDefault(7168) /* metro dependency 7168: ApplicationCommandStore */;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
let Map = global.Map;
|
||||
let map = new Map();
|
||||
Map = global.Map;
|
||||
map = new Map();
|
||||
Map = global.Map;
|
||||
map = new Map();
|
||||
const env0_12 = (require(477) /* metro dependency 477: PlatformUtils */).isDesktop();
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
_fun57531(Store).displayName = 'ApplicationCommandAutocompleteStore';
|
||||
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: closure, LOGOUT: closure,
|
||||
CHANNEL_SELECT: closure, APPLICATION_COMMAND_AUTOCOMPLETE_REQUEST: APPLICATION_COMMAND_AUTOCOMPLETE_REQUEST,
|
||||
APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE: APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE,
|
||||
INTERACTION_FAILURE: INTERACTION_FAILURE_57541, APPLICATION_COMMAND_SET_ACTIVE_COMMAND: closure2,
|
||||
APP_LAUNCHER_SET_ACTIVE_COMMAND: closure2,
|
||||
APPLICATION_COMMAND_UPDATE_CHANNEL_STATE: APPLICATION_COMMAND_UPDATE_CHANNEL_STATE});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandAutocompleteStore.tsx');
|
||||
exports.default = map;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_57524() { // fn#57524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:183, offset: 0x013e7f2c, size: 94 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_57524_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function getOrCreateChannelState(a0) { // fn#57527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:410, offset: 0x013e7f8a, size: 255 bytes, params: 2, frame: 18
|
||||
var set;
|
||||
var object2;
|
||||
var activeCommand;
|
||||
var value3;
|
||||
var Map;
|
||||
var prototype;
|
||||
var value4;
|
||||
var map;
|
||||
var value6;
|
||||
var value8;
|
||||
var value10;
|
||||
let binding = env0_10;
|
||||
if (!binding.has(a0)) {
|
||||
binding = env0_10;
|
||||
set = binding.set;
|
||||
object2 = {};
|
||||
activeCommand = ApplicationCommandStore.getActiveCommand(a0);
|
||||
value3 = undefined;
|
||||
object2.commandId = activeCommand == null ? value3 : activeCommand.id;
|
||||
object2.optionName = ApplicationCommandStore.getActiveOptionName(a0);
|
||||
Map = global.Map;
|
||||
prototype = Map.prototype;
|
||||
value4 = Object.create(prototype, {constructor: {value: Map}});
|
||||
map = new Map();
|
||||
object2.optionNameToAutocompleteQueries = map instanceof Object ? map : value4;
|
||||
Map = global.Map;
|
||||
prototype = Map.prototype;
|
||||
value6 = Object.create(prototype, {constructor: {value: Map}});
|
||||
map = new Map();
|
||||
object2.optionNameToLastResults = map instanceof Object ? map : value6;
|
||||
Map = global.Map;
|
||||
prototype = Map.prototype;
|
||||
value8 = Object.create(prototype, {constructor: {value: Map}});
|
||||
map = new Map();
|
||||
object2.optionNameToNonce = map instanceof Object ? map : value8;
|
||||
Map = global.Map;
|
||||
prototype = Map.prototype;
|
||||
value10 = Object.create(prototype, {constructor: {value: Map}});
|
||||
map = new Map();
|
||||
object2.optionNameToLastQuery = map instanceof Object ? map : value10;
|
||||
object2.lastErrored = false;
|
||||
object2.lastResponseNonce = value3;
|
||||
Reflect.apply(set, binding, [a0, object2]);
|
||||
}
|
||||
return env0_10.get(a0);
|
||||
}
|
||||
|
||||
function CHANNEL_SELECT_57528() { // fn#57528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:747, offset: 0x013e8089, size: 35 bytes, params: 1, frame: 10
|
||||
env0_9.clear();
|
||||
env0_10.clear();
|
||||
return true;
|
||||
}
|
||||
|
||||
function APPLICATION_COMMAND_SET_ACTIVE_COMMAND({channelId, command}) { // fn#57529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:825, offset: 0x013e80ac, size: 47 bytes, params: 2, frame: 15
|
||||
handleCommandChange(channelId, command?.id);
|
||||
}
|
||||
|
||||
function handleCommandChange(a0, a1) { // fn#57530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:925, offset: 0x013e80db, size: 184 bytes, params: 3, frame: 15
|
||||
const activeOptionName = ApplicationCommandStore.getActiveOptionName(a0);
|
||||
let value = env0_10.get(a0);
|
||||
let r0 = value != null && (a1 !== value.commandId || activeOptionName !== value.optionName);
|
||||
if (r0) {
|
||||
if (a1 != null && a1 !== value.commandId) {
|
||||
value.optionNameToLastResults.clear();
|
||||
value.optionNameToNonce.clear();
|
||||
value.optionNameToLastQuery.clear();
|
||||
value.optionNameToAutocompleteQueries.clear();
|
||||
}
|
||||
value.lastErrored = false;
|
||||
value.commandId = a1;
|
||||
value.optionName = activeOptionName;
|
||||
value = true;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun57531(a0) { // fn#57531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:1275, offset: 0x013e8193, size: 164 bytes, params: 2, frame: 16
|
||||
const closure = ApplicationCommandAutocompleteStore;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(ApplicationCommandStore);
|
||||
}}, {key: 'getLastErrored', value: function(a0) {
|
||||
return getOrCreateChannelState(a0).lastErrored;
|
||||
}}, {key: 'getAutocompleteChoices', value: value_57535}, {key: 'getAutocompleteLastChoices', value: function(a0,
|
||||
a1) {
|
||||
return getOrCreateChannelState(a0).optionNameToLastResults.get(a1);
|
||||
}}, {key: 'getLastResponseNonce', value: function(a0) {
|
||||
return getOrCreateChannelState(a0).lastResponseNonce;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function APPLICATION_COMMAND_AUTOCOMPLETE_REQUEST({nonce, channelId, query, name}) { // fn#57538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:2382, offset: 0x013e82cb, size: 303 bytes, params: 2, frame: 20
|
||||
var r1;
|
||||
const orCreateChannelState = getOrCreateChannelState(channelId);
|
||||
let optionNameToLastQuery = orCreateChannelState.optionNameToLastQuery;
|
||||
const get = optionNameToLastQuery.get;
|
||||
if (Reflect.apply(get, optionNameToLastQuery, [name]) === query) {
|
||||
return false;
|
||||
}
|
||||
optionNameToLastQuery = orCreateChannelState.optionNameToLastQuery;
|
||||
let set = optionNameToLastQuery.set;
|
||||
Reflect.apply(set, optionNameToLastQuery, [name, query]);
|
||||
const r2 = orCreateChannelState.optionNameToAutocompleteQueries.get(name)?.get(query);
|
||||
if (r2 != null) {
|
||||
orCreateChannelState.lastErrored = false;
|
||||
orCreateChannelState.optionNameToLastResults.set(name, r2);
|
||||
return true;
|
||||
}
|
||||
const value6 = orCreateChannelState.optionNameToNonce.get(name);
|
||||
if (value6 != null) {
|
||||
env0_9.delete(value6);
|
||||
}
|
||||
let binding = env0_9;
|
||||
binding.set(nonce, {channelId: channelId, query: query, name: name});
|
||||
binding = env0_11;
|
||||
set = binding.set;
|
||||
const Date = global.Date;
|
||||
Reflect.apply(set, binding, [nonce, new Date()]);
|
||||
orCreateChannelState.optionNameToNonce.set(name, nonce);
|
||||
if (orCreateChannelState.lastErrored) {
|
||||
orCreateChannelState.lastErrored = false;
|
||||
r1 = true;
|
||||
} else {
|
||||
r1 = undefined;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
function APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE({choices, nonce}) { // fn#57539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:2966, offset: 0x013e83fa, size: 534 bytes, params: 2, frame: 22
|
||||
var r5;
|
||||
var r3;
|
||||
var set;
|
||||
var Map;
|
||||
var value5;
|
||||
var map;
|
||||
var value7;
|
||||
var Date;
|
||||
var value12;
|
||||
var date;
|
||||
var optionNameToLastResults;
|
||||
let value = undefined;
|
||||
let binding = env0_9;
|
||||
let get = binding.get;
|
||||
const value3 = Reflect.apply(get, binding, [nonce]);
|
||||
if (value3 == null) {
|
||||
return false;
|
||||
}
|
||||
env0_9.delete(nonce);
|
||||
const orCreateChannelState = getOrCreateChannelState(value3.channelId);
|
||||
let optionNameToAutocompleteQueries = orCreateChannelState.optionNameToAutocompleteQueries;
|
||||
get = optionNameToAutocompleteQueries.get;
|
||||
let name = value3.name;
|
||||
if (Reflect.apply(get, optionNameToAutocompleteQueries, [name]) == null) {
|
||||
optionNameToAutocompleteQueries = orCreateChannelState.optionNameToAutocompleteQueries;
|
||||
set = optionNameToAutocompleteQueries.set;
|
||||
name = value3.name;
|
||||
Map = global.Map;
|
||||
value5 = Object.create(Map.prototype, {constructor: {value: Map}});
|
||||
map = new Map();
|
||||
Reflect.apply(set, optionNameToAutocompleteQueries, [name, map instanceof Object ? map : value5]);
|
||||
}
|
||||
binding = env0_12;
|
||||
if (binding) {
|
||||
value7 = ApplicationCommandStore.getActiveOption(value3.channelId);
|
||||
r5 = (value7 == null ? value : value7.type) === (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType.INTEGER;
|
||||
} else {
|
||||
r5 = binding;
|
||||
}
|
||||
r5 = choices == null ? value : choices.map(_fun57540);
|
||||
r5 = r5 ?? [];
|
||||
const value10 = env0_11.get(nonce);
|
||||
if (value10 != null) {
|
||||
Date = global.Date;
|
||||
value12 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
r3 = (date instanceof Object ? date : value12).getTime() - value10.getTime();
|
||||
} else {
|
||||
r3 = 0;
|
||||
}
|
||||
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const trackWithMetadata = value.trackWithMetadata;
|
||||
const APPLICATION_COMMAND_OPTION_STRING_AUTOCOMPLETE_PERFORMANCE = AnalyticEvents.APPLICATION_COMMAND_OPTION_STRING_AUTOCOMPLETE_PERFORMANCE;
|
||||
Reflect.apply(trackWithMetadata, value, [APPLICATION_COMMAND_OPTION_STRING_AUTOCOMPLETE_PERFORMANCE,
|
||||
{duration_ms: r3, error: false, num_options: r5.length}]);
|
||||
env0_11.delete(nonce);
|
||||
value = orCreateChannelState.optionNameToAutocompleteQueries.get(value3.name);
|
||||
if (value != null) {
|
||||
value.set(value3.query, r5);
|
||||
}
|
||||
const optionNameToLastQuery = orCreateChannelState.optionNameToLastQuery;
|
||||
get = optionNameToLastQuery.get;
|
||||
if (Reflect.apply(get, optionNameToLastQuery, [value3.name]) === value3.query) {
|
||||
orCreateChannelState.lastErrored = false;
|
||||
optionNameToLastResults = orCreateChannelState.optionNameToLastResults;
|
||||
optionNameToLastResults.set(value3.name, r5);
|
||||
}
|
||||
orCreateChannelState.lastResponseNonce = nonce;
|
||||
return true;
|
||||
}
|
||||
|
||||
function INTERACTION_FAILURE_57541({nonce}) { // fn#57541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:3927, offset: 0x013e865b, size: 232 bytes, params: 2, frame: 19
|
||||
var r0;
|
||||
var Date;
|
||||
var value5;
|
||||
var date;
|
||||
if (nonce == null) {
|
||||
return false;
|
||||
}
|
||||
const value2 = env0_9.get(nonce);
|
||||
if (value2 == null) {
|
||||
return false;
|
||||
}
|
||||
env0_9.delete(nonce);
|
||||
const value3 = env0_11.get(nonce);
|
||||
if (value3 != null) {
|
||||
Date = global.Date;
|
||||
value5 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
r0 = (date instanceof Object ? date : value5).getTime() - value3.getTime();
|
||||
} else {
|
||||
r0 = 0;
|
||||
}
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const trackWithMetadata = appAnalyticsUtilsModule.trackWithMetadata;
|
||||
const APPLICATION_COMMAND_OPTION_STRING_AUTOCOMPLETE_PERFORMANCE = AnalyticEvents.APPLICATION_COMMAND_OPTION_STRING_AUTOCOMPLETE_PERFORMANCE;
|
||||
Reflect.apply(trackWithMetadata, appAnalyticsUtilsModule,
|
||||
[APPLICATION_COMMAND_OPTION_STRING_AUTOCOMPLETE_PERFORMANCE, {duration_ms: r0, error: true}]);
|
||||
env0_11.delete(nonce);
|
||||
getOrCreateChannelState(value2.channelId).lastErrored = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
function value_57535(a0, a1, a2) { // fn#57535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:1833, offset: 0x013e8250, size: 60 bytes, params: 4, frame: 12
|
||||
let value = environment.__proto__;
|
||||
const getOrCreateChannelStateBinding = getOrCreateChannelState;
|
||||
value = undefined;
|
||||
const value2 = getOrCreateChannelStateBinding(a0).optionNameToAutocompleteQueries.get(a1);
|
||||
return value2 == null ? value : value2.get(a2);
|
||||
}
|
||||
|
||||
function _fun57540({value, name_localized, name}) { // fn#57540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:3390, offset: 0x013e8610, size: 75 bytes, params: 2, frame: 14
|
||||
var r1;
|
||||
const object2 = {};
|
||||
object2.displayName = name_localized ?? name;
|
||||
object2.name = name;
|
||||
if (env0_0) {
|
||||
value = global.Number(value);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
object2.value = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,93 @@
|
||||
/* Metro module 8053; source: modules/application_commands/ApplicationCommandChoiceUtils.tsx; dependencies: [7167, 5066, 2] */
|
||||
function _fun63878(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:6, offset: 0x01b94379, size: 188 bytes, params: 8, frame: 20
|
||||
const closure = function(a0, a1) {
|
||||
var r0;
|
||||
var value2;
|
||||
var env0_0 = a1;
|
||||
var value = undefined;
|
||||
if (a0 == null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value2 = a0.find(_fun63880);
|
||||
r0 = value2 == null ? value : value2.value;
|
||||
}
|
||||
return typeof r0 === 'string' ? r0 : value;
|
||||
};
|
||||
const closure2 = function(a0, a1) {
|
||||
var r0;
|
||||
var value2;
|
||||
var env0_0 = a1;
|
||||
var value = undefined;
|
||||
if (a0 == null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value2 = a0.find(_fun63882);
|
||||
r0 = value2 == null ? value : value2.value;
|
||||
}
|
||||
return typeof r0 === 'number' ? r0 : value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const applicationCommandAutocompleteStore = importDefault(7167) /* metro dependency 7167: ApplicationCommandAutocompleteStore */;
|
||||
const applicationCommandConstantsModule = require(5066) /* metro dependency 5066: ApplicationCommandConstants */;
|
||||
const env0_1 = applicationCommandConstantsModule.FALSE_OPTION_NAME;
|
||||
const env0_2 = applicationCommandConstantsModule.TRUE_OPTION_NAME;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandChoiceUtils.tsx');
|
||||
exports.toChoiceBooleanValue = function(a0) {
|
||||
var value = a0.toLowerCase();
|
||||
value = value === TRUE_OPTION_NAME.toLowerCase();
|
||||
var value3 = a0.toLowerCase();
|
||||
var value4 = FALSE_OPTION_NAME.toLowerCase();
|
||||
if (value) {
|
||||
return value;
|
||||
}
|
||||
if (value3 === value4) {
|
||||
return value;
|
||||
}
|
||||
};
|
||||
exports.findChoiceStringValue = closure;
|
||||
exports.findChoiceNumberValue = closure2;
|
||||
exports.findAutocompleteChoiceStringValue = findAutocompleteChoiceStringValue;
|
||||
exports.findAutocompleteChoiceNumberValue = findAutocompleteChoiceNumberValue;
|
||||
}
|
||||
|
||||
function findChoiceStringValue(a0, a1) { // fn#63879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:159, offset: 0x01b94435, size: 70 bytes, params: 3, frame: 14
|
||||
var r0;
|
||||
var value2;
|
||||
const env0_0 = a1;
|
||||
const value = undefined;
|
||||
if (a0 == null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value2 = a0.find(function({displayName}) {
|
||||
return displayName === require;
|
||||
});
|
||||
r0 = value2 == null ? value : value2.value;
|
||||
}
|
||||
return typeof r0 === 'string' ? r0 : value;
|
||||
}
|
||||
|
||||
function findChoiceNumberValue(a0, a1) { // fn#63881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:299, offset: 0x01b94490, size: 70 bytes, params: 3, frame: 14
|
||||
var r0;
|
||||
var value2;
|
||||
const env0_0 = a1;
|
||||
const value = undefined;
|
||||
if (a0 == null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value2 = a0.find(function({displayName}) {
|
||||
return displayName === require;
|
||||
});
|
||||
r0 = value2 == null ? value : value2.value;
|
||||
}
|
||||
return typeof r0 === 'number' ? r0 : value;
|
||||
}
|
||||
|
||||
function findAutocompleteChoiceStringValue(a0, a1, a2) { // fn#63884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:813, offset: 0x01b9451d, size: 42 bytes, params: 4, frame: 14
|
||||
return findChoiceStringValue(ApplicationCommandAutocompleteStore.getAutocompleteLastChoices(a0, a1), a2);
|
||||
}
|
||||
|
||||
function findAutocompleteChoiceNumberValue(a0, a1, a2) { // fn#63885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:966, offset: 0x01b94547, size: 42 bytes, params: 4, frame: 14
|
||||
return findChoiceNumberValue(ApplicationCommandAutocompleteStore.getAutocompleteLastChoices(a0, a1), a2);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/* Metro module 5066; source: modules/application_commands/ApplicationCommandConstants.tsx; dependencies: [1244, 1909, 2] */
|
||||
function _fun43827(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5244:6, offset: 0x0115ffea, size: 358 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
let Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
Object = global.Object;
|
||||
const value = Object.freeze([]);
|
||||
Object = global.Object;
|
||||
const value2 = Object.freeze([]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandConstants.tsx');
|
||||
exports.TRUE_OPTION_NAME = 'True';
|
||||
exports.FALSE_OPTION_NAME = 'False';
|
||||
exports.BOOLEAN_CHOICES = [{'name': 'True', 'displayName': 'True', 'value': 'true'}, {'name': 'False',
|
||||
'displayName': 'False', 'value': 'false'}];
|
||||
exports.BuiltInSectionId = {BUILT_IN: '-1', FRECENCY: '-2'};
|
||||
exports.DISCOVERY_COMMANDS_QUERY_LIMIT_WEB = 10;
|
||||
exports.DISCOVERY_COMMANDS_QUERY_LIMIT_MOBILE = 5;
|
||||
exports.DISCOVERY_COMMANDS_QUERY_LIMIT = 5;
|
||||
exports.DISCOVERY_COMMANDS_FRECENCY_LIMIT = 5;
|
||||
exports.DISCOVERY_COMMAND_FRECENCY_GATEWAY_LIMIT = 25;
|
||||
exports.SUB_COMMAND_KEY_SEPARATOR = '\x00';
|
||||
exports.APPLICATION_COMMAND_PERMISSIONS_LIMIT = 100;
|
||||
exports.MAX_SUBCOMMAND_LEVEL = 3;
|
||||
exports.CONTEXT_MENU_COMMANDS_QUERY_LIMIT = 10;
|
||||
exports.AUTOCOMPLETE_OPTION_DEBOUNCE_TIME = 500;
|
||||
exports.EMPTY_COMMANDS = value;
|
||||
exports.EMPTY_COMMANDS_SECTION = value2;
|
||||
exports.APPLICATION_USER_INSTALL_BETA_USER_LIMIT = 200;
|
||||
exports.getValidationErrorText = getValidationErrorText;
|
||||
}
|
||||
|
||||
function getValidationErrorText({choices, type}) { // fn#43828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5244:970, offset: 0x01160150, size: 807 bytes, params: 2, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
if (choices != null) {
|
||||
return intl.string(t.xi5aah);
|
||||
}
|
||||
const ApplicationCommandOptionType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType;
|
||||
const BOOLEAN = ApplicationCommandOptionType.BOOLEAN;
|
||||
if (BOOLEAN === type) {
|
||||
return intl.string(t.ATIx6O);
|
||||
}
|
||||
const CHANNEL = ApplicationCommandOptionType.CHANNEL;
|
||||
if (CHANNEL === type) {
|
||||
return intl.string(t.Q0z2Gx);
|
||||
}
|
||||
const INTEGER = ApplicationCommandOptionType.INTEGER;
|
||||
if (INTEGER === type) {
|
||||
return intl.string(t['d/9Rk4']);
|
||||
}
|
||||
const NUMBER = ApplicationCommandOptionType.NUMBER;
|
||||
if (NUMBER === type) {
|
||||
return intl.string(t['FDyk/V']);
|
||||
}
|
||||
const ROLE = ApplicationCommandOptionType.ROLE;
|
||||
if (ROLE === type) {
|
||||
return intl.string(t.vrRQn0);
|
||||
}
|
||||
const USER = ApplicationCommandOptionType.USER;
|
||||
if (USER === type) {
|
||||
return intl.string(t.i2r7j5);
|
||||
}
|
||||
const MENTIONABLE = ApplicationCommandOptionType.MENTIONABLE;
|
||||
if (MENTIONABLE === type) {
|
||||
return intl.string(t.I7imec);
|
||||
}
|
||||
const string = intl.string;
|
||||
const EkDo1i = t.EkDo1i;
|
||||
return Reflect.apply(string, intl, [EkDo1i]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/* Metro module 11864; source: modules/application_commands/ApplicationCommandDiscoveryManager.tsx; dependencies: [629, 690, 2] */
|
||||
function _fun90969(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12050:6, offset: 0x0204e1d1, size: 134 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(629) /* metro dependency 629 */;
|
||||
value = value.create(function() {
|
||||
return {initialSectionId: undefined};
|
||||
});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandDiscoveryManager.tsx');
|
||||
exports.useCommandDiscoveryManager = value;
|
||||
exports.updateInitialSectionId = updateInitialSectionId;
|
||||
}
|
||||
|
||||
function updateInitialSectionId(a0) { // fn#90971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12050:309, offset: 0x0204e262, size: 54 bytes, params: 2, frame: 12
|
||||
const env0_0 = a0;
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun90972);
|
||||
}
|
||||
|
||||
function _fun90972() { // fn#90972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12050:366, offset: 0x0204e298, size: 29 bytes, params: 1, frame: 11
|
||||
return env1_2.setState(_fun90973);
|
||||
}
|
||||
|
||||
function _fun90973() { // fn#90973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12050:382, offset: 0x0204e2b5, size: 16 bytes, params: 1, frame: 2
|
||||
return {initialSectionId: env1_0};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/* Metro module 7870; source: modules/application_commands/ApplicationCommandFrecencyHooks.tsx; dependencies: [31, 7863, 670, 1362, 566, 2] */
|
||||
function _fun62982(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#62982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8048:6, offset: 0x01b6ddc1, size: 195 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const applicationCommandFrecencyStoreModule = require(7863) /* metro dependency 7863: ApplicationCommandFrecencyStore */;
|
||||
const env0_3 = applicationCommandFrecencyStoreModule.getFilteredTopCommands;
|
||||
const env0_4 = applicationCommandFrecencyStoreModule.getTopRealCommands;
|
||||
const applicationCommandFrecencyStore = importDefault(7863) /* metro dependency 7863: ApplicationCommandFrecencyStore */;
|
||||
const env0_6 = (require(670) /* metro dependency 670: UserSettingsConstants */).UserSettingsTypes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandFrecencyHooks.tsx');
|
||||
exports.useTopCommands = useTopCommands;
|
||||
exports.useTopRealCommands = useTopRealCommands;
|
||||
}
|
||||
|
||||
function useTopCommands(a0) { // fn#62983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8048:319, offset: 0x01b6de84, size: 120 bytes, params: 2, frame: 16
|
||||
const env0_0 = a0;
|
||||
const binding = env0_2;
|
||||
binding.useEffect(function() {
|
||||
var FrecencyUserSettingsActionCreators = require(dependencyMap[3]).FrecencyUserSettingsActionCreators;
|
||||
FrecencyUserSettingsActionCreators.loadIfUncached(UserSettingsTypes.FRECENCY_AND_FAVORITES_SETTINGS);
|
||||
}, []);
|
||||
return binding.useMemo(_fun62986,
|
||||
[(require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationCommandFrecencyStore],
|
||||
function() {
|
||||
return ApplicationCommandFrecencyStore.getTopCommandsWithoutLoadingLatest();
|
||||
}), a0]);
|
||||
}
|
||||
|
||||
function useTopRealCommands(a0) { // fn#62987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8048:605, offset: 0x01b6df61, size: 120 bytes, params: 2, frame: 16
|
||||
const env0_0 = a0;
|
||||
const binding = env0_2;
|
||||
binding.useEffect(function() {
|
||||
var FrecencyUserSettingsActionCreators = require(dependencyMap[3]).FrecencyUserSettingsActionCreators;
|
||||
FrecencyUserSettingsActionCreators.loadIfNecessary();
|
||||
}, []);
|
||||
return binding.useMemo(_fun62990,
|
||||
[(require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationCommandFrecencyStore],
|
||||
function() {
|
||||
return ApplicationCommandFrecencyStore.getTopCommandsWithoutLoadingLatest();
|
||||
}), a0]);
|
||||
}
|
||||
|
||||
function _fun62986() { // fn#62986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8048:564, offset: 0x01b6df45, size: 28 bytes, params: 1, frame: 13
|
||||
return getFilteredTopCommands(topCommandsWithoutLoadingLatest, env0_0);
|
||||
}
|
||||
|
||||
function _fun62990() { // fn#62990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8048:822, offset: 0x01b6e004, size: 37 bytes, params: 1, frame: 14
|
||||
return getTopRealCommands(getFilteredTopCommands(topCommandsWithoutLoadingLatest, env0_0));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,334 @@
|
||||
/* Metro module 7863; source: modules/application_commands/ApplicationCommandFrecencyStore.tsx; dependencies: [6, 7, 15, 17, 18, 1348, 5066, 4238, 670, 4393, 22, 566, 694, 2] */
|
||||
function _fun62911(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#62911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:6, offset: 0x01b6c199, size: 526 bytes, params: 8, frame: 20
|
||||
const _arrayLikeToArray_62917 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const getKey_62918 = function(a0, a1) {
|
||||
var r0;
|
||||
if (global.Number(a1.id) < 0) {
|
||||
r0 = a1.id;
|
||||
} else {
|
||||
r0 = a0?.guild;
|
||||
r0 = r0 == null ? a1.id : a1.guildId != null ? '' + a1.id + ':' + a0.guild.id : a1.id;
|
||||
}
|
||||
return r0;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
|
||||
let value = require(5066) /* metro dependency 5066: ApplicationCommandConstants */;
|
||||
const env0_8 = value.DISCOVERY_COMMAND_FRECENCY_GATEWAY_LIMIT;
|
||||
const env0_9 = value.SUB_COMMAND_KEY_SEPARATOR;
|
||||
const FREQUENCY_ITEM_LIMIT = (require(4238) /* metro dependency 4238: ApplicationConstants */).FREQUENCY_ITEM_LIMIT;
|
||||
const env0_10 = (require(670) /* metro dependency 670: UserSettingsConstants */).UserSettingsTypes;
|
||||
object = {pendingUsages: []};
|
||||
value = importDefault(4393) /* metro dependency 4393: Frecency */;
|
||||
value = new value({computeBonus: function() {
|
||||
return 1;
|
||||
}, lookupKey: function(a0) {
|
||||
return a0;
|
||||
}, afterCompute: function() {
|
||||
}, numFrequentlyItems: FREQUENCY_ITEM_LIMIT});
|
||||
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
|
||||
value = _fun62925(PersistedStore);
|
||||
value.displayName = 'ApplicationCommandFrecencyStore';
|
||||
value.persistKey = 'ApplicationCommandFrecencyV2';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
||||
{APPLICATION_COMMAND_USED: APPLICATION_COMMAND_USED_62933,
|
||||
USER_SETTINGS_PROTO_UPDATE: USER_SETTINGS_PROTO_UPDATE_62934});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandFrecencyStore.tsx');
|
||||
exports.default = value;
|
||||
exports.getTopRealCommands = getTopRealCommands;
|
||||
exports.getFilteredTopCommands = function(a0, a1) {
|
||||
var env0_0 = a1;
|
||||
return a0.filter(_fun62937).map(_fun62938);
|
||||
};
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_62912() { // fn#62912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:307, offset: 0x01b6c3a7, size: 94 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_62912_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_62915(a0, a1) { // fn#62915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:500, offset: 0x01b6c405, size: 370 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun62916;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_62917(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_62917(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_62917(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun62916;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function handleUserSettingsProtoStoreChange_62919() { // fn#62919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:1653, offset: 0x01b6c5ed, size: 111 bytes, params: 1, frame: 17
|
||||
const applicationCommandFrecency = UserSettingsProtoStore.frecencyWithoutFetchingLatest.applicationCommandFrecency;
|
||||
const value2 = undefined;
|
||||
const r7 = (applicationCommandFrecency == null ? value2 : applicationCommandFrecency.applicationCommands) ?? ({});
|
||||
const binding = env0_12;
|
||||
binding.overwriteHistory((importDefault(22) /* metro dependency 22 */).mapValues(r7, function(a0) {
|
||||
var r3;
|
||||
var object = {};
|
||||
copyDataProperties(object, a0, r3);
|
||||
var value = a0.recentUses.map(global.Number);
|
||||
value = value.filter(_fun62921);
|
||||
object['recentUses'] = value;
|
||||
return object;
|
||||
}), env0_11.pendingUsages);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun62925(a0) { // fn#62925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:1953, offset: 0x01b6c69f, size: 185 bytes, params: 2, frame: 16
|
||||
const closure = ApplicationCommandFrecencyStore;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: 'initialize', value: value_62927}, {key: 'getState', value: value_62928},
|
||||
{key: 'hasPendingUsage', value: value_62929}, {key: 'getCommandFrecencyWithoutLoadingLatest',
|
||||
value: value_62930}, {key: 'getScoreWithoutLoadingLatest', value: value_62931},
|
||||
{key: 'getTopCommandsWithoutLoadingLatest', value: value_62932}]);
|
||||
}
|
||||
|
||||
function APPLICATION_COMMAND_USED_62933({command, context}) { // fn#62933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:2970, offset: 0x01b6c7c2, size: 107 bytes, params: 2, frame: 17
|
||||
const key_62918 = getKey_62918(context, command);
|
||||
const pendingUsages = env0_11.pendingUsages;
|
||||
const push = pendingUsages.push;
|
||||
const object2 = {key: key_62918};
|
||||
const Date = global.Date;
|
||||
object2.timestamp = Date.now();
|
||||
Reflect.apply(push, pendingUsages, [object2]);
|
||||
env0_12.track(key_62918);
|
||||
env0_12.compute();
|
||||
}
|
||||
|
||||
function USER_SETTINGS_PROTO_UPDATE_62934({settings, wasSaved}) { // fn#62934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:3151, offset: 0x01b6c82d, size: 62 bytes, params: 2, frame: 4
|
||||
const type = settings.type;
|
||||
const FRECENCY_AND_FAVORITES_SETTINGS = UserSettingsTypes.FRECENCY_AND_FAVORITES_SETTINGS;
|
||||
if (type === FRECENCY_AND_FAVORITES_SETTINGS) {
|
||||
if (wasSaved) {
|
||||
env0_11.pendingUsages = [];
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getTopRealCommands(a0) { // fn#62935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:3433, offset: 0x01b6c86b, size: 153 bytes, params: 2, frame: 20
|
||||
var r9;
|
||||
var r3;
|
||||
var value5;
|
||||
var split;
|
||||
var property;
|
||||
var Number;
|
||||
var size;
|
||||
var value6;
|
||||
const Set = global.Set;
|
||||
const set = new Set();
|
||||
const value3 = _createForOfIteratorHelperLoose_62915(a0);
|
||||
const value4 = value3();
|
||||
let done = value4.done;
|
||||
if (!done) {
|
||||
r3 = value4;
|
||||
while (true) {
|
||||
value5 = r3.value;
|
||||
split = value5.split;
|
||||
property = Reflect.apply(split, value5, [SUB_COMMAND_KEY_SEPARATOR])[0];
|
||||
Number = global.Number;
|
||||
if (Number(property) > 0) {
|
||||
set.add(property);
|
||||
}
|
||||
size = set.size;
|
||||
if (size >= DISCOVERY_COMMAND_FRECENCY_GATEWAY_LIMIT) {
|
||||
r9 = value5;
|
||||
break;
|
||||
}
|
||||
value6 = value3();
|
||||
done = value6.done;
|
||||
if (done) {
|
||||
r9 = value5;
|
||||
break;
|
||||
}
|
||||
r3 = value6;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
const items2 = [];
|
||||
arraySpread(items2, set, 0, r9);
|
||||
return items2;
|
||||
}
|
||||
|
||||
function getFilteredTopCommands(a0, a1) { // fn#62936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:3644, offset: 0x01b6c904, size: 44 bytes, params: 3, frame: 12
|
||||
const env0_0 = a1;
|
||||
return a0.filter(_fun62937).map(function(a0) {
|
||||
return a0.split(':')[0];
|
||||
});
|
||||
}
|
||||
|
||||
function _fun62920(a0) { // fn#62920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:1863, offset: 0x01b6c65c, size: 67 bytes, params: 2, frame: 13
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a0, undefined);
|
||||
const recentUses = a0.recentUses;
|
||||
const map = recentUses.map;
|
||||
const Number = global.Number;
|
||||
let value = Reflect.apply(map, recentUses, [Number]);
|
||||
value = value.filter(function(a0) {
|
||||
return a0 > 0;
|
||||
});
|
||||
object2['recentUses'] = value;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function value_62927(a0) { // fn#62927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:2338, offset: 0x01b6c758, size: 54 bytes, params: 2, frame: 14
|
||||
var value;
|
||||
if (a0 != null) {
|
||||
value = environment.__proto__;
|
||||
env1_11 = a0;
|
||||
}
|
||||
this.syncWith([UserSettingsProtoStore], handleUserSettingsProtoStoreChange_62919);
|
||||
}
|
||||
|
||||
function value_62931(a0, a1) { // fn#62931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:2655, offset: 0x01b6c78e, size: 52 bytes, params: 3, frame: 15
|
||||
const value = environment.__proto__;
|
||||
return env1_12.getScore(getKey_62918(a0, a1)) ?? 0;
|
||||
}
|
||||
|
||||
function _fun62937(a0) { // fn#62937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:3698, offset: 0x01b6c930, size: 97 bytes, params: 2, frame: 15
|
||||
var r1;
|
||||
var r0;
|
||||
var value4;
|
||||
var id;
|
||||
let value = a0.includes(':');
|
||||
if (value) {
|
||||
value4 = require?.guild != null;
|
||||
if (value4) {
|
||||
id = require.guild.id;
|
||||
value = a0.split(':');
|
||||
value = id === value[1];
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value4;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = !value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
/* Metro module 7865; source: modules/application_commands/ApplicationCommandIndexActionCreators.tsx; dependencies: [5, 661, 694, 507, 672, 683, 1360, 2] */
|
||||
function _fun62942(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#62942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:6, offset: 0x01b6ca89, size: 177 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_4 = constantsModule.AnalyticEvents;
|
||||
const env0_5 = constantsModule.Endpoints;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandIndexActionCreators.tsx');
|
||||
exports.fetchApplicationCommandIndex = function() {
|
||||
return _fetchApplicationCommandIndex.apply(this, arguments);
|
||||
};
|
||||
exports.requestApplicationCommandIndex = requestApplicationCommandIndex;
|
||||
}
|
||||
|
||||
function _fetchApplicationCommandIndex() { // fn#62943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:149, offset: 0x01b6cb3a, size: 48 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun62945).apply(this, arguments);
|
||||
}
|
||||
|
||||
function getTargetId(a0) { // fn#62956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:1718, offset: 0x01b6d081, size: 103 bytes, params: 2, frame: 12
|
||||
const type = a0.type;
|
||||
if (type === 'channel') {
|
||||
return a0.channelId;
|
||||
}
|
||||
if (type === 'guild') {
|
||||
return a0.guildId;
|
||||
}
|
||||
if (type === 'user') {
|
||||
return null;
|
||||
}
|
||||
if (type === 'application') {
|
||||
return a0.applicationId;
|
||||
}
|
||||
(require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(a0);
|
||||
}
|
||||
|
||||
function requestApplicationCommandIndex(a0) { // fn#62958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:2183, offset: 0x01b6d0e8, size: 57 bytes, params: 2, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'APPLICATION_COMMAND_INDEX_FETCH_REQUEST',
|
||||
target: a0});
|
||||
}
|
||||
|
||||
function* _fun62945(a0, a1) { // fn#62945, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:230, offset: 0x01b6cb73, size: 286 bytes, params: 3, frame: 15
|
||||
var environment;
|
||||
var binding;
|
||||
var APPLICATION_COMMAND_INDEX_USER;
|
||||
if (true) {
|
||||
var env0_0 = a0;
|
||||
var env0_1 = a1;
|
||||
var env0_2;
|
||||
var env0_3;
|
||||
var env0_5;
|
||||
var env0_6;
|
||||
env0_3 = global.performance.now();
|
||||
env0_5 = [];
|
||||
var type = a0.type;
|
||||
if (type === 'channel') {
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_5;
|
||||
env0_2 = binding.APPLICATION_COMMAND_INDEX_CHANNEL(a0.channelId);
|
||||
} else if (type === 'guild') {
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_5;
|
||||
env0_2 = binding.APPLICATION_COMMAND_INDEX_GUILD(a0.guildId);
|
||||
} else if (type === 'user') {
|
||||
value = environment.__proto__.__proto__;
|
||||
APPLICATION_COMMAND_INDEX_USER = env2_5.APPLICATION_COMMAND_INDEX_USER;
|
||||
} else if (type === 'application') {
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_5;
|
||||
env0_2 = binding.APPLICATION_COMMAND_INDEX_APPLICATION(a0.applicationId);
|
||||
}
|
||||
env0_6 = _fun62946();
|
||||
yield fetch_62951();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun62946() { // fn#62946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:566, offset: 0x01b6cc91, size: 32 bytes, params: 1, frame: 12
|
||||
const env0_0 = env3_3(_fun62948);
|
||||
return _fun62950;
|
||||
}
|
||||
|
||||
function fetch_62951() { // fn#62951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:830, offset: 0x01b6cd78, size: 129 bytes, params: 1, frame: 16
|
||||
var environment;
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
const HTTP = env3_0(env3_2[3]).HTTP;
|
||||
const get = HTTP.get;
|
||||
return Reflect.apply(get, HTTP, [{url: APPLICATION_COMMAND_INDEX_USER, retries: 3 - env0_4 - 1,
|
||||
signal: require.signal, onRequestCreated: onRequestCreated, rejectWithError: false}]).then(_fun62953, _fun62954);
|
||||
}
|
||||
|
||||
function end_62955({error}) { // fn#62955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:1365, offset: 0x01b6cfa9, size: 216 bytes, params: 2, frame: 20
|
||||
let value = global.performance.now();
|
||||
value -= env0_3;
|
||||
let binding = env3_1;
|
||||
const value4 = binding(env3_2[5]);
|
||||
const track = value4.track;
|
||||
const APPLICATION_COMMAND_PERFORMANCE = env3_4.APPLICATION_COMMAND_PERFORMANCE;
|
||||
const object2 = {duration_ms: value, error: error};
|
||||
object2.aborted = require.signal.aborted;
|
||||
object2.include_applications = true;
|
||||
const Math = global.Math;
|
||||
object2.retries = Math.max(env0_4 - 1, 0);
|
||||
object2.kind = null;
|
||||
object2.command_type = null;
|
||||
object2.url = APPLICATION_COMMAND_INDEX_USER;
|
||||
binding = env0_0;
|
||||
object2.target_type = binding.type;
|
||||
object2.target_id = env3_7(binding);
|
||||
object2.failure_statuses = env0_5;
|
||||
Reflect.apply(track, value4, [APPLICATION_COMMAND_PERFORMANCE, object2]);
|
||||
}
|
||||
|
||||
function* _fun62948(a0) { // fn#62948, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:586, offset: 0x01b6ccba, size: 190 bytes, params: 2, frame: 15
|
||||
var environment;
|
||||
var binding;
|
||||
var value7;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
const env0_0 = a0;
|
||||
value = environment.__proto__.__proto__;
|
||||
if (env2_4 >= 3) {
|
||||
binding = env2_5;
|
||||
binding.push(1002);
|
||||
binding = env2_8;
|
||||
binding({error: true});
|
||||
value7 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
|
||||
binding = env5_1;
|
||||
return binding(env5_2[2]).dispatch({type: 'APPLICATION_COMMAND_INDEX_FETCH_FAILURE', target: env2_0});
|
||||
}
|
||||
const Promise = global.Promise;
|
||||
const value3 = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
const promise = new Promise(_fun62949);
|
||||
yield promise instanceof Object ? promise : value3;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
return env2_7();
|
||||
}
|
||||
|
||||
function fetch_62951OnRequestCreated() { // fn#62952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:905, owner: fetch_62951.onRequestCreated, offset: 0x01b6cdf9, size: 19 bytes, params: 1, frame: 3
|
||||
const binding = env1_4;
|
||||
const value2 = typeof binding === 'bigint' ? binding : +binding;
|
||||
env1_4 = typeof value2 === 'bigint' ? value2 + 1n : +value2 + 1;
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun62953(a0) { // fn#62953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:940, offset: 0x01b6ce0c, size: 138 bytes, params: 2, frame: 15
|
||||
var r0;
|
||||
var value;
|
||||
var value2;
|
||||
if (a0.status === 202) {
|
||||
value = environment.__proto__;
|
||||
env1_5.push(202);
|
||||
value = env1_6(5000);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
end_62955({error: false});
|
||||
value2 = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
value = env4_1(env4_2[2]).dispatch({type: 'APPLICATION_COMMAND_INDEX_FETCH_SUCCESS', target: env1_0,
|
||||
index: a0.body});
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun62954(a0) { // fn#62954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:1088, offset: 0x01b6ce96, size: 275 bytes, params: 2, frame: 16
|
||||
var r0;
|
||||
var binding;
|
||||
var push;
|
||||
var end_62955Binding;
|
||||
var value3;
|
||||
var retry_after;
|
||||
let value = environment.__proto__;
|
||||
if (require.signal.aborted) {
|
||||
env1_5.push(1001);
|
||||
end_62955Binding = end_62955;
|
||||
value = undefined;
|
||||
end_62955Binding({error: true});
|
||||
r0 = value;
|
||||
} else if (a0.status === 429) {
|
||||
binding = env1_5;
|
||||
binding.push(429);
|
||||
binding = env1_6;
|
||||
retry_after = a0.body.retry_after;
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
value = binding(retry_after * env4_1(env4_2[4]).Millis.SECOND);
|
||||
r0 = value;
|
||||
} else {
|
||||
binding = env1_5;
|
||||
push = binding.push;
|
||||
r0 = a0.status ?? 1000;
|
||||
Reflect.apply(push, binding, [r0]);
|
||||
end_62955({error: true});
|
||||
value3 = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
binding = env4_1;
|
||||
r0 = binding(env4_2[2]).dispatch({type: 'APPLICATION_COMMAND_INDEX_FETCH_FAILURE', target: env1_0});
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,425 @@
|
||||
/* Metro module 8051; source: modules/application_commands/ApplicationCommandOptionUtils.tsx; dependencies: [5066, 44, 8052, 4100, 1909, 2] */
|
||||
function _fun63857(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:6, offset: 0x01b93765, size: 308 bytes, params: 8, frame: 24
|
||||
let env0_0 = require;
|
||||
const _arrayLikeToArray_63860 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const closure = function(a0) {
|
||||
var env0_0 = a0;
|
||||
return a0 == null ? [] : a0.filter(_fun63862);
|
||||
};
|
||||
const closure2 = getBoolean;
|
||||
const closure3 = getChannelId;
|
||||
const closure4 = getUserId_63865;
|
||||
const closure5 = getRoleId;
|
||||
const closure6 = getString_63867;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_6 = (require(5066) /* metro dependency 5066: ApplicationCommandConstants */).TRUE_OPTION_NAME;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandOptionUtils.tsx');
|
||||
exports.filterEmpty = closure;
|
||||
exports.getBoolean = closure2;
|
||||
exports.getOptionalBoolean = getOptionalBoolean;
|
||||
exports.getChannelId = closure3;
|
||||
exports.getOptionalChannelId = getOptionalChannelId;
|
||||
exports.getUserId = closure4;
|
||||
exports.getOptionalUserId = getOptionalUserId;
|
||||
exports.getRoleId = closure5;
|
||||
exports.getOptionalRoleId = getOptionalRoleId;
|
||||
exports.getString = closure6;
|
||||
exports.getOptionalString = getOptionalString;
|
||||
exports.normalizeNumericString = normalizeNumericString;
|
||||
exports.getInitialValuesFromInteractionOptions = getInitialValuesFromInteractionOptions;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_63858(a0, a1) { // fn#63858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:134, offset: 0x01b93899, size: 370 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun63859;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_63860(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_63860(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_63860(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun63859;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function filterEmpty(a0) { // fn#63861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:1044, offset: 0x01b93a0b, size: 38 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
return a0 == null ? [] : a0.filter(_fun63862);
|
||||
}
|
||||
|
||||
function getBoolean(a0, a1) { // fn#63863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:1173, offset: 0x01b93a8f, size: 135 bytes, params: 3, frame: 18
|
||||
const filterEmptyBinding = filterEmpty;
|
||||
const value2 = undefined;
|
||||
const value3 = filterEmptyBinding(a0[a1]);
|
||||
(importDefault(44) /* metro dependency 44 */)(value3.length === 1, 'Contains multiple values');
|
||||
const defaultImport2 = importDefault(44) /* metro dependency 44 */;
|
||||
const property = value3[0];
|
||||
defaultImport2((property == null ? value2 : property.type) === 'text', 'First value is not text');
|
||||
return value3[0].text === TRUE_OPTION_NAME;
|
||||
}
|
||||
|
||||
function getChannelId(a0, a1) { // fn#63864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:1369, offset: 0x01b93b16, size: 127 bytes, params: 3, frame: 17
|
||||
const filterEmptyBinding = filterEmpty;
|
||||
const value2 = undefined;
|
||||
const value3 = filterEmptyBinding(a0[a1]);
|
||||
(importDefault(44) /* metro dependency 44 */)(value3.length === 1, 'Contains multiple values');
|
||||
const value = importDefault(44) /* metro dependency 44 */;
|
||||
const property = value3[0];
|
||||
value((property == null ? value2 : property.type) === 'channelMention', 'First value is not a channel mention');
|
||||
return value3[0].channelId;
|
||||
}
|
||||
|
||||
function getUserId_63865(a0, a1) { // fn#63865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:1591, offset: 0x01b93b95, size: 129 bytes, params: 3, frame: 17
|
||||
const filterEmptyBinding = filterEmpty;
|
||||
const value2 = undefined;
|
||||
const value3 = filterEmptyBinding(a0[a1]);
|
||||
(importDefault(44) /* metro dependency 44 */)(value3.length === 1, 'Contains multiple values');
|
||||
const value = importDefault(44) /* metro dependency 44 */;
|
||||
const property = value3[0];
|
||||
value((property == null ? value2 : property.type) === 'userMention', 'First value is not a user mention');
|
||||
return value3[0].userId;
|
||||
}
|
||||
|
||||
function getRoleId(a0, a1) { // fn#63866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:1801, offset: 0x01b93c16, size: 128 bytes, params: 3, frame: 17
|
||||
const filterEmptyBinding = filterEmpty;
|
||||
const value2 = undefined;
|
||||
const value3 = filterEmptyBinding(a0[a1]);
|
||||
(importDefault(44) /* metro dependency 44 */)(value3.length === 1, 'Contains multiple values');
|
||||
const value = importDefault(44) /* metro dependency 44 */;
|
||||
const property = value3[0];
|
||||
value((property == null ? value2 : property.type) === 'roleMention', 'First value is not a role mention');
|
||||
return value3[0].roleId;
|
||||
}
|
||||
|
||||
function getString_63867(a0, a1) { // fn#63867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:2011, offset: 0x01b93c96, size: 420 bytes, params: 3, frame: 42
|
||||
var r2;
|
||||
var r3;
|
||||
var r28;
|
||||
var r24;
|
||||
var r0;
|
||||
var value5;
|
||||
var type;
|
||||
var animated;
|
||||
var name;
|
||||
var replace;
|
||||
var value6;
|
||||
var split;
|
||||
var property;
|
||||
var emojiId;
|
||||
var HermesInternal;
|
||||
var concat;
|
||||
var value7;
|
||||
var surrogate;
|
||||
var value8;
|
||||
var roleId;
|
||||
var value9;
|
||||
var channelId;
|
||||
var value10;
|
||||
var userId;
|
||||
var value11;
|
||||
var text;
|
||||
var value12;
|
||||
var value13;
|
||||
const value = _createForOfIteratorHelperLoose_63858(a0[a1]);
|
||||
const value2 = value();
|
||||
let done = value2.done;
|
||||
const value3 = '';
|
||||
if (done) {
|
||||
r0 = value3;
|
||||
} else {
|
||||
r2 = value3;
|
||||
r3 = value2;
|
||||
reducibleLoop1: while (true) {
|
||||
value5 = r3.value;
|
||||
type = value5.type;
|
||||
reducibleJoin15: while (true) {
|
||||
reducibleJoin14: while (true) {
|
||||
if (type === 'text') {
|
||||
break reducibleJoin14;
|
||||
}
|
||||
if (type === 'textMention') {
|
||||
break reducibleJoin14;
|
||||
}
|
||||
if (type === 'userMention') {
|
||||
userId = value5.userId;
|
||||
concat = global.HermesInternal.concat;
|
||||
value11 = r2 + ('<@' + userId + '>');
|
||||
r24 = value11;
|
||||
break reducibleJoin15;
|
||||
}
|
||||
if (type === 'channelMention') {
|
||||
channelId = value5.channelId;
|
||||
concat = global.HermesInternal.concat;
|
||||
value10 = r2 + ('<#' + channelId + '>');
|
||||
r24 = value10;
|
||||
break reducibleJoin15;
|
||||
}
|
||||
if (type === 'roleMention') {
|
||||
roleId = value5.roleId;
|
||||
concat = global.HermesInternal.concat;
|
||||
value9 = r2 + ('<@&' + roleId + '>');
|
||||
r24 = value9;
|
||||
break reducibleJoin15;
|
||||
}
|
||||
if (type === 'emoji') {
|
||||
surrogate = value5.surrogate;
|
||||
value8 = r2 + surrogate;
|
||||
r24 = value8;
|
||||
break reducibleJoin15;
|
||||
}
|
||||
if (type !== 'customEmoji') {
|
||||
r24 = r2;
|
||||
break reducibleJoin15;
|
||||
}
|
||||
animated = value5.animated;
|
||||
r28 = animated ? 'a' : value3;
|
||||
name = value5.name;
|
||||
replace = name.replace;
|
||||
value6 = Reflect.apply(replace, name, [RegExp(':', 'g'), value3]);
|
||||
split = value6.split;
|
||||
property = Reflect.apply(split, value6, ['~'])[0];
|
||||
emojiId = value5.emojiId;
|
||||
HermesInternal = global.HermesInternal;
|
||||
concat = HermesInternal.concat;
|
||||
value7 = r2 + ('<' + r28 + ':' + property + ':' + emojiId + '>');
|
||||
r24 = value7;
|
||||
break reducibleJoin15;
|
||||
}
|
||||
text = value5.text;
|
||||
value12 = r2 + text;
|
||||
r24 = value12;
|
||||
break reducibleJoin15;
|
||||
}
|
||||
value13 = value();
|
||||
done = value13.done;
|
||||
if (done) {
|
||||
r0 = r24;
|
||||
break reducibleLoop1;
|
||||
}
|
||||
r2 = r24;
|
||||
r3 = value13;
|
||||
continue reducibleLoop1;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getOptionalBoolean(a0, a1) { // fn#63868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:2633, offset: 0x01b93e3a, size: 36 bytes, params: 3, frame: 14
|
||||
const value = null;
|
||||
return value == a0[a1] ? value : getBoolean(a0, a1);
|
||||
}
|
||||
|
||||
function getOptionalChannelId(a0, a1) { // fn#63869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:2759, offset: 0x01b93e5e, size: 36 bytes, params: 3, frame: 14
|
||||
const value = null;
|
||||
return value == a0[a1] ? value : getChannelId(a0, a1);
|
||||
}
|
||||
|
||||
function getOptionalUserId(a0, a1) { // fn#63870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:2880, offset: 0x01b93e82, size: 36 bytes, params: 3, frame: 14
|
||||
const value = null;
|
||||
return value == a0[a1] ? value : getUserId_63865(a0, a1);
|
||||
}
|
||||
|
||||
function getOptionalRoleId(a0, a1) { // fn#63871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:2995, offset: 0x01b93ea6, size: 36 bytes, params: 3, frame: 14
|
||||
const value = null;
|
||||
return value == a0[a1] ? value : getRoleId(a0, a1);
|
||||
}
|
||||
|
||||
function getOptionalString(a0, a1) { // fn#63872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:3110, offset: 0x01b93eca, size: 36 bytes, params: 3, frame: 14
|
||||
const value = null;
|
||||
return value == a0[a1] ? value : getString_63867(a0, a1);
|
||||
}
|
||||
|
||||
function normalizeNumericString(a0, a1) { // fn#63873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:3207, offset: 0x01b93eee, size: 263 bytes, params: 3, frame: 21
|
||||
var r1;
|
||||
const numberParts = (require(8052) /* metro dependency 8052: numberParts */).numberParts;
|
||||
var group;
|
||||
var decimal;
|
||||
var RegExp;
|
||||
var value2;
|
||||
var prototype;
|
||||
var value3;
|
||||
var regExp;
|
||||
var value5;
|
||||
var value6;
|
||||
if (a0 !== env0_5) {
|
||||
env0_5 = a0;
|
||||
r1 = numberParts[a0] ?? numberParts['en-US'];
|
||||
group = r1.group;
|
||||
decimal = r1.decimal;
|
||||
RegExp = global.RegExp;
|
||||
value2 = (importDefault(4100) /* metro dependency 4100: RegexUtils */).escape(group);
|
||||
prototype = RegExp.prototype;
|
||||
value3 = Object.create(prototype, {constructor: {value: RegExp}});
|
||||
regExp = new RegExp(value2, 'g');
|
||||
env0_3 = regExp instanceof Object ? regExp : value3;
|
||||
RegExp = global.RegExp;
|
||||
value5 = (importDefault(4100) /* metro dependency 4100: RegexUtils */).escape(decimal);
|
||||
prototype = RegExp.prototype;
|
||||
value6 = Object.create(prototype, {constructor: {value: RegExp}});
|
||||
regExp = new RegExp(value5, 'g');
|
||||
env0_4 = regExp instanceof Object ? regExp : value6;
|
||||
}
|
||||
return a1.replace(env0_3, '').replace(env0_4, '.');
|
||||
}
|
||||
|
||||
function getInitialValuesFromInteractionOptions(a0, a1) { // fn#63874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:3511, offset: 0x01b93ff5, size: 76 bytes, params: 3, frame: 15
|
||||
var r2;
|
||||
var value3;
|
||||
var value4;
|
||||
const env0_0 = a0;
|
||||
const closure = getInitialValuesFromInteractionOptions_loop;
|
||||
const value = _createForOfIteratorHelperLoose_63858(a1);
|
||||
const value2 = value();
|
||||
let done = value2.done;
|
||||
if (!done) {
|
||||
for (r2 = value2; true; r2 = value4) {
|
||||
value3 = r2.value;
|
||||
closure(value3);
|
||||
value4 = value();
|
||||
done = value4.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
function _fun63862(a0, a1) { // fn#63862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:1096, offset: 0x01b93a31, size: 94 bytes, params: 3, frame: 12
|
||||
var r1;
|
||||
var r0;
|
||||
let value = a0.type !== 'text';
|
||||
if (value) {
|
||||
r0 = value;
|
||||
} else {
|
||||
if (a1 > 0) {
|
||||
if (a1 < env0_0.length - 1) {
|
||||
r1 = a0.text !== '';
|
||||
} else {
|
||||
value = a0.text.trim();
|
||||
value = value !== '';
|
||||
r1 = value;
|
||||
}
|
||||
} else {
|
||||
value = a0.text.trim();
|
||||
value = value !== '';
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getInitialValuesFromInteractionOptions_loop(a0) { // fn#63875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:3585, owner: getInitialValuesFromInteractionOptions._loop, offset: 0x01b94041, size: 128 bytes, params: 2, frame: 17
|
||||
var r0;
|
||||
const options = a0.options;
|
||||
const value2 = undefined;
|
||||
const r3 = options == null ? value2 : options.find(_fun63876);
|
||||
const type = a0.type;
|
||||
const ApplicationCommandOptionType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType;
|
||||
const ATTACHMENT = ApplicationCommandOptionType.ATTACHMENT;
|
||||
const value5 = 0;
|
||||
if (type === ATTACHMENT) {
|
||||
r0 = value5;
|
||||
} else if (r3 == null) {
|
||||
env0_1[a0.name] = a0;
|
||||
r0 = value2;
|
||||
} else if (r3.autocomplete) {
|
||||
r0 = value5;
|
||||
} else {
|
||||
env0_1[a0.name] = a0;
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,646 @@
|
||||
/* Metro module 8060; source: modules/application_commands/ApplicationCommandQueryApi.tsx; dependencies: [57, 31, 1867, 7861, 5066, 661, 5065, 7869, 566, 7871, 1360, 1909, 7866, 8039, 5068, 2] */
|
||||
function _fun63958(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:6, offset: 0x01b974ce, size: 509 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_63961 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const closure = useCommandsForApplication;
|
||||
const createPlaceholderCommands = function(a0, a1) {
|
||||
var r3;
|
||||
var items = [];
|
||||
var value = 0;
|
||||
if (value < a0) {
|
||||
for (r3 = value; true; r3 = value) {
|
||||
items.push(createPlaceholderCommand(r3, a1));
|
||||
value = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
|
||||
if (!(value < a0)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return items;
|
||||
};
|
||||
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 */;
|
||||
const applicationCommandIndexStoreModule = require(7861) /* metro dependency 7861: ApplicationCommandIndexStore */;
|
||||
const env0_6 = applicationCommandIndexStoreModule.useContextIndexState;
|
||||
const env0_7 = applicationCommandIndexStoreModule.useDiscoveryState;
|
||||
const env0_8 = applicationCommandIndexStoreModule.useQueryState;
|
||||
const env0_9 = applicationCommandIndexStoreModule.useUserIndexState;
|
||||
const applicationCommandIndexStore = importDefault(7861) /* metro dependency 7861: ApplicationCommandIndexStore */;
|
||||
const env0_11 = (require(5066) /* metro dependency 5066: ApplicationCommandConstants */).BuiltInSectionId;
|
||||
const env0_12 = (require(661) /* metro dependency 661: Constants */).NOOP;
|
||||
const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType;
|
||||
const CHAT = ApplicationCommandType.CHAT;
|
||||
object = [CHAT];
|
||||
object = {'id': 'placeholder-section', 'type': null, 'name': ''};
|
||||
const ApplicationCommandSectionType = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandSectionType;
|
||||
const APPLICATION = ApplicationCommandSectionType.APPLICATION;
|
||||
object.type = APPLICATION;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandQueryApi.tsx');
|
||||
exports.getCachedCommand = getCachedCommand;
|
||||
exports.getCachedApplicationSection = getCachedApplicationSection;
|
||||
exports.getCachedResults = getCachedResults_63974;
|
||||
exports.getChangeKeys = getChangeKeys;
|
||||
exports.useCachedResults = useCachedResults;
|
||||
exports.useDiscovery = useDiscovery;
|
||||
exports.executeQuery = executeQuery;
|
||||
exports.useQuery = useQuery;
|
||||
exports.useCommand = useCommand;
|
||||
exports.useCommandsForApplication = closure;
|
||||
exports.useAccessibleCommandsForApplication = useAccessibleCommandsForApplication;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_63959(a0, a1) { // fn#63959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:287, offset: 0x01b976cb, size: 370 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun63960;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_63961(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_63961(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_63961(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun63960;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function findCommandInSection(a0, a1) { // fn#63962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:1197, offset: 0x01b9783d, size: 208 bytes, params: 3, frame: 18
|
||||
var rootCommand;
|
||||
var r2;
|
||||
var commands;
|
||||
var Object;
|
||||
var values;
|
||||
var value;
|
||||
var value2;
|
||||
var buildCommand;
|
||||
var application;
|
||||
const env0_0 = a1;
|
||||
if (a1 != null) {
|
||||
commands = a0.commands;
|
||||
if (commands[a1] != null) {
|
||||
return a0.commands[a1];
|
||||
}
|
||||
Object = global.Object;
|
||||
values = Object.values;
|
||||
commands = a0.commands;
|
||||
value = Reflect.apply(values, Object, [commands]);
|
||||
value = value.find(_fun63963);
|
||||
value2 = undefined;
|
||||
rootCommand = value == null ? value2 : value.rootCommand;
|
||||
if (rootCommand != null) {
|
||||
value = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
|
||||
buildCommand = value.buildCommand;
|
||||
application = a0.descriptor.application;
|
||||
value = Reflect.apply(buildCommand, value, [{rootCommand: rootCommand, command: rootCommand,
|
||||
applicationId: (application == null ? value2 : application.id) ?? ''}]);
|
||||
r2 = value;
|
||||
} else {
|
||||
r2 = value2;
|
||||
}
|
||||
return r2;
|
||||
}
|
||||
}
|
||||
|
||||
function useCommandsForApplication(a0, a1, a2) { // fn#63964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:1576, offset: 0x01b97933, size: 129 bytes, params: 4, frame: 21
|
||||
const env0_0 = a1;
|
||||
const env0_1 = a2;
|
||||
const value2 = undefined;
|
||||
const value3 = useUserIndexState(true, true);
|
||||
const value4 = useContextIndexState(a0, true, true);
|
||||
return env0_4.useMemo(_fun63965, [value3 == null ? value2 : value3.result, value4 == null ? value2 : value4.result,
|
||||
a1, a2]);
|
||||
}
|
||||
|
||||
function createPlaceholderCommand(a0, a1) { // fn#63970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:2673, offset: 0x01b97bd9, size: 110 bytes, params: 3, frame: 13
|
||||
const ApplicationCommandInputType = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandInputType;
|
||||
const PLACEHOLDER = ApplicationCommandInputType.PLACEHOLDER;
|
||||
return {'type': null, 'inputType': null, 'id': null, 'untranslatedName': '', 'displayName': '',
|
||||
'untranslatedDescription': '', 'displayDescription': '', 'applicationId': '', type: a1, inputType: PLACEHOLDER,
|
||||
id: 'placeholder-' + a0, section: env0_14};
|
||||
}
|
||||
|
||||
function getCachedCommand(a0, a1, a2) { // fn#63971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:3035, offset: 0x01b97c47, size: 322 bytes, params: 4, frame: 22
|
||||
var value9;
|
||||
var commandInSection;
|
||||
var value10;
|
||||
var value11;
|
||||
const env0_0 = a2;
|
||||
if (a1 == null) {
|
||||
return {application: undefined, command: undefined};
|
||||
}
|
||||
const userState = ApplicationCommandIndexStore.getUserState();
|
||||
const contextState = ApplicationCommandIndexStore.getContextState(a0);
|
||||
let Object = global.Object;
|
||||
let values = Object.values;
|
||||
let result = userState.result;
|
||||
const value4 = undefined;
|
||||
const value5 = Reflect.apply(values, Object, [(result == null ? value4 : result.sections) ?? ({})]);
|
||||
const concat = value5.concat;
|
||||
Object = global.Object;
|
||||
values = Object.values;
|
||||
result = contextState.result;
|
||||
const value6 = Reflect.apply(concat, value5, [Reflect.apply(values, Object,
|
||||
[(result == null ? value4 : result.sections) ?? ({})])]);
|
||||
if (a2 != null) {
|
||||
value11 = value6.find(_fun63972);
|
||||
if (value11 != null) {
|
||||
return {application: value11.descriptor.application, command: findCommandInSection(value11, a1)};
|
||||
}
|
||||
return {application: value4, command: value4};
|
||||
}
|
||||
const value7 = _createForOfIteratorHelperLoose_63959(value6);
|
||||
const value8 = value7();
|
||||
let done = value8.done;
|
||||
if (done) {
|
||||
return {application: value4, command: value4};
|
||||
}
|
||||
let r9 = value8;
|
||||
loopExit11: while (true) {
|
||||
value9 = r9.value;
|
||||
commandInSection = findCommandInSection(value9, a1);
|
||||
if (commandInSection != null) {
|
||||
break loopExit11;
|
||||
}
|
||||
value10 = value7();
|
||||
done = value10.done;
|
||||
if (done) {
|
||||
return {application: value4, command: value4};
|
||||
}
|
||||
r9 = value10;
|
||||
continue;
|
||||
}
|
||||
return {application: value9.descriptor.application, command: commandInSection};
|
||||
}
|
||||
|
||||
function getCachedApplicationSection(a0, a1, a2) { // fn#63973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:3771, offset: 0x01b97db4, size: 180 bytes, params: 4, frame: 16
|
||||
let value = ApplicationCommandIndexStore.getUserState();
|
||||
const contextState = ApplicationCommandIndexStore.getContextState(a0);
|
||||
const applicationState = ApplicationCommandIndexStore.getApplicationState(a2);
|
||||
const result = value.result;
|
||||
value = undefined;
|
||||
let r1 = result == null || result.sections == null ? value : result.sections[a2];
|
||||
r1 = r1 ?? (contextState.result == null || contextState.result.sections == null ? value : contextState.result.sections[a2]);
|
||||
r1 = r1 ?? (applicationState.result == null || applicationState.result.sections == null ? value : applicationState.result.sections[a2]);
|
||||
return r1 == null ? value : r1.descriptor;
|
||||
}
|
||||
|
||||
function getCachedResults_63974(a0, a1, a2) { // fn#63974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:4139, offset: 0x01b97e68, size: 122 bytes, params: 4, frame: 17
|
||||
const query = ApplicationCommandIndexStore.query;
|
||||
const ScoreMethod = (require(7869) /* metro dependency 7869: ApplicationCommandQueryTypes */).ScoreMethod;
|
||||
const COMMAND_OR_APPLICATION = ScoreMethod.COMMAND_OR_APPLICATION;
|
||||
const value = Reflect.apply(query, ApplicationCommandIndexStore, [a0, {commandTypes: [a1], text: a2},
|
||||
{scoreMethod: COMMAND_OR_APPLICATION, allowFetch: false}]);
|
||||
return {commands: value.commands, sections: value.descriptors};
|
||||
}
|
||||
|
||||
function getChangeKeys(a0) { // fn#63975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:4356, offset: 0x01b97ee2, size: 77 bytes, params: 2, frame: 14
|
||||
const userState = ApplicationCommandIndexStore.getUserState();
|
||||
const contextState = ApplicationCommandIndexStore.getContextState(a0);
|
||||
const value3 = undefined;
|
||||
return [userState == null ? value3 : userState.result, contextState == null ? value3 : contextState.result];
|
||||
}
|
||||
|
||||
function useCachedResults(a0, a1, a2) { // fn#63976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:4505, offset: 0x01b97f2f, size: 105 bytes, params: 4, frame: 16
|
||||
const env0_0 = a1;
|
||||
const binding = env0_4;
|
||||
let object = [a1];
|
||||
object = {commandTypes: binding.useMemo(function() {
|
||||
return [require];
|
||||
}, object), text: a2};
|
||||
const value = useQueryState(a0, object, {allowFetch: false});
|
||||
return {commands: value.commands, sections: value.descriptors};
|
||||
}
|
||||
|
||||
function useDiscovery({context, filters, options, allowFetch}) { // fn#63978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:4684, offset: 0x01b97fa9, size: 389 bytes, params: 2, frame: 24
|
||||
var object2;
|
||||
const type = context.type;
|
||||
let value = null;
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(guild_id);
|
||||
}, [type !== 'channel' ? value : context.channel.guild_id]);
|
||||
object2 = {};
|
||||
copyDataProperties(object2, options, undefined);
|
||||
object2['allowFetch'] = allowFetch;
|
||||
const value4 = useDiscoveryState(context, value3, filters, object2);
|
||||
const descriptors = value4.descriptors;
|
||||
const env0_3 = descriptors;
|
||||
const commands = value4.commands;
|
||||
const env0_4 = commands;
|
||||
const sectionedCommands = value4.sectionedCommands;
|
||||
const loading = value4.loading;
|
||||
value = env0_4.useState(value);
|
||||
value = env0_3(value, 2);
|
||||
const property = value[0];
|
||||
const env0_8 = value[1];
|
||||
return env0_4.useMemo(_fun63981, [loading, commands, descriptors, sectionedCommands, property,
|
||||
env0_4.useMemo(function() {
|
||||
var createPlaceholderCommandsBinding = createPlaceholderCommands;
|
||||
var placeholderCount = options.placeholderCount;
|
||||
var value2 = 0;
|
||||
return createPlaceholderCommandsBinding(placeholderCount ?? value2, filters.commandTypes[value2]);
|
||||
}, [filters.commandTypes, options.placeholderCount])]);
|
||||
}
|
||||
|
||||
function executeQuery(a0, a1, a2) { // fn#63984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:5778, offset: 0x01b98367, size: 214 bytes, params: 4, frame: 20
|
||||
var items2;
|
||||
const {descriptors, commands, loading} = ApplicationCommandIndexStore.query(a0, a1, a2);
|
||||
const createPlaceholderCommandsBinding = createPlaceholderCommands;
|
||||
const value3 = 0;
|
||||
let r1 = loading && a2.placeholderCount != null ? a2.placeholderCount : value3;
|
||||
const placeholderCommands = createPlaceholderCommandsBinding(r1, a1.commandTypes[value3]);
|
||||
const object2 = {};
|
||||
if (loading) {
|
||||
items2 = [];
|
||||
arraySpread(items2, placeholderCommands, arraySpread(items2, commands, value3, placeholderCommands),
|
||||
placeholderCommands);
|
||||
r1 = items2;
|
||||
} else {
|
||||
r1 = commands;
|
||||
}
|
||||
object2.commands = r1;
|
||||
object2.sections = loading ? value3 !== descriptors.length ? descriptors : [(require(7871) /* metro dependency 7871: ApplicationCommandBuiltIns */).BUILT_IN_SECTIONS[BuiltInSectionId.BUILT_IN]] : descriptors;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function useQuery(a0, a1, a2) { // fn#63985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:6068, offset: 0x01b9843d, size: 178 bytes, params: 4, frame: 20
|
||||
const env0_0 = a1;
|
||||
const env0_1 = a2;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a2, undefined);
|
||||
object2['allowFetch'] = true;
|
||||
const {descriptors, commands, loading} = useQueryState(a0, a1, object2);
|
||||
const env0_4 = loading;
|
||||
return env0_4.useMemo(_fun63987, [loading, commands, descriptors, env0_4.useMemo(function() {
|
||||
var createPlaceholderCommandsBinding = createPlaceholderCommands;
|
||||
var placeholderCount = importDefault.placeholderCount;
|
||||
var value2 = 0;
|
||||
return createPlaceholderCommandsBinding(placeholderCount ?? value2, require.commandTypes[value2]);
|
||||
}, [a1.commandTypes, a2.placeholderCount])]);
|
||||
}
|
||||
|
||||
function useCommand(a0, a1) { // fn#63988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:6475, offset: 0x01b9858e, size: 98 bytes, params: 3, frame: 18
|
||||
const env0_0 = a1;
|
||||
return env0_4.useMemo(_fun63989, [useContextIndexState(a0, true, true).result, useUserIndexState(true, true).result,
|
||||
a1]);
|
||||
}
|
||||
|
||||
function useAccessibleCommandsForApplication(a0, a1, a2) { // fn#63990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:7031, offset: 0x01b986d6, size: 205 bytes, params: 4, frame: 22
|
||||
const env0_0 = a0;
|
||||
let binding = env0_4;
|
||||
let useMemo = binding.useMemo;
|
||||
const {commands, application, sectionDescriptor, isGuildInstalled,
|
||||
isUserInstalled} = useCommandsForApplication(Reflect.apply(useMemo, binding, [_fun63991, [a0]]), a1, a2);
|
||||
var env0_4 = isUserInstalled;
|
||||
const value4 = (require(7866) /* metro dependency 7866: CommandPermissionContext */).usePermissionContext(a0,
|
||||
env0_13);
|
||||
binding = env0_4;
|
||||
useMemo = binding.useMemo;
|
||||
return {application: application, commands: Reflect.apply(useMemo, binding, [_fun63992, [commands, value4,
|
||||
sectionDescriptor, isGuildInstalled, isUserInstalled, a0]])};
|
||||
}
|
||||
|
||||
function _fun63963({rootCommand}) { // fn#63963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:1345, offset: 0x01b9790d, size: 38 bytes, params: 2, frame: 3
|
||||
return rootCommand?.id === require;
|
||||
}
|
||||
|
||||
function _fun63965() { // fn#63965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:1664, offset: 0x01b979b4, size: 390 bytes, params: 1, frame: 20
|
||||
let result = env0_2.result;
|
||||
const value2 = undefined;
|
||||
const value3 = (result == null || result.sections == null ? value2 : result.sections[require]) != null;
|
||||
result = env0_3.result;
|
||||
const value4 = (result == null || result.sections == null ? value2 : result.sections[require]) != null;
|
||||
result = env0_2.result;
|
||||
let r4 = result == null || result.sections == null ? value2 : result.sections[require];
|
||||
r4 = r4 ?? (env0_3.result == null ? value2 : env0_3.result.sections[require]);
|
||||
const Object = global.Object;
|
||||
const env0_0 = Object.values((r4 == null ? value2 : r4.commands) ?? ({})).map(_fun63966).reduce(function(a0, a1) {
|
||||
a0[a1.id] = a1;
|
||||
return a0;
|
||||
}, {});
|
||||
const object2 = {};
|
||||
object2.application = r4 == null || r4.descriptor == null ? value2 : r4.descriptor.application;
|
||||
const value = importDefault.map(_fun63968);
|
||||
object2.commands = value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
object2.sectionDescriptor = r4 == null ? value2 : r4.descriptor;
|
||||
object2.isGuildInstalled = value4;
|
||||
object2.isUserInstalled = value3;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun63972({descriptor}) { // fn#63972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:3349, offset: 0x01b97d89, size: 43 bytes, params: 2, frame: 3
|
||||
return descriptor.application?.id === importDefault;
|
||||
}
|
||||
|
||||
function _fun63981() { // fn#63981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:5162, offset: 0x01b98185, size: 436 bytes, params: 1, frame: 18
|
||||
var r7;
|
||||
var r1;
|
||||
var value3;
|
||||
var section;
|
||||
var property;
|
||||
var object2;
|
||||
var data;
|
||||
var items8;
|
||||
var items9;
|
||||
var items10;
|
||||
const object4 = {};
|
||||
object4.loading = loading;
|
||||
object4.commands = commands;
|
||||
object4.activeSections = descriptors;
|
||||
object4.commandsByActiveSection = sectionedCommands;
|
||||
object4.filteredSectionId = env0_7;
|
||||
object4.hasMoreAfter = false;
|
||||
object4.placeholders = loading ? env0_9 : [];
|
||||
object4.sectionDescriptors = descriptors;
|
||||
object4.filterSection = filterSection;
|
||||
object4.scrollDown = NOOP;
|
||||
if (env0_7 != null) {
|
||||
value3 = sectionedCommands.find(_fun63983);
|
||||
if (value3 != null) {
|
||||
section = value3.section;
|
||||
r1 = [section];
|
||||
r7 = section;
|
||||
} else {
|
||||
r1 = [];
|
||||
}
|
||||
object4.activeSections = r1;
|
||||
r1 = value3 != null ? [value3] : [];
|
||||
object4.commandsByActiveSection = r1;
|
||||
}
|
||||
if (loading) {
|
||||
property = sectionedCommands[0];
|
||||
if (property != null) {
|
||||
object2 = {};
|
||||
object2.section = property.section;
|
||||
data = property.data;
|
||||
items8 = [];
|
||||
arraySpread(items8, env0_9, arraySpread(items8, data, 0, r7), r7);
|
||||
object2.data = items8;
|
||||
items9 = [object2];
|
||||
sectionedCommandsBinding = sectionedCommands;
|
||||
arraySpread(items9, sectionedCommandsBinding.slice(1), 1, r7);
|
||||
object4.commandsByActiveSection = items9;
|
||||
} else {
|
||||
property = (require(7871) /* metro dependency 7871: ApplicationCommandBuiltIns */).BUILT_IN_SECTIONS[BuiltInSectionId.BUILT_IN];
|
||||
object4.activeSections = [property];
|
||||
object4.commandsByActiveSection = [{section: property, data: env0_9}];
|
||||
r7 = require;
|
||||
}
|
||||
commandsBinding = commands;
|
||||
items10 = [];
|
||||
arraySpread(items10, env0_9, arraySpread(items10, commandsBinding, 0, r7), r7);
|
||||
object4.commands = items10;
|
||||
}
|
||||
return object4;
|
||||
}
|
||||
|
||||
function _fun63987() { // fn#63987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:6334, offset: 0x01b984ef, size: 159 bytes, params: 1, frame: 16
|
||||
var r2;
|
||||
var items2;
|
||||
const object2 = {};
|
||||
const loadingBinding = loading;
|
||||
const commandsBinding = commands;
|
||||
if (loadingBinding) {
|
||||
items2 = [];
|
||||
arraySpread(items2, env0_5, arraySpread(items2, commandsBinding, 0, commandsBinding), commandsBinding);
|
||||
r2 = items2;
|
||||
} else {
|
||||
r2 = commandsBinding;
|
||||
}
|
||||
object2.commands = r2;
|
||||
object2.sections = loading && descriptors.length === 0 ? [(require(7871) /* metro dependency 7871: ApplicationCommandBuiltIns */).BUILT_IN_SECTIONS[BuiltInSectionId.BUILT_IN]] : descriptors;
|
||||
object2.scrollDown = NOOP;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun63989() { // fn#63989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:6546, offset: 0x01b985f0, size: 230 bytes, params: 1, frame: 19
|
||||
var value7;
|
||||
var commands;
|
||||
var property;
|
||||
var value8;
|
||||
if (require == null) {
|
||||
return {command: undefined, application: undefined};
|
||||
}
|
||||
const _createForOfIteratorHelperLoose_63959Binding = _createForOfIteratorHelperLoose_63959;
|
||||
let Object = global.Object;
|
||||
let values = Object.values;
|
||||
let result = env0_1.result;
|
||||
const value3 = undefined;
|
||||
const value4 = Reflect.apply(values, Object, [(result == null ? value3 : result.sections) ?? ({})]);
|
||||
const concat = value4.concat;
|
||||
Object = global.Object;
|
||||
values = Object.values;
|
||||
result = env0_2.result;
|
||||
const value5 = _createForOfIteratorHelperLoose_63959Binding(Reflect.apply(concat, value4, [Reflect.apply(values,
|
||||
Object, [(result == null ? value3 : result.sections) ?? ({})])]));
|
||||
const value6 = value5();
|
||||
let done = value6.done;
|
||||
if (done) {
|
||||
return {command: undefined, application: undefined};
|
||||
}
|
||||
let r3 = value6;
|
||||
loopExit10: while (true) {
|
||||
value7 = r3.value;
|
||||
commands = value7.commands;
|
||||
property = commands[require];
|
||||
if (property != null) {
|
||||
break loopExit10;
|
||||
}
|
||||
value8 = value5();
|
||||
done = value8.done;
|
||||
if (done) {
|
||||
return {command: undefined, application: undefined};
|
||||
}
|
||||
r3 = value8;
|
||||
continue;
|
||||
}
|
||||
return {command: property, application: value7.descriptor.application};
|
||||
}
|
||||
|
||||
function _fun63991() { // fn#63991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:7126, offset: 0x01b987a3, size: 23 bytes, params: 1, frame: 2
|
||||
return {channel: env0_0, type: 'channel'};
|
||||
}
|
||||
|
||||
function _fun63992() { // fn#63992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:7341, offset: 0x01b987ba, size: 283 bytes, params: 1, frame: 23
|
||||
var environment;
|
||||
var permissions;
|
||||
var r2;
|
||||
var guild_id;
|
||||
var value4;
|
||||
var moduleValue;
|
||||
var computeAllowedForUser;
|
||||
var binding;
|
||||
var value6;
|
||||
var moduleValue2;
|
||||
var computeAllowedForChannel;
|
||||
var allowedForChannel;
|
||||
const commandsBinding = commands;
|
||||
const value2 = null;
|
||||
if (value2 != commandsBinding) {
|
||||
guild_id = env0_0.guild_id;
|
||||
if (value2 != guild_id) {
|
||||
permissions = value2 == sectionDescriptor ? undefined : sectionDescriptor.permissions;
|
||||
if (value2 != permissions) {
|
||||
value4 = environment.__proto__;
|
||||
moduleValue = importAll(8039) /* metro dependency 8039: CommandPermissionUtils */;
|
||||
computeAllowedForUser = moduleValue.computeAllowedForUser;
|
||||
permissions = sectionDescriptor.permissions;
|
||||
guild_id = env0_0.guild_id;
|
||||
binding = env0_5;
|
||||
r2 = Reflect.apply(computeAllowedForUser, moduleValue, [permissions, guild_id, binding.userId,
|
||||
binding.roleIds,
|
||||
binding.isImpersonating]);
|
||||
} else {
|
||||
r2 = value2;
|
||||
}
|
||||
} else {
|
||||
r2 = value2;
|
||||
}
|
||||
var env0_0 = r2;
|
||||
guild_id = env0_0.guild_id;
|
||||
if (value2 != guild_id) {
|
||||
permissions = value2 == sectionDescriptor ? undefined : sectionDescriptor.permissions;
|
||||
if (value2 != permissions) {
|
||||
value6 = environment.__proto__;
|
||||
moduleValue2 = importAll(8039) /* metro dependency 8039: CommandPermissionUtils */;
|
||||
computeAllowedForChannel = moduleValue2.computeAllowedForChannel;
|
||||
permissions = sectionDescriptor.permissions;
|
||||
binding = env0_0;
|
||||
allowedForChannel = Reflect.apply(computeAllowedForChannel, moduleValue2, [permissions, binding,
|
||||
binding.guild_id]);
|
||||
}
|
||||
}
|
||||
return commands.filter(_fun63993);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun63966(a0) { // fn#63966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:1983, offset: 0x01b97b3a, size: 89 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var buildCommand;
|
||||
var object2;
|
||||
let value = a0;
|
||||
let rootCommand = value.rootCommand;
|
||||
if (rootCommand == null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value2 = environment.__proto__.__proto__;
|
||||
moduleValue = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
|
||||
buildCommand = moduleValue.buildCommand;
|
||||
object2 = {};
|
||||
rootCommand = value.rootCommand;
|
||||
object2.rootCommand = rootCommand;
|
||||
rootCommand = value.rootCommand;
|
||||
object2.command = rootCommand;
|
||||
object2.applicationId = value.applicationId;
|
||||
value = Reflect.apply(buildCommand, moduleValue, [object2]);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun63983({section}) { // fn#63983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:5379, offset: 0x01b9834c, size: 27 bytes, params: 2, frame: 2
|
||||
return section.id === env1_7;
|
||||
}
|
||||
|
||||
function _fun63993(a0) { // fn#63993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8238:7661, offset: 0x01b988d5, size: 154 bytes, params: 2, frame: 20
|
||||
const value2 = undefined;
|
||||
const commandPermissionUtilsModule = importAll(8039) /* metro dependency 8039: CommandPermissionUtils */;
|
||||
const hasAccess2 = commandPermissionUtilsModule.hasAccess(a0, env1_5, {applicationAllowedForUser: env0_0,
|
||||
applicationAllowedForChannel: env0_1, isGuildInstalled: isGuildInstalled, isUserInstalled: isUserInstalled,
|
||||
commandBotId: sectionDescriptor == null ? value2 : sectionDescriptor.botId});
|
||||
const HasAccessResult = (require(8039) /* metro dependency 8039: CommandPermissionUtils */).HasAccessResult;
|
||||
const ALLOWED = HasAccessResult.ALLOWED;
|
||||
return hasAccess2 === ALLOWED;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/* Metro module 7869; source: modules/application_commands/ApplicationCommandQueryTypes.tsx; dependencies: [2] */
|
||||
function _fun62981(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#62981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8047:6, offset: 0x01b6dd1b, size: 166 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandQueryTypes.tsx');
|
||||
exports.ScoreMethod = {NONE: 'none', APPLICATION_ONLY: 'application_only', COMMAND_ONLY: 'command_only',
|
||||
COMMAND_OR_APPLICATION: 'command_or_application'};
|
||||
exports.BuiltInCommandFilter = {ALLOW: 'allow', ONLY_TEXT: 'only_text', DENY: 'deny'};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,348 @@
|
||||
/* Metro module 7168; source: modules/application_commands/ApplicationCommandStore.tsx; dependencies: [6, 7, 15, 17, 18, 57, 4791, 1934, 5065, 566, 694, 2] */
|
||||
function _fun57543(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:6, offset: 0x013e8743, size: 396 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const closure = function() {
|
||||
env0_10 = {};
|
||||
return true;
|
||||
};
|
||||
const closure2 = APPLICATION_COMMAND_SET_ACTIVE_COMMAND_57549;
|
||||
const closure3 = APPLICATION_COMMAND_SET_PREFERRED_COMMAND;
|
||||
const closure4 = APPLICATION_COMMAND_UPDATE_OPTIONS;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
const env0_7 = importDefault(57) /* metro dependency 57 */;
|
||||
const channelSectionStore = importDefault(4791) /* metro dependency 4791: ChannelSectionStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
let env0_10 = {};
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
let value = _fun57553(Store);
|
||||
value.displayName = 'ApplicationCommandStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: closure,
|
||||
CHANNEL_SELECT: closure, LOGOUT: closure, APPLICATION_COMMAND_SET_ACTIVE_COMMAND: closure2,
|
||||
APPLICATION_COMMAND_SET_PREFERRED_COMMAND: closure3, APPLICATION_COMMAND_UPDATE_OPTIONS: closure4,
|
||||
APPLICATION_COMMAND_UPDATE_CHANNEL_STATE: APPLICATION_COMMAND_UPDATE_CHANNEL_STATE_57570});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_57544() { // fn#57544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:178, offset: 0x013e88cf, size: 94 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_57544_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function getOrCreateChannelState_57548(a0) { // fn#57548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:417, offset: 0x013e893a, size: 65 bytes, params: 2, frame: 5
|
||||
if (!(a0 in env0_10)) {
|
||||
env0_10[a0] = {'activeCommand': null, 'activeCommandSection': null, 'activeOptionName': null,
|
||||
'preferredCommandId': null, 'optionStates': null, 'initialValues': null, 'commandOrigin': null,
|
||||
optionStates: {}, initialValues: {}};
|
||||
}
|
||||
return env0_10[a0];
|
||||
}
|
||||
|
||||
function APPLICATION_COMMAND_SET_ACTIVE_COMMAND_57549({channelId, command, section, initialValues, location, triggerSection, queryLength, sectionName, query, searchResultsPosition, source, commandOrigin}) { // fn#57549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:625, offset: 0x013e897b, size: 328 bytes, params: 2, frame: 28
|
||||
let value = undefined;
|
||||
const orCreateChannelState_57548 = getOrCreateChannelState_57548(channelId);
|
||||
const id = command == null ? value : command.id;
|
||||
const activeCommand = orCreateChannelState_57548.activeCommand;
|
||||
if (id === (activeCommand == null ? value : activeCommand.id)) {
|
||||
return false;
|
||||
}
|
||||
orCreateChannelState_57548.activeCommand = command;
|
||||
orCreateChannelState_57548.activeCommandSection = section;
|
||||
orCreateChannelState_57548.activeOptionName = null;
|
||||
orCreateChannelState_57548.preferredCommandId = null;
|
||||
orCreateChannelState_57548.initialValues = initialValues ?? ({});
|
||||
orCreateChannelState_57548.commandOrigin = commandOrigin ?? null;
|
||||
orCreateChannelState_57548.source = source;
|
||||
if ((command == null ? value : command.options) != null) {
|
||||
command.options.forEach(_fun57550);
|
||||
}
|
||||
orCreateChannelState_57548.optionStates = {};
|
||||
if (command != null) {
|
||||
value = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
|
||||
value.trackCommandSelected({command: command, location: location, triggerSection: triggerSection,
|
||||
queryLength: queryLength, sectionName: sectionName, query: query,
|
||||
searchResultsPosition: searchResultsPosition,
|
||||
source: source});
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function APPLICATION_COMMAND_SET_PREFERRED_COMMAND({channelId, commandId}) { // fn#57551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:1419, offset: 0x013e8ae8, size: 130 bytes, params: 2, frame: 16
|
||||
const getOrCreateChannelState_57548Binding = getOrCreateChannelState_57548;
|
||||
const value = undefined;
|
||||
const orCreateChannelState_57548Binding = getOrCreateChannelState_57548Binding(channelId);
|
||||
let r0 = commandId !== orCreateChannelState_57548Binding.preferredCommandId && (orCreateChannelState_57548Binding.preferredCommandId !== null || commandId !== ((orCreateChannelState_57548Binding.activeCommand == null ? value : orCreateChannelState_57548Binding.activeCommand.id) ?? null));
|
||||
if (r0) {
|
||||
orCreateChannelState_57548Binding.activeCommand = null;
|
||||
orCreateChannelState_57548Binding.activeOptionName = null;
|
||||
orCreateChannelState_57548Binding.preferredCommandId = commandId;
|
||||
orCreateChannelState_57548Binding.optionStates = {};
|
||||
r0 = true;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function APPLICATION_COMMAND_UPDATE_OPTIONS({channelId, changedOptionStates}) { // fn#57552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:1735, offset: 0x013e8b6a, size: 589 bytes, params: 2, frame: 38
|
||||
var r8;
|
||||
var hasValue;
|
||||
var isActive;
|
||||
var lastValidationResult;
|
||||
var r21;
|
||||
var r27;
|
||||
var r25;
|
||||
var property;
|
||||
var value5;
|
||||
var property2;
|
||||
var activeOptionName;
|
||||
var property3;
|
||||
var object2;
|
||||
var optionValue;
|
||||
var location;
|
||||
var value6;
|
||||
var value7;
|
||||
var object5;
|
||||
var activeOptionName2;
|
||||
var value8;
|
||||
const orCreateChannelState_57548 = getOrCreateChannelState_57548(channelId);
|
||||
const object6 = {};
|
||||
let optionStates = orCreateChannelState_57548.optionStates;
|
||||
copyDataProperties(object6, optionStates, undefined);
|
||||
const Object = global.Object;
|
||||
const value3 = Object.entries(changedOptionStates);
|
||||
let length = value3.length;
|
||||
if (0 < length) {
|
||||
r8 = 0;
|
||||
while (true) {
|
||||
property = value3[r8];
|
||||
value5 = env0_7(property, 2);
|
||||
property = value5[0];
|
||||
property2 = value5[1];
|
||||
optionStates = orCreateChannelState_57548.optionStates;
|
||||
if (property in optionStates) {
|
||||
hasValue = property2.hasValue;
|
||||
hasValue = hasValue !== undefined ? property2.hasValue : object6[property].hasValue;
|
||||
if (hasValue) {
|
||||
property3 = object6[property];
|
||||
object2 = {hasValue: true};
|
||||
isActive = property2.isActive;
|
||||
isActive = isActive !== undefined ? property2.isActive : property3.isActive;
|
||||
object2.isActive = isActive;
|
||||
lastValidationResult = property2.lastValidationResult;
|
||||
lastValidationResult = lastValidationResult !== undefined ? property2.lastValidationResult : property3.lastValidationResult;
|
||||
object2.lastValidationResult = lastValidationResult;
|
||||
optionValue = property2.optionValue;
|
||||
if (optionValue != null) {
|
||||
r21 = optionValue;
|
||||
continue;
|
||||
}
|
||||
optionValue = property3.optionValue;
|
||||
r21 = optionValue;
|
||||
object2.optionValue = r21;
|
||||
location = property2.location;
|
||||
if (location != null) {
|
||||
r21 = location;
|
||||
continue;
|
||||
}
|
||||
location = property3.location;
|
||||
r21 = location;
|
||||
object2.location = r21;
|
||||
length = property2.length;
|
||||
if (length != null) {
|
||||
r27 = length;
|
||||
continue;
|
||||
}
|
||||
r27 = property3.length;
|
||||
object2.length = r27;
|
||||
object6[property] = object2;
|
||||
isActive = property2.isActive;
|
||||
if (isActive === undefined) {
|
||||
break;
|
||||
}
|
||||
isActive = property2.isActive;
|
||||
activeOptionName = orCreateChannelState_57548.activeOptionName;
|
||||
if (isActive) {
|
||||
value6 = activeOptionName != null;
|
||||
if (!value6) {
|
||||
r25 = value6;
|
||||
continue;
|
||||
}
|
||||
activeOptionName = orCreateChannelState_57548.activeOptionName;
|
||||
value7 = activeOptionName !== property;
|
||||
r25 = value7;
|
||||
if (!r25) {
|
||||
continue;
|
||||
}
|
||||
activeOptionName = orCreateChannelState_57548.activeOptionName;
|
||||
object5 = {};
|
||||
activeOptionName2 = orCreateChannelState_57548.activeOptionName;
|
||||
copyDataProperties(object5, object6[activeOptionName2], undefined);
|
||||
object6[activeOptionName] = object5;
|
||||
activeOptionName = orCreateChannelState_57548.activeOptionName;
|
||||
object6[activeOptionName].isActive = false;
|
||||
orCreateChannelState_57548.activeOptionName = property;
|
||||
break;
|
||||
}
|
||||
if (property !== activeOptionName) {
|
||||
break;
|
||||
}
|
||||
orCreateChannelState_57548.activeOptionName = null;
|
||||
break;
|
||||
}
|
||||
object6[property] = {'hasValue': false, 'isActive': false, 'lastValidationResult': null,
|
||||
'optionValue': null,
|
||||
location: undefined, length: undefined};
|
||||
activeOptionName = orCreateChannelState_57548.activeOptionName;
|
||||
if (activeOptionName !== property) {
|
||||
break;
|
||||
}
|
||||
orCreateChannelState_57548.activeOptionName = null;
|
||||
break;
|
||||
}
|
||||
value8 = typeof r8 === 'bigint' ? r8 + 1n : +r8 + 1;
|
||||
length = value3.length;
|
||||
if (value8 < length) {
|
||||
r8 = value8;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
orCreateChannelState_57548.optionStates = object6;
|
||||
return true;
|
||||
}
|
||||
|
||||
function _fun57553(a0) { // fn#57553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:2763, offset: 0x013e8db7, size: 329 bytes, params: 2, frame: 16
|
||||
const closure = ApplicationCommandStore;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(ChannelSectionStore, SelectedChannelStore);
|
||||
ChannelSectionStore.addChangeListener(_fun57556);
|
||||
}}, {key: 'getActiveCommand', value: function(a0) {
|
||||
return getOrCreateChannelState_57548(a0).activeCommand;
|
||||
}}, {key: 'getActiveCommandSection', value: function(a0) {
|
||||
return getOrCreateChannelState_57548(a0).activeCommandSection;
|
||||
}}, {key: 'getActiveOptionName', value: function(a0) {
|
||||
return getOrCreateChannelState_57548(a0).activeOptionName;
|
||||
}}, {key: 'getActiveOption', value: value_57560}, {key: 'getPreferredCommandId', value: function(a0) {
|
||||
return getOrCreateChannelState_57548(a0).preferredCommandId;
|
||||
}}, {key: 'getOptionStates', value: function(a0) {
|
||||
return getOrCreateChannelState_57548(a0).optionStates;
|
||||
}}, {key: 'getOptionState', value: function(a0, a1) {
|
||||
return getOrCreateChannelState_57548(a0).optionStates[a1];
|
||||
}}, {key: 'getCommandOrigin', value: function(a0) {
|
||||
return getOrCreateChannelState_57548(a0).commandOrigin;
|
||||
}}, {key: 'getSource', value: function(a0) {
|
||||
return getOrCreateChannelState_57548(a0).source;
|
||||
}}, {key: 'getOption', value: value_57567}, {key: 'getState', value: function(a0) {
|
||||
var object = {};
|
||||
var getOrCreateChannelState_57548Binding = getOrCreateChannelState_57548;
|
||||
copyDataProperties(object, getOrCreateChannelState_57548Binding(a0), getOrCreateChannelState_57548Binding);
|
||||
return object;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function APPLICATION_COMMAND_UPDATE_CHANNEL_STATE_57570({channelId, preferredCommandId, command, section, location, changedOptionStates}) { // fn#57570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:4868, offset: 0x013e9140, size: 152 bytes, params: 2, frame: 18
|
||||
const value2 = APPLICATION_COMMAND_SET_ACTIVE_COMMAND_57549({type: 'APPLICATION_COMMAND_SET_ACTIVE_COMMAND',
|
||||
channelId: channelId, command: command, section: section, location: location});
|
||||
const value3 = APPLICATION_COMMAND_SET_PREFERRED_COMMAND({type: 'APPLICATION_COMMAND_SET_PREFERRED_COMMAND',
|
||||
channelId: channelId, commandId: preferredCommandId});
|
||||
APPLICATION_COMMAND_UPDATE_OPTIONS({type: 'APPLICATION_COMMAND_UPDATE_OPTIONS', channelId: channelId,
|
||||
changedOptionStates: changedOptionStates});
|
||||
let r0 = value2 || value3;
|
||||
r0 = !r0 || r0;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun57550({name}) { // fn#57550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:1165, offset: 0x013e8ac3, size: 37 bytes, params: 2, frame: 3
|
||||
env0_0[name] = {'isActive': false, 'hasValue': false, 'lastValidationResult': null, 'optionValue': null};
|
||||
}
|
||||
|
||||
function value_57555() { // fn#57555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:3108, offset: 0x013e8f00, size: 48 bytes, params: 1, frame: 13
|
||||
this.waitFor(ChannelSectionStore, SelectedChannelStore);
|
||||
ChannelSectionStore.addChangeListener(_fun57556);
|
||||
}
|
||||
|
||||
function value_57560(a0) { // fn#57560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:3631, offset: 0x013e8fe7, size: 84 bytes, params: 2, frame: 14
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const getOrCreateChannelState_57548Binding = getOrCreateChannelState_57548;
|
||||
value = undefined;
|
||||
const activeCommand = getOrCreateChannelState_57548Binding(a0).activeCommand;
|
||||
const value3 = null;
|
||||
const r1 = value3 == activeCommand || value3 == activeCommand.options ? value : activeCommand.options.find(_fun57561);
|
||||
return value3 != r1 ? r1 : value3;
|
||||
}
|
||||
|
||||
function value_57567(a0, a1) { // fn#57567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:4280, offset: 0x013e90d9, size: 75 bytes, params: 3, frame: 14
|
||||
var environment;
|
||||
const env0_0 = a1;
|
||||
let value = environment.__proto__;
|
||||
const getOrCreateChannelState_57548Binding = getOrCreateChannelState_57548;
|
||||
value = undefined;
|
||||
const activeCommand = getOrCreateChannelState_57548Binding(a0).activeCommand;
|
||||
return activeCommand == null || activeCommand.options == null ? value : activeCommand.options.find(function({name}) {
|
||||
return name === require;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun57556() { // fn#57556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:3158, offset: 0x013e8f30, size: 108 bytes, params: 1, frame: 13
|
||||
var object;
|
||||
const channelId = SelectedChannelStore.getChannelId();
|
||||
if (channelId == null) {
|
||||
env2_10 = {};
|
||||
return true;
|
||||
}
|
||||
const currentSidebarChannelId = ChannelSectionStore.getCurrentSidebarChannelId(channelId);
|
||||
if (currentSidebarChannelId == null) {
|
||||
if (channelId in env2_10) {
|
||||
({})[channelId] = env2_10[channelId];
|
||||
} else {
|
||||
object = {};
|
||||
}
|
||||
} else {
|
||||
if (currentSidebarChannelId in env2_10) {
|
||||
return false;
|
||||
}
|
||||
if (channelId in env2_10) {
|
||||
({})[channelId] = env2_10[channelId];
|
||||
} else {
|
||||
object = {};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun57561({name}) { // fn#57561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:3758, offset: 0x013e903b, size: 27 bytes, params: 2, frame: 2
|
||||
return name === env0_0.activeOptionName;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
/* Metro module 5068; source: modules/application_commands/ApplicationCommandTypes.tsx; dependencies: [2] */
|
||||
function _fun43837(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5246:6, offset: 0x011606b4, size: 880 bytes, params: 8, frame: 23
|
||||
var object4;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
object4 = {BUILT_IN: 0};
|
||||
object4[0] = 'BUILT_IN';
|
||||
object4.APPLICATION = 1;
|
||||
object4[1] = 'APPLICATION';
|
||||
const object7 = {BUILT_IN: 0};
|
||||
object7[0] = 'BUILT_IN';
|
||||
object7.BUILT_IN_TEXT = 1;
|
||||
object7[1] = 'BUILT_IN_TEXT';
|
||||
object7.BUILT_IN_INTEGRATION = 2;
|
||||
object7[2] = 'BUILT_IN_INTEGRATION';
|
||||
object7.BOT = 3;
|
||||
object7[3] = 'BOT';
|
||||
object7.PLACEHOLDER = 4;
|
||||
object7[4] = 'PLACEHOLDER';
|
||||
const object8 = {ROLE: 1};
|
||||
object8[1] = 'ROLE';
|
||||
object8.USER = 2;
|
||||
object8[2] = 'USER';
|
||||
object8.CHANNEL = 3;
|
||||
object8[3] = 'CHANNEL';
|
||||
const object9 = {BUILT_IN: 1};
|
||||
object9[1] = 'BUILT_IN';
|
||||
object9.FRECENCY = 2;
|
||||
object9[2] = 'FRECENCY';
|
||||
object9.APP = 3;
|
||||
object9[3] = 'APP';
|
||||
const object10 = {CHAT: 0};
|
||||
object10[0] = 'CHAT';
|
||||
object10.APPLICATION_LAUNCHER = 1;
|
||||
object10[1] = 'APPLICATION_LAUNCHER';
|
||||
object10.APP_LAUNCHER_APPLICATION_VIEW = 2;
|
||||
object10[2] = 'APP_LAUNCHER_APPLICATION_VIEW';
|
||||
object10.IMAGE_RECS_MENU = 3;
|
||||
object10[3] = 'IMAGE_RECS_MENU';
|
||||
object10.IMAGE_RECS_SUBMENU = 4;
|
||||
object10[4] = 'IMAGE_RECS_SUBMENU';
|
||||
object10.CONTEXT_MENU = 5;
|
||||
object10[5] = 'CONTEXT_MENU';
|
||||
object10.VOICE_UI = 6;
|
||||
object10[6] = 'VOICE_UI';
|
||||
object10.VOICE_TILE_ACTIVITY_SUGGESTIONS = 7;
|
||||
object10[7] = 'VOICE_TILE_ACTIVITY_SUGGESTIONS';
|
||||
object10.MINI_SHELF = 8;
|
||||
object10[8] = 'MINI_SHELF';
|
||||
object10.USER_PROFILE = 9;
|
||||
object10[9] = 'USER_PROFILE';
|
||||
object10.NOW_PLAYING = 10;
|
||||
object10[10] = 'NOW_PLAYING';
|
||||
object10.ACTIVITY_DETAILS = 11;
|
||||
object10[11] = 'ACTIVITY_DETAILS';
|
||||
object10.ACTIVITIES_HOME = 12;
|
||||
object10[12] = 'ACTIVITIES_HOME';
|
||||
object10.ACTIVITY_INSTANCE_EMBED = 13;
|
||||
object10[13] = 'ACTIVITY_INSTANCE_EMBED';
|
||||
object10.ACTIVITY_BOOKMARK_EMBED = 14;
|
||||
object10[14] = 'ACTIVITY_BOOKMARK_EMBED';
|
||||
object10.APP_DMS_ENTRY_POINT_COMMAND_BUTTON = 15;
|
||||
object10[15] = 'APP_DMS_ENTRY_POINT_COMMAND_BUTTON';
|
||||
object10.APP_MESSAGE_EMBED = 16;
|
||||
object10[16] = 'APP_MESSAGE_EMBED';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandTypes.tsx');
|
||||
exports.ApplicationCommandSectionType = object4;
|
||||
exports.ApplicationCommandInputType = object7;
|
||||
exports.ApplicationCommandPermissionType = object8;
|
||||
exports.ApplicationCommandTriggerLocations = {DISCOVERY: 'discovery', SUGGESTION: 'suggestion', MENTION: 'mention',
|
||||
PASTE: 'paste', RECALL: 'recall', POPULAR_COMMANDS: 'popular_commands', MJ_CHAT_BAR: 'mj_chat_bar',
|
||||
QUERY: 'query', SLASH_UI: 'slash_ui', APP_LAUNCHER: 'app_launcher', APP_LAUNCHER_HOME: 'app_launcher_home',
|
||||
APP_LAUNCHER_HOME_SEARCH: 'app_launcher_home_search', APP_LAUNCHER_LIST_VIEW_ALL: 'app_launcher_list_view_all',
|
||||
APP_LAUNCHER_APPLICATION_VIEW: 'app_launcher_application_view',
|
||||
APP_LAUNCHER_APPLICATION_VIEW_FRECENCT: 'app_launcher_application_view_frecent',
|
||||
APP_LAUNCHER_APPLICATION_VIEW_MORE_MENU: 'app_launcher_application_view_more_menu',
|
||||
APP_LAUNCHER_SLASH_SEARCH: 'app_launcher_slash_search',
|
||||
APP_LAUNCHER_FRECENTS_VIEW_ALL: 'app_launcher_frecents_view_all', IMAGE_RECS_MENU: 'image_recs_menu',
|
||||
IMAGE_RECS_SUBMENU: 'image_recs_submenu', ACTIVITY_INSTANCE_EMBED: 'activity_instance_embed',
|
||||
ACTIVITY_BOOKMARK_EMBED: 'activity_bookmark_embed', ACTIVITIES_MINI_SHELF: 'activities_mini_shelf',
|
||||
VC_TILE_ACTIVITY_SUGGESTION: 'vc_tile_activity_suggestion',
|
||||
APP_DMS_ENTRY_POINT_COMMAND_BUTTON: 'app_dms_entry_point_command_button'};
|
||||
exports.ApplicationCommandTriggerSections = object9;
|
||||
exports.CommandOrigin = object10;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
/* Metro module 8332; source: modules/application_commands/ApplicationCommandUserAppUtils.tsx; dependencies: [8333, 1244, 2] */
|
||||
function _fun66352(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8517:6, offset: 0x01bf7bd7, size: 96 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandUserAppUtils.tsx');
|
||||
exports.getEphemeralReasonMessage = getEphemeralReasonMessage;
|
||||
}
|
||||
|
||||
function getEphemeralReasonMessage(a0) { // fn#66353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8517:217, offset: 0x01bf7c37, size: 1776 bytes, params: 2, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const EphemeralMessageReason = (require(8333) /* metro dependency 8333: EphemeralMessageReason */).EphemeralMessageReason;
|
||||
const FEATURE_LIMITED = EphemeralMessageReason.FEATURE_LIMITED;
|
||||
if (FEATURE_LIMITED === a0) {
|
||||
return intl.string(t.WCvmrR);
|
||||
}
|
||||
const GUILD_FEATURE_LIMITED = EphemeralMessageReason.GUILD_FEATURE_LIMITED;
|
||||
if (GUILD_FEATURE_LIMITED === a0) {
|
||||
return intl.string(t['0QUDYf']);
|
||||
}
|
||||
const USER_FEATURE_LIMITED = EphemeralMessageReason.USER_FEATURE_LIMITED;
|
||||
if (USER_FEATURE_LIMITED === a0) {
|
||||
return intl.string(t.gs1sxd);
|
||||
}
|
||||
const SLOWMODE = EphemeralMessageReason.SLOWMODE;
|
||||
if (SLOWMODE === a0) {
|
||||
return intl.string(t['9UAXh4']);
|
||||
}
|
||||
const RATE_LIMIT = EphemeralMessageReason.RATE_LIMIT;
|
||||
if (RATE_LIMIT === a0) {
|
||||
return intl.string(t.zBB9xD);
|
||||
}
|
||||
const CANNOT_MESSAGE_USER = EphemeralMessageReason.CANNOT_MESSAGE_USER;
|
||||
if (CANNOT_MESSAGE_USER === a0) {
|
||||
return intl.string(t.w7sHnP);
|
||||
}
|
||||
const USER_VERIFICATION_LEVEL = EphemeralMessageReason.USER_VERIFICATION_LEVEL;
|
||||
if (USER_VERIFICATION_LEVEL === a0) {
|
||||
return intl.string(t.SLAkFX);
|
||||
}
|
||||
const CANNOT_UNARCHIVE_THREAD = EphemeralMessageReason.CANNOT_UNARCHIVE_THREAD;
|
||||
if (CANNOT_UNARCHIVE_THREAD === a0) {
|
||||
return intl.string(t.AIqS3n);
|
||||
}
|
||||
const CANNOT_JOIN_THREAD = EphemeralMessageReason.CANNOT_JOIN_THREAD;
|
||||
if (CANNOT_JOIN_THREAD === a0) {
|
||||
return intl.string(t.BqKxlT);
|
||||
}
|
||||
const MISSING_PERMISSIONS = EphemeralMessageReason.MISSING_PERMISSIONS;
|
||||
if (MISSING_PERMISSIONS === a0) {
|
||||
return intl.string(t.LLF2DJ);
|
||||
}
|
||||
const CANNOT_SEND_ATTACHMENTS = EphemeralMessageReason.CANNOT_SEND_ATTACHMENTS;
|
||||
if (CANNOT_SEND_ATTACHMENTS === a0) {
|
||||
return intl.string(t.Htl7W1);
|
||||
}
|
||||
const CANNOT_SEND_EMBEDS = EphemeralMessageReason.CANNOT_SEND_EMBEDS;
|
||||
if (CANNOT_SEND_EMBEDS === a0) {
|
||||
return intl.string(t.vGgPMH);
|
||||
}
|
||||
const CANNOT_SEND_STICKERS = EphemeralMessageReason.CANNOT_SEND_STICKERS;
|
||||
if (CANNOT_SEND_STICKERS === a0) {
|
||||
return intl.string(t.byrr7l);
|
||||
}
|
||||
const AUTOMOD_BLOCKED = EphemeralMessageReason.AUTOMOD_BLOCKED;
|
||||
if (AUTOMOD_BLOCKED === a0) {
|
||||
return intl.string(t['24PAJ+']);
|
||||
}
|
||||
const HARMFUL_LINK = EphemeralMessageReason.HARMFUL_LINK;
|
||||
if (HARMFUL_LINK === a0) {
|
||||
return intl.string(t.zeqgmP);
|
||||
}
|
||||
const CANNOT_USE_COMMAND = EphemeralMessageReason.CANNOT_USE_COMMAND;
|
||||
if (CANNOT_USE_COMMAND === a0) {
|
||||
return intl.string(t.kzMhhk);
|
||||
}
|
||||
const BETA_GUILD_SIZE = EphemeralMessageReason.BETA_GUILD_SIZE;
|
||||
if (BETA_GUILD_SIZE === a0) {
|
||||
return intl.string(t.Af3rGY);
|
||||
}
|
||||
const CANNOT_USE_EXTERNAL_APPS = EphemeralMessageReason.CANNOT_USE_EXTERNAL_APPS;
|
||||
if (CANNOT_USE_EXTERNAL_APPS === a0) {
|
||||
return intl.string(t.Ji4l7E);
|
||||
}
|
||||
return intl.string(t['v/OAcs']);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,963 @@
|
||||
/* Metro module 5065; source: modules/application_commands/ApplicationCommandUtils.tsx; dependencies: [1383, 4645, 5066, 661, 482, 5067, 1909, 5068, 483, 22, 44, 24, 4863, 2] */
|
||||
function _fun43792(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5243:6, offset: 0x0115e828, size: 488 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_43795 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const closure = buildCommand;
|
||||
const mapOptions = function(a0) {
|
||||
return a0?.map(_fun43801);
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = (require(1383) /* metro dependency 1383: ChannelRecord */).isReadableType;
|
||||
const env0_5 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
|
||||
let value = require(5066) /* metro dependency 5066: ApplicationCommandConstants */;
|
||||
const env0_6 = value.BuiltInSectionId;
|
||||
const env0_7 = value.SUB_COMMAND_KEY_SEPARATOR;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_8 = value.AnalyticEvents;
|
||||
const env0_9 = value.ID_REGEX;
|
||||
const env0_10 = (require(482) /* metro dependency 482: Constants */).Permissions;
|
||||
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
||||
value = value.deserialize(0);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandUtils.tsx');
|
||||
exports.buildCommand = closure;
|
||||
exports.buildApplicationCommands = buildApplicationCommands;
|
||||
exports.applicationPermissionsList = function(a0) {
|
||||
return a0?.reduce(_fun43810, []);
|
||||
};
|
||||
exports.isSnowflake = function(a0) {
|
||||
return ID_REGEX.test(a0.trim());
|
||||
};
|
||||
exports.getMatchingGroupCommands = getMatchingGroupCommands;
|
||||
exports.getApplicationCommandOptionQueryOptions = getApplicationCommandOptionQueryOptions;
|
||||
exports.allChannelsSentinel = allChannelsSentinel;
|
||||
exports.canUseApplicationCommands = canUseApplicationCommands;
|
||||
exports.DISABLED_BY_DEFAULT_PERMISSION_FLAG = value;
|
||||
exports.hasAccess = hasAccess;
|
||||
exports.getCommandAttachmentDraftType = getCommandAttachmentDraftType;
|
||||
exports.getCommandTriggerSection = getCommandTriggerSection;
|
||||
exports.getApplicationCommandSection = getApplicationCommandSection;
|
||||
exports.extractInteractionDataProps = extractInteractionDataProps;
|
||||
exports.trackCommandSelected = trackCommandSelected;
|
||||
exports.getInitialInteractionMetadata = function({interactionMetadata}) {
|
||||
var value = null;
|
||||
return value == interactionMetadata ? value : 'triggering_interaction_metadata' in interactionMetadata ? interactionMetadata.triggering_interaction_metadata : interactionMetadata;
|
||||
};
|
||||
exports.hasCommandIndexForApp = function(a0, {result}) {
|
||||
var r2;
|
||||
r2 = result?.sections;
|
||||
return r2 != null && a0 in r2;
|
||||
};
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_43793(a0, a1) { // fn#43793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5243:277, offset: 0x0115ea10, size: 370 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun43794;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_43795(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_43795(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_43795(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun43794;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function buildCommand({rootCommand, command, applicationId, subCommandPath, useKeyedPermissions}) { // fn#43796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5243:1187, offset: 0x0115eb82, size: 662 bytes, params: 2, frame: 25
|
||||
var r2;
|
||||
var r5;
|
||||
var r10;
|
||||
var r14;
|
||||
var r8;
|
||||
var moduleValue;
|
||||
let value = undefined;
|
||||
if (rootCommand.permissions != null && rootCommand.permissions.length > 0) {
|
||||
if (useKeyedPermissions) {
|
||||
moduleValue = require(dependencyMap[5]);
|
||||
r2 = moduleValue.keyPermissions(rootCommand.permissions);
|
||||
} else {
|
||||
rootCommand.permissions.forEach(_fun43797);
|
||||
r2 = {};
|
||||
}
|
||||
r5 = r2;
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
const value6 = (subCommandPath ?? []).map(function(a0) {
|
||||
return a0.name;
|
||||
});
|
||||
const value7 = (subCommandPath ?? []).map(function(a0) {
|
||||
return a0.displayName;
|
||||
});
|
||||
const object2 = {};
|
||||
object2.version = rootCommand.version;
|
||||
object2.guildId = rootCommand.guild_id;
|
||||
const items4 = [rootCommand.id];
|
||||
arraySpread(items4, value6, 1, items4);
|
||||
object2.id = items4.join(SUB_COMMAND_KEY_SEPARATOR);
|
||||
const items2 = [rootCommand.name];
|
||||
arraySpread(items2, value6, 1, items4);
|
||||
object2.untranslatedName = items2.join(' ');
|
||||
object2.serverLocalizedName = command.name_localized;
|
||||
object2.applicationId = applicationId;
|
||||
const type = rootCommand.type;
|
||||
if (type != null) {
|
||||
r10 = type;
|
||||
r14 = items4;
|
||||
} else {
|
||||
r10 = require(dependencyMap[6]).ApplicationCommandType.CHAT;
|
||||
r14 = dependencyMap;
|
||||
}
|
||||
object2.type = r10;
|
||||
const ApplicationCommandInputType = require(dependencyMap[7]).ApplicationCommandInputType;
|
||||
const BOT = ApplicationCommandInputType.BOT;
|
||||
object2.inputType = BOT;
|
||||
object2.untranslatedDescription = command.description;
|
||||
object2.options = mapOptions(command.options);
|
||||
object2.rootCommand = rootCommand;
|
||||
object2.subCommandPath = subCommandPath;
|
||||
if (rootCommand.default_member_permissions == null) {
|
||||
r8 = value;
|
||||
} else {
|
||||
value = importAll(dependencyMap[8]);
|
||||
value = value.deserialize(rootCommand.default_member_permissions);
|
||||
r8 = value;
|
||||
}
|
||||
object2.defaultMemberPermissions = r8;
|
||||
object2.dmPermission = rootCommand.dm_permission;
|
||||
object2.permissions = r5;
|
||||
const items3 = [rootCommand.name_localized ?? rootCommand.name];
|
||||
arraySpread(items3, value7, 1, r14);
|
||||
object2.displayName = items3.join(' ');
|
||||
object2.displayDescription = command.description_localized ?? command.description;
|
||||
object2.nsfw = rootCommand.nsfw;
|
||||
object2.contexts = rootCommand.contexts;
|
||||
object2.integration_types = rootCommand.integration_types;
|
||||
object2.global_popularity_rank = rootCommand.global_popularity_rank;
|
||||
object2.handler = rootCommand.handler;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function mapOptions(a0) { // fn#43800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5243:2323, offset: 0x0115ee39, size: 33 bytes, params: 2, frame: 12
|
||||
return a0?.map(_fun43801);
|
||||
}
|
||||
|
||||
function buildSubCommands({rootCommand, command, applicationId, subCommandPath, useKeyedPermissions}) { // fn#43803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5243:3168, offset: 0x0115f07b, size: 829 bytes, params: 2, frame: 32
|
||||
var environment;
|
||||
var r12;
|
||||
var r19;
|
||||
var r17;
|
||||
var r21;
|
||||
var r7;
|
||||
var type;
|
||||
var value;
|
||||
const ApplicationCommandOptionType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType;
|
||||
var SUB_COMMAND;
|
||||
var SUB_COMMAND_GROUP;
|
||||
var options;
|
||||
var length;
|
||||
var buildCommandBinding;
|
||||
var push;
|
||||
var buildSubCommandsBinding;
|
||||
var object6;
|
||||
var concat;
|
||||
var object7;
|
||||
var name;
|
||||
var name_localized;
|
||||
var property;
|
||||
var subCommands;
|
||||
var items3;
|
||||
var value4;
|
||||
var object8;
|
||||
var object9;
|
||||
var value6;
|
||||
if (command.hasOwnProperty('id')) {
|
||||
options = command.options;
|
||||
reducibleJoin8: while (true) {
|
||||
reducibleJoin27: while (true) {
|
||||
if (options == null) {
|
||||
break reducibleJoin27;
|
||||
}
|
||||
options = command.options;
|
||||
length = options.length;
|
||||
if (length === 0) {
|
||||
break reducibleJoin27;
|
||||
}
|
||||
break reducibleJoin8;
|
||||
}
|
||||
value = environment;
|
||||
value = buildCommand({rootCommand: rootCommand, command: command, applicationId: applicationId,
|
||||
subCommandPath: subCommandPath, useKeyedPermissions: useKeyedPermissions});
|
||||
return [value];
|
||||
}
|
||||
} else {
|
||||
type = command.type;
|
||||
value = environment;
|
||||
SUB_COMMAND = ApplicationCommandOptionType.SUB_COMMAND;
|
||||
reducibleJoin8: while (true) {
|
||||
if (type === SUB_COMMAND) {
|
||||
break reducibleJoin8;
|
||||
}
|
||||
type = command.type;
|
||||
SUB_COMMAND_GROUP = ApplicationCommandOptionType.SUB_COMMAND_GROUP;
|
||||
if (type !== SUB_COMMAND_GROUP) {
|
||||
options = command.options;
|
||||
if (options != null) {
|
||||
options = command.options;
|
||||
length = options.length;
|
||||
reducibleJoin5: while (true) {
|
||||
if (length !== 0) {
|
||||
break reducibleJoin8;
|
||||
}
|
||||
break reducibleJoin5;
|
||||
}
|
||||
}
|
||||
value = buildCommand({rootCommand: rootCommand, command: command, applicationId: applicationId,
|
||||
subCommandPath: subCommandPath, useKeyedPermissions: useKeyedPermissions});
|
||||
return [value];
|
||||
}
|
||||
break reducibleJoin8;
|
||||
}
|
||||
}
|
||||
const items = [];
|
||||
if (command.options != null) {
|
||||
value = command.options.filter(function({type}) {
|
||||
return type === require(dependencyMap[6]).ApplicationCommandOptionType.SUB_COMMAND_GROUP;
|
||||
});
|
||||
length = value.length;
|
||||
if (0 < length) {
|
||||
r12 = 0;
|
||||
reducibleLoop10: while (true) {
|
||||
push = items.push;
|
||||
buildSubCommandsBinding = buildSubCommands;
|
||||
object6 = {rootCommand: rootCommand, command: value[r12], applicationId: applicationId};
|
||||
reducibleJoin12: while (true) {
|
||||
if (subCommandPath != null) {
|
||||
r19 = subCommandPath;
|
||||
break reducibleJoin12;
|
||||
}
|
||||
r19 = [];
|
||||
break reducibleJoin12;
|
||||
}
|
||||
concat = r19.concat;
|
||||
object7 = {};
|
||||
name = value[r12].name;
|
||||
object7.name = name;
|
||||
SUB_COMMAND_GROUP = ApplicationCommandOptionType.SUB_COMMAND_GROUP;
|
||||
object7.type = SUB_COMMAND_GROUP;
|
||||
name_localized = value[r12].name_localized;
|
||||
reducibleJoin14: while (true) {
|
||||
if (name_localized != null) {
|
||||
r17 = name_localized;
|
||||
r21 = require;
|
||||
break reducibleJoin14;
|
||||
}
|
||||
property = value[r12];
|
||||
name = property.name;
|
||||
r17 = name;
|
||||
r21 = property;
|
||||
break reducibleJoin14;
|
||||
}
|
||||
object7.displayName = r17;
|
||||
object6.subCommandPath = Reflect.apply(concat, r19, [[object7]]);
|
||||
object6.useKeyedPermissions = useKeyedPermissions;
|
||||
subCommands = buildSubCommandsBinding(object6);
|
||||
items3 = [];
|
||||
arraySpread(items3, subCommands, 0, r21);
|
||||
apply(push, items3, items, r21);
|
||||
value4 = typeof r12 === 'bigint' ? r12 + 1n : +r12 + 1;
|
||||
length = value.length;
|
||||
if (value4 < length) {
|
||||
r12 = value4;
|
||||
continue reducibleLoop10;
|
||||
}
|
||||
break reducibleLoop10;
|
||||
}
|
||||
}
|
||||
var value5 = command.options.filter(function({type}) {
|
||||
return type === require(dependencyMap[6]).ApplicationCommandOptionType.SUB_COMMAND;
|
||||
});
|
||||
length = value5.length;
|
||||
if (0 < length) {
|
||||
r12 = 0;
|
||||
reducibleLoop16: while (true) {
|
||||
push = items.push;
|
||||
buildCommandBinding = buildCommand;
|
||||
object8 = {rootCommand: rootCommand, command: value5[r12], applicationId: applicationId};
|
||||
reducibleJoin18: while (true) {
|
||||
if (subCommandPath != null) {
|
||||
r19 = subCommandPath;
|
||||
break reducibleJoin18;
|
||||
}
|
||||
r19 = [];
|
||||
break reducibleJoin18;
|
||||
}
|
||||
concat = r19.concat;
|
||||
object9 = {};
|
||||
name = value5[r12].name;
|
||||
object9.name = name;
|
||||
SUB_COMMAND = ApplicationCommandOptionType.SUB_COMMAND;
|
||||
object9.type = SUB_COMMAND;
|
||||
name_localized = value5[r12].name_localized;
|
||||
reducibleJoin20: while (true) {
|
||||
if (name_localized != null) {
|
||||
r17 = name_localized;
|
||||
break reducibleJoin20;
|
||||
}
|
||||
name = value5[r12].name;
|
||||
r17 = name;
|
||||
break reducibleJoin20;
|
||||
}
|
||||
object9.displayName = r17;
|
||||
object8.subCommandPath = Reflect.apply(concat, r19, [[object9]]);
|
||||
object8.useKeyedPermissions = useKeyedPermissions;
|
||||
Reflect.apply(push, items, [buildCommandBinding(object8)]);
|
||||
value6 = typeof r12 === 'bigint' ? r12 + 1n : +r12 + 1;
|
||||
length = value5.length;
|
||||
if (value6 < length) {
|
||||
r12 = value6;
|
||||
continue reducibleLoop16;
|
||||
}
|
||||
break reducibleLoop16;
|
||||
}
|
||||
}
|
||||
value = value.length === 0;
|
||||
reducibleJoin23: while (true) {
|
||||
if (value) {
|
||||
length = value5.length;
|
||||
value = length === 0;
|
||||
r7 = value;
|
||||
break reducibleJoin23;
|
||||
}
|
||||
r7 = value;
|
||||
break reducibleJoin23;
|
||||
}
|
||||
reducibleJoin25: while (true) {
|
||||
if (r7) {
|
||||
push = items.push;
|
||||
Reflect.apply(push, items, [buildCommand({rootCommand: rootCommand, command: command,
|
||||
applicationId: applicationId,
|
||||
subCommandPath: subCommandPath, useKeyedPermissions: useKeyedPermissions})]);
|
||||
break reducibleJoin25;
|
||||
}
|
||||
break reducibleJoin25;
|
||||
}
|
||||
}
|
||||
return items;
|
||||
}
|
||||
|
||||
function hasAccessGivenPerms({userId, roles}, a1, a2) { // fn#43806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5243:4696, offset: 0x0115f41e, size: 306 bytes, params: 4, frame: 27
|
||||
var r11;
|
||||
var r12;
|
||||
var r5;
|
||||
var permission;
|
||||
var value7;
|
||||
var moduleValue2;
|
||||
var ROLE;
|
||||
var value8;
|
||||
const integrationPermissionUtilsModule = require(5067) /* metro dependency 5067: IntegrationPermissionUtils */;
|
||||
let toPermissionKey = integrationPermissionUtilsModule.toPermissionKey;
|
||||
const ApplicationCommandPermissionType = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandPermissionType;
|
||||
const USER = ApplicationCommandPermissionType.USER;
|
||||
let property = a2[Reflect.apply(toPermissionKey, integrationPermissionUtilsModule, [userId, USER])];
|
||||
if (property != null) {
|
||||
return property.permission;
|
||||
}
|
||||
const value3 = _createForOfIteratorHelperLoose_43793(roles);
|
||||
const value4 = value3();
|
||||
let done = value4.done;
|
||||
if (done) {
|
||||
r5 = false;
|
||||
} else {
|
||||
r11 = false;
|
||||
r12 = value4;
|
||||
reducibleLoop2: while (true) {
|
||||
value7 = r12.value;
|
||||
moduleValue2 = integrationPermissionUtilsModule;
|
||||
toPermissionKey = moduleValue2.toPermissionKey;
|
||||
ROLE = ApplicationCommandPermissionType.ROLE;
|
||||
property = a2[Reflect.apply(toPermissionKey, moduleValue2, [value7, ROLE])];
|
||||
if (property != null) {
|
||||
permission = property.permission;
|
||||
reducibleJoin4: while (true) {
|
||||
if (permission) {
|
||||
return true;
|
||||
}
|
||||
r11 = true;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
}
|
||||
value8 = value3();
|
||||
done = value8.done;
|
||||
if (done) {
|
||||
r5 = r11;
|
||||
break reducibleLoop2;
|
||||
}
|
||||
r12 = value8;
|
||||
continue reducibleLoop2;
|
||||
}
|
||||
}
|
||||
if (r5) {
|
||||
return false;
|
||||
}
|
||||
const value = integrationPermissionUtilsModule;
|
||||
toPermissionKey = value.toPermissionKey;
|
||||
ROLE = ApplicationCommandPermissionType.ROLE;
|
||||
property = a2[Reflect.apply(toPermissionKey, value, [a1, ROLE])];
|
||||
reducibleJoin9: while (true) {
|
||||
if (property != null) {
|
||||
permission = property.permission;
|
||||
break reducibleJoin9;
|
||||
}
|
||||
permission = null;
|
||||
break reducibleJoin9;
|
||||
}
|
||||
return permission;
|
||||
}
|
||||
|
||||
function buildApplicationCommands(a0, a1) { // fn#43807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5243:5343, offset: 0x0115f550, size: 56 bytes, params: 3, frame: 13
|
||||
const env0_0 = a1;
|
||||
return (importDefault(22) /* metro dependency 22 */).flatMap(a0, function(a0) {
|
||||
importDefault(dependencyMap[10])(a0.id != null, 'Missing command id');
|
||||
return buildSubCommands({rootCommand: a0, command: a0, applicationId: a0.application_id,
|
||||
subCommandPath: undefined,
|
||||
useKeyedPermissions: require});
|
||||
});
|
||||
}
|
||||
|
||||
function applicationPermissionsList(a0) { // fn#43809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5243:5611, offset: 0x0115f5ed, size: 39 bytes, params: 2, frame: 14
|
||||
return a0?.reduce(function(a0, a1) {
|
||||
if (a1.applicationCommandPermissions != null) {
|
||||
a0.push({id: a1.id, permissions: a1.applicationCommandPermissions});
|
||||
}
|
||||
return a0;
|
||||
}, []);
|
||||
}
|
||||
|
||||
function getMatchingGroupCommands(a0, a1, a2, a3) { // fn#43812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5243:5892, offset: 0x0115f668, size: 90 bytes, params: 5, frame: 14
|
||||
const env0_0 = a1;
|
||||
const env0_1 = a2;
|
||||
let value = importDefault(22) /* metro dependency 22 */;
|
||||
value = value(a0);
|
||||
value.forEach(_fun43813);
|
||||
return [].slice(0, a3);
|
||||
}
|
||||
|
||||
function getApplicationCommandOptionQueryOptions(a0) { // fn#43814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5243:6107, offset: 0x0115f714, size: 309 bytes, params: 2, frame: 18
|
||||
let type = a0.type;
|
||||
const ApplicationCommandOptionType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType;
|
||||
const STRING = ApplicationCommandOptionType.STRING;
|
||||
const value2 = type === STRING;
|
||||
type = a0.type;
|
||||
const CHANNEL = ApplicationCommandOptionType.CHANNEL;
|
||||
const value3 = type === CHANNEL;
|
||||
type = a0.type;
|
||||
const USER = ApplicationCommandOptionType.USER;
|
||||
const r3 = type === USER || a0.type === ApplicationCommandOptionType.MENTIONABLE;
|
||||
type = a0.type;
|
||||
const ROLE = ApplicationCommandOptionType.ROLE;
|
||||
const r2 = type === ROLE || a0.type === ApplicationCommandOptionType.MENTIONABLE;
|
||||
return {canMentionEveryone: value2 || r2, canMentionHere: value2, canMentionChannels: value2 || value3,
|
||||
canMentionUsers: value2 || r3, canMentionRoles: value2 || r2, canMentionAnyGuildUser: r3,
|
||||
canMentionNonMentionableRoles: r2, canMentionOtherGlobals: value2};
|
||||
}
|
||||
|
||||
function allChannelsSentinel(a0) { // fn#43815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5243:6725, offset: 0x0115f849, size: 58 bytes, params: 2, frame: 11
|
||||
let value = importDefault(24) /* metro dependency 24 */;
|
||||
value = value(a0);
|
||||
value = value.subtract(1);
|
||||
return value.toString();
|
||||
}
|
||||
|
||||
function canUseApplicationCommands(a0, a1, a2) { // fn#43816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5243:6831, offset: 0x0115f883, size: 244 bytes, params: 4, frame: 20
|
||||
var r2;
|
||||
var r1;
|
||||
var r0;
|
||||
var can;
|
||||
let value = !a1;
|
||||
if (a1) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = a2.isMultiUserDM();
|
||||
if (value) {
|
||||
r1 = !!value;
|
||||
} else {
|
||||
if (a2.isDM()) {
|
||||
r2 = !a2.isSystemDM();
|
||||
} else {
|
||||
value = a2.isArchivedLockedThread();
|
||||
if (value) {
|
||||
can = a0.can;
|
||||
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
||||
value = Reflect.apply(can, a0, [value.combine(Permissions.USE_APPLICATION_COMMANDS,
|
||||
Permissions.MANAGE_THREADS),
|
||||
a2]);
|
||||
r2 = value;
|
||||
} else {
|
||||
value = isReadableType(a2.type);
|
||||
if (value) {
|
||||
can = a0.can;
|
||||
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
||||
value = Reflect.apply(can, a0, [value.combine(Permissions.USE_APPLICATION_COMMANDS,
|
||||
Permissions.SEND_MESSAGES),
|
||||
a2]);
|
||||
r2 = value;
|
||||
} else {
|
||||
r2 = !!value;
|
||||
}
|
||||
}
|
||||
}
|
||||
r1 = r2;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function hasAccess({PermissionStore, guild, selfMember, applicationLevelPermissions, commandLevelPermissions, defaultMemberPermissions}) { // fn#43817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5243:7169, offset: 0x0115f977, size: 239 bytes, params: 2, frame: 21
|
||||
const ownerId = guild.ownerId;
|
||||
const userId = selfMember.userId;
|
||||
if (ownerId === userId) {
|
||||
return true;
|
||||
}
|
||||
const can = PermissionStore.can;
|
||||
const ADMINISTRATOR = Permissions.ADMINISTRATOR;
|
||||
if (Reflect.apply(can, PermissionStore, [ADMINISTRATOR, guild])) {
|
||||
return true;
|
||||
}
|
||||
const id = guild.id;
|
||||
if (commandLevelPermissions != null) {
|
||||
var hasAccessGivenPerms2 = hasAccessGivenPerms(selfMember, id, commandLevelPermissions);
|
||||
if (typeof hasAccessGivenPerms2 === 'boolean') {
|
||||
return hasAccessGivenPerms2;
|
||||
}
|
||||
}
|
||||
const hasAccessGivenPerms3 = hasAccessGivenPerms(selfMember, id, applicationLevelPermissions);
|
||||
return !(typeof hasAccessGivenPerms3 === 'boolean' && !hasAccessGivenPerms3) && (defaultMemberPermissions == null || !(importAll(483) /* metro dependency 483: BigFlagUtils */).equals(defaultMemberPermissions,
|
||||
env0_11) && PermissionStore.can(defaultMemberPermissions, guild));
|
||||
}
|
||||
|
||||
function getCommandAttachmentDraftType(a0) { // fn#43818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5243:7606, offset: 0x0115fa66, size: 637 bytes, params: 2, frame: 14
|
||||
const CommandOrigin = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).CommandOrigin;
|
||||
const CHAT = CommandOrigin.CHAT;
|
||||
if (CHAT === a0) {
|
||||
return DraftType.SlashCommand;
|
||||
}
|
||||
const APPLICATION_LAUNCHER = CommandOrigin.APPLICATION_LAUNCHER;
|
||||
if (APPLICATION_LAUNCHER === a0) {
|
||||
return DraftType.ApplicationLauncherCommand;
|
||||
}
|
||||
const APP_LAUNCHER_APPLICATION_VIEW = CommandOrigin.APP_LAUNCHER_APPLICATION_VIEW;
|
||||
if (APP_LAUNCHER_APPLICATION_VIEW === a0) {
|
||||
return DraftType.ApplicationLauncherCommand;
|
||||
}
|
||||
const CONTEXT_MENU = CommandOrigin.CONTEXT_MENU;
|
||||
if (CONTEXT_MENU === a0) {
|
||||
return DraftType.ApplicationLauncherCommand;
|
||||
}
|
||||
const VOICE_UI = CommandOrigin.VOICE_UI;
|
||||
if (VOICE_UI === a0) {
|
||||
return DraftType.ApplicationLauncherCommand;
|
||||
}
|
||||
const VOICE_TILE_ACTIVITY_SUGGESTIONS = CommandOrigin.VOICE_TILE_ACTIVITY_SUGGESTIONS;
|
||||
if (VOICE_TILE_ACTIVITY_SUGGESTIONS === a0) {
|
||||
return DraftType.ApplicationLauncherCommand;
|
||||
}
|
||||
const MINI_SHELF = CommandOrigin.MINI_SHELF;
|
||||
if (MINI_SHELF === a0) {
|
||||
return DraftType.ApplicationLauncherCommand;
|
||||
}
|
||||
const USER_PROFILE = CommandOrigin.USER_PROFILE;
|
||||
if (USER_PROFILE === a0) {
|
||||
return DraftType.ApplicationLauncherCommand;
|
||||
}
|
||||
const NOW_PLAYING = CommandOrigin.NOW_PLAYING;
|
||||
if (NOW_PLAYING === a0) {
|
||||
return DraftType.ApplicationLauncherCommand;
|
||||
}
|
||||
const ACTIVITY_DETAILS = CommandOrigin.ACTIVITY_DETAILS;
|
||||
if (ACTIVITY_DETAILS === a0) {
|
||||
return DraftType.ApplicationLauncherCommand;
|
||||
}
|
||||
const ACTIVITIES_HOME = CommandOrigin.ACTIVITIES_HOME;
|
||||
if (ACTIVITIES_HOME === a0) {
|
||||
return DraftType.ApplicationLauncherCommand;
|
||||
}
|
||||
const ACTIVITY_INSTANCE_EMBED = CommandOrigin.ACTIVITY_INSTANCE_EMBED;
|
||||
if (ACTIVITY_INSTANCE_EMBED === a0) {
|
||||
return DraftType.ApplicationLauncherCommand;
|
||||
}
|
||||
const ACTIVITY_BOOKMARK_EMBED = CommandOrigin.ACTIVITY_BOOKMARK_EMBED;
|
||||
if (ACTIVITY_BOOKMARK_EMBED === a0) {
|
||||
return DraftType.ApplicationLauncherCommand;
|
||||
}
|
||||
const APP_MESSAGE_EMBED = CommandOrigin.APP_MESSAGE_EMBED;
|
||||
if (APP_MESSAGE_EMBED === a0) {
|
||||
return DraftType.ApplicationLauncherCommand;
|
||||
}
|
||||
const APP_DMS_ENTRY_POINT_COMMAND_BUTTON = CommandOrigin.APP_DMS_ENTRY_POINT_COMMAND_BUTTON;
|
||||
if (APP_DMS_ENTRY_POINT_COMMAND_BUTTON === a0) {
|
||||
return DraftType.ApplicationLauncherCommand;
|
||||
}
|
||||
const IMAGE_RECS_MENU = CommandOrigin.IMAGE_RECS_MENU;
|
||||
if (IMAGE_RECS_MENU === a0) {
|
||||
return DraftType.ApplicationLauncherCommand;
|
||||
}
|
||||
const IMAGE_RECS_SUBMENU = CommandOrigin.IMAGE_RECS_SUBMENU;
|
||||
if (IMAGE_RECS_SUBMENU === a0) {
|
||||
return DraftType.ApplicationLauncherCommand;
|
||||
}
|
||||
}
|
||||
|
||||
function getCommandTriggerSection(a0) { // fn#43819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5243:8537, offset: 0x0115fce3, size: 162 bytes, params: 2, frame: 13
|
||||
const ApplicationCommandTriggerSections = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerSections;
|
||||
if (a0 != null) {
|
||||
return a0.id === BuiltInSectionId.BUILT_IN ? ApplicationCommandTriggerSections.BUILT_IN : a0.id === BuiltInSectionId.FRECENCY ? ApplicationCommandTriggerSections.FRECENCY : ApplicationCommandTriggerSections.APP;
|
||||
}
|
||||
}
|
||||
|
||||
function getApplicationCommandSection(a0, a1, a2) { // fn#43820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5243:8812, offset: 0x0115fd85, size: 145 bytes, params: 4, frame: 17
|
||||
const value = a1;
|
||||
const value2 = a2;
|
||||
const value4 = undefined;
|
||||
const ApplicationCommandSectionType = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandSectionType;
|
||||
const APPLICATION = ApplicationCommandSectionType.APPLICATION;
|
||||
let r4 = value2 ?? (a0 == null || a0.bot == null ? value4 : a0.bot.username);
|
||||
r4 = r4 ?? a0.name;
|
||||
return {type: APPLICATION, id: a0.id, name: r4, icon: a0.icon, application: a0, isUserApp: value != null && value};
|
||||
}
|
||||
|
||||
function extractInteractionDataProps({id, options}) { // fn#43821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5243:9093, offset: 0x0115fe16, size: 183 bytes, params: 2, frame: 20
|
||||
var r4;
|
||||
var r2;
|
||||
var value4;
|
||||
let value = undefined;
|
||||
const r5 = options == null ? value : options.find(function({type}) {
|
||||
return type === require(dependencyMap[6]).ApplicationCommandOptionType.SUB_COMMAND_GROUP;
|
||||
});
|
||||
if (r5 == null) {
|
||||
r4 = id;
|
||||
} else {
|
||||
value4 = id + ('' + SUB_COMMAND_KEY_SEPARATOR + r5.name);
|
||||
options = r5.options;
|
||||
r4 = value4;
|
||||
}
|
||||
const r0 = options == null ? value : options.find(function({type}) {
|
||||
return type === require(dependencyMap[6]).ApplicationCommandOptionType.SUB_COMMAND;
|
||||
});
|
||||
if (r0 == null) {
|
||||
r2 = r4;
|
||||
} else {
|
||||
value = r4 + ('' + SUB_COMMAND_KEY_SEPARATOR + r0.name);
|
||||
options = r0.options;
|
||||
r2 = value;
|
||||
}
|
||||
return {commandKey: r2, interactionOptions: options};
|
||||
}
|
||||
|
||||
function trackCommandSelected({command, location, triggerSection, queryLength, sectionName, query, searchResultsPosition, source}) { // fn#43824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5243:9508, offset: 0x0115fecd, size: 196 bytes, params: 2, frame: 26
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const trackWithMetadata = appAnalyticsUtilsModule.trackWithMetadata;
|
||||
const APPLICATION_COMMAND_SELECTED = AnalyticEvents.APPLICATION_COMMAND_SELECTED;
|
||||
let id = command.rootCommand?.id;
|
||||
id = id ?? command.id;
|
||||
Reflect.apply(trackWithMetadata, appAnalyticsUtilsModule, [APPLICATION_COMMAND_SELECTED, {command_id: id,
|
||||
application_id: command.applicationId, location: location, section: triggerSection, query_length: queryLength,
|
||||
command_text_length: command.displayName.length, section_name: sectionName, query: query,
|
||||
search_results_position: searchResultsPosition, source: source}]);
|
||||
}
|
||||
|
||||
function _fun43801(a0) { // fn#43801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5243:2375, offset: 0x0115ee5a, size: 502 bytes, params: 2, frame: 17
|
||||
var r1;
|
||||
var r0;
|
||||
var object5;
|
||||
var object6;
|
||||
var object7;
|
||||
const object8 = {};
|
||||
copyDataProperties(object8, a0, undefined);
|
||||
object8['choices'] = a0.choices?.map(function(a0) {
|
||||
var r3;
|
||||
var object = {};
|
||||
copyDataProperties(object, a0, r3);
|
||||
object['displayName'] = a0.name_localized ?? a0.name;
|
||||
return object;
|
||||
});
|
||||
object8['options'] = mapOptions(a0.options);
|
||||
object8['serverLocalizedName'] = a0.name_localized;
|
||||
object8['displayName'] = a0.name_localized ?? a0.name;
|
||||
object8['displayDescription'] = a0.description_localized ?? a0.description;
|
||||
const type = a0.type;
|
||||
const ApplicationCommandOptionType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType;
|
||||
const CHANNEL = ApplicationCommandOptionType.CHANNEL;
|
||||
if (type !== CHANNEL) {
|
||||
if (a0.type === ApplicationCommandOptionType.NUMBER) {
|
||||
if ('min_value' in a0) {
|
||||
object5 = {};
|
||||
copyDataProperties(object5, object8, 6);
|
||||
object5['minValue'] = a0.min_value;
|
||||
object5['maxValue'] = a0.max_value;
|
||||
r0 = object5;
|
||||
} else if ('max_value' in a0) {
|
||||
object5 = {};
|
||||
copyDataProperties(object5, object8, 6);
|
||||
object5['minValue'] = a0.min_value;
|
||||
object5['maxValue'] = a0.max_value;
|
||||
r0 = object5;
|
||||
} else {
|
||||
if (a0.type !== ApplicationCommandOptionType.STRING) {
|
||||
r1 = object8;
|
||||
} else if ('min_length' in a0) {
|
||||
object6 = {};
|
||||
copyDataProperties(object6, object8, 6);
|
||||
object6['minLength'] = a0.min_length;
|
||||
object6['maxLength'] = a0.max_length;
|
||||
r1 = object6;
|
||||
} else if ('max_length' in a0) {
|
||||
object6 = {};
|
||||
copyDataProperties(object6, object8, 6);
|
||||
object6['minLength'] = a0.min_length;
|
||||
object6['maxLength'] = a0.max_length;
|
||||
r1 = object6;
|
||||
} else {
|
||||
r1 = object8;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
} else if (a0.type !== ApplicationCommandOptionType.INTEGER) {
|
||||
if (a0.type !== ApplicationCommandOptionType.STRING) {
|
||||
r1 = object8;
|
||||
} else if ('min_length' in a0) {
|
||||
object6 = {};
|
||||
copyDataProperties(object6, object8, 6);
|
||||
object6['minLength'] = a0.min_length;
|
||||
object6['maxLength'] = a0.max_length;
|
||||
r1 = object6;
|
||||
} else if ('max_length' in a0) {
|
||||
object6 = {};
|
||||
copyDataProperties(object6, object8, 6);
|
||||
object6['minLength'] = a0.min_length;
|
||||
object6['maxLength'] = a0.max_length;
|
||||
r1 = object6;
|
||||
} else {
|
||||
r1 = object8;
|
||||
}
|
||||
r0 = r1;
|
||||
} else if ('min_value' in a0) {
|
||||
object5 = {};
|
||||
copyDataProperties(object5, object8, 6);
|
||||
object5['minValue'] = a0.min_value;
|
||||
object5['maxValue'] = a0.max_value;
|
||||
r0 = object5;
|
||||
} else if ('max_value' in a0) {
|
||||
object5 = {};
|
||||
copyDataProperties(object5, object8, 6);
|
||||
object5['minValue'] = a0.min_value;
|
||||
object5['maxValue'] = a0.max_value;
|
||||
r0 = object5;
|
||||
} else {
|
||||
if (a0.type !== ApplicationCommandOptionType.STRING) {
|
||||
r1 = object8;
|
||||
} else if ('min_length' in a0) {
|
||||
object6 = {};
|
||||
copyDataProperties(object6, object8, 6);
|
||||
object6['minLength'] = a0.min_length;
|
||||
object6['maxLength'] = a0.max_length;
|
||||
r1 = object6;
|
||||
} else if ('max_length' in a0) {
|
||||
object6 = {};
|
||||
copyDataProperties(object6, object8, 6);
|
||||
object6['minLength'] = a0.min_length;
|
||||
object6['maxLength'] = a0.max_length;
|
||||
r1 = object6;
|
||||
} else {
|
||||
r1 = object8;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
} else if ('channel_types' in a0) {
|
||||
object7 = {};
|
||||
copyDataProperties(object7, object8, 6);
|
||||
object7['channelTypes'] = a0.channel_types;
|
||||
r0 = object7;
|
||||
} else if (a0.type === ApplicationCommandOptionType.NUMBER) {
|
||||
if ('min_value' in a0) {
|
||||
object5 = {};
|
||||
copyDataProperties(object5, object8, 6);
|
||||
object5['minValue'] = a0.min_value;
|
||||
object5['maxValue'] = a0.max_value;
|
||||
r0 = object5;
|
||||
} else if ('max_value' in a0) {
|
||||
object5 = {};
|
||||
copyDataProperties(object5, object8, 6);
|
||||
object5['minValue'] = a0.min_value;
|
||||
object5['maxValue'] = a0.max_value;
|
||||
r0 = object5;
|
||||
} else {
|
||||
if (a0.type !== ApplicationCommandOptionType.STRING) {
|
||||
r1 = object8;
|
||||
} else if ('min_length' in a0) {
|
||||
object6 = {};
|
||||
copyDataProperties(object6, object8, 6);
|
||||
object6['minLength'] = a0.min_length;
|
||||
object6['maxLength'] = a0.max_length;
|
||||
r1 = object6;
|
||||
} else if ('max_length' in a0) {
|
||||
object6 = {};
|
||||
copyDataProperties(object6, object8, 6);
|
||||
object6['minLength'] = a0.min_length;
|
||||
object6['maxLength'] = a0.max_length;
|
||||
r1 = object6;
|
||||
} else {
|
||||
r1 = object8;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
} else if (a0.type !== ApplicationCommandOptionType.INTEGER) {
|
||||
if (a0.type !== ApplicationCommandOptionType.STRING) {
|
||||
r1 = object8;
|
||||
} else if ('min_length' in a0) {
|
||||
object6 = {};
|
||||
copyDataProperties(object6, object8, 6);
|
||||
object6['minLength'] = a0.min_length;
|
||||
object6['maxLength'] = a0.max_length;
|
||||
r1 = object6;
|
||||
} else if ('max_length' in a0) {
|
||||
object6 = {};
|
||||
copyDataProperties(object6, object8, 6);
|
||||
object6['minLength'] = a0.min_length;
|
||||
object6['maxLength'] = a0.max_length;
|
||||
r1 = object6;
|
||||
} else {
|
||||
r1 = object8;
|
||||
}
|
||||
r0 = r1;
|
||||
} else if ('min_value' in a0) {
|
||||
object5 = {};
|
||||
copyDataProperties(object5, object8, 6);
|
||||
object5['minValue'] = a0.min_value;
|
||||
object5['maxValue'] = a0.max_value;
|
||||
r0 = object5;
|
||||
} else if ('max_value' in a0) {
|
||||
object5 = {};
|
||||
copyDataProperties(object5, object8, 6);
|
||||
object5['minValue'] = a0.min_value;
|
||||
object5['maxValue'] = a0.max_value;
|
||||
r0 = object5;
|
||||
} else {
|
||||
if (a0.type !== ApplicationCommandOptionType.STRING) {
|
||||
r1 = object8;
|
||||
} else if ('min_length' in a0) {
|
||||
object6 = {};
|
||||
copyDataProperties(object6, object8, 6);
|
||||
object6['minLength'] = a0.min_length;
|
||||
object6['maxLength'] = a0.max_length;
|
||||
r1 = object6;
|
||||
} else if ('max_length' in a0) {
|
||||
object6 = {};
|
||||
copyDataProperties(object6, object8, 6);
|
||||
object6['minLength'] = a0.min_length;
|
||||
object6['maxLength'] = a0.max_length;
|
||||
r1 = object6;
|
||||
} else {
|
||||
r1 = object8;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun43813(a0) { // fn#43813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5243:5973, offset: 0x0115f6c2, size: 82 bytes, params: 2, frame: 14
|
||||
if (require.test(a0.displayName) && (a0.predicate == null || a0.predicate(importDefault))) {
|
||||
env0_2.push(a0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
/* Metro module 11693; source: modules/application_commands/ApplicationCommandValidationUtils.tsx; dependencies: [5066, 5068, 8051, 1244, 11694, 2] */
|
||||
function _fun89637(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11879:6, offset: 0x02017ecd, size: 163 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_89640 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const closure = validateOptionContent;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(5066) /* metro dependency 5066: ApplicationCommandConstants */).getValidationErrorText;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandValidationUtils.tsx');
|
||||
exports.getValidationResults = getValidationResults;
|
||||
exports.validateOptionContent = closure;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_89638(a0, a1) { // fn#89638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11879:134, offset: 0x02017f70, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun89639;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_89640(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_89640(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_89640(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun89639;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function validateOptionContent({option, content, guildId, channelId, allowEmptyValues, commandOrigin}) { // fn#89641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11879:1044, offset: 0x020180e4, size: 501 bytes, params: 2, frame: 26
|
||||
var r3;
|
||||
var r1;
|
||||
var moduleValue;
|
||||
var object2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const r9 = commandOrigin !== undefined ? commandOrigin : (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).CommandOrigin.CHAT;
|
||||
const value = '';
|
||||
if (content != null) {
|
||||
moduleValue = require(8051) /* metro dependency 8051: ApplicationCommandOptionUtils */;
|
||||
r3 = moduleValue.getString({content: content}, 'content').trim();
|
||||
} else {
|
||||
r3 = value;
|
||||
}
|
||||
const required = option.required;
|
||||
if (content == null) {
|
||||
return required ? {success: false, error: intl.string(t.JZJQL2)} : {success: true};
|
||||
}
|
||||
if (value === r3) {
|
||||
if (allowEmptyValues) {
|
||||
r1 = {success: true};
|
||||
} else {
|
||||
object2 = {success: false};
|
||||
if (required) {
|
||||
object2.error = intl.string(t.JZJQL2);
|
||||
r1 = object2;
|
||||
} else {
|
||||
object2.error = getValidationErrorText(option);
|
||||
r1 = object2;
|
||||
}
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
const value5 = (importDefault(11694) /* metro dependency 11694: ApplicationCommandValidators */)[option.type](content.length > 1 ? {type: 'text',
|
||||
text: r3} : content[0], option, channelId, guildId, r9);
|
||||
if (!(value5.success || value5.error != null)) {
|
||||
value5.error = getValidationErrorText(option);
|
||||
}
|
||||
return value5;
|
||||
}
|
||||
|
||||
function getValidationResults({options}, a1, a2, a3, a4) { // fn#89642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11879:1717, offset: 0x020182d9, size: 129 bytes, params: 6, frame: 22
|
||||
var r2;
|
||||
var value4;
|
||||
var name;
|
||||
var property;
|
||||
var value5;
|
||||
const object2 = {};
|
||||
if (options != null) {
|
||||
var value2 = _createForOfIteratorHelperLoose_89638(options);
|
||||
var value3 = value2();
|
||||
var done = value3.done;
|
||||
if (!done) {
|
||||
r2 = value3;
|
||||
reducibleLoop2: while (true) {
|
||||
value4 = r2.value;
|
||||
name = value4.name;
|
||||
property = a1[name];
|
||||
name = value4.name;
|
||||
object2[name] = validateOptionContent({option: value4, content: property, guildId: a2, channelId: a3,
|
||||
allowEmptyValues: a4});
|
||||
value5 = value2();
|
||||
done = value5.done;
|
||||
if (done) {
|
||||
break reducibleLoop2;
|
||||
}
|
||||
r2 = value5;
|
||||
continue reducibleLoop2;
|
||||
}
|
||||
}
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,535 @@
|
||||
/* Metro module 11694; source: modules/application_commands/ApplicationCommandValidators.tsx; dependencies: [1949, 4644, 1909, 8053, 44, 1244, 8051, 5065, 8054, 2] */
|
||||
function _fun89643(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:6, offset: 0x0201835a, size: 535 bytes, params: 8, frame: 19
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const localeNumberFormat = function(a0) {
|
||||
return a0.toLocaleString(require(dependencyMap[5]).intl.currentLocale, {useGrouping: false});
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
|
||||
const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */;
|
||||
object2 = {};
|
||||
const ApplicationCommandOptionType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType;
|
||||
const SUB_COMMAND = ApplicationCommandOptionType.SUB_COMMAND;
|
||||
object2[SUB_COMMAND] = function() {
|
||||
return {success: false};
|
||||
};
|
||||
const SUB_COMMAND_GROUP = ApplicationCommandOptionType.SUB_COMMAND_GROUP;
|
||||
object2[SUB_COMMAND_GROUP] = function() {
|
||||
return {success: false};
|
||||
};
|
||||
const BOOLEAN = ApplicationCommandOptionType.BOOLEAN;
|
||||
object2[BOOLEAN] = function(a0) {
|
||||
if (a0.type !== 'text') {
|
||||
return {success: false};
|
||||
}
|
||||
var value = a0.text.trim();
|
||||
value = require(dependencyMap[3]).toChoiceBooleanValue(value);
|
||||
return {success: value != null};
|
||||
};
|
||||
const STRING = ApplicationCommandOptionType.STRING;
|
||||
object2[STRING] = _fun89649;
|
||||
const INTEGER = ApplicationCommandOptionType.INTEGER;
|
||||
object2[INTEGER] = _fun89650;
|
||||
const NUMBER = ApplicationCommandOptionType.NUMBER;
|
||||
object2[NUMBER] = _fun89651;
|
||||
const USER = ApplicationCommandOptionType.USER;
|
||||
object2[USER] = _fun89652;
|
||||
const CHANNEL = ApplicationCommandOptionType.CHANNEL;
|
||||
object2[CHANNEL] = _fun89653;
|
||||
const ROLE = ApplicationCommandOptionType.ROLE;
|
||||
object2[ROLE] = _fun89654;
|
||||
const MENTIONABLE = ApplicationCommandOptionType.MENTIONABLE;
|
||||
object2[MENTIONABLE] = _fun89655;
|
||||
const ATTACHMENT = ApplicationCommandOptionType.ATTACHMENT;
|
||||
object2[ATTACHMENT] = _fun89656;
|
||||
const isValidRoleMention = function(a0) {
|
||||
return a0.type === 'roleMention' || a0.type === 'textMention' && a0.text === '@everyone';
|
||||
};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandValidators.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function validateNumericOptionRange(a0, a1, a2, a3, a4) { // fn#89644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:4844, offset: 0x02018571, size: 361 bytes, params: 6, frame: 17
|
||||
var maxValue;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToPlainString;
|
||||
var object;
|
||||
var localeNumberFormatBinding;
|
||||
var object5;
|
||||
var object6;
|
||||
let minValue = a1.minValue;
|
||||
if (minValue == null) {
|
||||
if (a1.maxValue == null) {
|
||||
return {success: true};
|
||||
}
|
||||
} else {
|
||||
minValue = a1.minValue;
|
||||
if (a0 < minValue) {
|
||||
maxValue = a1.maxValue;
|
||||
if (maxValue == null) {
|
||||
if (a1.minValue != null) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
object5 = {};
|
||||
object5.minimum = localeNumberFormat(a1.minValue);
|
||||
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a3, object5])};
|
||||
}
|
||||
if (a1.maxValue != null) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
object = {};
|
||||
object.maximum = localeNumberFormat(a1.maxValue);
|
||||
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a4, object])};
|
||||
}
|
||||
return {success: true};
|
||||
}
|
||||
minValue = a1.minValue;
|
||||
if (minValue != null) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
object6 = {};
|
||||
localeNumberFormatBinding = localeNumberFormat;
|
||||
object6.minimum = localeNumberFormatBinding(a1.minValue);
|
||||
object6.maximum = localeNumberFormatBinding(a1.maxValue);
|
||||
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a2, object6])};
|
||||
}
|
||||
minValue = a1.minValue;
|
||||
if (minValue != null) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
object5 = {};
|
||||
object5.minimum = localeNumberFormat(a1.minValue);
|
||||
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a3, object5])};
|
||||
}
|
||||
maxValue = a1.maxValue;
|
||||
if (maxValue != null) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
object = {};
|
||||
object.maximum = localeNumberFormat(a1.maxValue);
|
||||
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a4, object])};
|
||||
}
|
||||
return {success: true};
|
||||
}
|
||||
if (a1.maxValue == null) {
|
||||
return {success: true};
|
||||
}
|
||||
}
|
||||
maxValue = a1.maxValue;
|
||||
if (a0 > maxValue) {
|
||||
maxValue = a1.maxValue;
|
||||
if (maxValue == null) {
|
||||
if (a1.minValue != null) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
object5 = {};
|
||||
object5.minimum = localeNumberFormat(a1.minValue);
|
||||
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a3, object5])};
|
||||
}
|
||||
if (a1.maxValue != null) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
object = {};
|
||||
object.maximum = localeNumberFormat(a1.maxValue);
|
||||
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a4, object])};
|
||||
}
|
||||
return {success: true};
|
||||
}
|
||||
minValue = a1.minValue;
|
||||
if (minValue != null) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
object6 = {};
|
||||
localeNumberFormatBinding = localeNumberFormat;
|
||||
object6.minimum = localeNumberFormatBinding(a1.minValue);
|
||||
object6.maximum = localeNumberFormatBinding(a1.maxValue);
|
||||
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a2, object6])};
|
||||
}
|
||||
minValue = a1.minValue;
|
||||
if (minValue != null) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
object5 = {};
|
||||
object5.minimum = localeNumberFormat(a1.minValue);
|
||||
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a3, object5])};
|
||||
}
|
||||
maxValue = a1.maxValue;
|
||||
if (maxValue != null) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
object = {};
|
||||
object.maximum = localeNumberFormat(a1.maxValue);
|
||||
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a4, object])};
|
||||
}
|
||||
}
|
||||
return {success: true};
|
||||
}
|
||||
|
||||
function _fun89649(a0, a1, a2) { // fn#89649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:475, offset: 0x02018780, size: 934 bytes, params: 4, frame: 25
|
||||
var r5;
|
||||
var object2;
|
||||
var moduleValue;
|
||||
var maxLength;
|
||||
var length;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToPlainString;
|
||||
var maxErrorMessage;
|
||||
var localeNumberFormatBinding;
|
||||
var minErrorMessage;
|
||||
var rangeErrorMessage;
|
||||
var exactRangeErrorMessage;
|
||||
var value;
|
||||
const defaultImport = importDefault(44) /* metro dependency 44 */;
|
||||
let type = a1.type;
|
||||
const ApplicationCommandOptionType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType;
|
||||
const STRING = ApplicationCommandOptionType.STRING;
|
||||
defaultImport(type === STRING, 'option type must match validator type');
|
||||
type = a0.type;
|
||||
if (type === 'emoji') {
|
||||
r5 = a0.surrogate;
|
||||
} else {
|
||||
if (type !== 'text') {
|
||||
return {success: false};
|
||||
}
|
||||
r5 = a0.text.trim();
|
||||
}
|
||||
if (a1.choices != null) {
|
||||
value = require(8053) /* metro dependency 8053: ApplicationCommandChoiceUtils */;
|
||||
return {success: value.findChoiceStringValue(a1.choices, r5) != null};
|
||||
}
|
||||
if (a1.autocomplete) {
|
||||
moduleValue = require(8053) /* metro dependency 8053: ApplicationCommandChoiceUtils */;
|
||||
reducibleJoin8: while (true) {
|
||||
if (moduleValue.findAutocompleteChoiceStringValue(a2, a1.name, r5) != null) {
|
||||
return {success: true};
|
||||
}
|
||||
break reducibleJoin8;
|
||||
}
|
||||
}
|
||||
let minLength = a1.minLength;
|
||||
if (minLength === undefined) {
|
||||
maxLength = a1.maxLength;
|
||||
reducibleJoin10: while (true) {
|
||||
if (maxLength === undefined) {
|
||||
return {success: true};
|
||||
}
|
||||
break reducibleJoin10;
|
||||
}
|
||||
}
|
||||
if (r5 == null) {
|
||||
return {success: false};
|
||||
}
|
||||
let object3 = {};
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
object3.exactRangeErrorMessage = t['e+9/SY'];
|
||||
const IE1sTh = t.IE1sTh;
|
||||
object3.rangeErrorMessage = IE1sTh;
|
||||
object3.minErrorMessage = t.rXAFQD;
|
||||
object3.maxErrorMessage = t['ycEPx/'];
|
||||
minLength = a1.minLength;
|
||||
reducibleJoin27: while (true) {
|
||||
reducibleJoin22: while (true) {
|
||||
if (minLength === undefined) {
|
||||
maxLength = a1.maxLength;
|
||||
if (maxLength === undefined) {
|
||||
break reducibleJoin22;
|
||||
}
|
||||
length = r5.length;
|
||||
maxLength = a1.maxLength;
|
||||
if (length > maxLength) {
|
||||
maxLength = a1.maxLength;
|
||||
if (maxLength !== undefined) {
|
||||
if (a1.minLength !== undefined) {
|
||||
if (a1.minLength === a1.maxLength) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
exactRangeErrorMessage = object3.exactRangeErrorMessage;
|
||||
object3 = {};
|
||||
object3.value = localeNumberFormat(a1.minLength);
|
||||
object2 = {success: false, error: Reflect.apply(formatToPlainString, intl,
|
||||
[exactRangeErrorMessage,
|
||||
object3])};
|
||||
break reducibleJoin27;
|
||||
}
|
||||
}
|
||||
}
|
||||
maxLength = a1.maxLength;
|
||||
if (maxLength !== undefined) {
|
||||
if (a1.minLength !== undefined) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
rangeErrorMessage = object3.rangeErrorMessage;
|
||||
object3 = {};
|
||||
localeNumberFormatBinding = localeNumberFormat;
|
||||
object3.minimum = localeNumberFormatBinding(a1.minLength);
|
||||
object3.maximum = localeNumberFormatBinding(a1.maxLength);
|
||||
object2 = {success: false, error: Reflect.apply(formatToPlainString, intl,
|
||||
[rangeErrorMessage,
|
||||
object3])};
|
||||
break reducibleJoin27;
|
||||
}
|
||||
}
|
||||
if (a1.minLength !== undefined) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
minErrorMessage = object3.minErrorMessage;
|
||||
object3 = {};
|
||||
object3.minimum = localeNumberFormat(a1.minLength);
|
||||
object2 = {success: false, error: Reflect.apply(formatToPlainString, intl, [minErrorMessage,
|
||||
object3])};
|
||||
break reducibleJoin27;
|
||||
}
|
||||
maxLength = a1.maxLength;
|
||||
if (maxLength !== undefined) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
maxErrorMessage = object3.maxErrorMessage;
|
||||
object3 = {};
|
||||
object3.maximum = localeNumberFormat(a1.maxLength);
|
||||
object2 = {success: false, error: Reflect.apply(formatToPlainString, intl, [maxErrorMessage,
|
||||
object3])};
|
||||
break reducibleJoin27;
|
||||
}
|
||||
break reducibleJoin22;
|
||||
}
|
||||
break reducibleJoin22;
|
||||
}
|
||||
length = r5.length;
|
||||
minLength = a1.minLength;
|
||||
if (!(length < minLength)) {
|
||||
if (a1.maxLength === undefined) {
|
||||
break reducibleJoin22;
|
||||
}
|
||||
length = r5.length;
|
||||
if (!(length > a1.maxLength)) {
|
||||
break reducibleJoin22;
|
||||
}
|
||||
}
|
||||
maxLength = a1.maxLength;
|
||||
if (maxLength !== undefined) {
|
||||
if (a1.minLength !== undefined) {
|
||||
if (a1.minLength === a1.maxLength) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
exactRangeErrorMessage = object3.exactRangeErrorMessage;
|
||||
object3 = {};
|
||||
object3.value = localeNumberFormat(a1.minLength);
|
||||
object2 = {success: false, error: Reflect.apply(formatToPlainString, intl,
|
||||
[exactRangeErrorMessage,
|
||||
object3])};
|
||||
break reducibleJoin27;
|
||||
}
|
||||
}
|
||||
}
|
||||
maxLength = a1.maxLength;
|
||||
if (maxLength !== undefined) {
|
||||
if (a1.minLength !== undefined) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
rangeErrorMessage = object3.rangeErrorMessage;
|
||||
object3 = {};
|
||||
localeNumberFormatBinding = localeNumberFormat;
|
||||
object3.minimum = localeNumberFormatBinding(a1.minLength);
|
||||
object3.maximum = localeNumberFormatBinding(a1.maxLength);
|
||||
object2 = {success: false, error: Reflect.apply(formatToPlainString, intl, [rangeErrorMessage,
|
||||
object3])};
|
||||
break reducibleJoin27;
|
||||
}
|
||||
}
|
||||
minLength = a1.minLength;
|
||||
if (minLength !== undefined) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
minErrorMessage = object3.minErrorMessage;
|
||||
object3 = {};
|
||||
localeNumberFormatBinding = localeNumberFormat;
|
||||
minLength = a1.minLength;
|
||||
object3.minimum = localeNumberFormatBinding(minLength);
|
||||
object2 = {success: false, error: Reflect.apply(formatToPlainString, intl, [minErrorMessage, object3])};
|
||||
break reducibleJoin27;
|
||||
}
|
||||
maxLength = a1.maxLength;
|
||||
if (maxLength !== undefined) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
maxErrorMessage = object3.maxErrorMessage;
|
||||
object3 = {};
|
||||
localeNumberFormatBinding = localeNumberFormat;
|
||||
maxLength = a1.maxLength;
|
||||
object3.maximum = localeNumberFormatBinding(maxLength);
|
||||
object2 = {success: false, error: Reflect.apply(formatToPlainString, intl, [maxErrorMessage, object3])};
|
||||
break reducibleJoin27;
|
||||
}
|
||||
break reducibleJoin22;
|
||||
}
|
||||
object2 = {success: true};
|
||||
break reducibleJoin27;
|
||||
}
|
||||
if (object2.success) {
|
||||
return {success: true};
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun89650(a0, a1, a2) { // fn#89650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:2061, offset: 0x02018b26, size: 498 bytes, params: 4, frame: 24
|
||||
var moduleValue;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var value;
|
||||
const defaultImport = importDefault(44) /* metro dependency 44 */;
|
||||
let type = a1.type;
|
||||
const ApplicationCommandOptionType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType;
|
||||
const INTEGER = ApplicationCommandOptionType.INTEGER;
|
||||
defaultImport(type === INTEGER, 'option type must match validator type');
|
||||
type = a0.type;
|
||||
const value2 = null;
|
||||
const r5 = type !== 'text' ? value2 : a0.text.trim();
|
||||
if (value2 == r5) {
|
||||
return {success: false};
|
||||
}
|
||||
if (r5.length === 0) {
|
||||
return {success: false};
|
||||
}
|
||||
if (value2 != a1.choices) {
|
||||
value = require(8053) /* metro dependency 8053: ApplicationCommandChoiceUtils */;
|
||||
return {success: value2 != value.findChoiceNumberValue(a1.choices, r5)};
|
||||
}
|
||||
if (a1.autocomplete) {
|
||||
moduleValue = require(8053) /* metro dependency 8053: ApplicationCommandChoiceUtils */;
|
||||
if (value2 != moduleValue.findAutocompleteChoiceNumberValue(a2, a1.name, r5)) {
|
||||
return {success: true};
|
||||
}
|
||||
}
|
||||
const Number = global.Number;
|
||||
const moduleValue2 = importAll(8051) /* metro dependency 8051: ApplicationCommandOptionUtils */;
|
||||
const value4 = Number(moduleValue2.normalizeNumericString(LocaleStore.locale, r5));
|
||||
return value2 == value4 || global.isNaN(value4) ? {success: false} : global.Number.isInteger(value4) && global.Number.isSafeInteger(value4) ? validateNumericOptionRange(value4,
|
||||
a1, t['8Y5zsp'], t.CyRLmH, t['VD3Q+S']) : {success: false};
|
||||
}
|
||||
|
||||
function _fun89651(a0, a1, a2) { // fn#89651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:2719, offset: 0x02018d18, size: 480 bytes, params: 4, frame: 24
|
||||
var moduleValue;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var value;
|
||||
const defaultImport = importDefault(44) /* metro dependency 44 */;
|
||||
let type = a1.type;
|
||||
const ApplicationCommandOptionType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType;
|
||||
const NUMBER = ApplicationCommandOptionType.NUMBER;
|
||||
defaultImport(type === NUMBER, 'option type must match validator type');
|
||||
type = a0.type;
|
||||
const value2 = null;
|
||||
const r5 = type !== 'text' ? value2 : a0.text.trim();
|
||||
if (value2 == r5) {
|
||||
return {success: false};
|
||||
}
|
||||
if (r5.length === 0) {
|
||||
return {success: false};
|
||||
}
|
||||
if (value2 != a1.choices) {
|
||||
value = require(8053) /* metro dependency 8053: ApplicationCommandChoiceUtils */;
|
||||
return {success: value2 != value.findChoiceNumberValue(a1.choices, r5)};
|
||||
}
|
||||
if (a1.autocomplete) {
|
||||
moduleValue = require(8053) /* metro dependency 8053: ApplicationCommandChoiceUtils */;
|
||||
if (value2 != moduleValue.findAutocompleteChoiceNumberValue(a2, a1.name, r5)) {
|
||||
return {success: true};
|
||||
}
|
||||
}
|
||||
const Number = global.Number;
|
||||
const moduleValue2 = importAll(8051) /* metro dependency 8051: ApplicationCommandOptionUtils */;
|
||||
const value4 = Number(moduleValue2.normalizeNumericString(LocaleStore.locale, r5));
|
||||
return global.isNaN(value4) || value4 > global.Number.MAX_SAFE_INTEGER || value4 < global.Number.MIN_SAFE_INTEGER ? {success: false} : validateNumericOptionRange(value4,
|
||||
a1, t['8Y5zsp'], t.CyRLmH, t['VD3Q+S']);
|
||||
}
|
||||
|
||||
function _fun89652(a0, a1, a2, a3) { // fn#89652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:3372, offset: 0x02018ef8, size: 186 bytes, params: 5, frame: 18
|
||||
var value;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var isSnowflake;
|
||||
var text;
|
||||
var resolveApplicationCommandOption;
|
||||
if (a0.type === 'text') {
|
||||
value2 = undefined;
|
||||
moduleValue = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
|
||||
isSnowflake = moduleValue.isSnowflake;
|
||||
text = a0.text;
|
||||
if (Reflect.apply(isSnowflake, moduleValue, [text])) {
|
||||
return {success: true};
|
||||
}
|
||||
value = require(8054) /* metro dependency 8054: PlaintextResolvers */;
|
||||
resolveApplicationCommandOption = value.resolveApplicationCommandOption;
|
||||
text = a0.text;
|
||||
value = Reflect.apply(resolveApplicationCommandOption, value, [text, a3, a2, {allowRoles: false}]);
|
||||
return {success: (value == null ? value2 : value.type) === 'userMention'};
|
||||
}
|
||||
return {success: a0.type === 'userMention'};
|
||||
}
|
||||
|
||||
function _fun89653(a0, a1, a2, a3) { // fn#89653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:3671, offset: 0x02018fb2, size: 170 bytes, params: 5, frame: 16
|
||||
var value;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var isSnowflake;
|
||||
var text;
|
||||
var resolveApplicationCommandOption;
|
||||
if (a0.type === 'text') {
|
||||
value2 = undefined;
|
||||
moduleValue = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
|
||||
isSnowflake = moduleValue.isSnowflake;
|
||||
text = a0.text;
|
||||
if (Reflect.apply(isSnowflake, moduleValue, [text])) {
|
||||
return {success: true};
|
||||
}
|
||||
value = require(8054) /* metro dependency 8054: PlaintextResolvers */;
|
||||
resolveApplicationCommandOption = value.resolveApplicationCommandOption;
|
||||
text = a0.text;
|
||||
value = Reflect.apply(resolveApplicationCommandOption, value, [text, a3, a2]);
|
||||
return {success: (value == null ? value2 : value.type) === 'channelMention'};
|
||||
}
|
||||
return {success: a0.type === 'channelMention'};
|
||||
}
|
||||
|
||||
function _fun89654(a0, a1, a2, a3) { // fn#89654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:3957, offset: 0x0201905c, size: 183 bytes, params: 5, frame: 18
|
||||
var value;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var isSnowflake;
|
||||
var text;
|
||||
var resolveApplicationCommandOption;
|
||||
if (a0.type === 'text') {
|
||||
value2 = undefined;
|
||||
moduleValue = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
|
||||
isSnowflake = moduleValue.isSnowflake;
|
||||
text = a0.text;
|
||||
if (Reflect.apply(isSnowflake, moduleValue, [text])) {
|
||||
return {success: true};
|
||||
}
|
||||
value = require(8054) /* metro dependency 8054: PlaintextResolvers */;
|
||||
resolveApplicationCommandOption = value.resolveApplicationCommandOption;
|
||||
text = a0.text;
|
||||
value = Reflect.apply(resolveApplicationCommandOption, value, [text, a3, a2, {allowUsers: false}]);
|
||||
return {success: (value == null ? value2 : value.type) === 'roleMention'};
|
||||
}
|
||||
const object2 = {};
|
||||
object2.success = isValidRoleMention(a0);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun89655(a0, a1, a2, a3) { // fn#89655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:4259, offset: 0x02019113, size: 204 bytes, params: 5, frame: 17
|
||||
var moduleValue;
|
||||
var isSnowflake;
|
||||
var text;
|
||||
var moduleValue2;
|
||||
var resolveApplicationCommandOption;
|
||||
var applicationCommandOption;
|
||||
if (a0.type === 'text') {
|
||||
moduleValue = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
|
||||
isSnowflake = moduleValue.isSnowflake;
|
||||
text = a0.text;
|
||||
if (Reflect.apply(isSnowflake, moduleValue, [text])) {
|
||||
return {success: true};
|
||||
}
|
||||
moduleValue2 = require(8054) /* metro dependency 8054: PlaintextResolvers */;
|
||||
resolveApplicationCommandOption = moduleValue2.resolveApplicationCommandOption;
|
||||
text = a0.text;
|
||||
applicationCommandOption = Reflect.apply(resolveApplicationCommandOption, moduleValue2, [text, a3, a2]);
|
||||
return {success: applicationCommandOption != null && (applicationCommandOption.type === 'userMention' || isValidRoleMention(applicationCommandOption))};
|
||||
}
|
||||
return {success: a0.type === 'userMention' || isValidRoleMention(a0)};
|
||||
}
|
||||
|
||||
function _fun89656(a0, {name}, a2, a3, a4) { // fn#89656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:4585, offset: 0x020191df, size: 127 bytes, params: 6, frame: 17
|
||||
if (a0.type !== 'text') {
|
||||
return {success: false};
|
||||
}
|
||||
const getUpload = UploadAttachmentStore.getUpload;
|
||||
let value = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
|
||||
value = value.getCommandAttachmentDraftType(a4);
|
||||
value = Reflect.apply(getUpload, UploadAttachmentStore, [a2, name, value]);
|
||||
return {success: value != null && value.filename === a0.text};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,191 @@
|
||||
/* Metro module 7866; source: modules/application_commands/CommandPermissionContext.tsx; dependencies: [31, 1937, 1383, 1226, 1379, 1945, 3784, 1878, 661, 7867, 566, 483, 1909, 2] */
|
||||
function _fun62959(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#62959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:6, offset: 0x01b6d121, size: 324 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const computeAllowNsfw = function(a0, a1, a2) {
|
||||
return a1 ? a0 instanceof ChannelRecordBase ? a0.guild_id == null ? a2 : a0.nsfw : !(a0 instanceof ChannelRecordBase) : !!a1;
|
||||
};
|
||||
const closure = function(a0) {
|
||||
return a0 instanceof ChannelRecordBase ? a0.guild_id : a0.id;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const impersonateStore = importDefault(1937) /* metro dependency 1937: ImpersonateStore */;
|
||||
const env0_5 = (require(1383) /* metro dependency 1383: ChannelRecord */).ChannelRecordBase;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_11 = constantsModule.ChannelTypes;
|
||||
const env0_12 = constantsModule.Permissions;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/CommandPermissionContext.tsx');
|
||||
exports.buildPermissionContext = buildPermissionContext;
|
||||
exports.usePermissionContext = usePermissionContext;
|
||||
exports.computeCommandContextType = computeCommandContextType;
|
||||
exports.getContextGuildId = closure;
|
||||
}
|
||||
|
||||
function computePermissions_62961(a0, a1) { // fn#62961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:330, offset: 0x01b6d2a1, size: 350 bytes, params: 3, frame: 20
|
||||
var r5;
|
||||
var r2;
|
||||
var r3;
|
||||
var permissions;
|
||||
var moduleValue;
|
||||
var has;
|
||||
var value2;
|
||||
var value4;
|
||||
var value5;
|
||||
var moduleValue3;
|
||||
var moduleValue4;
|
||||
var object2;
|
||||
if (a0 instanceof ChannelRecordBase) {
|
||||
if (a0.isPrivate()) {
|
||||
object2 = {'computedPermissions': null, 'hasBaseAccessPermissions': true,
|
||||
'hasSendMessagesPermission': true};
|
||||
object2.computedPermissions = (importAll(483) /* metro dependency 483: BigFlagUtils */).deserialize(0);
|
||||
return object2;
|
||||
}
|
||||
if (a0 == null) {
|
||||
object2 = {'computedPermissions': null, 'hasBaseAccessPermissions': true,
|
||||
'hasSendMessagesPermission': true};
|
||||
object2.computedPermissions = (importAll(483) /* metro dependency 483: BigFlagUtils */).deserialize(0);
|
||||
return object2;
|
||||
}
|
||||
permissions = PermissionStore.computePermissions(a0);
|
||||
value2 = (importAll(483) /* metro dependency 483: BigFlagUtils */).has(permissions, Permissions.ADMINISTRATOR);
|
||||
} else {
|
||||
if (a0 == null) {
|
||||
object2 = {'computedPermissions': null, 'hasBaseAccessPermissions': true,
|
||||
'hasSendMessagesPermission': true};
|
||||
object2.computedPermissions = (importAll(483) /* metro dependency 483: BigFlagUtils */).deserialize(0);
|
||||
return object2;
|
||||
}
|
||||
permissions = PermissionStore.computePermissions(a0);
|
||||
moduleValue = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
||||
value2 = moduleValue.has(permissions, Permissions.ADMINISTRATOR);
|
||||
}
|
||||
const value3 = true;
|
||||
if (value2) {
|
||||
r2 = value3;
|
||||
r3 = value3;
|
||||
} else {
|
||||
value4 = a0 instanceof ChannelRecordBase;
|
||||
value5 = (importAll(483) /* metro dependency 483: BigFlagUtils */).has(permissions, Permissions.VIEW_CHANNEL);
|
||||
if (value4) {
|
||||
if (value5) {
|
||||
moduleValue3 = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
||||
r5 = moduleValue3.has(permissions, Permissions.USE_APPLICATION_COMMANDS);
|
||||
} else {
|
||||
r5 = value5;
|
||||
}
|
||||
moduleValue4 = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
||||
has = moduleValue4.has;
|
||||
r2 = a1 ? Reflect.apply(has, moduleValue4, [permissions,
|
||||
Permissions.SEND_MESSAGES_IN_THREADS]) : Reflect.apply(has,
|
||||
moduleValue4, [permissions, Permissions.SEND_MESSAGES]);
|
||||
r3 = r5;
|
||||
} else {
|
||||
r2 = value3;
|
||||
r3 = value5;
|
||||
}
|
||||
}
|
||||
return {computedPermissions: permissions, hasBaseAccessPermissions: r3, hasSendMessagesPermission: r2};
|
||||
}
|
||||
|
||||
function buildPermissionContext(a0, a1) { // fn#62963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:1076, offset: 0x01b6d41e, size: 340 bytes, params: 3, frame: 22
|
||||
var r8;
|
||||
var r0;
|
||||
var member;
|
||||
let value = a0;
|
||||
const r5 = value instanceof ChannelRecordBase && value.isThread() ? ChannelStore.getChannel(value.parent_id) ?? value : value;
|
||||
const value4 = undefined;
|
||||
const r7 = r5 != null ? getContextGuildId(r5) : value4;
|
||||
const viewNsfwCommandsOrDefault = (require(7867) /* metro dependency 7867: AgeRestrictedContentSettingsUtils */).getViewNsfwCommandsOrDefault();
|
||||
const id = AuthenticationStore.getId();
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
const nsfwAllowed = currentUser == null ? value4 : currentUser.nsfwAllowed;
|
||||
const r2 = nsfwAllowed != null && nsfwAllowed;
|
||||
if (r7 == null) {
|
||||
r8 = [];
|
||||
} else {
|
||||
member = GuildMemberStore.getMember(r7, id);
|
||||
r8 = (member == null ? value4 : member.roles) ?? [];
|
||||
}
|
||||
const isViewingRoles2 = ImpersonateStore.isViewingRoles(r7);
|
||||
const computePermissions_62961Binding = computePermissions_62961;
|
||||
const value11 = value instanceof ChannelRecordBase;
|
||||
if (value11) {
|
||||
value = value.isThread();
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value11;
|
||||
}
|
||||
value = computePermissions_62961Binding(r5, r0);
|
||||
const object2 = {context: r5, userId: id, roleIds: r8, isImpersonating: isViewingRoles2, commandTypes: a1};
|
||||
object2.computedPermissions = value.computedPermissions;
|
||||
object2.hasBaseAccessPermissions = value.hasBaseAccessPermissions;
|
||||
object2.hasSendMessagesPermission = value.hasSendMessagesPermission;
|
||||
object2.allowNsfw = computeAllowNsfw(r5, r2, viewNsfwCommandsOrDefault);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function usePermissionContext(a0, a1) { // fn#62964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:1780, offset: 0x01b6d572, size: 337 bytes, params: 3, frame: 25
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const value2 = env0_3.useMemo(_fun62965, [a0]);
|
||||
var env0_3 = value2 != null ? getContextGuildId(value2) : undefined;
|
||||
return env0_3.useMemo(_fun62970, [a1, value2,
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStores([ImpersonateStore], _fun62969),
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildMemberStore], _fun62968),
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], function() {
|
||||
return AuthenticationStore.getId();
|
||||
}), (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun62967),
|
||||
(require(7867) /* metro dependency 7867: AgeRestrictedContentSettingsUtils */).useViewNsfwCommandsOrDefault(),
|
||||
a0]);
|
||||
}
|
||||
|
||||
function computeCommandContextType(a0, a1) { // fn#62971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:2762, offset: 0x01b6d831, size: 203 bytes, params: 3, frame: 15
|
||||
const InteractionContextType = (require(1909) /* metro dependency 1909: Server */).InteractionContextType;
|
||||
return a0 instanceof ChannelRecordBase && a0?.guild_id == null ? a0?.type !== ChannelTypes.DM ? InteractionContextType.PRIVATE_CHANNEL : a0?.getRecipientId() === a1 ? InteractionContextType.BOT_DM : InteractionContextType.PRIVATE_CHANNEL : InteractionContextType.GUILD;
|
||||
}
|
||||
|
||||
function _fun62965() { // fn#62965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:1832, offset: 0x01b6d6c3, size: 74 bytes, params: 1, frame: 12
|
||||
return env0_0 instanceof ChannelRecordBase && env0_0.isThread() ? ChannelStore.getChannel(env0_0.parent_id) ?? env0_0 : env0_0;
|
||||
}
|
||||
|
||||
function _fun62967() { // fn#62967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:2092, offset: 0x01b6d70d, size: 45 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
const nsfwAllowed = UserStore.getCurrentUser()?.nsfwAllowed;
|
||||
return nsfwAllowed != null && nsfwAllowed;
|
||||
}
|
||||
|
||||
function _fun62968() { // fn#62968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:2218, offset: 0x01b6d73a, size: 65 bytes, params: 1, frame: 14
|
||||
return env0_3 == null ? [] : GuildMemberStore.getMember(env0_3, id)?.roles ?? [];
|
||||
}
|
||||
|
||||
function _fun62969() { // fn#62969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:2342, offset: 0x01b6d77b, size: 27 bytes, params: 1, frame: 11
|
||||
return ImpersonateStore.isViewingRoles(env0_3);
|
||||
}
|
||||
|
||||
function _fun62970() { // fn#62970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:2386, offset: 0x01b6d796, size: 155 bytes, params: 1, frame: 19
|
||||
const computePermissions_62961Binding = computePermissions_62961;
|
||||
let binding = env0_2;
|
||||
const {computedPermissions, hasBaseAccessPermissions,
|
||||
hasSendMessagesPermission} = computePermissions_62961Binding(binding,
|
||||
env0_0 instanceof ChannelRecordBase && env0_0.isThread());
|
||||
const object2 = {};
|
||||
binding = env0_2;
|
||||
object2.context = binding;
|
||||
object2.userId = id;
|
||||
object2.roleIds = env0_7;
|
||||
object2.commandTypes = require;
|
||||
object2.isImpersonating = env0_8;
|
||||
object2.computedPermissions = computedPermissions;
|
||||
object2.hasBaseAccessPermissions = hasBaseAccessPermissions;
|
||||
object2.hasSendMessagesPermission = hasSendMessagesPermission;
|
||||
object2.allowNsfw = computeAllowNsfw(binding, env0_6, env0_4);
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,873 @@
|
||||
/* Metro module 8039; source: modules/application_commands/CommandPermissionUtils.tsx; dependencies: [1383, 1867, 5066, 661, 8040, 7866, 5068, 1909, 483, 8042, 44, 5065, 5067, 2] */
|
||||
function _fun63731(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8217:6, offset: 0x01b8e615, size: 391 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_63734 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const isExplicitAllow = function(a0) {
|
||||
return a0 === true;
|
||||
};
|
||||
const isExplicitDeny = function(a0) {
|
||||
return a0 === false;
|
||||
};
|
||||
const closure = computeAllowedForChannel;
|
||||
const closure2 = computeAllowedForUser;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = (require(1383) /* metro dependency 1383: ChannelRecord */).ChannelRecordBase;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const env0_6 = (require(5066) /* metro dependency 5066: ApplicationCommandConstants */).BuiltInSectionId;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).Permissions;
|
||||
object2 = {ALLOWED: 0};
|
||||
object2[0] = 'ALLOWED';
|
||||
object2.NSFW_NOT_ALLOWED = 1;
|
||||
object2[1] = 'NSFW_NOT_ALLOWED';
|
||||
object2.WRONG_COMMAND_TYPE = 2;
|
||||
object2[2] = 'WRONG_COMMAND_TYPE';
|
||||
object2.PREDICATE_FAILED = 3;
|
||||
object2[3] = 'PREDICATE_FAILED';
|
||||
object2.CONTEXT_NOT_ALLOWED = 4;
|
||||
object2[4] = 'CONTEXT_NOT_ALLOWED';
|
||||
object2.MISSING_BASE_PERMISSIONS = 5;
|
||||
object2[5] = 'MISSING_BASE_PERMISSIONS';
|
||||
object2.CHANNEL_DENIED = 6;
|
||||
object2[6] = 'CHANNEL_DENIED';
|
||||
object2.USER_DENIED = 7;
|
||||
object2[7] = 'USER_DENIED';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/CommandPermissionUtils.tsx');
|
||||
exports.HasAccessResult = object2;
|
||||
exports.hasAccess = hasAccess_63739;
|
||||
exports.computeAllowedForChannel = closure;
|
||||
exports.computeAllowedForUser = closure2;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_63732(a0, a1) { // fn#63732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8217:190, offset: 0x01b8e79c, size: 370 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun63733;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_63734(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_63734(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_63734(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun63733;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function computeAllowedForChannel(a0, a1, a2) { // fn#63737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8217:1551, offset: 0x01b8e924, size: 227 bytes, params: 4, frame: 21
|
||||
const value = null;
|
||||
if (value == a0) {
|
||||
return value;
|
||||
}
|
||||
const r7 = a1.isThread() && value != a1.parent_id ? a1.parent_id : a1.id;
|
||||
const integrationPermissionUtilsModule = require(5067) /* metro dependency 5067: IntegrationPermissionUtils */;
|
||||
let toPermissionKey = integrationPermissionUtilsModule.toPermissionKey;
|
||||
const ApplicationCommandPermissionType = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandPermissionType;
|
||||
let CHANNEL = ApplicationCommandPermissionType.CHANNEL;
|
||||
let property = a0[Reflect.apply(toPermissionKey, integrationPermissionUtilsModule, [r7, CHANNEL])];
|
||||
if (value != property) {
|
||||
return property.permission;
|
||||
}
|
||||
const moduleValue2 = integrationPermissionUtilsModule;
|
||||
toPermissionKey = moduleValue2.toPermissionKey;
|
||||
const value3 = (require(5065) /* metro dependency 5065: ApplicationCommandUtils */).allChannelsSentinel(a2);
|
||||
CHANNEL = ApplicationCommandPermissionType.CHANNEL;
|
||||
property = a0[Reflect.apply(toPermissionKey, moduleValue2, [value3, CHANNEL])];
|
||||
return value != property ? property.permission : value;
|
||||
}
|
||||
|
||||
function computeAllowedForUser(a0, a1, a2, a3, a4) { // fn#63738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8217:1946, offset: 0x01b8ea07, size: 330 bytes, params: 6, frame: 27
|
||||
var r11;
|
||||
var r12;
|
||||
var r3;
|
||||
var permission;
|
||||
var moduleValue;
|
||||
var toPermissionKey;
|
||||
const ApplicationCommandPermissionType = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandPermissionType;
|
||||
var property;
|
||||
var value8;
|
||||
var moduleValue2;
|
||||
var ROLE;
|
||||
var value9;
|
||||
var moduleValue3;
|
||||
const value = null;
|
||||
if (value == a0) {
|
||||
return value;
|
||||
}
|
||||
if (!a4) {
|
||||
moduleValue = require(5067) /* metro dependency 5067: IntegrationPermissionUtils */;
|
||||
toPermissionKey = moduleValue.toPermissionKey;
|
||||
property = a0[Reflect.apply(toPermissionKey, moduleValue, [a2, ApplicationCommandPermissionType.USER])];
|
||||
reducibleJoin4: while (true) {
|
||||
if (value != property) {
|
||||
return property.permission;
|
||||
}
|
||||
break reducibleJoin4;
|
||||
}
|
||||
}
|
||||
const value4 = _createForOfIteratorHelperLoose_63732(a3);
|
||||
const value5 = value4();
|
||||
let done = value5.done;
|
||||
const value6 = false;
|
||||
const value7 = true;
|
||||
if (done) {
|
||||
r3 = value6;
|
||||
} else {
|
||||
r11 = value6;
|
||||
r12 = value5;
|
||||
reducibleLoop5: while (true) {
|
||||
value8 = r12.value;
|
||||
moduleValue2 = require(5067) /* metro dependency 5067: IntegrationPermissionUtils */;
|
||||
toPermissionKey = moduleValue2.toPermissionKey;
|
||||
ROLE = ApplicationCommandPermissionType.ROLE;
|
||||
property = a0[Reflect.apply(toPermissionKey, moduleValue2, [value8, ROLE])];
|
||||
if (value != property) {
|
||||
permission = property.permission;
|
||||
reducibleJoin7: while (true) {
|
||||
if (permission) {
|
||||
return value7;
|
||||
}
|
||||
r11 = value7;
|
||||
break reducibleJoin7;
|
||||
}
|
||||
}
|
||||
value9 = value4();
|
||||
done = value9.done;
|
||||
if (done) {
|
||||
r3 = r11;
|
||||
break reducibleLoop5;
|
||||
}
|
||||
r12 = value9;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
}
|
||||
if (r3) {
|
||||
return value6;
|
||||
}
|
||||
reducibleJoin12: while (true) {
|
||||
if (value != a1) {
|
||||
moduleValue3 = require(5067) /* metro dependency 5067: IntegrationPermissionUtils */;
|
||||
toPermissionKey = moduleValue3.toPermissionKey;
|
||||
ROLE = ApplicationCommandPermissionType.ROLE;
|
||||
property = a0[Reflect.apply(toPermissionKey, moduleValue3, [a1, ROLE])];
|
||||
r3 = property;
|
||||
break reducibleJoin12;
|
||||
}
|
||||
r3 = value;
|
||||
break reducibleJoin12;
|
||||
}
|
||||
reducibleJoin14: while (true) {
|
||||
if (value != r3) {
|
||||
permission = r3.permission;
|
||||
break reducibleJoin14;
|
||||
}
|
||||
permission = value;
|
||||
break reducibleJoin14;
|
||||
}
|
||||
return permission;
|
||||
}
|
||||
|
||||
function hasAccess_63739(a0, {context, commandTypes, allowNsfw, computedPermissions, userId, roleIds, isImpersonating, hasBaseAccessPermissions, hasSendMessagesPermission}, {applicationAllowedForUser, applicationAllowedForChannel, isGuildInstalled, isUserInstalled, commandBotId}) { // fn#63739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8217:2610, offset: 0x01b8eb51, size: 1204 bytes, params: 4, frame: 33
|
||||
var r9;
|
||||
var r2;
|
||||
var r1;
|
||||
var value;
|
||||
var applicationId;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var computeCommandContextType;
|
||||
var commandContextType;
|
||||
var contexts;
|
||||
var inputType;
|
||||
var value3;
|
||||
const ApplicationCommandInputType = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandInputType;
|
||||
var BOT;
|
||||
var dmPermission;
|
||||
const InteractionContextType = (require(1909) /* metro dependency 1909: Server */).InteractionContextType;
|
||||
var BOT_DM;
|
||||
var PRIVATE_CHANNEL;
|
||||
var predicate;
|
||||
var value4;
|
||||
var getGuild;
|
||||
var guild_id;
|
||||
var value5;
|
||||
var object2;
|
||||
var value6;
|
||||
var BUILT_IN;
|
||||
var moduleValue2;
|
||||
var getContextGuildId;
|
||||
var value7;
|
||||
var moduleValue3;
|
||||
var has;
|
||||
var ADMINISTRATOR;
|
||||
var integration_types;
|
||||
const ApplicationIntegrationType = (require(8042) /* metro dependency 8042: ApplicationIntegrationType */).ApplicationIntegrationType;
|
||||
var USER_INSTALL;
|
||||
var GUILD_INSTALL;
|
||||
var defaultImport;
|
||||
var permissions;
|
||||
var allowedForChannel;
|
||||
var computeAllowedForUserBinding;
|
||||
var allowedForUser;
|
||||
var defaultMemberPermissions;
|
||||
var ALLOWED;
|
||||
var moduleValue4;
|
||||
var equals;
|
||||
const DISABLED_BY_DEFAULT_PERMISSION_FLAG = (require(5065) /* metro dependency 5065: ApplicationCommandUtils */).DISABLED_BY_DEFAULT_PERMISSION_FLAG;
|
||||
var USER_DENIED;
|
||||
let includes = commandTypes.includes;
|
||||
if (Reflect.apply(includes, commandTypes, [a0.type])) {
|
||||
if (!a0.nsfw) {
|
||||
value = importDefault(8040) /* metro dependency 8040: isApplicationAgeRestricted */;
|
||||
applicationId = a0.applicationId;
|
||||
reducibleJoin4: while (true) {
|
||||
if (!value(applicationId)) {
|
||||
value = undefined;
|
||||
reducibleJoin8: while (true) {
|
||||
if (context != null) {
|
||||
value2 = environment;
|
||||
moduleValue = require(7866) /* metro dependency 7866: CommandPermissionContext */;
|
||||
computeCommandContextType = moduleValue.computeCommandContextType;
|
||||
commandContextType = Reflect.apply(computeCommandContextType, moduleValue, [context,
|
||||
commandBotId]);
|
||||
r9 = commandContextType;
|
||||
break reducibleJoin8;
|
||||
}
|
||||
r9 = value;
|
||||
break reducibleJoin8;
|
||||
}
|
||||
contexts = a0.contexts;
|
||||
if (contexts != null) {
|
||||
reducibleJoin18: while (true) {
|
||||
if (r9 == null) {
|
||||
break reducibleJoin18;
|
||||
}
|
||||
contexts = a0.contexts;
|
||||
includes = contexts.includes;
|
||||
if (!Reflect.apply(includes, contexts, [r9])) {
|
||||
value = environment;
|
||||
return env0_8.CONTEXT_NOT_ALLOWED;
|
||||
}
|
||||
break reducibleJoin18;
|
||||
}
|
||||
} else {
|
||||
inputType = a0.inputType;
|
||||
value3 = environment;
|
||||
BOT = ApplicationCommandInputType.BOT;
|
||||
reducibleJoin18: while (true) {
|
||||
if (inputType !== BOT) {
|
||||
break reducibleJoin18;
|
||||
}
|
||||
dmPermission = a0.dmPermission;
|
||||
if (dmPermission === false) {
|
||||
BOT_DM = InteractionContextType.BOT_DM;
|
||||
reducibleJoin12: while (true) {
|
||||
if (r9 === BOT_DM) {
|
||||
return env0_8.CONTEXT_NOT_ALLOWED;
|
||||
}
|
||||
break reducibleJoin12;
|
||||
}
|
||||
}
|
||||
PRIVATE_CHANNEL = InteractionContextType.PRIVATE_CHANNEL;
|
||||
if (r9 === PRIVATE_CHANNEL) {
|
||||
return env0_8.CONTEXT_NOT_ALLOWED;
|
||||
}
|
||||
break reducibleJoin18;
|
||||
}
|
||||
}
|
||||
predicate = a0.predicate;
|
||||
if (predicate != null) {
|
||||
value4 = environment;
|
||||
reducibleJoin22: while (true) {
|
||||
if (context instanceof ChannelRecordBase) {
|
||||
getGuild = GuildStore.getGuild;
|
||||
guild_id = context.guild_id;
|
||||
value5 = Reflect.apply(getGuild, GuildStore, [guild_id]);
|
||||
predicate = a0.predicate;
|
||||
object2 = {channel: context, guild: value5};
|
||||
if (!Reflect.apply(predicate, a0, [object2])) {
|
||||
return env0_8.PREDICATE_FAILED;
|
||||
}
|
||||
break reducibleJoin22;
|
||||
}
|
||||
break reducibleJoin22;
|
||||
}
|
||||
}
|
||||
applicationId = a0.applicationId;
|
||||
value6 = environment;
|
||||
BUILT_IN = BuiltInSectionId.BUILT_IN;
|
||||
if (applicationId === BUILT_IN) {
|
||||
return env0_8.ALLOWED;
|
||||
}
|
||||
reducibleJoin25: while (true) {
|
||||
if (context != null) {
|
||||
moduleValue2 = require(7866) /* metro dependency 7866: CommandPermissionContext */;
|
||||
getContextGuildId = moduleValue2.getContextGuildId;
|
||||
value7 = Reflect.apply(getContextGuildId, moduleValue2, [context]);
|
||||
r9 = value7;
|
||||
break reducibleJoin25;
|
||||
}
|
||||
r9 = value;
|
||||
break reducibleJoin25;
|
||||
}
|
||||
if (r9 == null) {
|
||||
return env0_8.ALLOWED;
|
||||
}
|
||||
moduleValue3 = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
||||
has = moduleValue3.has;
|
||||
ADMINISTRATOR = Permissions.ADMINISTRATOR;
|
||||
if (Reflect.apply(has, moduleValue3, [computedPermissions, ADMINISTRATOR])) {
|
||||
return env0_8.ALLOWED;
|
||||
}
|
||||
if (isUserInstalled) {
|
||||
integration_types = a0.integration_types;
|
||||
reducibleJoin30: while (true) {
|
||||
if (integration_types == null) {
|
||||
break reducibleJoin30;
|
||||
}
|
||||
includes = integration_types.includes;
|
||||
USER_INSTALL = ApplicationIntegrationType.USER_INSTALL;
|
||||
if (Reflect.apply(includes, integration_types, [USER_INSTALL])) {
|
||||
return env0_8.ALLOWED;
|
||||
}
|
||||
break reducibleJoin30;
|
||||
}
|
||||
}
|
||||
if (hasBaseAccessPermissions) {
|
||||
reducibleJoin32: while (true) {
|
||||
if (hasSendMessagesPermission) {
|
||||
if (context instanceof ChannelRecordBase) {
|
||||
defaultImport = importDefault(44) /* metro dependency 44 */;
|
||||
defaultImport(value !== applicationAllowedForChannel,
|
||||
'missing applicationAllowedForChannel');
|
||||
allowedForChannel = computeAllowedForChannel(a0.permissions, context, r9);
|
||||
if (isExplicitDeny(allowedForChannel)) {
|
||||
return env0_8.CHANNEL_DENIED;
|
||||
}
|
||||
reducibleJoin41: while (true) {
|
||||
if (isExplicitAllow(allowedForChannel)) {
|
||||
break reducibleJoin41;
|
||||
}
|
||||
if (isExplicitDeny(applicationAllowedForChannel)) {
|
||||
return env0_8.CHANNEL_DENIED;
|
||||
}
|
||||
break reducibleJoin41;
|
||||
}
|
||||
}
|
||||
computeAllowedForUserBinding = computeAllowedForUser;
|
||||
permissions = a0.permissions;
|
||||
allowedForUser = computeAllowedForUserBinding(permissions, r9, userId, roleIds,
|
||||
isImpersonating);
|
||||
if (isExplicitAllow(allowedForUser)) {
|
||||
ALLOWED = env0_8.ALLOWED;
|
||||
r1 = ALLOWED;
|
||||
} else {
|
||||
reducibleJoin53: while (true) {
|
||||
reducibleJoin52: while (true) {
|
||||
if (isExplicitDeny(allowedForUser)) {
|
||||
break reducibleJoin52;
|
||||
}
|
||||
if (isExplicitDeny(applicationAllowedForUser)) {
|
||||
break reducibleJoin52;
|
||||
}
|
||||
defaultMemberPermissions = a0.defaultMemberPermissions;
|
||||
if (defaultMemberPermissions != null) {
|
||||
moduleValue4 = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
||||
equals = moduleValue4.equals;
|
||||
defaultMemberPermissions = a0.defaultMemberPermissions;
|
||||
reducibleJoin50: while (true) {
|
||||
reducibleJoin49: while (true) {
|
||||
if (Reflect.apply(equals, moduleValue4,
|
||||
[defaultMemberPermissions,
|
||||
DISABLED_BY_DEFAULT_PERMISSION_FLAG])) {
|
||||
break reducibleJoin49;
|
||||
}
|
||||
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
||||
has = value.has;
|
||||
defaultMemberPermissions = a0.defaultMemberPermissions;
|
||||
if (Reflect.apply(has, value, [computedPermissions,
|
||||
defaultMemberPermissions])) {
|
||||
ALLOWED = env0_8.ALLOWED;
|
||||
r2 = ALLOWED;
|
||||
break reducibleJoin50;
|
||||
}
|
||||
break reducibleJoin49;
|
||||
}
|
||||
USER_DENIED = env0_8.USER_DENIED;
|
||||
r2 = USER_DENIED;
|
||||
break reducibleJoin50;
|
||||
}
|
||||
r1 = r2;
|
||||
} else {
|
||||
ALLOWED = env0_8.ALLOWED;
|
||||
r1 = ALLOWED;
|
||||
}
|
||||
break reducibleJoin53;
|
||||
}
|
||||
USER_DENIED = env0_8.USER_DENIED;
|
||||
r1 = USER_DENIED;
|
||||
break reducibleJoin53;
|
||||
}
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
break reducibleJoin32;
|
||||
}
|
||||
}
|
||||
if (isGuildInstalled) {
|
||||
integration_types = a0.integration_types;
|
||||
reducibleJoin36: while (true) {
|
||||
reducibleJoin35: while (true) {
|
||||
if (integration_types == null) {
|
||||
break reducibleJoin35;
|
||||
}
|
||||
integration_types = a0.integration_types;
|
||||
includes = integration_types.includes;
|
||||
GUILD_INSTALL = ApplicationIntegrationType.GUILD_INSTALL;
|
||||
if (Reflect.apply(includes, integration_types, [GUILD_INSTALL])) {
|
||||
break reducibleJoin35;
|
||||
}
|
||||
break reducibleJoin36;
|
||||
}
|
||||
return env0_8.MISSING_BASE_PERMISSIONS;
|
||||
}
|
||||
}
|
||||
if (context instanceof ChannelRecordBase) {
|
||||
defaultImport = importDefault(44) /* metro dependency 44 */;
|
||||
defaultImport(value !== applicationAllowedForChannel, 'missing applicationAllowedForChannel');
|
||||
allowedForChannel = computeAllowedForChannel(a0.permissions, context, r9);
|
||||
if (isExplicitDeny(allowedForChannel)) {
|
||||
return env0_8.CHANNEL_DENIED;
|
||||
}
|
||||
reducibleJoin41: while (true) {
|
||||
if (isExplicitAllow(allowedForChannel)) {
|
||||
break reducibleJoin41;
|
||||
}
|
||||
if (isExplicitDeny(applicationAllowedForChannel)) {
|
||||
return env0_8.CHANNEL_DENIED;
|
||||
}
|
||||
break reducibleJoin41;
|
||||
}
|
||||
}
|
||||
computeAllowedForUserBinding = computeAllowedForUser;
|
||||
permissions = a0.permissions;
|
||||
allowedForUser = computeAllowedForUserBinding(permissions, r9, userId, roleIds, isImpersonating);
|
||||
if (isExplicitAllow(allowedForUser)) {
|
||||
ALLOWED = env0_8.ALLOWED;
|
||||
r1 = ALLOWED;
|
||||
} else {
|
||||
reducibleJoin53: while (true) {
|
||||
reducibleJoin52: while (true) {
|
||||
if (isExplicitDeny(allowedForUser)) {
|
||||
break reducibleJoin52;
|
||||
}
|
||||
if (isExplicitDeny(applicationAllowedForUser)) {
|
||||
break reducibleJoin52;
|
||||
}
|
||||
defaultMemberPermissions = a0.defaultMemberPermissions;
|
||||
if (defaultMemberPermissions != null) {
|
||||
moduleValue4 = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
||||
equals = moduleValue4.equals;
|
||||
defaultMemberPermissions = a0.defaultMemberPermissions;
|
||||
reducibleJoin50: while (true) {
|
||||
reducibleJoin49: while (true) {
|
||||
if (Reflect.apply(equals, moduleValue4, [defaultMemberPermissions,
|
||||
DISABLED_BY_DEFAULT_PERMISSION_FLAG])) {
|
||||
break reducibleJoin49;
|
||||
}
|
||||
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
||||
has = value.has;
|
||||
defaultMemberPermissions = a0.defaultMemberPermissions;
|
||||
if (Reflect.apply(has, value, [computedPermissions,
|
||||
defaultMemberPermissions])) {
|
||||
ALLOWED = env0_8.ALLOWED;
|
||||
r2 = ALLOWED;
|
||||
break reducibleJoin50;
|
||||
}
|
||||
break reducibleJoin49;
|
||||
}
|
||||
USER_DENIED = env0_8.USER_DENIED;
|
||||
r2 = USER_DENIED;
|
||||
break reducibleJoin50;
|
||||
}
|
||||
r1 = r2;
|
||||
} else {
|
||||
ALLOWED = env0_8.ALLOWED;
|
||||
r1 = ALLOWED;
|
||||
}
|
||||
break reducibleJoin53;
|
||||
}
|
||||
USER_DENIED = env0_8.USER_DENIED;
|
||||
r1 = USER_DENIED;
|
||||
break reducibleJoin53;
|
||||
}
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
break reducibleJoin4;
|
||||
}
|
||||
}
|
||||
if (allowNsfw) {
|
||||
value = undefined;
|
||||
reducibleJoin8: while (true) {
|
||||
if (context != null) {
|
||||
value2 = environment;
|
||||
moduleValue = require(7866) /* metro dependency 7866: CommandPermissionContext */;
|
||||
computeCommandContextType = moduleValue.computeCommandContextType;
|
||||
commandContextType = Reflect.apply(computeCommandContextType, moduleValue, [context, commandBotId]);
|
||||
r9 = commandContextType;
|
||||
break reducibleJoin8;
|
||||
}
|
||||
r9 = value;
|
||||
break reducibleJoin8;
|
||||
}
|
||||
contexts = a0.contexts;
|
||||
if (contexts != null) {
|
||||
reducibleJoin18: while (true) {
|
||||
if (r9 == null) {
|
||||
break reducibleJoin18;
|
||||
}
|
||||
contexts = a0.contexts;
|
||||
includes = contexts.includes;
|
||||
if (!Reflect.apply(includes, contexts, [r9])) {
|
||||
value = environment;
|
||||
return env0_8.CONTEXT_NOT_ALLOWED;
|
||||
}
|
||||
break reducibleJoin18;
|
||||
}
|
||||
} else {
|
||||
reducibleJoin18: while (true) {
|
||||
if (a0.inputType !== ApplicationCommandInputType.BOT) {
|
||||
break reducibleJoin18;
|
||||
}
|
||||
dmPermission = a0.dmPermission;
|
||||
if (dmPermission === false) {
|
||||
BOT_DM = InteractionContextType.BOT_DM;
|
||||
reducibleJoin12: while (true) {
|
||||
if (r9 === BOT_DM) {
|
||||
return env0_8.CONTEXT_NOT_ALLOWED;
|
||||
}
|
||||
break reducibleJoin12;
|
||||
}
|
||||
}
|
||||
PRIVATE_CHANNEL = InteractionContextType.PRIVATE_CHANNEL;
|
||||
if (r9 === PRIVATE_CHANNEL) {
|
||||
return env0_8.CONTEXT_NOT_ALLOWED;
|
||||
}
|
||||
break reducibleJoin18;
|
||||
}
|
||||
}
|
||||
predicate = a0.predicate;
|
||||
if (predicate != null) {
|
||||
reducibleJoin22: while (true) {
|
||||
if (context instanceof ChannelRecordBase) {
|
||||
getGuild = GuildStore.getGuild;
|
||||
guild_id = context.guild_id;
|
||||
value5 = Reflect.apply(getGuild, GuildStore, [guild_id]);
|
||||
predicate = a0.predicate;
|
||||
object2 = {channel: context, guild: value5};
|
||||
if (!Reflect.apply(predicate, a0, [object2])) {
|
||||
return env0_8.PREDICATE_FAILED;
|
||||
}
|
||||
break reducibleJoin22;
|
||||
}
|
||||
break reducibleJoin22;
|
||||
}
|
||||
}
|
||||
if (a0.applicationId === BuiltInSectionId.BUILT_IN) {
|
||||
return env0_8.ALLOWED;
|
||||
}
|
||||
reducibleJoin25: while (true) {
|
||||
if (context != null) {
|
||||
moduleValue2 = require(7866) /* metro dependency 7866: CommandPermissionContext */;
|
||||
getContextGuildId = moduleValue2.getContextGuildId;
|
||||
value7 = Reflect.apply(getContextGuildId, moduleValue2, [context]);
|
||||
r9 = value7;
|
||||
break reducibleJoin25;
|
||||
}
|
||||
r9 = value;
|
||||
break reducibleJoin25;
|
||||
}
|
||||
if (r9 == null) {
|
||||
return env0_8.ALLOWED;
|
||||
}
|
||||
moduleValue3 = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
||||
has = moduleValue3.has;
|
||||
if (Reflect.apply(has, moduleValue3, [computedPermissions, Permissions.ADMINISTRATOR])) {
|
||||
return env0_8.ALLOWED;
|
||||
}
|
||||
if (isUserInstalled) {
|
||||
integration_types = a0.integration_types;
|
||||
reducibleJoin30: while (true) {
|
||||
if (integration_types == null) {
|
||||
break reducibleJoin30;
|
||||
}
|
||||
includes = integration_types.includes;
|
||||
USER_INSTALL = ApplicationIntegrationType.USER_INSTALL;
|
||||
if (Reflect.apply(includes, integration_types, [USER_INSTALL])) {
|
||||
return env0_8.ALLOWED;
|
||||
}
|
||||
break reducibleJoin30;
|
||||
}
|
||||
}
|
||||
if (hasBaseAccessPermissions) {
|
||||
reducibleJoin32: while (true) {
|
||||
if (hasSendMessagesPermission) {
|
||||
if (context instanceof ChannelRecordBase) {
|
||||
defaultImport = importDefault(44) /* metro dependency 44 */;
|
||||
defaultImport(value !== applicationAllowedForChannel,
|
||||
'missing applicationAllowedForChannel');
|
||||
allowedForChannel = computeAllowedForChannel(a0.permissions, context, r9);
|
||||
if (isExplicitDeny(allowedForChannel)) {
|
||||
return env0_8.CHANNEL_DENIED;
|
||||
}
|
||||
reducibleJoin41: while (true) {
|
||||
if (isExplicitAllow(allowedForChannel)) {
|
||||
break reducibleJoin41;
|
||||
}
|
||||
if (isExplicitDeny(applicationAllowedForChannel)) {
|
||||
return env0_8.CHANNEL_DENIED;
|
||||
}
|
||||
break reducibleJoin41;
|
||||
}
|
||||
}
|
||||
computeAllowedForUserBinding = computeAllowedForUser;
|
||||
permissions = a0.permissions;
|
||||
allowedForUser = computeAllowedForUserBinding(permissions, r9, userId, roleIds,
|
||||
isImpersonating);
|
||||
if (isExplicitAllow(allowedForUser)) {
|
||||
ALLOWED = env0_8.ALLOWED;
|
||||
r1 = ALLOWED;
|
||||
} else {
|
||||
reducibleJoin53: while (true) {
|
||||
reducibleJoin52: while (true) {
|
||||
if (isExplicitDeny(allowedForUser)) {
|
||||
break reducibleJoin52;
|
||||
}
|
||||
if (isExplicitDeny(applicationAllowedForUser)) {
|
||||
break reducibleJoin52;
|
||||
}
|
||||
defaultMemberPermissions = a0.defaultMemberPermissions;
|
||||
if (defaultMemberPermissions != null) {
|
||||
moduleValue4 = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
||||
equals = moduleValue4.equals;
|
||||
defaultMemberPermissions = a0.defaultMemberPermissions;
|
||||
reducibleJoin50: while (true) {
|
||||
reducibleJoin49: while (true) {
|
||||
if (Reflect.apply(equals, moduleValue4, [defaultMemberPermissions,
|
||||
DISABLED_BY_DEFAULT_PERMISSION_FLAG])) {
|
||||
break reducibleJoin49;
|
||||
}
|
||||
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
||||
has = value.has;
|
||||
defaultMemberPermissions = a0.defaultMemberPermissions;
|
||||
if (Reflect.apply(has, value, [computedPermissions,
|
||||
defaultMemberPermissions])) {
|
||||
ALLOWED = env0_8.ALLOWED;
|
||||
r2 = ALLOWED;
|
||||
break reducibleJoin50;
|
||||
}
|
||||
break reducibleJoin49;
|
||||
}
|
||||
USER_DENIED = env0_8.USER_DENIED;
|
||||
r2 = USER_DENIED;
|
||||
break reducibleJoin50;
|
||||
}
|
||||
r1 = r2;
|
||||
} else {
|
||||
ALLOWED = env0_8.ALLOWED;
|
||||
r1 = ALLOWED;
|
||||
}
|
||||
break reducibleJoin53;
|
||||
}
|
||||
USER_DENIED = env0_8.USER_DENIED;
|
||||
r1 = USER_DENIED;
|
||||
break reducibleJoin53;
|
||||
}
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
break reducibleJoin32;
|
||||
}
|
||||
}
|
||||
if (isGuildInstalled) {
|
||||
integration_types = a0.integration_types;
|
||||
reducibleJoin36: while (true) {
|
||||
reducibleJoin35: while (true) {
|
||||
if (integration_types == null) {
|
||||
break reducibleJoin35;
|
||||
}
|
||||
integration_types = a0.integration_types;
|
||||
includes = integration_types.includes;
|
||||
GUILD_INSTALL = ApplicationIntegrationType.GUILD_INSTALL;
|
||||
if (Reflect.apply(includes, integration_types, [GUILD_INSTALL])) {
|
||||
break reducibleJoin35;
|
||||
}
|
||||
break reducibleJoin36;
|
||||
}
|
||||
return env0_8.MISSING_BASE_PERMISSIONS;
|
||||
}
|
||||
}
|
||||
if (context instanceof ChannelRecordBase) {
|
||||
(importDefault(44) /* metro dependency 44 */)(value !== applicationAllowedForChannel,
|
||||
'missing applicationAllowedForChannel');
|
||||
allowedForChannel = computeAllowedForChannel(a0.permissions, context, r9);
|
||||
if (isExplicitDeny(allowedForChannel)) {
|
||||
return env0_8.CHANNEL_DENIED;
|
||||
}
|
||||
reducibleJoin41: while (true) {
|
||||
if (isExplicitAllow(allowedForChannel)) {
|
||||
break reducibleJoin41;
|
||||
}
|
||||
if (isExplicitDeny(applicationAllowedForChannel)) {
|
||||
return env0_8.CHANNEL_DENIED;
|
||||
}
|
||||
break reducibleJoin41;
|
||||
}
|
||||
}
|
||||
computeAllowedForUserBinding = computeAllowedForUser;
|
||||
permissions = a0.permissions;
|
||||
allowedForUser = computeAllowedForUserBinding(permissions, r9, userId, roleIds, isImpersonating);
|
||||
if (isExplicitAllow(allowedForUser)) {
|
||||
r1 = env0_8.ALLOWED;
|
||||
} else {
|
||||
reducibleJoin53: while (true) {
|
||||
reducibleJoin52: while (true) {
|
||||
if (isExplicitDeny(allowedForUser)) {
|
||||
break reducibleJoin52;
|
||||
}
|
||||
if (isExplicitDeny(applicationAllowedForUser)) {
|
||||
break reducibleJoin52;
|
||||
}
|
||||
defaultMemberPermissions = a0.defaultMemberPermissions;
|
||||
if (defaultMemberPermissions != null) {
|
||||
moduleValue4 = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
||||
equals = moduleValue4.equals;
|
||||
defaultMemberPermissions = a0.defaultMemberPermissions;
|
||||
reducibleJoin50: while (true) {
|
||||
reducibleJoin49: while (true) {
|
||||
if (Reflect.apply(equals, moduleValue4, [defaultMemberPermissions,
|
||||
DISABLED_BY_DEFAULT_PERMISSION_FLAG])) {
|
||||
break reducibleJoin49;
|
||||
}
|
||||
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
||||
has = value.has;
|
||||
defaultMemberPermissions = a0.defaultMemberPermissions;
|
||||
if (Reflect.apply(has, value, [computedPermissions, defaultMemberPermissions])) {
|
||||
ALLOWED = env0_8.ALLOWED;
|
||||
r2 = ALLOWED;
|
||||
break reducibleJoin50;
|
||||
}
|
||||
break reducibleJoin49;
|
||||
}
|
||||
USER_DENIED = env0_8.USER_DENIED;
|
||||
r2 = USER_DENIED;
|
||||
break reducibleJoin50;
|
||||
}
|
||||
r1 = r2;
|
||||
} else {
|
||||
ALLOWED = env0_8.ALLOWED;
|
||||
r1 = ALLOWED;
|
||||
}
|
||||
break reducibleJoin53;
|
||||
}
|
||||
USER_DENIED = env0_8.USER_DENIED;
|
||||
r1 = USER_DENIED;
|
||||
break reducibleJoin53;
|
||||
}
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
return env0_8.NSFW_NOT_ALLOWED;
|
||||
}
|
||||
return env0_8.WRONG_COMMAND_TYPE;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,128 @@
|
||||
/* Metro module 10657; source: modules/application_commands/getPrimaryAppCommand.tsx; dependencies: [5, 31, 1379, 7861, 1909, 7869, 7865, 8042, 2] */
|
||||
function _fun81967(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:6, offset: 0x01ee5bfa, size: 342 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const closure = queryForPrimaryAppCommand;
|
||||
const closure2 = useGetPrimaryAppCommand;
|
||||
const closure3 = useQueryForPrimaryAppCommand;
|
||||
const closure4 = isPrimaryAppCommandUsableInAppDM;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const applicationCommandIndexStoreModule = require(7861) /* metro dependency 7861: ApplicationCommandIndexStore */;
|
||||
const env0_5 = applicationCommandIndexStoreModule.getOrFetchApplicationCommandIndexForTarget;
|
||||
const env0_6 = applicationCommandIndexStoreModule.useQueryState;
|
||||
const applicationCommandIndexStore = importDefault(7861) /* metro dependency 7861: ApplicationCommandIndexStore */;
|
||||
const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType;
|
||||
const PRIMARY_ENTRY_POINT = ApplicationCommandType.PRIMARY_ENTRY_POINT;
|
||||
object = [PRIMARY_ENTRY_POINT];
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/getPrimaryAppCommand.tsx');
|
||||
exports.default = function() {
|
||||
return _getPrimaryAppCommand.apply(this, arguments);
|
||||
};
|
||||
exports.NO_PRIMARY_APP_COMMAND_ERROR = 'no primary app command for application';
|
||||
exports.queryForPrimaryAppCommand = closure;
|
||||
exports.useGetPrimaryAppCommand = closure2;
|
||||
exports.useQueryForPrimaryAppCommand = closure3;
|
||||
exports.useIsPrimaryAppCommandUsableInAppDM = useIsPrimaryAppCommandUsableInAppDM;
|
||||
exports.isPrimaryAppCommandUsableInAppDM = closure4;
|
||||
}
|
||||
|
||||
function _getPrimaryAppCommand() { // fn#81968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:309, offset: 0x01ee5d50, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_2(_fun81970).apply(this, arguments);
|
||||
}
|
||||
|
||||
function queryForPrimaryAppCommand(a0, a1) { // fn#81971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:667, offset: 0x01ee5e45, size: 139 bytes, params: 3, frame: 18
|
||||
const query = ApplicationCommandIndexStore.query;
|
||||
const object2 = {};
|
||||
const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType;
|
||||
const PRIMARY_ENTRY_POINT = ApplicationCommandType.PRIMARY_ENTRY_POINT;
|
||||
object2.commandTypes = [PRIMARY_ENTRY_POINT];
|
||||
const ScoreMethod = (require(7869) /* metro dependency 7869: ApplicationCommandQueryTypes */).ScoreMethod;
|
||||
const COMMAND_ONLY = ScoreMethod.COMMAND_ONLY;
|
||||
return Reflect.apply(query, ApplicationCommandIndexStore, [a0, object2, {'placeholderCount': 1, 'scoreMethod': null,
|
||||
'applicationId': null, 'allowFetch': false, 'allowApplicationState': true, scoreMethod: COMMAND_ONLY,
|
||||
applicationId: a1}]).commands[0];
|
||||
}
|
||||
|
||||
function useGetPrimaryAppCommand(a0, a1) { // fn#81972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:926, offset: 0x01ee5ed0, size: 99 bytes, params: 3, frame: 17
|
||||
const env0_0 = a1;
|
||||
const {commands, loading} = useQueryForPrimaryAppCommand(a0, a1);
|
||||
const property = commands[0];
|
||||
env0_3.useEffect(_fun81973, [a1, property != null, loading]);
|
||||
return property;
|
||||
}
|
||||
|
||||
function useQueryForPrimaryAppCommand(a0, a1) { // fn#81974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:1167, offset: 0x01ee5f7e, size: 93 bytes, params: 3, frame: 16
|
||||
const object2 = {commandTypes: env0_9};
|
||||
const ScoreMethod = (require(7869) /* metro dependency 7869: ApplicationCommandQueryTypes */).ScoreMethod;
|
||||
const COMMAND_ONLY = ScoreMethod.COMMAND_ONLY;
|
||||
return useQueryState(a0, object2, {'placeholderCount': 1, 'scoreMethod': null, 'applicationId': null,
|
||||
'allowFetch': false, 'allowApplicationState': true, scoreMethod: COMMAND_ONLY, applicationId: a1});
|
||||
}
|
||||
|
||||
function isPrimaryAppCommandUsableInAppDM(a0) { // fn#81975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:1360, offset: 0x01ee5fdb, size: 156 bytes, params: 2, frame: 16
|
||||
if (a0 == null) {
|
||||
return false;
|
||||
}
|
||||
return a0.integration_types != null && a0.integration_types.includes((require(8042) /* metro dependency 8042: ApplicationIntegrationType */).ApplicationIntegrationType.USER_INSTALL) && (a0.contexts != null && a0.contexts.includes((require(1909) /* metro dependency 1909: Server */).InteractionContextType.BOT_DM));
|
||||
}
|
||||
|
||||
function useIsPrimaryAppCommandUsableInAppDM({context, applicationId, botUserId}) { // fn#81977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:2043, offset: 0x01ee6077, size: 64 bytes, params: 2, frame: 16
|
||||
const value2 = useGetPrimaryAppCommand(context, applicationId);
|
||||
return value2 != null && (botUserId != null && isPrimaryAppCommandUsableInAppDM(value2));
|
||||
}
|
||||
|
||||
function* _fun81970(a0, a1) { // fn#81970, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:374, offset: 0x01ee5d8d, size: 184 bytes, params: 3, frame: 20
|
||||
var r1;
|
||||
var r2;
|
||||
var value6;
|
||||
var Error;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
let binding = env2_4;
|
||||
const channel = binding.getChannel(a0);
|
||||
const value4 = channel != null;
|
||||
if (value4) {
|
||||
value6 = env2_11({channel: channel, type: 'channel'}, a1);
|
||||
r1 = value6 == null;
|
||||
r2 = value6;
|
||||
} else {
|
||||
r1 = value4;
|
||||
r2 = undefined;
|
||||
}
|
||||
if (r1) {
|
||||
binding = env2_5;
|
||||
yield binding({type: 'application', applicationId: a1});
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
binding = env2_11;
|
||||
r2 = binding({channel: channel, type: 'channel'}, a1);
|
||||
if (r2 != null) {
|
||||
return r2;
|
||||
}
|
||||
Error = global.Error;
|
||||
binding = env2_8;
|
||||
throw new Error(binding);
|
||||
}
|
||||
if (r2 != null) {
|
||||
return r2;
|
||||
}
|
||||
Error = global.Error;
|
||||
throw new Error(env2_8);
|
||||
}
|
||||
|
||||
function _fun81973() { // fn#81973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:1066, offset: 0x01ee5f33, size: 75 bytes, params: 1, frame: 13
|
||||
var value2;
|
||||
if (!(result || loading)) {
|
||||
value2 = environment.__proto__;
|
||||
(require(7865) /* metro dependency 7865: ApplicationCommandIndexActionCreators */).requestApplicationCommandIndex({type: 'application',
|
||||
|
||||
applicationId: require});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,367 @@
|
||||
/* Metro module 11869; source: modules/application_commands/native/ApplicationCommandBar.tsx; dependencies: [57, 31, 27, 1945, 33, 4501, 697, 6235, 5278, 1244, 1305, 566, 11752, 5475, 4573, 7972, 6266, 11870, 2] */
|
||||
function _fun91003(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:6, offset: 0x0204f649, size: 963 bytes, params: 8, frame: 26
|
||||
var object5;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.View;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const env0_6 = value.ScrollView;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.Fragment;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object5 = {};
|
||||
const object6 = {flexDirection: 'column'};
|
||||
const MOBILE_COMMAND_BAR_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_COMMAND_BAR_BACKGROUND;
|
||||
object6.backgroundColor = MOBILE_COMMAND_BAR_BACKGROUND;
|
||||
const CHAT_INPUT_FLOATING_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_FLOATING_BORDER_RADIUS;
|
||||
object6.borderRadius = CHAT_INPUT_FLOATING_BORDER_RADIUS;
|
||||
const CHAT_INPUT_FLOATING_ACCESSORY_BORDER_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_FLOATING_ACCESSORY_BORDER_WIDTH;
|
||||
object6.borderWidth = CHAT_INPUT_FLOATING_ACCESSORY_BORDER_WIDTH;
|
||||
const MOBILE_FLOATING_ACCESSORY_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_FLOATING_ACCESSORY_BORDER;
|
||||
object6.borderColor = MOBILE_FLOATING_ACCESSORY_BORDER;
|
||||
object6.overflow = 'hidden';
|
||||
object5.applicationCommandBar = object6;
|
||||
const object7 = {'width': 24, 'height': 24, 'borderRadius': null, 'marginRight': 16};
|
||||
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
object5.applicationIcon = object7;
|
||||
object5.applicationTopWrapperScrollView = {'flexDirection': 'row', 'alignItems': 'center', 'paddingHorizontal': 16,
|
||||
'paddingVertical': 8};
|
||||
object5.applicationName = {'textAlignVertical': 'center', 'marginRight': 12};
|
||||
const object9 = {'width': null, 'marginVertical': 8, 'marginHorizontal': 12, 'backgroundColor': null,
|
||||
'height': '100%'};
|
||||
object9.width = StyleSheet.hairlineWidth;
|
||||
const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL;
|
||||
object9.backgroundColor = BACKGROUND_MOD_NORMAL;
|
||||
object5.applicationOptionalOptionsDivider = object9;
|
||||
object5.applicationOptionalOptionsDividerWithNoRequired = {marginLeft: 4};
|
||||
object5.applicationOptionalOptionsIndicator = {'marginHorizontal': 4, 'paddingVertical': 8};
|
||||
object5.applicationDescriptionContainer = {flexShrink: 1};
|
||||
const MOBILE_COMMAND_BAR_DIVIDER = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_COMMAND_BAR_DIVIDER;
|
||||
object5.applicationDescriptionDivider = {marginLeft: 0, backgroundColor: MOBILE_COMMAND_BAR_DIVIDER};
|
||||
const object10 = {'marginHorizontal': 4, 'padding': 8, 'fontSize': 12, 'alignItems': 'center'};
|
||||
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
const DARK_PRIMARY_800_LIGHT_PRIMARY_300 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_PRIMARY_800_LIGHT_PRIMARY_300;
|
||||
object10.backgroundColor = DARK_PRIMARY_800_LIGHT_PRIMARY_300;
|
||||
object5.applicationCommandOption = object10;
|
||||
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
object5.applicationCommandOptionText = {color: TEXT_DEFAULT};
|
||||
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
object5.activeCommandOption = {backgroundColor: BACKGROUND_BRAND};
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object5.activeCommandOptionText = {color: WHITE};
|
||||
object5.completeCommandOptionText = {opacity: 0.5};
|
||||
const TEXT_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL;
|
||||
object5.errorCommandOptionText = {color: TEXT_FEEDBACK_CRITICAL};
|
||||
object5.optionDescriptionContainer = {'overflow': 'hidden', 'paddingHorizontal': 16, 'paddingVertical': 8,
|
||||
'flexDirection': 'row'};
|
||||
const MOBILE_FLOATING_ACCESSORY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_FLOATING_ACCESSORY_BACKGROUND;
|
||||
object5.descriptionEllipsis = {marginLeft: 10, backgroundColor: MOBILE_FLOATING_ACCESSORY_BACKGROUND};
|
||||
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
object5.descriptionEllipsisDots = {backgroundColor: INTERACTIVE_TEXT_DEFAULT};
|
||||
const DARK_PRIMARY_660_LIGHT_PRIMARY_300 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_PRIMARY_660_LIGHT_PRIMARY_300;
|
||||
object5.completeCommandOption = {backgroundColor: DARK_PRIMARY_660_LIGHT_PRIMARY_300};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object5]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandBar.tsx');
|
||||
exports.default = _default_91009;
|
||||
}
|
||||
|
||||
function ApplicationCommandOptionItem(a0) { // fn#91004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:2157, offset: 0x0204fa0c, size: 501 bytes, params: 2, frame: 27
|
||||
const option = a0.option;
|
||||
const optionState = a0.optionState;
|
||||
const value = Object.create(null);
|
||||
value.option = 0;
|
||||
value.optionState = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const value4 = undefined;
|
||||
const styles = useStyles();
|
||||
const isActive = optionState == null ? value4 : optionState.isActive;
|
||||
let r9 = isActive != null && isActive;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.evoEHc,
|
||||
{optionName: option.displayName});
|
||||
object2.accessibilityRole = 'button';
|
||||
object2.disabled = r9;
|
||||
const value6 = !r9;
|
||||
object2.style = [styles.applicationCommandOption, r9 && styles.activeCommandOption,
|
||||
(r9 ? value6 : optionState == null || optionState.lastValidationResult == null ? value4 : optionState.lastValidationResult.success) && styles.completeCommandOption];
|
||||
copyDataProperties(object2, value2, value);
|
||||
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
||||
const items2 = [styles.applicationCommandOptionText];
|
||||
items2[1] = r9 && styles.activeCommandOptionText;
|
||||
items2[2] = (r9 ? value6 : optionState == null || optionState.lastValidationResult == null ? value4 : optionState.lastValidationResult.success) && styles.completeCommandOptionText;
|
||||
r9 = (r9 ? value6 : (optionState == null || optionState.lastValidationResult == null ? value4 : optionState.lastValidationResult.success) === false) && styles.errorCommandOptionText;
|
||||
items2[3] = r9;
|
||||
return (
|
||||
<PressableOpacity {...object2}>
|
||||
<LegacyText style={items2} numberOfLines={1}>
|
||||
{option.displayName}
|
||||
</LegacyText>
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function ApplicationCommandOptionDescription({command, option, optionState}) { // fn#91005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:2945, offset: 0x0204fc01, size: 675 bytes, params: 2, frame: 31
|
||||
var r8;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const value3 = (importDefault(6266) /* metro dependency 6266: usePrevious */)(option);
|
||||
const binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value4 = Reflect.apply(useState, binding, [undefined]);
|
||||
const binding2 = env0_3;
|
||||
const value5 = binding2(value4, 2);
|
||||
const property = value5[0];
|
||||
var env0_3 = value5[1];
|
||||
useState = binding.useState;
|
||||
const value6 = binding2(Reflect.apply(useState, binding, [0]), 2);
|
||||
const property2 = value6[0];
|
||||
const env0_5 = value6[1];
|
||||
useState = binding.useState;
|
||||
const value7 = binding2(Reflect.apply(useState, binding, [0]), 2);
|
||||
const property3 = value7[0];
|
||||
const env0_6 = value7[1];
|
||||
binding.useEffect(_fun91006, [value3, option, property2,
|
||||
(importDefault(6266) /* metro dependency 6266: usePrevious */)(property2)]);
|
||||
const value9 = binding.useCallback(_fun91007, [property]);
|
||||
const closure = onLayout_91008;
|
||||
const r5 = property === 1 && property3 === property2;
|
||||
const r6 = r5 ? 'text' : 'button';
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const view = <View style={styles.applicationDescriptionContainer}>{(optionState == null || optionState.lastValidationResult == null ? undefined : optionState.lastValidationResult.error) != null ? ((Text) => <Text lineClamp={property} onLayout={closure} variant="text-sm/medium" color="text-feedback-critical">{optionState.lastValidationResult.error}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : ((Text) => <Text lineClamp={property} onLayout={closure} variant="text-sm/medium" color="mobile-text-heading-primary">{option != null ? option.displayDescription : command.displayDescription}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
|
||||
if (property3 === property2) {
|
||||
r8 = null;
|
||||
} else {
|
||||
value = importDefault(11870) /* metro dependency 11870: DescriptionEllipsis */;
|
||||
value = ((Component) => <Component style={styles.descriptionEllipsis} dotStyle={styles.descriptionEllipsisDots} />)(value);
|
||||
r8 = value;
|
||||
}
|
||||
return (
|
||||
<PressableOpacity
|
||||
accessibilityRole={r6}
|
||||
disabled={r5}
|
||||
onPress={value9}
|
||||
>
|
||||
<View style={styles.optionDescriptionContainer}>
|
||||
{view}
|
||||
{r8}
|
||||
</View>
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_91009({command, section, guildId, currentOption, optionStates, onPressOption}) { // fn#91009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4105, offset: 0x0204ff71, size: 1077 bytes, params: 2, frame: 36
|
||||
var r7;
|
||||
var jsxRuntimeEnv0_9Binding;
|
||||
var items3;
|
||||
var intl;
|
||||
const env0_3 = currentOption;
|
||||
const env0_4 = optionStates;
|
||||
const styles = useStyles();
|
||||
const binding = env0_4;
|
||||
const value4 = binding.useRef(null);
|
||||
const env0_8 = binding.useRef({});
|
||||
let useState = binding.useState;
|
||||
const value5 = Reflect.apply(useState, binding, [false]);
|
||||
const binding2 = env0_3;
|
||||
const value6 = binding2(value5, 2);
|
||||
const property = value6[0];
|
||||
const env0_9 = value6[1];
|
||||
useState = binding.useState;
|
||||
const value7 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
||||
const property2 = value7[0];
|
||||
const env0_10 = value7[1];
|
||||
useState = binding.useState;
|
||||
const value8 = binding2(Reflect.apply(useState, binding, []), 2);
|
||||
const property3 = value8[0];
|
||||
const env0_12 = value8[1];
|
||||
binding.useEffect(_fun91010, [command]);
|
||||
binding.useEffect(_fun91012, [currentOption]);
|
||||
binding.useEffect(_fun91013, [property3, styles]);
|
||||
const value9 = binding.useMemo(_fun91015, [section,
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun91014)]);
|
||||
const env0_14 = binding.useCallback(_fun91016, []);
|
||||
const r12 = currentOption?.name != null ? optionStates[currentOption?.name] : undefined;
|
||||
const items2 = [value9 != null && ((Component) => <Component style={styles.applicationIcon} source={value9} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items2[1] = <Text style={styles.applicationName} lineClamp={1} variant="text-sm/semibold" color="mobile-text-heading-primary">{'/ ' + command.displayName}</Text>;
|
||||
items2[2] = command.options?.map(_fun91017);
|
||||
if (property) {
|
||||
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
|
||||
items3 = [<View style={[styles.applicationOptionalOptionsDivider,
|
||||
!property2 && styles.applicationOptionalOptionsDividerWithNoRequired]} />];
|
||||
var textProps = {'style': null, 'lineClamp': 1, 'variant': 'eyebrow', 'color': 'text-muted',
|
||||
style: styles.applicationOptionalOptionsIndicator};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
items3[1] = <Text {...textProps}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.U19GM3)}</Text>;
|
||||
items3[2] = command.options?.map(_fun91020);
|
||||
r7 = <>{items3}</>;
|
||||
} else {
|
||||
r7 = null;
|
||||
}
|
||||
items2[3] = r7;
|
||||
const items4 = [<ScrollView ref={value4} contentContainerStyle={styles.applicationTopWrapperScrollView} keyboardShouldPersistTaps="always" showsHorizontalScrollIndicator={false} horizontal>{items2}</ScrollView>];
|
||||
const FormDivider = (require(7972) /* metro dependency 7972: native */).FormDivider;
|
||||
items4[1] = <FormDivider style={styles.applicationDescriptionDivider} />;
|
||||
items4[2] = <ApplicationCommandOptionDescription command={command} option={currentOption} optionState={r12} />;
|
||||
items4[3] = <FormDivider style={styles.applicationDescriptionDivider} />;
|
||||
return (
|
||||
<View style={styles.applicationCommandBar}>
|
||||
{items4}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun91006() { // fn#91006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:3159, offset: 0x0204fea4, size: 90 bytes, params: 1, frame: 12
|
||||
if (env0_1 !== option) {
|
||||
env0_5(0);
|
||||
env0_6(0);
|
||||
env0_3(undefined);
|
||||
} else if (env0_4 > 0 && env0_7 === 0) {
|
||||
env0_3(1);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun91007() { // fn#91007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:3243, offset: 0x0204fefe, size: 29 bytes, params: 1, frame: 11
|
||||
const binding = env0_3;
|
||||
const value = 1;
|
||||
binding(value !== env0_2 ? value : undefined);
|
||||
}
|
||||
|
||||
function ApplicationCommandOptionDescriptionOnLayout({nativeEvent}) { // fn#91008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:3293, owner: ApplicationCommandOptionDescription.onLayout, offset: 0x0204ff1b, size: 86 bytes, params: 2, frame: 13
|
||||
const height = nativeEvent.layout.height;
|
||||
const Math = global.Math;
|
||||
const value = Math.trunc(height);
|
||||
if (env0_2 === undefined || value > env0_4) {
|
||||
env0_5(value);
|
||||
}
|
||||
env0_6(value);
|
||||
}
|
||||
|
||||
function _fun91010() { // fn#91010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4365, offset: 0x020503a6, size: 77 bytes, params: 1, frame: 13
|
||||
const env0_0 = false;
|
||||
const env0_1 = false;
|
||||
const options = command.options;
|
||||
if (options != null) {
|
||||
options.forEach(_fun91011);
|
||||
}
|
||||
env0_9(env0_0);
|
||||
env0_10(env0_1);
|
||||
}
|
||||
|
||||
function _fun91012() { // fn#91012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4481, offset: 0x02050416, size: 40 bytes, params: 1, frame: 13
|
||||
const binding = env0_12;
|
||||
const currentOptionBinding = currentOption;
|
||||
const value2 = undefined;
|
||||
binding(currentOptionBinding == null ? value2 : currentOption.name);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun91013() { // fn#91013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4531, offset: 0x0205043e, size: 104 bytes, params: 1, frame: 13
|
||||
var current;
|
||||
const value2 = null;
|
||||
const r4 = value2 != env0_11 ? env0_8.current[env0_11] : value2;
|
||||
if (value2 != r4) {
|
||||
current = env0_7.current;
|
||||
if (value2 != current) {
|
||||
current.scrollTo({x: r4.x - styles.applicationTopWrapperScrollView.paddingHorizontal, animated: true});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun91014() { // fn#91014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4734, offset: 0x020504a6, size: 79 bytes, params: 1, frame: 13
|
||||
var value3;
|
||||
if (guildId != null) {
|
||||
if (section?.botId != null) {
|
||||
value3 = environment.__proto__;
|
||||
return GuildMemberStore.getMember(guildId, section.botId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun91015() { // fn#91015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4828, offset: 0x020504f5, size: 50 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return (require(11752) /* metro dependency 11752: ApplicationCommandUtils */).getApplicationCommandsIconSource(section,
|
||||
member);
|
||||
}
|
||||
|
||||
function _fun91016({nativeEvent}, {name}) { // fn#91016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4904, offset: 0x02050527, size: 75 bytes, params: 3, frame: 6
|
||||
const binding = env0_8;
|
||||
const current = binding.current;
|
||||
current[name] = {x: nativeEvent.layout.x, width: nativeEvent.layout.width};
|
||||
binding.current = current;
|
||||
}
|
||||
|
||||
function _fun91017(a0) { // fn#91017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:5518, offset: 0x02050572, size: 98 bytes, params: 2, frame: 18
|
||||
var environment;
|
||||
var r0;
|
||||
var object2;
|
||||
var optionStatesBinding;
|
||||
var name;
|
||||
const env0_0 = a0;
|
||||
const required = a0.required;
|
||||
let value = null;
|
||||
if (required) {
|
||||
value = environment.__proto__;
|
||||
object2 = {option: a0, onPress: onPress_91018};
|
||||
optionStatesBinding = optionStates;
|
||||
name = a0.name;
|
||||
object2.optionState = optionStatesBinding[name];
|
||||
object2.onLayout = onLayout_91019;
|
||||
name = a0.name;
|
||||
value = <ApplicationCommandOptionItem {...object2} key={name} />;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun91020(a0) { // fn#91020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:5977, offset: 0x02050615, size: 98 bytes, params: 2, frame: 18
|
||||
var environment;
|
||||
var r0;
|
||||
var object2;
|
||||
var optionStatesBinding;
|
||||
var name;
|
||||
const env0_0 = a0;
|
||||
const required = a0.required;
|
||||
let value = null;
|
||||
if (required) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
object2 = {option: a0, onPress: onPress_91021};
|
||||
optionStatesBinding = optionStates;
|
||||
name = a0.name;
|
||||
object2.optionState = optionStatesBinding[name];
|
||||
object2.onLayout = onLayout_91022;
|
||||
name = a0.name;
|
||||
value = <ApplicationCommandOptionItem {...object2} key={name} />;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun91011({required}) { // fn#91011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4418, offset: 0x020503f3, size: 35 bytes, params: 2, frame: 2
|
||||
if (required !== true) {
|
||||
}
|
||||
}
|
||||
|
||||
function onPress_91018() { // fn#91018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:5581, offset: 0x020505d4, size: 38 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
return onPressOption?.(env0_0);
|
||||
}
|
||||
|
||||
function onLayout_91019(a0) { // fn#91019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:5636, offset: 0x020505fa, size: 27 bytes, params: 2, frame: 13
|
||||
return env1_14(a0, env0_0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
/* Metro module 7873; source: modules/application_commands/native/ApplicationCommandBuiltIns.tsx; dependencies: [3793, 1878, 5066, 1909, 5068, 1244, 4805, 4647, 4603, 7067, 2] */
|
||||
function _fun63116(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8051:6, offset: 0x01b70e18, size: 284 bytes, params: 8, frame: 19
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const BuiltInSectionId = (require(5066) /* metro dependency 5066: ApplicationCommandConstants */).BuiltInSectionId;
|
||||
object2 = {'id': '-15', 'untranslatedName': 'leave', 'displayName': 'leave'};
|
||||
const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType;
|
||||
const CHAT = ApplicationCommandType.CHAT;
|
||||
object2.type = CHAT;
|
||||
const ApplicationCommandInputType = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandInputType;
|
||||
let BUILT_IN = ApplicationCommandInputType.BUILT_IN;
|
||||
object2.inputType = BUILT_IN;
|
||||
BUILT_IN = BuiltInSectionId.BUILT_IN;
|
||||
object2.applicationId = BUILT_IN;
|
||||
Object.defineProperty(object2, 'untranslatedDescription', {get: function() {
|
||||
return require(dependencyMap[5]).intl.string(require(dependencyMap[5]).t['26C4oi']);
|
||||
}, set: undefined, enumerable: true, configurable: true});
|
||||
Object.defineProperty(object2, 'displayDescription', {get: function() {
|
||||
return require(dependencyMap[5]).intl.string(require(dependencyMap[5]).t['26C4oi']);
|
||||
}, set: undefined, enumerable: true, configurable: true});
|
||||
object2.predicate = function({channel}) {
|
||||
return channel != null && channel.isGroupDM();
|
||||
};
|
||||
object2.execute = execute_63120;
|
||||
const items2 = [object2];
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandBuiltIns.tsx');
|
||||
exports.default = items2;
|
||||
}
|
||||
|
||||
function execute_63120(a0, {channel}) { // fn#63120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8051:533, offset: 0x01b70f8f, size: 457 bytes, params: 3, frame: 24
|
||||
var r6;
|
||||
var r7;
|
||||
var channelName;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var object2;
|
||||
var value2;
|
||||
var format;
|
||||
var SSIVOu;
|
||||
var value4;
|
||||
var defaultImport;
|
||||
var show;
|
||||
if (channel != null) {
|
||||
channelName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel, UserStore,
|
||||
RelationshipStore);
|
||||
value2 = intl.formatToPlainString(t.hJ5Ap4, {name: channelName});
|
||||
format = intl.format;
|
||||
SSIVOu = t.SSIVOu;
|
||||
object2 = {name: channelName};
|
||||
if (channel.isManaged()) {
|
||||
value4 = intl.formatToPlainString(t.hVGjEW, {name: channelName});
|
||||
r6 = intl.format(t.IK1Qvs, {name: channelName});
|
||||
r7 = value4;
|
||||
} else {
|
||||
r6 = Reflect.apply(format, intl, [SSIVOu, object2]);
|
||||
r7 = value2;
|
||||
}
|
||||
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
|
||||
show = defaultImport.show;
|
||||
object2 = {title: r7, body: r6};
|
||||
object2.confirmText = intl.string(t['26C4oi']);
|
||||
object2.cancelText = intl.string(t['ETE/oC']);
|
||||
object2.onConfirm = onConfirm;
|
||||
Reflect.apply(show, defaultImport, [object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function execute_63120OnConfirm() { // fn#63121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8051:986, owner: execute_63120.onConfirm, offset: 0x01b71158, size: 158 bytes, params: 1, frame: 18
|
||||
var value;
|
||||
var property;
|
||||
var defaultImport;
|
||||
var closePrivateChannel;
|
||||
var value2;
|
||||
var id;
|
||||
var error;
|
||||
var defaultImport2;
|
||||
var sendBotMessage;
|
||||
var value3;
|
||||
var intl;
|
||||
var string;
|
||||
var t;
|
||||
try {
|
||||
value = environment.__proto__;
|
||||
property = dependencyMap[8];
|
||||
defaultImport = importDefault(property);
|
||||
closePrivateChannel = defaultImport.closePrivateChannel;
|
||||
value2 = environment;
|
||||
id = channel.id;
|
||||
Reflect.apply(closePrivateChannel, defaultImport, [id]);
|
||||
} catch (error) {
|
||||
defaultImport2 = importDefault(dependencyMap[9]);
|
||||
sendBotMessage = defaultImport2.sendBotMessage;
|
||||
value3 = environment;
|
||||
id = channel.id;
|
||||
intl = require(dependencyMap[5]).intl;
|
||||
string = intl.string;
|
||||
t = require(dependencyMap[5]).t;
|
||||
Reflect.apply(sendBotMessage, defaultImport2, [id, Reflect.apply(string, intl, [t['YOsuT/']])]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,658 @@
|
||||
/* Metro module 11861; source: modules/application_commands/native/ApplicationCommandDiscovery.tsx; dependencies: [57, 31, 27, 5066, 11862, 11018, 661, 33, 11863, 4501, 697, 4584, 11864, 8060, 1909, 7869, 3869, 1244, 4863, 22, 11865, 5068, 11866, 11867, 1305, 11080, 2] */
|
||||
function _fun90935(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:6, offset: 0x0204cc54, size: 453 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_90938 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
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 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value.View;
|
||||
const env0_7 = value.SectionList;
|
||||
value = require(5066) /* metro dependency 5066: ApplicationCommandConstants */;
|
||||
const env0_8 = value.BuiltInSectionId;
|
||||
const env0_9 = value.DISCOVERY_COMMANDS_QUERY_LIMIT;
|
||||
const env0_10 = (require(11862) /* metro dependency 11862: ApplicationCommandsCategoriesConstants */).ITEM_HEIGHT;
|
||||
const env0_11 = (require(11018) /* metro dependency 11018: ApplicationCommandsConstants */).AUTOCOMPLETE_ROW_HEIGHT;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_12 = value.AnalyticEvents;
|
||||
const env0_13 = value.SectionListElementType;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_14 = value.jsx;
|
||||
const env0_15 = value.Fragment;
|
||||
const env0_16 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const MOBILE_FLOATING_ACCESSORY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_FLOATING_ACCESSORY_BACKGROUND;
|
||||
const env0_17 = Reflect.apply(createStyles, value, [{discoveryWrapper: {flex: 1}, noCommandsImage: {'height': 50,
|
||||
'width': 50, 'marginBottom': 16}, noCommandsContainer: {'padding': 0, 'height': 100},
|
||||
commandsList: {backgroundColor: MOBILE_FLOATING_ACCESSORY_BACKGROUND}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandDiscovery.tsx');
|
||||
exports.default = ApplicationCommandDiscovery;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_90936(a0, a1) { // fn#90936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:382, offset: 0x0204ce19, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun90937;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_90938(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_90938(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_90938(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun90937;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function ApplicationCommandDiscovery({style, onPressSlashItem, onHeightChange, channel, canOnlyUseTextCommands}) { // fn#90939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:1644, offset: 0x0204cf8d, size: 1066 bytes, params: 2, frame: 33
|
||||
const styles = useStyles();
|
||||
const value2 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
|
||||
const Math = global.Math;
|
||||
const value3 = Math.max(value2 * AUTOCOMPLETE_ROW_HEIGHT, AUTOCOMPLETE_ROW_HEIGHT);
|
||||
const env0_4 = value3;
|
||||
let binding = env0_5;
|
||||
const value5 = binding.useRef(null);
|
||||
var env0_5 = value5;
|
||||
const [property, property2] = env0_4(binding.useState(0), 2);
|
||||
const env0_8 = binding.useRef(false);
|
||||
const value8 = (require(11864) /* metro dependency 11864: ApplicationCommandDiscoveryManager */).useCommandDiscoveryManager(function(a0) {
|
||||
return a0.initialSectionId;
|
||||
});
|
||||
const applicationCommandQueryApiModule = importAll(8060) /* metro dependency 8060: ApplicationCommandQueryApi */;
|
||||
const useDiscovery = applicationCommandQueryApiModule.useDiscovery;
|
||||
const object2 = {};
|
||||
object2.context = {channel: channel, type: 'channel'};
|
||||
const object4 = {};
|
||||
const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType;
|
||||
const CHAT = ApplicationCommandType.CHAT;
|
||||
object4.commandTypes = [CHAT];
|
||||
const BuiltInCommandFilter = (require(7869) /* metro dependency 7869: ApplicationCommandQueryTypes */).BuiltInCommandFilter;
|
||||
object4.builtIns = canOnlyUseTextCommands ? BuiltInCommandFilter.ONLY_TEXT : BuiltInCommandFilter.ALLOW;
|
||||
object4.applicationCommands = !canOnlyUseTextCommands;
|
||||
object2.filters = object4;
|
||||
object2.options = {'placeholderCount': 3, 'limit': null, 'includeFrecency': true,
|
||||
limit: DISCOVERY_COMMANDS_QUERY_LIMIT};
|
||||
object2.allowFetch = true;
|
||||
const value9 = Reflect.apply(useDiscovery, applicationCommandQueryApiModule, [object2]);
|
||||
const sectionDescriptors = value9.sectionDescriptors;
|
||||
const env0_11 = value9.activeSections;
|
||||
const commandsByActiveSection = value9.commandsByActiveSection;
|
||||
const env0_13 = value9.hasMoreAfter;
|
||||
const loading = value9.loading;
|
||||
const filteredSectionId = value9.filteredSectionId;
|
||||
const env0_15 = value9.scrollDown;
|
||||
const filterSection = value9.filterSection;
|
||||
binding = env0_5;
|
||||
binding.useEffect(_fun90941, [filterSection, value8, property2, sectionDescriptors]);
|
||||
binding.useEffect(_fun90943, []);
|
||||
binding.useEffect(_fun90945, [commandsByActiveSection, onHeightChange, value3]);
|
||||
const value10 = binding.useCallback(_fun90948, [sectionDescriptors, filterSection, filteredSectionId]);
|
||||
const value11 = binding.useCallback(_fun90949, []);
|
||||
const value12 = binding.useCallback(_fun90950, []);
|
||||
const value13 = binding.useCallback(_fun90951, []);
|
||||
const env0_19 = binding.useMemo(_fun90955, [binding.useMemo(_fun90952, [sectionDescriptors, commandsByActiveSection,
|
||||
value3])]);
|
||||
return (
|
||||
<View style={[styles.discoveryWrapper, style]}>
|
||||
<SectionList
|
||||
ref={value5}
|
||||
sections={commandsByActiveSection}
|
||||
style={styles.commandsList}
|
||||
onScrollBeginDrag={value11}
|
||||
onScrollEndDrag={value12}
|
||||
onMomentumScrollEnd={value13}
|
||||
onScroll={onScroll_90959}
|
||||
scrollEventThrottle={16}
|
||||
keyExtractor={function(a0) {
|
||||
return a0.id;
|
||||
}}
|
||||
maintainVisibleContentPosition={loading ? {minIndexForVisible: 1} : null}
|
||||
renderItem={renderItem_90961}
|
||||
renderSectionHeader={renderSectionHeader_90964}
|
||||
getItemLayout={binding.useCallback(_fun90957, [value3])}
|
||||
stickySectionHeadersEnabled
|
||||
/>
|
||||
{binding.useMemo(_fun90958, [channel.guild_id, value10, sectionDescriptors, property])}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun90941() { // fn#90941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:2428, offset: 0x0204d3c2, size: 80 bytes, params: 1, frame: 13
|
||||
var index;
|
||||
if (env0_9 != null) {
|
||||
filterSection(env0_9);
|
||||
index = sectionDescriptors.findIndex(_fun90942);
|
||||
env0_7(index === -1 ? 0 : index);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun90943() { // fn#90943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:2524, offset: 0x0204d427, size: 135 bytes, params: 1, frame: 17
|
||||
const AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
|
||||
const announce = AccessibilityAnnouncer.announce;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
Reflect.apply(announce, AccessibilityAnnouncer,
|
||||
[intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2wfLMm'])]);
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const trackWithMetadata = appAnalyticsUtilsModule.trackWithMetadata;
|
||||
const APPLICATION_COMMAND_BROWSER_OPENED = AnalyticEvents.APPLICATION_COMMAND_BROWSER_OPENED;
|
||||
Reflect.apply(trackWithMetadata, appAnalyticsUtilsModule, [APPLICATION_COMMAND_BROWSER_OPENED]);
|
||||
return _fun90944;
|
||||
}
|
||||
|
||||
function _fun90945() { // fn#90945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:2749, offset: 0x0204d4d4, size: 51 bytes, params: 1, frame: 14
|
||||
if (onHeightChange != null) {
|
||||
onHeightChange(((a0, a1) => {
|
||||
var r0;
|
||||
var env0_0 = a1;
|
||||
var value = 0;
|
||||
if (value === a0.length) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = a0.reduce(_fun90947, value);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
})(commandsByActiveSection, env0_4));
|
||||
}
|
||||
}
|
||||
|
||||
function _fun90948(a0) { // fn#90948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:2980, offset: 0x0204d5b9, size: 138 bytes, params: 2, frame: 13
|
||||
var value2;
|
||||
const property = sectionDescriptors[a0];
|
||||
let id = property.id;
|
||||
if (id === filteredSectionId) {
|
||||
filterSection(null);
|
||||
env0_7(0);
|
||||
} else {
|
||||
id = property.id;
|
||||
value2 = environment.__proto__;
|
||||
if (id === BuiltInSectionId.FRECENCY) {
|
||||
filterSection(null);
|
||||
env0_7(0);
|
||||
} else {
|
||||
filterSection(property.id);
|
||||
env0_7(a0);
|
||||
}
|
||||
}
|
||||
const value = environment.__proto__;
|
||||
(require(11864) /* metro dependency 11864: ApplicationCommandDiscoveryManager */).updateInitialSectionId(undefined);
|
||||
}
|
||||
|
||||
function _fun90949() { // fn#90949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:3122, offset: 0x0204d643, size: 63 bytes, params: 1, frame: 12
|
||||
env0_8.current = true;
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const trackWithMetadata = appAnalyticsUtilsModule.trackWithMetadata;
|
||||
const APPLICATION_COMMAND_BROWSER_SCROLLED = AnalyticEvents.APPLICATION_COMMAND_BROWSER_SCROLLED;
|
||||
Reflect.apply(trackWithMetadata, appAnalyticsUtilsModule, [APPLICATION_COMMAND_BROWSER_SCROLLED]);
|
||||
}
|
||||
|
||||
function _fun90950({nativeEvent}) { // fn#90950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:3231, offset: 0x0204d682, size: 67 bytes, params: 2, frame: 5
|
||||
if (nativeEvent.contentOffset.y === nativeEvent.targetContentOffset?.y) {
|
||||
env0_8.current = false;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun90951() { // fn#90951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:3363, offset: 0x0204d6c5, size: 19 bytes, params: 1, frame: 2
|
||||
env0_8.current = false;
|
||||
}
|
||||
|
||||
function _fun90952() { // fn#90952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:3400, offset: 0x0204d6d8, size: 83 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
var r2;
|
||||
var value3;
|
||||
var value4;
|
||||
const closure = _loop_90953;
|
||||
let value = environment.__proto__;
|
||||
value = _createForOfIteratorHelperLoose_90936(sectionDescriptors);
|
||||
const value2 = value();
|
||||
let done = value2.done;
|
||||
if (!done) {
|
||||
for (r2 = value2; true; r2 = value4) {
|
||||
value3 = r2.value;
|
||||
closure(value3);
|
||||
value4 = value();
|
||||
done = value4.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
function _fun90955() { // fn#90955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:3696, offset: 0x0204d7e8, size: 51 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(22) /* metro dependency 22 */).throttle(_fun90956, 100);
|
||||
}
|
||||
|
||||
function _fun90957(a0, a1) { // fn#90957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:3815, offset: 0x0204d8a4, size: 446 bytes, params: 3, frame: 30
|
||||
var r13;
|
||||
var r14;
|
||||
var r15;
|
||||
var r16;
|
||||
var r3;
|
||||
var r4;
|
||||
var r7;
|
||||
var r5;
|
||||
var value5;
|
||||
var value6;
|
||||
var data;
|
||||
var length;
|
||||
var value7;
|
||||
var value8;
|
||||
var value9;
|
||||
var value10;
|
||||
var value11;
|
||||
var value12;
|
||||
var value13;
|
||||
var value14;
|
||||
var value15;
|
||||
var FOOTER;
|
||||
var HEADER;
|
||||
const APPLICATION_SECTION_HEADER_HEIGHT = (require(11863) /* metro dependency 11863: ApplicationSectionHeader */).APPLICATION_SECTION_HEADER_HEIGHT;
|
||||
var object2;
|
||||
if (a0 == null) {
|
||||
object2 = {'length': 0, 'offset': 0};
|
||||
} else {
|
||||
var value = environment.__proto__;
|
||||
var ROW = SectionListElementType.ROW;
|
||||
var value2 = _createForOfIteratorHelperLoose_90936(a0);
|
||||
var value3 = value2();
|
||||
var done = value3.done;
|
||||
var value4 = 0;
|
||||
if (done) {
|
||||
r3 = value4;
|
||||
r4 = value4;
|
||||
r7 = ROW;
|
||||
} else {
|
||||
r13 = value4;
|
||||
r14 = value4;
|
||||
r15 = value4;
|
||||
r16 = value3;
|
||||
loopExit2: while (true) {
|
||||
value5 = r16.value;
|
||||
value6 = r15 + r14;
|
||||
data = value5.data;
|
||||
length = data.length;
|
||||
if (value6 + length + r13 + 1 >= a1) {
|
||||
if (a1 === r15 + r14 + r13) {
|
||||
HEADER = SectionListElementType.HEADER;
|
||||
r3 = r15;
|
||||
r4 = r14;
|
||||
r7 = HEADER;
|
||||
break loopExit2;
|
||||
}
|
||||
value11 = r15 + r14;
|
||||
if (a1 === value11 + value5.data.length + r13 + 1) {
|
||||
value14 = r15 + 1;
|
||||
value15 = r14 + value5.data.length;
|
||||
FOOTER = SectionListElementType.FOOTER;
|
||||
r3 = value14;
|
||||
r4 = value15;
|
||||
r7 = FOOTER;
|
||||
break loopExit2;
|
||||
}
|
||||
value12 = r15 + 1;
|
||||
value13 = r14 + (a1 - value12 - r14 - r13);
|
||||
ROW = SectionListElementType.ROW;
|
||||
r3 = value12;
|
||||
r4 = value13;
|
||||
r7 = ROW;
|
||||
break loopExit2;
|
||||
}
|
||||
value7 = r15 + 1;
|
||||
data = value5.data;
|
||||
length = data.length;
|
||||
value8 = r14 + length;
|
||||
value9 = r13 + 1;
|
||||
value10 = value2();
|
||||
done = value10.done;
|
||||
if (done) {
|
||||
r3 = value7;
|
||||
r4 = value8;
|
||||
r7 = ROW;
|
||||
break loopExit2;
|
||||
}
|
||||
r13 = value9;
|
||||
r14 = value8;
|
||||
r15 = value7;
|
||||
r16 = value10;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
ROW = SectionListElementType.ROW;
|
||||
if (ROW === r7) {
|
||||
r5 = env0_4;
|
||||
} else if (SectionListElementType.HEADER === r7) {
|
||||
r5 = APPLICATION_SECTION_HEADER_HEIGHT;
|
||||
} else {
|
||||
SectionListElementType.FOOTER;
|
||||
r5 = value4;
|
||||
}
|
||||
object2 = {length: r5};
|
||||
value = r3 * APPLICATION_SECTION_HEADER_HEIGHT;
|
||||
object2.offset = value + r4 * env0_4;
|
||||
}
|
||||
object2.index = a1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun90958() { // fn#90958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:4358, offset: 0x0204da62, size: 82 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component onPressSection={env0_17} sections={sectionDescriptors} selectedIndex={env0_6} guildId={channel.guild_id} />)(importDefault(11865) /* metro dependency 11865: ApplicationCommandsCategories */);
|
||||
}
|
||||
|
||||
function ApplicationCommandDiscoveryOnScroll({nativeEvent}) { // fn#90959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:4624, owner: ApplicationCommandDiscovery.onScroll, offset: 0x0204dab4, size: 341 bytes, params: 2, frame: 23
|
||||
var r2;
|
||||
var length;
|
||||
var height;
|
||||
var scrollToLocation;
|
||||
var object2;
|
||||
var Math;
|
||||
var max;
|
||||
var commandsByActiveSectionBinding;
|
||||
var value3;
|
||||
const layoutMeasurement = nativeEvent.layoutMeasurement;
|
||||
const contentSize = nativeEvent.contentSize;
|
||||
const contentOffset = nativeEvent.contentOffset;
|
||||
const contentInset = nativeEvent.contentInset;
|
||||
const y = contentOffset.y;
|
||||
env0_19(y);
|
||||
let current = env0_8.current;
|
||||
if (!current) {
|
||||
length = activeSections.length;
|
||||
if (length > 0) {
|
||||
if (y < contentInset.top) {
|
||||
current = env0_5.current;
|
||||
if (current != null) {
|
||||
current.scrollToLocation({'sectionIndex': 0, 'itemIndex': 0, 'viewPosition': 0, 'animated': false});
|
||||
}
|
||||
} else if (y > contentSize.height - layoutMeasurement.height - contentInset.bottom) {
|
||||
current = env0_5.current;
|
||||
if (current != null) {
|
||||
scrollToLocation = current.scrollToLocation;
|
||||
object2 = {};
|
||||
length = activeSections.length;
|
||||
object2.sectionIndex = length - 1;
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
commandsByActiveSectionBinding = commandsByActiveSection;
|
||||
length = commandsByActiveSectionBinding.length;
|
||||
length = commandsByActiveSectionBinding[length - 1].data.length;
|
||||
object2.itemIndex = Reflect.apply(max, Math, [length - 1, 0]);
|
||||
object2.viewPosition = 1;
|
||||
object2.animated = false;
|
||||
Reflect.apply(scrollToLocation, current, [object2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
const hasMoreAfterBinding = hasMoreAfter;
|
||||
if (hasMoreAfterBinding) {
|
||||
height = layoutMeasurement.height;
|
||||
value3 = y + height;
|
||||
height = contentSize.height;
|
||||
r2 = value3 >= height - 3 * env0_4;
|
||||
} else {
|
||||
r2 = hasMoreAfterBinding;
|
||||
}
|
||||
if (r2) {
|
||||
scrollDown();
|
||||
}
|
||||
}
|
||||
|
||||
function ApplicationCommandDiscoveryRenderItem({item, section}) { // fn#90961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:5206, owner: ApplicationCommandDiscovery.renderItem, offset: 0x0204dc09, size: 234 bytes, params: 2, frame: 20
|
||||
var environment;
|
||||
const inputType = item.inputType;
|
||||
let value = environment.__proto__;
|
||||
const ApplicationCommandInputType = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandInputType;
|
||||
const PLACEHOLDER = ApplicationCommandInputType.PLACEHOLDER;
|
||||
if (inputType === PLACEHOLDER) {
|
||||
return ((Component) => <Component />)(importDefault(11866) /* metro dependency 11866: ApplicationCommandLoadingItem */);
|
||||
}
|
||||
const value3 = sectionDescriptors.find(function({id}) {
|
||||
return id === item.applicationId;
|
||||
});
|
||||
value = importDefault(11867) /* metro dependency 11867: ApplicationCommandItem */;
|
||||
const applicationId = item.applicationId;
|
||||
section = section.section;
|
||||
return ((Component) => <Component command={item} onPress={onPress_90963} section={value3} showIcon={applicationId !== section.id} guildId={channel.guild_id} />)(value);
|
||||
}
|
||||
|
||||
function ApplicationCommandDiscoveryRenderSectionHeader({section}) { // fn#90964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:5527, owner: ApplicationCommandDiscovery.renderSectionHeader, offset: 0x0204dd29, size: 312 bytes, params: 2, frame: 26
|
||||
var r5;
|
||||
var ThemedEmptyState;
|
||||
var object3;
|
||||
var intl;
|
||||
var format;
|
||||
var WoQXT6;
|
||||
var stylesBinding;
|
||||
const value = environment.__proto__;
|
||||
const jsxRuntimeEnv1_15Binding = jsxRuntimeEnv1_15;
|
||||
const value3 = ((Component) => <Component section={section.section} guildId={channel.guild_id} key={section.section.id} />)(importDefault(11863) /* metro dependency 11863: ApplicationSectionHeader */);
|
||||
const value4 = section.data.length === 0;
|
||||
if (value4) {
|
||||
ThemedEmptyState = (require(1305) /* metro dependency 1305: native */).ThemedEmptyState;
|
||||
var themedEmptyStateProps = {lightSource: importDefault(11080) /* metro dependency 11080 */,
|
||||
darkSource: importDefault(11080) /* metro dependency 11080 */};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
format = intl.format;
|
||||
WoQXT6 = (require(1244) /* metro dependency 1244: indexNative */).t.WoQXT6;
|
||||
section = section.section;
|
||||
themedEmptyStateProps.body = Reflect.apply(format, intl, [WoQXT6, {applicationName: section.name}]);
|
||||
stylesBinding = styles;
|
||||
themedEmptyStateProps.containerStyle = stylesBinding.noCommandsContainer;
|
||||
themedEmptyStateProps.imageStyle = stylesBinding.noCommandsImage;
|
||||
r5 = <ThemedEmptyState {...themedEmptyStateProps} />;
|
||||
} else {
|
||||
r5 = value4;
|
||||
}
|
||||
return (
|
||||
<>
|
||||
{value3}
|
||||
{r5}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun90942({id}) { // fn#90942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:2469, offset: 0x0204d412, size: 21 bytes, params: 2, frame: 2
|
||||
return id === env1_9;
|
||||
}
|
||||
|
||||
function _fun90944() { // fn#90944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:2683, offset: 0x0204d4ae, size: 38 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__.__proto__;
|
||||
(require(11864) /* metro dependency 11864: ApplicationCommandDiscoveryManager */).updateInitialSectionId(undefined);
|
||||
}
|
||||
|
||||
function _fun90946(a0, a1) { // fn#90946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:2766, offset: 0x0204d507, size: 46 bytes, params: 3, frame: 14
|
||||
var r0;
|
||||
const env0_0 = a1;
|
||||
const length = a0.length;
|
||||
let value = 0;
|
||||
if (value === length) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = a0.reduce(_fun90947, value);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _loop_90953(a0) { // fn#90953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:3430, offset: 0x0204d72b, size: 157 bytes, params: 2, frame: 13
|
||||
var environment;
|
||||
var value2;
|
||||
const env0_0 = a0;
|
||||
let value = environment.__proto__;
|
||||
const index = commandsByActiveSection.findIndex(_fun90954);
|
||||
if (index >= 0) {
|
||||
value = commandsByActiveSection[index].data.length * env1_4;
|
||||
value2 = environment.__proto__.__proto__;
|
||||
value += (require(11863) /* metro dependency 11863: ApplicationSectionHeader */).APPLICATION_SECTION_HEADER_HEIGHT;
|
||||
value += env0_0;
|
||||
env0_1.push(value);
|
||||
} else {
|
||||
env0_1.push(env0_0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun90956(a0) { // fn#90956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:3720, offset: 0x0204d81b, size: 137 bytes, params: 2, frame: 17
|
||||
var r3;
|
||||
var r4;
|
||||
var r2;
|
||||
var value3;
|
||||
var value4;
|
||||
let length = env1_18.length;
|
||||
const value2 = 0;
|
||||
reducibleJoin6: while (true) {
|
||||
if (!(value2 < length)) {
|
||||
r2 = value2;
|
||||
break reducibleJoin6;
|
||||
}
|
||||
if (value2 === env1_18[value2]) {
|
||||
r3 = value2;
|
||||
r4 = value2;
|
||||
} else {
|
||||
if (!(a0 >= env1_18[value2])) {
|
||||
r2 = value2;
|
||||
break reducibleJoin6;
|
||||
}
|
||||
r3 = value2;
|
||||
r4 = value2;
|
||||
}
|
||||
reducibleLoop3: while (true) {
|
||||
value3 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
|
||||
value4 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
|
||||
length = env1_18.length;
|
||||
if (value4 < length) {
|
||||
if (value2 === env1_18[value4]) {
|
||||
r3 = value4;
|
||||
r4 = value3;
|
||||
continue reducibleLoop3;
|
||||
}
|
||||
if (a0 >= env1_18[value4]) {
|
||||
r3 = value4;
|
||||
r4 = value3;
|
||||
continue reducibleLoop3;
|
||||
}
|
||||
r2 = value3;
|
||||
break reducibleJoin6;
|
||||
}
|
||||
r2 = value3;
|
||||
break reducibleJoin6;
|
||||
}
|
||||
}
|
||||
env1_7(r2);
|
||||
}
|
||||
|
||||
function renderItemOnPress_90963() { // fn#90963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:5399, owner: ApplicationCommandDiscovery.renderItem.onPress, offset: 0x0204dcf3, size: 54 bytes, params: 1, frame: 16
|
||||
const value = environment.__proto__;
|
||||
return onPressSlashItem?.(item, env0_2, section.section);
|
||||
}
|
||||
|
||||
function _fun90947(a0, a1) { // fn#90947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12047:2798, offset: 0x0204d535, size: 132 bytes, params: 3, frame: 13
|
||||
var r0;
|
||||
var value;
|
||||
const APPLICATION_SECTION_HEADER_HEIGHT = (require(11863) /* metro dependency 11863: ApplicationSectionHeader */).APPLICATION_SECTION_HEADER_HEIGHT;
|
||||
if (a1.data.length === 0) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
value = APPLICATION_SECTION_HEADER_HEIGHT + 160;
|
||||
r0 = value;
|
||||
} else {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
value = require + ITEM_HEIGHT;
|
||||
value = a0 + (APPLICATION_SECTION_HEADER_HEIGHT + value * a1.data.length);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
/* Metro module 11867; source: modules/application_commands/native/ApplicationCommandItem.tsx; dependencies: [31, 27, 1945, 11018, 33, 4501, 697, 4584, 566, 11752, 5278, 1244, 5475, 4573, 2] */
|
||||
function _fun90990(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:6, offset: 0x0204ed84, size: 243 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const env0_6 = (require(11018) /* metro dependency 11018: ApplicationCommandsConstants */).AUTOCOMPLETE_ROW_HEIGHT;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun90991);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandItem.tsx');
|
||||
exports.default = _default_90992;
|
||||
}
|
||||
|
||||
function _fun90991(a0) { // fn#90991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:216, offset: 0x0204ee77, size: 187 bytes, params: 2, frame: 16
|
||||
const object3 = {};
|
||||
const object5 = {'flexDirection': 'row', 'paddingVertical': 8, 'paddingHorizontal': 16, 'alignItems': 'center'};
|
||||
const Math = global.Math;
|
||||
object5.height = Math.max(a0 * AUTOCOMPLETE_ROW_HEIGHT, AUTOCOMPLETE_ROW_HEIGHT);
|
||||
object3.applicationCommandItem = object5;
|
||||
const INTERACTIVE_BACKGROUND_HOVER = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_HOVER;
|
||||
object3.highlightedApplicationCommandItem = {backgroundColor: INTERACTIVE_BACKGROUND_HOVER};
|
||||
const object6 = {'width': 32, 'height': 32, 'borderRadius': null, 'marginRight': 16};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object3.applicationCommandIcon = object6;
|
||||
object3.applicationCommandDescriptionWrapper = {'flexDirection': 'column', 'flexShrink': 1, 'alignSelf': 'flex-end'};
|
||||
object3.applicationCommandSectionName = {'paddingLeft': 16, 'marginLeft': 'auto'};
|
||||
return object3;
|
||||
}
|
||||
|
||||
function _default_90992({command, onPress, section, guildId, showIcon, highlighted}) { // fn#90992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:707, offset: 0x0204ef32, size: 688 bytes, params: 2, frame: 28
|
||||
showIcon = showIcon === undefined || showIcon;
|
||||
highlighted = !(highlighted === undefined) && highlighted;
|
||||
const styles = useStyles((require(4584) /* metro dependency 4584: useFontScale */).useFontScale());
|
||||
const member = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun90993);
|
||||
const value6 = env0_3.useMemo(_fun90994, [section, member]);
|
||||
const r8 = member?.nick != null ? member.nick : section?.name;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const eo8b3e = (require(1244) /* metro dependency 1244: indexNative */).t.eo8b3e;
|
||||
const object = {applicationName: r8};
|
||||
object.commandDescription = command.displayDescription;
|
||||
object.commandName = command.displayName;
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, styles.applicationCommandItem, undefined);
|
||||
copyDataProperties(object4, highlighted ? styles.highlightedApplicationCommandItem : {}, undefined);
|
||||
const items2 = [showIcon && value6 != null && ((Component) => <Component style={styles.applicationCommandIcon} source={value6} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items2[1] = <View style={styles.applicationCommandDescriptionWrapper}><Text lineClamp={1} variant="text-md/semibold" color="mobile-text-heading-primary">{'/ ' + command.displayName}</Text><Text lineClamp={1} variant="text-xs/medium" color="text-default">{command.displayDescription}</Text></View>;
|
||||
items2[2] = <Text style={styles.applicationCommandSectionName} variant="eyebrow" color="text-muted">{r8}</Text>;
|
||||
return (
|
||||
<PressableOpacity
|
||||
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [eo8b3e, object])}
|
||||
style={object4}
|
||||
accessibilityRole="button"
|
||||
onPress={onPress}
|
||||
>
|
||||
{items2}
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun90993() { // fn#90993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:854, offset: 0x0204f1e2, size: 79 bytes, params: 1, frame: 13
|
||||
var value3;
|
||||
if (guildId != null) {
|
||||
if (section?.botId != null) {
|
||||
value3 = environment.__proto__;
|
||||
return GuildMemberStore.getMember(guildId, section.botId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun90994() { // fn#90994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:948, offset: 0x0204f231, size: 50 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return (require(11752) /* metro dependency 11752: ApplicationCommandUtils */).getApplicationCommandsIconSource(section,
|
||||
member);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
/* Metro module 11868; source: modules/application_commands/native/ApplicationCommandList.tsx; dependencies: [31, 27, 11018, 33, 8060, 1909, 7869, 5068, 11866, 11867, 2] */
|
||||
function _fun90995(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:6, offset: 0x0204f263, size: 194 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).FlatList;
|
||||
const AUTOCOMPLETE_ROW_HEIGHT = (require(11018) /* metro dependency 11018: ApplicationCommandsConstants */).AUTOCOMPLETE_ROW_HEIGHT;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_7 = 3 * AUTOCOMPLETE_ROW_HEIGHT;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandList.tsx');
|
||||
exports.default = _default_90996;
|
||||
}
|
||||
|
||||
function _default_90996({style, channel, onPressCommandItem, query, ItemSeparatorComponent, getItemLayout, onCommandsChange}) { // fn#90996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:188, offset: 0x0204f325, size: 406 bytes, params: 2, frame: 27
|
||||
const applicationCommandQueryApiModule = importAll(8060) /* metro dependency 8060: ApplicationCommandQueryApi */;
|
||||
const useQuery = applicationCommandQueryApiModule.useQuery;
|
||||
const object3 = {channel: channel, type: 'channel'};
|
||||
const object4 = {text: query};
|
||||
const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType;
|
||||
const CHAT = ApplicationCommandType.CHAT;
|
||||
object4.commandTypes = [CHAT];
|
||||
const ScoreMethod = (require(7869) /* metro dependency 7869: ApplicationCommandQueryTypes */).ScoreMethod;
|
||||
const COMMAND_OR_APPLICATION = ScoreMethod.COMMAND_OR_APPLICATION;
|
||||
const value3 = Reflect.apply(useQuery, applicationCommandQueryApiModule, [object3, object4, {'placeholderCount': 3,
|
||||
'limit': 7, scoreMethod: COMMAND_OR_APPLICATION}]);
|
||||
const commands = value3.commands;
|
||||
const sections = value3.sections;
|
||||
const env0_4 = sections;
|
||||
const scrollDown = value3.scrollDown;
|
||||
const binding = env0_4;
|
||||
const value4 = binding.useCallback(_fun90997, [sections, channel.guild_id, onPressCommandItem]);
|
||||
binding.useEffect(_fun91000, [commands?.length, onCommandsChange]);
|
||||
return (
|
||||
<FlatList
|
||||
style={style}
|
||||
keyExtractor={function(a0) {
|
||||
return a0.id;
|
||||
}}
|
||||
data={commands}
|
||||
renderItem={value4}
|
||||
ItemSeparatorComponent={ItemSeparatorComponent}
|
||||
getItemLayout={getItemLayout}
|
||||
onScroll={env0_4.useCallback(_fun91001, [scrollDown])}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun90997({item, index}) { // fn#90997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:554, offset: 0x0204f4bb, size: 230 bytes, params: 2, frame: 20
|
||||
const inputType = item.inputType;
|
||||
const ApplicationCommandInputType = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandInputType;
|
||||
const PLACEHOLDER = ApplicationCommandInputType.PLACEHOLDER;
|
||||
if (inputType === PLACEHOLDER) {
|
||||
return ((Component) => <Component />)(importDefault(11866) /* metro dependency 11866: ApplicationCommandLoadingItem */);
|
||||
}
|
||||
return ((Component) => <Component command={item} section={sections?.find(function({id}) {
|
||||
return id === item.applicationId;
|
||||
})} onPress={onPress_90999} guildId={channel.guild_id} highlighted={index === 0} />)(importDefault(11867) /* metro dependency 11867: ApplicationCommandItem */);
|
||||
}
|
||||
|
||||
function _fun91000() { // fn#91000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:847, offset: 0x0204f5bd, size: 62 bytes, params: 1, frame: 14
|
||||
if (onCommandsChange != null) {
|
||||
onCommandsChange(commands?.length ?? 0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun91001({nativeEvent}) { // fn#91001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:960, offset: 0x0204f5fb, size: 78 bytes, params: 2, frame: 10
|
||||
if (nativeEvent.contentOffset.y + nativeEvent.layoutMeasurement.height >= nativeEvent.contentSize.height - env1_7) {
|
||||
scrollDown();
|
||||
}
|
||||
}
|
||||
|
||||
function onPress_90999() { // fn#90999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:764, offset: 0x0204f5a1, size: 28 bytes, params: 1, frame: 13
|
||||
return onPressCommandItem(item, env0_1);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/* Metro module 11866; source: modules/application_commands/native/ApplicationCommandLoadingItem.tsx; dependencies: [31, 27, 11018, 33, 4501, 697, 4584, 2] */
|
||||
function _fun90987(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12052:6, offset: 0x0204eb0e, size: 223 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(11018) /* metro dependency 11018: ApplicationCommandsConstants */).AUTOCOMPLETE_ROW_HEIGHT;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun90988);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandLoadingItem.tsx');
|
||||
exports.default = _default_90989;
|
||||
}
|
||||
|
||||
function _fun90988(a0) { // fn#90988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12052:209, offset: 0x0204ebed, size: 227 bytes, params: 2, frame: 16
|
||||
const object3 = {};
|
||||
const object4 = {'flexDirection': 'row', 'paddingVertical': 4, 'paddingHorizontal': 16, 'alignItems': 'center'};
|
||||
const Math = global.Math;
|
||||
object4.height = Math.max(a0 * AUTOCOMPLETE_ROW_HEIGHT, AUTOCOMPLETE_ROW_HEIGHT);
|
||||
object3.applicationCommandLoadingItem = object4;
|
||||
object3.applicationCommandLoadingLeftWrapper = {'flexDirection': 'column', 'width': '75%', 'height': '100%',
|
||||
'justifyContent': 'space-between'};
|
||||
let BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
|
||||
object3.applicationCommandLoadingName = {'backgroundColor': null, 'height': 16, 'borderRadius': 16, 'width': '20%',
|
||||
backgroundColor: BACKGROUND_MOD_STRONG};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object3.applicationCommandLoadingDescription = {'backgroundColor': null, 'height': 16, 'borderRadius': 16,
|
||||
'width': '80%', backgroundColor: BACKGROUND_BASE_LOW};
|
||||
BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
|
||||
object3.applicationCommandLoadingSectionName = {'backgroundColor': null, 'paddingLeft': 16, 'width': '25%',
|
||||
'marginLeft': 'auto', 'height': 16, 'borderRadius': 16, backgroundColor: BACKGROUND_MOD_STRONG};
|
||||
return object3;
|
||||
}
|
||||
|
||||
function _default_90989() { // fn#90989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12052:888, offset: 0x0204ecd0, size: 180 bytes, params: 1, frame: 19
|
||||
const styles = useStyles((require(4584) /* metro dependency 4584: useFontScale */).useFontScale());
|
||||
let view = <View style={styles.applicationCommandLoadingName} />;
|
||||
view = <View style={styles.applicationCommandLoadingLeftWrapper}>{view}<View style={styles.applicationCommandLoadingDescription} /></View>;
|
||||
return (
|
||||
<View style={styles.applicationCommandLoadingItem}>
|
||||
{view}
|
||||
<View style={styles.applicationCommandLoadingSectionName} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,80 @@
|
||||
/* Metro module 11752; source: modules/application_commands/native/ApplicationCommandUtils.tsx; dependencies: [4645, 4644, 5066, 1423, 11753, 11754, 5068, 1860, 11093, 7879, 2] */
|
||||
function _fun90058(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:6, offset: 0x02028f7a, size: 175 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
|
||||
const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */;
|
||||
const env0_5 = (require(5066) /* metro dependency 5066: ApplicationCommandConstants */).BuiltInSectionId;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandUtils.tsx');
|
||||
exports.getApplicationCommandsIconSource = getApplicationCommandsIconSource;
|
||||
exports.openCommandAttachmentPreview = openCommandAttachmentPreview;
|
||||
}
|
||||
|
||||
function getApplicationCommandsIconSource(a0, a1) { // fn#90059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:286, offset: 0x02029029, size: 308 bytes, params: 3, frame: 17
|
||||
var r2;
|
||||
var getApplicationIconSource;
|
||||
var application;
|
||||
if (a0 == null) {
|
||||
return null;
|
||||
}
|
||||
const id = a0.id;
|
||||
var value;
|
||||
const BUILT_IN = BuiltInSectionId.BUILT_IN;
|
||||
if (BUILT_IN === id) {
|
||||
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource(importDefault(11753) /* metro dependency 11753 */);
|
||||
}
|
||||
const FRECENCY = BuiltInSectionId.FRECENCY;
|
||||
if (FRECENCY === id) {
|
||||
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource(importDefault(11754) /* metro dependency 11754 */);
|
||||
}
|
||||
const type = a0.type;
|
||||
const value2 = undefined;
|
||||
const ApplicationCommandSectionType = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandSectionType;
|
||||
const APPLICATION = ApplicationCommandSectionType.APPLICATION;
|
||||
if (type === APPLICATION) {
|
||||
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
getApplicationIconSource = value.getApplicationIconSource;
|
||||
application = a0.application;
|
||||
value = Reflect.apply(getApplicationIconSource, value, [{id: a0.id, icon: a0.icon,
|
||||
bot: application == null ? value2 : application.bot, botIconFirst: true, guildMember: a1}]);
|
||||
r2 = value;
|
||||
} else {
|
||||
r2 = importDefault(1860) /* metro dependency 1860 */;
|
||||
}
|
||||
return r2;
|
||||
}
|
||||
|
||||
function openCommandAttachmentPreview(a0, a1, a2, a3) { // fn#90060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:671, offset: 0x0202915d, size: 132 bytes, params: 5, frame: 17
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
const getUpload = UploadAttachmentStore.getUpload;
|
||||
const SlashCommand = DraftType.SlashCommand;
|
||||
const value2 = Reflect.apply(getUpload, UploadAttachmentStore, [a1, a2, SlashCommand]);
|
||||
if (value2 != null) {
|
||||
(importDefault(11093) /* metro dependency 11093: showUploadPreviewActionSheet */)({channelId: a1,
|
||||
disableSpoiler: true, onClose: a3, onRemove: onRemove, upload: value2});
|
||||
}
|
||||
}
|
||||
|
||||
function openCommandAttachmentPreviewOnRemove() { // fn#90061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:823, owner: openCommandAttachmentPreview.onRemove, offset: 0x020291e1, size: 189 bytes, params: 1, frame: 18
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
const value2 = undefined;
|
||||
const defaultImport = importDefault(7879) /* metro dependency 7879: UploadAttachmentActionCreators */;
|
||||
const remove = defaultImport.remove;
|
||||
const id = env0_3.id;
|
||||
const SlashCommand = DraftType.SlashCommand;
|
||||
Reflect.apply(remove, defaultImport, [require, id, SlashCommand]);
|
||||
const r5 = env0_0 == null || env0_0.props.activeCommand == null || env0_0.props.activeCommand.options == null ? value2 : env0_0.props.activeCommand.options.find(function({name}) {
|
||||
return name === importDefault;
|
||||
});
|
||||
if (r5 != null) {
|
||||
if (env0_0 != null) {
|
||||
env0_0.insertOrJumpCommandOption(r5, value2, false, {displayText: ''});
|
||||
}
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
/* Metro module 11695; source: modules/application_commands/native/ApplicationCommandValidationUtils.tsx; dependencies: [2] */
|
||||
function _fun89658(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11881:6, offset: 0x02019297, size: 109 bytes, params: 8, frame: 16
|
||||
const _arrayLikeToArray_89661 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandValidationUtils.tsx');
|
||||
exports.getFirstInvalidOption = getFirstInvalidOption;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_89659(a0, a1) { // fn#89659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11881:46, offset: 0x02019304, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun89660;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_89661(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_89661(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_89661(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun89660;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function getFirstInvalidOption({options}, a1) { // fn#89662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11881:1139, offset: 0x02019478, size: 111 bytes, params: 3, frame: 16
|
||||
var r3;
|
||||
var value3;
|
||||
var name;
|
||||
var property;
|
||||
var required;
|
||||
var success;
|
||||
var value4;
|
||||
if (options != null) {
|
||||
var value;
|
||||
value = _createForOfIteratorHelperLoose_89659(options);
|
||||
var value2 = value();
|
||||
var done = value2.done;
|
||||
if (!done) {
|
||||
r3 = value2;
|
||||
reducibleLoop2: while (true) {
|
||||
value3 = r3.value;
|
||||
name = value3.name;
|
||||
property = a1[name];
|
||||
required = value3.required;
|
||||
if (required) {
|
||||
reducibleJoin4: while (true) {
|
||||
if (property == null) {
|
||||
return value3;
|
||||
}
|
||||
break reducibleJoin4;
|
||||
}
|
||||
}
|
||||
if (property != null) {
|
||||
success = property.success;
|
||||
reducibleJoin7: while (true) {
|
||||
if (!success) {
|
||||
return value3;
|
||||
}
|
||||
break reducibleJoin7;
|
||||
}
|
||||
}
|
||||
value4 = value();
|
||||
done = value4.done;
|
||||
if (done) {
|
||||
return null;
|
||||
}
|
||||
r3 = value4;
|
||||
continue reducibleLoop2;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
/* Metro module 11865; source: modules/application_commands/native/ApplicationCommandsCategories.tsx; dependencies: [31, 27, 1310, 1945, 11862, 33, 4501, 697, 566, 11752, 5475, 5278, 1244, 1357, 4081, 4082, 4564, 4002, 2] */
|
||||
function _fun90974(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:6, offset: 0x0204e2c5, size: 542 bytes, params: 8, frame: 29
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value2.View;
|
||||
const env0_5 = value2.StyleSheet;
|
||||
const env0_6 = value2.FlatList;
|
||||
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const applicationCommandsCategoriesConstantsModule = require(11862) /* metro dependency 11862: ApplicationCommandsCategoriesConstants */;
|
||||
const ICON_SIZE = applicationCommandsCategoriesConstantsModule.ICON_SIZE;
|
||||
const NODE_SIZE = applicationCommandsCategoriesConstantsModule.NODE_SIZE;
|
||||
const NODE_MARGIN = applicationCommandsCategoriesConstantsModule.NODE_MARGIN;
|
||||
const env0_9 = applicationCommandsCategoriesConstantsModule.ITEM_WIDTH;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value4.jsx;
|
||||
const env0_11 = value4.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {'backgroundColor': null, 'borderTopWidth': null, 'borderTopColor': null, 'paddingHorizontal': 8,
|
||||
'paddingVertical': 4, 'flexDirection': 'row', 'alignItems': 'center'};
|
||||
const MOBILE_COMMAND_CATEGORIES_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_COMMAND_CATEGORIES_BACKGROUND;
|
||||
object4.backgroundColor = MOBILE_COMMAND_CATEGORIES_BACKGROUND;
|
||||
const CHAT_INPUT_COMMAND_CATEGORIES_BORDER_TOP_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_COMMAND_CATEGORIES_BORDER_TOP_WIDTH;
|
||||
object4.borderTopWidth = CHAT_INPUT_COMMAND_CATEGORIES_BORDER_TOP_WIDTH;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object4.borderTopColor = BORDER_SUBTLE;
|
||||
object3.container = object4;
|
||||
object3.categoryImage = {height: ICON_SIZE, width: ICON_SIZE, borderRadius: ICON_SIZE / 2};
|
||||
object3.fadedItem = {opacity: 0.5};
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object3.activeItem = {opacity: 1, backgroundColor: BACKGROUND_BASE_LOWER};
|
||||
object3.item = {marginVertical: NODE_MARGIN, marginHorizontal: NODE_MARGIN, height: NODE_SIZE, width: NODE_SIZE,
|
||||
borderRadius: NODE_SIZE / 2, alignItems: 'center', justifyContent: 'center'};
|
||||
const env0_12 = Reflect.apply(createStyles, createStylesModule, [object3]);
|
||||
const env0_13 = value.memo(_fun90975);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandsCategories.tsx');
|
||||
exports.default = _default_90979;
|
||||
}
|
||||
|
||||
function _fun90975({section, handlePressCategory, active, index, guildId}) { // fn#90975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:862, offset: 0x0204e4e3, size: 437 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
const value2 = guildId.useMemo(_fun90977, [section, Reflect.apply(useStateFromStores, fluxModule,
|
||||
[[GuildMemberStore], _fun90976])]);
|
||||
const r8 = value2 != null && ((Component) => <Component style={styles.categoryImage} source={value2} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
return (
|
||||
<PressableOpacity
|
||||
onPress={function() {
|
||||
return handlePressCategory(index);
|
||||
}}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel={active ? Reflect.apply(formatToPlainString, intl, [t.yl24Gd,
|
||||
{applicationName: section.name}]) : Reflect.apply(formatToPlainString, intl, [t['9uqD4O'],
|
||||
{applicationName: section.name}])}
|
||||
key={section.name}
|
||||
>
|
||||
<View style={[styles.item, active ? styles.activeItem : styles.fadedItem]}>
|
||||
{r8}
|
||||
</View>
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_90979({style, sections, onPressSection, selectedIndex, guildId}) { // fn#90979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:1535, offset: 0x0204e719, size: 563 bytes, params: 2, frame: 28
|
||||
var r6;
|
||||
var VisualEffectView;
|
||||
var moduleValue2;
|
||||
const styles = useStyles();
|
||||
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
|
||||
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
|
||||
const enabled = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
|
||||
[{location: 'ApplicationCommandsCategories'}]).enabled;
|
||||
const binding = env0_3;
|
||||
var env0_3 = binding.useRef(null);
|
||||
const env0_4 = binding.useRef(null);
|
||||
const env0_5 = binding.useRef(null);
|
||||
const value2 = binding.useRef(null);
|
||||
binding.useEffect(_fun90980, [selectedIndex]);
|
||||
const value3 = binding.useCallback(function(a0) {
|
||||
onPressSection(a0);
|
||||
require(dependencyMap[14]).triggerHapticFeedback(importDefault(dependencyMap[15]).IMPACT_LIGHT);
|
||||
}, [onPressSection]);
|
||||
const value4 = binding.useCallback(_fun90982, []);
|
||||
const value5 = binding.useCallback(_fun90983, []);
|
||||
const value6 = binding.useCallback(function(a0, a1) {
|
||||
return {length: ITEM_WIDTH, offset: ITEM_WIDTH * a1, index: a1};
|
||||
}, []);
|
||||
const value7 = binding.useCallback(_fun90985, [selectedIndex, value3, guildId]);
|
||||
const items2 = [styles.container, style];
|
||||
if (enabled) {
|
||||
r6 = !enabled;
|
||||
} else {
|
||||
VisualEffectView = importDefault(4564) /* metro dependency 4564: VisualEffectView */;
|
||||
moduleValue2 = require(4002) /* metro dependency 4002: shared */;
|
||||
r6 = <VisualEffectView blurTheme={moduleValue2.isThemeDark(ThemeStore.theme) ? 'dark' : 'light'} style={StyleSheet.absoluteFill} />;
|
||||
}
|
||||
return (
|
||||
<View style={items2}>
|
||||
{r6}
|
||||
<FlatList
|
||||
ref={value2}
|
||||
getItemLayout={value6}
|
||||
data={sections}
|
||||
keyboardShouldPersistTaps="always"
|
||||
horizontal
|
||||
keyExtractor={function(a0) {
|
||||
return a0.id;
|
||||
}}
|
||||
renderItem={value7}
|
||||
showsHorizontalScrollIndicator={false}
|
||||
onScroll={value4}
|
||||
onLayout={value5}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun90976() { // fn#90976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:977, offset: 0x0204e698, size: 79 bytes, params: 1, frame: 13
|
||||
var value3;
|
||||
if (guildId != null) {
|
||||
if (section?.botId != null) {
|
||||
value3 = environment.__proto__;
|
||||
return GuildMemberStore.getMember(guildId, section.botId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun90977() { // fn#90977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:1071, offset: 0x0204e6e7, size: 50 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return (require(11752) /* metro dependency 11752: ApplicationCommandUtils */).getApplicationCommandsIconSource(section,
|
||||
member);
|
||||
}
|
||||
|
||||
function _fun90980() { // fn#90980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:1786, offset: 0x0204e94c, size: 135 bytes, params: 1, frame: 12
|
||||
var selectedIndexBinding;
|
||||
var value2;
|
||||
var value3;
|
||||
let current = env0_3.current;
|
||||
if (current != null) {
|
||||
current = env0_4.current;
|
||||
if (current != null) {
|
||||
current = env0_6.current;
|
||||
if (current != null) {
|
||||
current = env0_5.current;
|
||||
if (current != null) {
|
||||
selectedIndexBinding = selectedIndex;
|
||||
value2 = environment.__proto__;
|
||||
value3 = selectedIndexBinding * ITEM_WIDTH;
|
||||
current = env0_4.current;
|
||||
if (value3 > current || value3 < env0_3.current) {
|
||||
current = env0_6.current;
|
||||
current.scrollToOffset({offset: value3});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun90982({nativeEvent}) { // fn#90982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:2053, offset: 0x0204ea1e, size: 67 bytes, params: 2, frame: 5
|
||||
const contentOffset = nativeEvent.contentOffset;
|
||||
const layoutMeasurement = nativeEvent.layoutMeasurement;
|
||||
env0_3.current = contentOffset.x;
|
||||
env0_4.current = contentOffset.x + layoutMeasurement.width;
|
||||
}
|
||||
|
||||
function _fun90983({nativeEvent}) { // fn#90983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:2176, offset: 0x0204ea61, size: 64 bytes, params: 2, frame: 4
|
||||
const layout = nativeEvent.layout;
|
||||
env0_3.current = 0;
|
||||
env0_4.current = layout.width;
|
||||
env0_5.current = layout.width;
|
||||
}
|
||||
|
||||
function _fun90985({item, index}) { // fn#90985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:2339, offset: 0x0204eac0, size: 78 bytes, params: 2, frame: 16
|
||||
return ((Component) => <Component active={index === selectedIndex} section={item} index={index} handlePressCategory={env0_7} guildId={guildId} />)(env1_13);
|
||||
}
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
/* Metro module 11862; source: modules/application_commands/native/ApplicationCommandsCategoriesConstants.tsx; dependencies: [2] */
|
||||
function _fun90965(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12048:6, offset: 0x0204de61, size: 114 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandsCategoriesConstants.tsx');
|
||||
exports.ICON_SIZE = 24;
|
||||
exports.NODE_SIZE = 32;
|
||||
exports.NODE_MARGIN = 4;
|
||||
exports.ITEM_WIDTH = 40;
|
||||
exports.ITEM_HEIGHT = 40;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Metro module 11018; source: modules/application_commands/native/ApplicationCommandsConstants.tsx; dependencies: [477, 2] */
|
||||
function _fun84402(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11204:6, offset: 0x01f48922, size: 118 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = value.isAndroid();
|
||||
const r1 = value ? 64 : 56;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandsConstants.tsx');
|
||||
exports.AUTOCOMPLETE_ROW_HEIGHT = 48;
|
||||
exports.AUTOCOMPLETE_EMOJI_ROW_HEIGHT = r1;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/* Metro module 11863; source: modules/application_commands/native/ApplicationSectionHeader.tsx; dependencies: [31, 27, 1945, 33, 4501, 697, 566, 11752, 1244, 5475, 4573, 2] */
|
||||
function _fun90966(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12049:6, offset: 0x0204ded3, size: 314 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const MOBILE_FLOATING_ACCESSORY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_FLOATING_ACCESSORY_BACKGROUND;
|
||||
object2.applicationHeaderWrapper = {'flexDirection': 'row', 'alignItems': 'center', 'height': 32,
|
||||
'backgroundColor': null, 'paddingHorizontal': 16, backgroundColor: MOBILE_FLOATING_ACCESSORY_BACKGROUND};
|
||||
const object4 = {'width': 16, 'height': 16, 'borderRadius': null, 'marginRight': 8};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object2.applicationIcon = object4;
|
||||
const env0_7 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationSectionHeader.tsx');
|
||||
exports.default = _default_90967;
|
||||
exports.APPLICATION_SECTION_HEADER_HEIGHT = 32;
|
||||
}
|
||||
|
||||
function _default_90967({section, guildId}) { // fn#90967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12049:438, offset: 0x0204e00d, size: 373 bytes, params: 2, frame: 23
|
||||
const styles = useStyles();
|
||||
const member = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun90968);
|
||||
const applicationCommandsIconSource = (require(11752) /* metro dependency 11752: ApplicationCommandUtils */).getApplicationCommandsIconSource(section,
|
||||
member);
|
||||
const r8 = member?.nick != null ? member.nick : section?.name;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const property = (require(1244) /* metro dependency 1244: indexNative */).t['Ocw/sM'];
|
||||
const object = {applicationName: r8};
|
||||
const r6 = applicationCommandsIconSource != null && ((Component) => <Component style={styles.applicationIcon} source={applicationCommandsIconSource} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View
|
||||
style={styles.applicationHeaderWrapper}
|
||||
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [property, object])}
|
||||
>
|
||||
{r6}
|
||||
<Text variant="eyebrow" color="interactive-text-default">
|
||||
{r8}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun90968() { // fn#90968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12049:508, offset: 0x0204e182, size: 79 bytes, params: 1, frame: 13
|
||||
var value3;
|
||||
if (guildId != null) {
|
||||
if (section?.botId != null) {
|
||||
value3 = environment.__proto__;
|
||||
return GuildMemberStore.getMember(guildId, section.botId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/* Metro module 15230; source: modules/application_commands/native/ContextMenuCommandAppScreen.tsx; dependencies: [31, 33, 4501, 697, 5463, 7705, 15229, 8671, 2] */
|
||||
function _fun116514(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15427:6, offset: 0x0248c55d, size: 200 bytes, params: 8, frame: 21
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const env0_4 = Reflect.apply(createStyles, createStylesModule, [{list: {marginHorizontal: PX_16}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ContextMenuCommandAppScreen.tsx');
|
||||
exports.default = ContextMenuCommandAppScreen;
|
||||
}
|
||||
|
||||
function ContextMenuCommandAppScreen(a0) { // fn#116515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15427:301, offset: 0x0248c625, size: 255 bytes, params: 2, frame: 23
|
||||
const {section, commands, onPressCommand} = a0.route.params;
|
||||
const env0_2 = onPressCommand;
|
||||
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
|
||||
const value2 = (importDefault(7705) /* metro dependency 7705: useScaledRowHeight */)();
|
||||
const binding = env0_2;
|
||||
const value3 = binding.useMemo(function() {
|
||||
return [commands.length];
|
||||
}, [commands.length]);
|
||||
const value4 = binding.useCallback(_fun116517, [commands, onPressCommand, section]);
|
||||
const styles = useStyles();
|
||||
return ((Component) => <Component style={styles.list} sections={value3} estimatedListSize="windowSize" itemSize={value2} insetEnd={insets.bottom} renderItem={value4} />)(importDefault(8671) /* metro dependency 8671: FastestListAndroid */);
|
||||
}
|
||||
|
||||
function _fun116517(a0, a1) { // fn#116517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15427:515, offset: 0x0248c73a, size: 119 bytes, params: 3, frame: 20
|
||||
const commandsBinding = commands;
|
||||
const property = commandsBinding[a1];
|
||||
return ((Component) => <Component item={property} onPress={onPress_116518} section={section} start={a1 === 0} end={a1 === commandsBinding.length - 1} key={property.id} />)(importDefault(15229) /* metro dependency 15229: ContextMenuCommandItem */);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
/* Metro module 15229; source: modules/application_commands/native/ContextMenuCommandItem.tsx; dependencies: [31, 27, 33, 4501, 697, 6238, 22, 1244, 11752, 5475, 1909, 4058, 2] */
|
||||
function _fun116508(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:6, offset: 0x0248bfc8, size: 369 bytes, params: 8, frame: 22
|
||||
var object3;
|
||||
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(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object3 = {};
|
||||
const object5 = {'width': 32, 'height': 32};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object3.commandIcon = object5;
|
||||
let BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
||||
object3.loadingIcon = {backgroundColor: BACKGROUND_MOD_MUTED};
|
||||
const object6 = {};
|
||||
BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
||||
object6.backgroundColor = BACKGROUND_MOD_MUTED;
|
||||
object6.height = 24;
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
object3.loadingName = object6;
|
||||
const env0_6 = Reflect.apply(createStyles, createStylesModule, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ContextMenuCommandItem.tsx');
|
||||
exports.default = ContextMenuCommandItem;
|
||||
exports.ContextMenuCommandLoadingItem = ContextMenuCommandLoadingItem;
|
||||
exports.ContextMenuCommandEmptyItem = ContextMenuCommandEmptyItem;
|
||||
exports.ContextMenuCommandAppItem = ContextMenuCommandAppItem;
|
||||
}
|
||||
|
||||
function ContextMenuCommandItem({item, onPress, section, start, end}) { // fn#116509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:503, offset: 0x0248c139, size: 290 bytes, params: 2, frame: 24
|
||||
const styles = useStyles();
|
||||
const value3 = env0_3.useMemo(_fun116510, [item, section?.name]);
|
||||
const applicationCommandsIconSource = (require(11752) /* metro dependency 11752: ApplicationCommandUtils */).getApplicationCommandsIconSource(section);
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const displayName = item.displayName;
|
||||
const r7 = applicationCommandsIconSource != null && ((Component) => <Component style={styles.commandIcon} source={applicationCommandsIconSource} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
const SendMessageIcon = (require(4058) /* metro dependency 4058: SendMessageIcon */).SendMessageIcon;
|
||||
return (
|
||||
<TableRow
|
||||
accessibilityLabel={value3}
|
||||
onPress={onPress}
|
||||
label={displayName}
|
||||
icon={r7}
|
||||
trailing={<SendMessageIcon />}
|
||||
start={start}
|
||||
end={end}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function ContextMenuCommandLoadingItem({start, end}) { // fn#116511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:1147, offset: 0x0248c31c, size: 219 bytes, params: 2, frame: 24
|
||||
const styles = useStyles();
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const items2 = [styles.loadingName];
|
||||
let value = importDefault(22) /* metro dependency 22 */;
|
||||
value = value.random(60, 80);
|
||||
items2[1] = {width: '' + value + '%'};
|
||||
return (
|
||||
<TableRow
|
||||
label={<View style={items2} />}
|
||||
icon={<View style={[styles.commandIcon, styles.loadingIcon]} />}
|
||||
start={start}
|
||||
end={end}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function ContextMenuCommandEmptyItem({start, end}) { // fn#116512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:1406, offset: 0x0248c3f7, size: 171 bytes, params: 2, frame: 22
|
||||
const styles = useStyles();
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const YSNlV2 = (require(1244) /* metro dependency 1244: indexNative */).t.YSNlV2;
|
||||
return (
|
||||
<TableRow
|
||||
label={Reflect.apply(string, intl, [YSNlV2])}
|
||||
icon={<View style={[styles.commandIcon, styles.loadingIcon]} />}
|
||||
start={start}
|
||||
end={end}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function ContextMenuCommandAppItem({section, onPress, start, end}) { // fn#116513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:1634, offset: 0x0248c4a2, size: 187 bytes, params: 2, frame: 22
|
||||
var r6;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const applicationCommandsIconSource = (require(11752) /* metro dependency 11752: ApplicationCommandUtils */).getApplicationCommandsIconSource(section);
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const name = section.name;
|
||||
const value3 = applicationCommandsIconSource != null;
|
||||
if (value3) {
|
||||
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
value = ((Component) => <Component style={styles.commandIcon} source={applicationCommandsIconSource} />)(value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value3;
|
||||
}
|
||||
return (
|
||||
<TableRow
|
||||
onPress={onPress}
|
||||
label={name}
|
||||
icon={r6}
|
||||
start={start}
|
||||
end={end}
|
||||
arrow
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun116510() { // fn#116510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:602, offset: 0x0248c25b, size: 193 bytes, params: 1, frame: 17
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const type = item.type;
|
||||
const value3 = undefined;
|
||||
const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType;
|
||||
const MESSAGE = ApplicationCommandType.MESSAGE;
|
||||
if (MESSAGE === type) {
|
||||
return intl.formatToPlainString(t.Pk4Mz3, {applicationName: section == null ? value3 : section.name,
|
||||
commandName: item.displayName});
|
||||
}
|
||||
const USER = ApplicationCommandType.USER;
|
||||
if (USER === type) {
|
||||
return intl.formatToPlainString(t.Pk4Mz3, {applicationName: section == null ? value3 : section.name,
|
||||
commandName: item.displayName});
|
||||
}
|
||||
return value3;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
/* Metro module 15227; source: modules/application_commands/native/ContextMenuCommandNavigator.tsx; dependencies: [31, 27, 33, 9884, 4501, 697, 4884, 5280, 1585, 9603, 1244, 15228, 15230, 2] */
|
||||
function _fun116476(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15424:6, offset: 0x0248ae64, size: 293 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
const env0_7 = (require(9884) /* metro dependency 9884 */).createNativeStackNavigator();
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWEST};
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object2.content = {backgroundColor: BACKGROUND_BASE_LOWER};
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ContextMenuCommandNavigator.tsx');
|
||||
exports.default = ContextMenuCommandNavigator;
|
||||
}
|
||||
|
||||
function ContextMenuCommandNavigator() { // fn#116477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15424:461, offset: 0x0248af89, size: 351 bytes, params: 1, frame: 26
|
||||
const styles = useStyles();
|
||||
let binding = env0_3;
|
||||
binding.useLayoutEffect(_fun116478, []);
|
||||
const env0_1 = (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions();
|
||||
const {left, right} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
const items2 = [styles.container];
|
||||
items2[1] = {paddingLeft: left, paddingRight: right};
|
||||
binding = env0_7;
|
||||
const Navigator = binding.Navigator;
|
||||
const object = {screenOptions: screenOptions_116479};
|
||||
let Screen = binding.Screen;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const PHjkRE = (require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE;
|
||||
const screen = <Screen name="root" options={{title: Reflect.apply(string, intl,
|
||||
[PHjkRE])}} getComponent={function() {
|
||||
return require(dependencyMap[11]).default;
|
||||
}} />;
|
||||
Screen = binding.Screen;
|
||||
return (
|
||||
<View style={items2}>
|
||||
<Navigator {...object}>
|
||||
{screen}
|
||||
<Screen
|
||||
name="app"
|
||||
options={function({route}) {
|
||||
route = route.params.section;
|
||||
return {title: route?.name};
|
||||
}}
|
||||
getComponent={function() {
|
||||
return require(dependencyMap[12]).default;
|
||||
}}
|
||||
/>
|
||||
</Navigator>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun116478() { // fn#116478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15424:529, offset: 0x0248b0e8, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (require(4884) /* metro dependency 4884: TTIAnalyticsUtils */).trackAppUIViewed();
|
||||
}
|
||||
|
||||
function ContextMenuCommandNavigatorScreenOptions({navigation, route}) { // fn#116479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15424:748, owner: ContextMenuCommandNavigator.screenOptions, offset: 0x0248b10d, size: 192 bytes, params: 2, frame: 16
|
||||
var r6;
|
||||
var environment;
|
||||
var r2;
|
||||
var value2;
|
||||
var value4;
|
||||
const object2 = {};
|
||||
object2.contentStyle = styles.content;
|
||||
object2.headerShadowVisible = false;
|
||||
object2.headerTitle = headerTitle_116480;
|
||||
object2.headerTitleAlign = 'center';
|
||||
const getState = navigation.getState;
|
||||
if (Reflect.apply(getState, navigation, []).routes[0].key === route.key) {
|
||||
value4 = environment.__proto__;
|
||||
r2 = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderModalCloseImage(navigation);
|
||||
r6 = require;
|
||||
} else {
|
||||
value2 = environment.__proto__;
|
||||
r2 = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderModalBackImage(navigation);
|
||||
}
|
||||
object2.headerLeft = r2;
|
||||
copyDataProperties(object2, env0_1, r6);
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,332 @@
|
||||
/* Metro module 15228; source: modules/application_commands/native/ContextMenuCommandRootScreen.tsx; dependencies: [57, 31, 27, 1867, 5066, 33, 4501, 697, 566, 8060, 7869, 8050, 5463, 7705, 8518, 1244, 4573, 15229, 6984, 8671, 2] */
|
||||
function _fun116484(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:6, offset: 0x0248b271, size: 384 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
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 env0_6 = (require(27) /* metro dependency 27 */).View;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
let value = require(5066) /* metro dependency 5066: ApplicationCommandConstants */;
|
||||
const env0_8 = value.CONTEXT_MENU_COMMANDS_QUERY_LIMIT;
|
||||
const env0_9 = value.BuiltInSectionId;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.container = {flex: 1, marginHorizontal: PX_16};
|
||||
const object4 = {};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.paddingTop = PX_16;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object4.paddingBottom = PX_8;
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object4.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
object2.sectionHeader = object4;
|
||||
const env0_12 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ContextMenuCommandRootScreen.tsx');
|
||||
exports.default = ContextMenuCommandRootScreen;
|
||||
}
|
||||
|
||||
function ContextMenuCommandRootScreen(a0) { // fn#116485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:568, offset: 0x0248b3f1, size: 1323 bytes, params: 2, frame: 32
|
||||
var object10;
|
||||
var object2;
|
||||
var object3;
|
||||
var SearchField;
|
||||
var object8;
|
||||
var intl;
|
||||
const navigation = a0.navigation;
|
||||
const {channel, commandType, commandTargetId, onPressAppCommand, onClose} = a0.route.params;
|
||||
const env0_4 = onClose;
|
||||
const value = undefined;
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(channel.guild_id);
|
||||
});
|
||||
const env0_5 = guild;
|
||||
let binding = env0_5;
|
||||
const env0_6 = binding.useRef(false);
|
||||
const value4 = env0_4(binding.useState(''), 2);
|
||||
const value5 = 0;
|
||||
const property = value4[value5];
|
||||
const property2 = value4[1];
|
||||
const value6 = property !== '';
|
||||
binding.useEffect(function() {
|
||||
return navigation.addListener('beforeRemove', _fun116488);
|
||||
}, [navigation, onClose]);
|
||||
const applicationCommandQueryApiModule = importAll(8060) /* metro dependency 8060: ApplicationCommandQueryApi */;
|
||||
const useDiscovery = applicationCommandQueryApiModule.useDiscovery;
|
||||
object10 = {context: {channel: channel, type: 'channel'}};
|
||||
object10.filters = {text: value6 ? property : value, commandTypes: [commandType]};
|
||||
const object9 = {};
|
||||
object9.limit = CONTEXT_MENU_COMMANDS_QUERY_LIMIT;
|
||||
object9.includeFrecency = !value6;
|
||||
const COMMAND_OR_APPLICATION = value6 ? (require(7869) /* metro dependency 7869: ApplicationCommandQueryTypes */).ScoreMethod.COMMAND_OR_APPLICATION : value;
|
||||
object9.scoreMethod = COMMAND_OR_APPLICATION;
|
||||
object10.options = object9;
|
||||
object10.allowFetch = true;
|
||||
const {commands, commandsByActiveSection, sectionDescriptors, loading} = Reflect.apply(useDiscovery,
|
||||
applicationCommandQueryApiModule, [object10]);
|
||||
binding = env0_5;
|
||||
const useMemo = binding.useMemo;
|
||||
const sections = Reflect.apply(useMemo, binding, [function() {
|
||||
sectionDescriptors.forEach(_fun116490);
|
||||
return {sections: {}};
|
||||
}, [sectionDescriptors]]).sections;
|
||||
const value8 = binding.useCallback(_fun116491, [channel, commandTargetId, guild, navigation, onPressAppCommand]);
|
||||
const value9 = binding.useCallback(_fun116492, [commandsByActiveSection, navigation, value8]);
|
||||
const value10 = binding.useMemo(_fun116494, [loading, commands.length, commandsByActiveSection]);
|
||||
const frecencyItems = value10.frecencyItems;
|
||||
const value11 = binding.useMemo(_fun116499, [loading, commands, value6, frecencyItems, value10.appItems]);
|
||||
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
|
||||
const value12 = (importDefault(7705) /* metro dependency 7705: useScaledRowHeight */)();
|
||||
const value13 = binding.useMemo(_fun116501, [value11]);
|
||||
const styles = useStyles();
|
||||
const value14 = (require(8518) /* metro dependency 8518: useScaledTextLineHeightAndroid */).useScaledTextLineHeight('text-sm/semibold');
|
||||
const value15 = binding.useCallback(_fun116503, [loading, commands.length, value6, frecencyItems.length,
|
||||
styles.sectionHeader]);
|
||||
const value16 = binding.useCallback(_fun116504, [value11, value8, value9, sections]);
|
||||
const value17 = binding.useMemo(_fun116507, [loading, commands.length, value6, value14,
|
||||
styles.sectionHeader.paddingTop, styles.sectionHeader.paddingBottom]);
|
||||
let r6 = value6 || !loading && commands.length > value5;
|
||||
if (r6) {
|
||||
object2 = {};
|
||||
object3 = {};
|
||||
object3.marginBottom = value6 ? (importDefault(697) /* metro dependency 697: native */).space.PX_16 : value5;
|
||||
object2.style = object3;
|
||||
SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
|
||||
object8 = {size: 'md', onChange: property2};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object8.placeholder = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.m1UwbP);
|
||||
r6 = <View {...object2}><SearchField {...object8} /></View>;
|
||||
}
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{r6}
|
||||
{((Component) => <Component sections={value13} estimatedListSize="windowSize" itemSize={value12} insetEnd={insets.bottom} renderItem={value16} renderSectionHeader={value15} sectionHeaderSize={value17} />)(importDefault(8671) /* metro dependency 8671: FastestListAndroid */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun116487() { // fn#116487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:855, offset: 0x0248b93c, size: 34 bytes, params: 1, frame: 13
|
||||
return navigation.addListener('beforeRemove', _fun116488);
|
||||
}
|
||||
|
||||
function _fun116489() { // fn#116489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1242, offset: 0x0248b988, size: 41 bytes, params: 1, frame: 12
|
||||
sectionDescriptors.forEach(_fun116490);
|
||||
return {sections: {}};
|
||||
}
|
||||
|
||||
function _fun116491(a0) { // fn#116491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1337, offset: 0x0248b9b1, size: 147 bytes, params: 2, frame: 15
|
||||
if (onPressAppCommand != null) {
|
||||
onPressAppCommand();
|
||||
}
|
||||
env0_6.current = true;
|
||||
(importDefault(8050) /* metro dependency 8050: executeCommand */)({command: a0, optionValues: {},
|
||||
context: {channel: channel, guild: guild}, commandTargetId: commandTargetId});
|
||||
(navigation.getParent() ?? navigation).goBack();
|
||||
}
|
||||
|
||||
function _fun116492(a0) { // fn#116492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1528, offset: 0x0248ba44, size: 103 bytes, params: 2, frame: 16
|
||||
const env0_0 = a0;
|
||||
const value2 = commandsByActiveSection.find(_fun116493);
|
||||
const value3 = undefined;
|
||||
const r5 = (value2 == null ? value3 : value2.data) ?? [];
|
||||
const navigationBinding = navigation;
|
||||
navigationBinding.navigate('app', {section: a0, commands: r5, onPressCommand: env0_13});
|
||||
return value3;
|
||||
}
|
||||
|
||||
function _fun116494() { // fn#116494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1696, offset: 0x0248baab, size: 167 bytes, params: 1, frame: 16
|
||||
var r2;
|
||||
var object2;
|
||||
var value;
|
||||
if (loading) {
|
||||
object2 = {frecencyItems: [], appItems: []};
|
||||
} else {
|
||||
if (commands.length === 0) {
|
||||
return {frecencyItems: [], appItems: []};
|
||||
}
|
||||
var value2 = commandsByActiveSection.find(function(a0) {
|
||||
return a0.section.id === BuiltInSectionId.FRECENCY;
|
||||
});
|
||||
value = commandsByActiveSection.filter(function(a0) {
|
||||
return a0.section.id !== BuiltInSectionId.FRECENCY;
|
||||
});
|
||||
object2 = {};
|
||||
r2 = value2 == null ? undefined : value2.data.map(function(a0) {
|
||||
return {type: 'command', command: a0};
|
||||
});
|
||||
r2 = r2 ?? [];
|
||||
object2.frecencyItems = r2;
|
||||
object2.appItems = value.map(function({section}) {
|
||||
return {type: 'app', section: section};
|
||||
});
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun116499() { // fn#116499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:2077, offset: 0x0248bbc2, size: 186 bytes, params: 1, frame: 13
|
||||
var object;
|
||||
if (loading) {
|
||||
object = {type: 'placeholder'};
|
||||
object = [[object]];
|
||||
} else {
|
||||
var length = commands.length;
|
||||
if (length === 0) {
|
||||
object = {type: 'no_commands'};
|
||||
object = [[object]];
|
||||
return object;
|
||||
}
|
||||
if (result) {
|
||||
return [commands.map(function(a0) {
|
||||
return {type: 'command', command: a0};
|
||||
})];
|
||||
}
|
||||
object = [];
|
||||
length = frecencyItems.length;
|
||||
if (length > 0) {
|
||||
object.push(frecencyItems);
|
||||
}
|
||||
length = appItems.length;
|
||||
if (length > 0) {
|
||||
object.push(appItems);
|
||||
}
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
function _fun116501() { // fn#116501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:2368, offset: 0x0248bc7c, size: 28 bytes, params: 1, frame: 11
|
||||
return env0_17.map(function(a0) {
|
||||
return a0.length;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun116503(a0) { // fn#116503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:2481, offset: 0x0248bc98, size: 269 bytes, params: 2, frame: 17
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
if (loading) {
|
||||
return null;
|
||||
}
|
||||
if (commands.length === 0) {
|
||||
return null;
|
||||
}
|
||||
if (result) {
|
||||
return null;
|
||||
}
|
||||
const r4 = a0 !== 0 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE) : frecencyItems.length > 0 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.V0w2ap) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
variant={env0_19}
|
||||
color="text-default"
|
||||
style={styles.sectionHeader}
|
||||
>
|
||||
{r4}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun116504(a0, a1) { // fn#116504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:2773, offset: 0x0248bda5, size: 405 bytes, params: 3, frame: 22
|
||||
var environment;
|
||||
var ContextMenuCommandAppItem;
|
||||
var object2;
|
||||
var section;
|
||||
var value4;
|
||||
var ContextMenuCommandItem;
|
||||
var command;
|
||||
var sectionsBinding;
|
||||
const property = env0_17[a0][a1];
|
||||
const value2 = a1 === 0;
|
||||
const value3 = a1 === env0_17[a0].length - 1;
|
||||
const type = property.type;
|
||||
if (type === 'placeholder') {
|
||||
value = environment.__proto__;
|
||||
const ContextMenuCommandLoadingItem = (require(15229) /* metro dependency 15229: ContextMenuCommandItem */).ContextMenuCommandLoadingItem;
|
||||
return (
|
||||
<ContextMenuCommandLoadingItem
|
||||
start={value2}
|
||||
end={value3}
|
||||
key="placeholder"
|
||||
/>
|
||||
);
|
||||
}
|
||||
if (type === 'no_commands') {
|
||||
value = environment.__proto__;
|
||||
const ContextMenuCommandEmptyItem = (require(15229) /* metro dependency 15229: ContextMenuCommandItem */).ContextMenuCommandEmptyItem;
|
||||
return (
|
||||
<ContextMenuCommandEmptyItem
|
||||
start={value2}
|
||||
end={value3}
|
||||
key="no_commands"
|
||||
/>
|
||||
);
|
||||
}
|
||||
if (type === 'command') {
|
||||
value4 = environment.__proto__;
|
||||
ContextMenuCommandItem = importDefault(15229) /* metro dependency 15229: ContextMenuCommandItem */;
|
||||
object2 = {};
|
||||
command = property.command;
|
||||
object2.item = command;
|
||||
object2.onPress = onPress_116505;
|
||||
sectionsBinding = sections;
|
||||
command = property.command;
|
||||
object2.section = sectionsBinding[command.applicationId];
|
||||
object2.start = value2;
|
||||
object2.end = value3;
|
||||
command = property.command;
|
||||
return <ContextMenuCommandItem {...object2} key={command.id} />;
|
||||
}
|
||||
if (type === 'app') {
|
||||
value = environment.__proto__;
|
||||
ContextMenuCommandAppItem = (require(15229) /* metro dependency 15229: ContextMenuCommandItem */).ContextMenuCommandAppItem;
|
||||
object2 = {};
|
||||
section = property.section;
|
||||
object2.section = section;
|
||||
object2.onPress = onPress_116506;
|
||||
object2.start = value2;
|
||||
object2.end = value3;
|
||||
section = property.section;
|
||||
return <ContextMenuCommandAppItem {...object2} key={section.id} />;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun116507() { // fn#116507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:3321, offset: 0x0248bf74, size: 84 bytes, params: 1, frame: 4
|
||||
var r0;
|
||||
var binding;
|
||||
var sectionHeader;
|
||||
var value3;
|
||||
const loadingBinding = loading;
|
||||
const value2 = 0;
|
||||
if (loadingBinding) {
|
||||
r0 = value2;
|
||||
} else if (value2 === commands.length) {
|
||||
r0 = value2;
|
||||
} else if (result) {
|
||||
r0 = value2;
|
||||
} else {
|
||||
binding = env0_20;
|
||||
sectionHeader = styles.sectionHeader;
|
||||
value3 = binding + sectionHeader.paddingTop;
|
||||
sectionHeader = styles.sectionHeader;
|
||||
r0 = value3 + sectionHeader.paddingBottom;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun116488() { // fn#116488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:889, offset: 0x0248b95e, size: 42 bytes, params: 1, frame: 11
|
||||
if (!(env1_6.current || onClose == null)) {
|
||||
onClose();
|
||||
}
|
||||
}
|
||||
|
||||
function onPress_116505() { // fn#116505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:3086, offset: 0x0248bf3a, size: 29 bytes, params: 1, frame: 11
|
||||
return env1_13(env0_0.command);
|
||||
}
|
||||
|
||||
function onPress_116506() { // fn#116506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:3248, offset: 0x0248bf57, size: 29 bytes, params: 1, frame: 11
|
||||
return env1_14(env0_0.section);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,17 @@
|
||||
/* Metro module 9900; source: modules/application_commands/native/showExecutedApplicationCommandPopout.tsx; dependencies: [4080, 9901, 1962, 2] */
|
||||
function _fun77584(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10086:6, offset: 0x01e02018, size: 103 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/showExecutedApplicationCommandPopout.tsx');
|
||||
exports.default = showExecutedApplicationCommandPopout;
|
||||
}
|
||||
|
||||
function showExecutedApplicationCommandPopout(a0) { // fn#77585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10086:212, offset: 0x01e0207f, size: 105 bytes, params: 2, frame: 18
|
||||
const defaultImport = importDefault(dependencyMap[0]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
let value = require(dependencyMap[2]);
|
||||
value = value(dependencyMap[1], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'ExecutedCommandPopout:' + a0.messageId, a0]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user