142 lines
6.9 KiB
TypeScript
142 lines
6.9 KiB
TypeScript
/* Metro module 10297; source: modules/guild_settings/GuildSettingsModalMembersStore.tsx; dependencies: [6, 7, 15, 17, 18, 1945, 661, 566, 694, 2] */
|
|
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import GuildMemberStore from '../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
|
|
function _fun79898(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10483:6, offset: 0x01e66767, size: 413 bytes, params: 8, frame: 21
|
|
const closure = function() {
|
|
env0_7 = null;
|
|
env0_8 = false;
|
|
env0_9 = null;
|
|
env0_10 = null;
|
|
env0_11 = null;
|
|
};
|
|
const closure2 = function() {
|
|
env0_9 = null;
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const Store = (Flux).Store;
|
|
let value = _fun79904(Store);
|
|
value.displayName = 'GuildSettingsModalMembersStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
|
{GUILD_SETTINGS_MODAL_MEMBERS_START_EDITING: function({guildId, userId}) {
|
|
var value2 = GuildMemberStore.getMember(guildId, userId);
|
|
if (value2 == null) {
|
|
return false;
|
|
}
|
|
env0_7 = FormStates.OPEN;
|
|
env0_8 = true;
|
|
env0_10 = userId;
|
|
env0_11 = value2.roles;
|
|
}, GUILD_SETTINGS_MODAL_MEMBERS_STOP_EDITING: closure, GUILD_SETTINGS_MODAL_MEMBERS_ROLES_SAVE_COMPLETE: closure,
|
|
GUILD_SETTINGS_MODAL_MEMBERS_TOGGLE_ROLE: GUILD_SETTINGS_MODAL_MEMBERS_TOGGLE_ROLE,
|
|
GUILD_SETTINGS_MODAL_MEMBERS_ROLES_SAVE: function() {
|
|
env0_7 = FormStates.SUBMITTING;
|
|
}, GUILD_SETTINGS_MODAL_MEMBERS_START_EDITING_NICKNAME: closure2,
|
|
GUILD_SETTINGS_MODAL_MEMBERS_CHANGE_NICKNAME_SUCCESS: closure2,
|
|
GUILD_SETTINGS_MODAL_MEMBERS_CHANGE_NICKNAME_FAILURE: function(a0) {
|
|
env0_9 = a0.error;
|
|
}});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/GuildSettingsModalMembersStore.tsx');
|
|
exports.default = value;
|
|
function _isNativeReflectConstruct_79899() { // fn#79899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10483:179, offset: 0x01e66904, size: 98 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_79899_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun79904(a0) { // fn#79904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10483:528, offset: 0x01e66985, size: 199 bytes, params: 2, frame: 16
|
|
const GuildSettingsModalMembersStore2 = GuildSettingsModalMembersStore;
|
|
Inherits(GuildSettingsModalMembersStore2, a0);
|
|
return CreateClass(GuildSettingsModalMembersStore2, [{key: 'initialize', value: function() {
|
|
this.waitFor(GuildMemberStore);
|
|
}}, {key: 'isSubmitting', get: get_79907}, {key: 'isEditing', get: get_79908}, {key: 'roles', get: get_79909},
|
|
{key: 'memberId', get: get_79910}, {key: 'nicknameError', get: get_79911}]);
|
|
function GuildSettingsModalMembersStore() { // fn#79905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10483:540, offset: 0x0118e5fe, size: 113 bytes, params: 1, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_0(this, GuildSettingsModalMembersStore);
|
|
const value3 = env1_3(GuildSettingsModalMembersStore);
|
|
return env1_2(this, _isNativeReflectConstruct_79899() ? global.Reflect.construct(value3, arguments,
|
|
env1_3(this).constructor) : value3.apply(this, arguments));
|
|
}
|
|
|
|
function get_79907() { // fn#79907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10483:961, offset: 0x013a86ca, size: 23 bytes, params: 1, frame: 2
|
|
const binding = env1_7;
|
|
const SUBMITTING = FormStates.SUBMITTING;
|
|
return binding === SUBMITTING;
|
|
}
|
|
|
|
function get_79908() { // fn#79908, offset: 0x00fbd9d4, size: 9 bytes, params: 1, frame: 1
|
|
return env1_8;
|
|
}
|
|
|
|
function get_79909() { // fn#79909, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
|
|
return env1_11;
|
|
}
|
|
|
|
function get_79910() { // fn#79910, offset: 0x00fbd9ec, size: 9 bytes, params: 1, frame: 1
|
|
return env1_10;
|
|
}
|
|
|
|
function get_79911() { // fn#79911, offset: 0x00e07a77, size: 9 bytes, params: 1, frame: 1
|
|
return env1_9;
|
|
}
|
|
|
|
}
|
|
|
|
function GUILD_SETTINGS_MODAL_MEMBERS_TOGGLE_ROLE({roleId, state}) { // fn#79913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10483:1603, offset: 0x01e66a9c, size: 102 bytes, params: 2, frame: 16
|
|
var value2;
|
|
var items2;
|
|
var value3;
|
|
if (env0_11 == null) {
|
|
return false;
|
|
}
|
|
const binding = env0_11;
|
|
if (state) {
|
|
items2 = [];
|
|
value3 = arraySpread(items2, binding, 0, binding);
|
|
items2[value3] = roleId;
|
|
value3 + 1;
|
|
} else {
|
|
value2 = binding.filter(function(a0) {
|
|
return a0 !== roleId;
|
|
});
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun79898, 10297, [6, 7, 15, 17, 18, 1945, 661, 566, 694,
|
|
2]) /* metro module 10297, dependencies: [6, 7, 15, 17, 18, 1945, 661, 566, 694, 2] */;
|