Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,388 @@
|
||||
/* Metro module 15186; source: stores/ChannelSettingsPermissionsStore.tsx; dependencies: [6, 7, 15, 17, 18, 8149, 1379, 661, 8120, 587, 3789, 22, 566, 694, 2] */
|
||||
function _fun116039(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15383:6, offset: 0x0247931a, size: 647 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_116045 = 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 = CHANNEL_SETTINGS_PERMISSIONS_INIT;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_5 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_6 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_7 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_8 = importDefault(18) /* metro dependency 18 */;
|
||||
const channelSettingsStore = importDefault(8149) /* metro dependency 8149: ChannelSettingsStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_11 = constantsModule.ChannelSettingsSections;
|
||||
const FormStates = constantsModule.FormStates;
|
||||
const ADVANCED_MODE_ON_KEY = (require(8120) /* metro dependency 8120: ChannelPermissionsConstants */).ADVANCED_MODE_ON_KEY;
|
||||
const Set = global.Set;
|
||||
let set = new Set();
|
||||
let env0_17 = FormStates.CLOSED;
|
||||
set = false;
|
||||
let Storage = (require(587) /* metro dependency 587: Storage */).Storage;
|
||||
let env0_25 = Storage.get(ADVANCED_MODE_ON_KEY) || set;
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
_fun116050(Store).displayName = 'ChannelSettingsPermissionsStore';
|
||||
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */,
|
||||
{CHANNEL_SETTINGS_SET_SECTION: CHANNEL_SETTINGS_SET_SECTION_116065, CHANNEL_SETTINGS_PERMISSIONS_INIT: closure,
|
||||
CHANNEL_SETTINGS_PERMISSIONS_UPDATE_PERMISSION: CHANNEL_SETTINGS_PERMISSIONS_UPDATE_PERMISSION,
|
||||
CHANNEL_SETTINGS_PERMISSIONS_SELECT_PERMISSION: CHANNEL_SETTINGS_PERMISSIONS_SELECT_PERMISSION,
|
||||
CHANNEL_SETTINGS_INIT: function() {
|
||||
if (ChannelSettingsStore.getSection() === ChannelSettingsSections.PERMISSIONS) {
|
||||
CHANNEL_SETTINGS_PERMISSIONS_INIT();
|
||||
}
|
||||
}, CHANNEL_SETTINGS_CLOSE: CHANNEL_SETTINGS_CLOSE_116069, CHANNEL_UPDATES: CHANNEL_UPDATES_116070,
|
||||
CHANNEL_SETTINGS_PERMISSIONS_SUBMITTING: function() {
|
||||
env0_17 = FormStates.SUBMITTING;
|
||||
}, CHANNEL_SETTINGS_PERMISSIONS_SAVE_SUCCESS: function({silent}) {
|
||||
if (silent) {
|
||||
env0_17 = FormStates.OPEN;
|
||||
} else {
|
||||
env0_17 = FormStates.CLOSED;
|
||||
CHANNEL_SETTINGS_PERMISSIONS_INIT();
|
||||
}
|
||||
}, CHANNEL_SETTINGS_PERMISSIONS_SET_ADVANCED_MODE: function({advancedMode}) {
|
||||
env0_25 = advancedMode;
|
||||
var Storage = require(dependencyMap[9]).Storage;
|
||||
Storage.set(ADVANCED_MODE_ON_KEY, advancedMode);
|
||||
}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/ChannelSettingsPermissionsStore.tsx');
|
||||
exports.default = set;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_116040() { // fn#116040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15383:256, offset: 0x024795a1, 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_116040_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_116043(a0, a1) { // fn#116043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15383:449, offset: 0x02479603, 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 _fun116044;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_116045(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_116045(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_116045(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun116044;
|
||||
}
|
||||
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 getPermissionOverwrites(a0) { // fn#116046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15383:1465, offset: 0x02479777, size: 90 bytes, params: 2, frame: 14
|
||||
var moduleValue;
|
||||
const guildId = a0.getGuildId();
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a0.permissionOverwrites, undefined);
|
||||
if (guildId != null && object2[guildId] == null) {
|
||||
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
|
||||
object2[guildId] = moduleValue.makeEveryoneOverwrite(guildId);
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
|
||||
function CHANNEL_SETTINGS_PERMISSIONS_INIT() { // fn#116047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15383:1624, offset: 0x024797d1, size: 204 bytes, params: 1, frame: 16
|
||||
env0_21 = ChannelSettingsStore.getChannel();
|
||||
env0_22 = ChannelSettingsStore.getCategory();
|
||||
if (env0_21 == null) {
|
||||
return false;
|
||||
}
|
||||
const value2 = env0_21.getGuildId();
|
||||
if (getPermissionOverwrites(env0_21)[env0_23] != null) {
|
||||
}
|
||||
result = env0_22 != null;
|
||||
const permissionUtilsModule = importAll(3789) /* metro dependency 3789: PermissionUtils */;
|
||||
env0_14 = permissionUtilsModule.areChannelsLocked(env0_21, env0_22);
|
||||
env0_17 = FormStates.CLOSED;
|
||||
env0_16.clear();
|
||||
}
|
||||
|
||||
function syncChannelUpdates(a0) { // fn#116048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15383:1843, offset: 0x0247989d, size: 367 bytes, params: 2, frame: 17
|
||||
var r7;
|
||||
var moduleValue;
|
||||
if (env0_21 == null) {
|
||||
return false;
|
||||
}
|
||||
if (env0_21.id !== a0) {
|
||||
return false;
|
||||
}
|
||||
const channel = ChannelStore.getChannel(a0);
|
||||
env0_21 = channel;
|
||||
if (channel == null) {
|
||||
return false;
|
||||
}
|
||||
env0_22 = ChannelSettingsStore.getCategory();
|
||||
let binding = env0_21;
|
||||
const guildId = binding.getGuildId();
|
||||
if (guildId == null) {
|
||||
return false;
|
||||
}
|
||||
env0_20 = getPermissionOverwrites(env0_21);
|
||||
const object3 = {};
|
||||
binding = env0_16;
|
||||
binding.forEach(_fun116049);
|
||||
if (object3[guildId] == null && env0_21.permissionOverwrites[guildId] == null) {
|
||||
moduleValue = importAll(dependencyMap[10]);
|
||||
object3[guildId] = moduleValue.makeEveryoneOverwrite(guildId);
|
||||
r7 = dependencyMap;
|
||||
} else {
|
||||
r7 = binding;
|
||||
}
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, env0_21.permissionOverwrites, r7);
|
||||
copyDataProperties(object4, object3, r7);
|
||||
if (object4[env0_23] != null) {
|
||||
if (env0_24 != null && object4[env0_24] != null) {
|
||||
}
|
||||
}
|
||||
const moduleValue2 = importAll(dependencyMap[10]);
|
||||
env0_14 = moduleValue2.areChannelsLocked(env0_21, env0_22);
|
||||
return true;
|
||||
}
|
||||
|
||||
function _fun116050(a0) { // fn#116050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15383:2300, offset: 0x02479a33, size: 380 bytes, params: 2, frame: 16
|
||||
const closure = ChannelSettingsPermissionsStore;
|
||||
env0_8(closure, a0);
|
||||
return env0_5(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(ChannelSettingsStore, ChannelStore);
|
||||
}}, {key: 'hasChanges', value: value_116053}, {key: 'showNotice', value: function() {
|
||||
return this.hasChanges();
|
||||
}}, {key: 'getPermissionOverwrite', value: value_116055}, {key: 'editedPermissionIds', get: get_116056},
|
||||
{key: 'permissionOverwrites', get: get_116057}, {key: 'selectedOverwriteId', get: get_116058},
|
||||
{key: 'formState', get: function() {
|
||||
return CLOSED;
|
||||
}}, {key: 'isLockable', get: get_116060}, {key: 'locked', get: get_116061}, {key: 'channel', get: get_116062},
|
||||
{key: 'category', get: get_116063}, {key: 'advancedMode', get: get_116064}]);
|
||||
}
|
||||
|
||||
function CHANNEL_SETTINGS_SET_SECTION_116065({section}) { // fn#116065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15383:3457, offset: 0x02479c3b, size: 52 bytes, params: 2, frame: 11
|
||||
if (env0_21 != null) {
|
||||
return false;
|
||||
}
|
||||
const PERMISSIONS = ChannelSettingsSections.PERMISSIONS;
|
||||
if (section !== PERMISSIONS) {
|
||||
return false;
|
||||
}
|
||||
CHANNEL_SETTINGS_PERMISSIONS_INIT();
|
||||
}
|
||||
|
||||
function CHANNEL_SETTINGS_PERMISSIONS_UPDATE_PERMISSION({id, allow, deny}) { // fn#116066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15383:3629, offset: 0x02479c6f, size: 235 bytes, params: 2, frame: 18
|
||||
const binding = env0_19;
|
||||
const value2 = binding == null;
|
||||
const r1 = value2 ? undefined : binding[id];
|
||||
if (r1 == null) {
|
||||
return false;
|
||||
}
|
||||
if (env0_21 == null) {
|
||||
return false;
|
||||
}
|
||||
const object3 = {};
|
||||
copyDataProperties(object3, r1, value2);
|
||||
object3['allow'] = allow;
|
||||
object3['deny'] = deny;
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, env0_19, value2);
|
||||
object4[id] = object3;
|
||||
env0_19 = object4;
|
||||
env0_16.add(id);
|
||||
env0_17 = FormStates.OPEN;
|
||||
const defaultImport = importDefault(22) /* metro dependency 22 */;
|
||||
result = !defaultImport.isEqual(env0_19, env0_20);
|
||||
const permissionUtilsModule = importAll(3789) /* metro dependency 3789: PermissionUtils */;
|
||||
env0_14 = permissionUtilsModule.areChannelsLocked(env0_21, env0_22);
|
||||
}
|
||||
|
||||
function CHANNEL_SETTINGS_PERMISSIONS_SELECT_PERMISSION({id}) { // fn#116067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15383:3910, offset: 0x02479d5a, size: 59 bytes, params: 2, frame: 4
|
||||
if (env0_19 == null) {
|
||||
if (env0_21 == null) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (env0_19[id] != null) {
|
||||
return undefined;
|
||||
}
|
||||
if (env0_21 == null) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function CHANNEL_SETTINGS_CLOSE_116069() { // fn#116069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15383:4115, offset: 0x02479dc2, size: 67 bytes, params: 1, frame: 11
|
||||
env0_17 = FormStates.CLOSED;
|
||||
env0_16.clear();
|
||||
}
|
||||
|
||||
function CHANNEL_UPDATES_116070({channels}) { // fn#116070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15383:4223, offset: 0x02479e05, size: 103 bytes, params: 2, frame: 19
|
||||
var r2;
|
||||
var r3;
|
||||
var r0;
|
||||
var syncChannelUpdatesBinding;
|
||||
var value5;
|
||||
var id;
|
||||
var value6;
|
||||
var value7;
|
||||
if (env0_21 == null) {
|
||||
return false;
|
||||
}
|
||||
const value2 = _createForOfIteratorHelperLoose_116043(channels);
|
||||
const value3 = value2();
|
||||
let done = value3.done;
|
||||
if (done) {
|
||||
r0 = false;
|
||||
} else {
|
||||
r2 = false;
|
||||
r3 = value3;
|
||||
while (true) {
|
||||
syncChannelUpdatesBinding = syncChannelUpdates;
|
||||
value5 = r3.value;
|
||||
id = value5.id;
|
||||
if (syncChannelUpdatesBinding(id) !== false) {
|
||||
value6 = true;
|
||||
r2 = value6;
|
||||
}
|
||||
value7 = value2();
|
||||
done = value7.done;
|
||||
if (done) {
|
||||
r0 = r2;
|
||||
break;
|
||||
}
|
||||
r3 = value7;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun116049(a0) { // fn#116049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15383:2057, offset: 0x02479a0c, size: 39 bytes, params: 2, frame: 4
|
||||
if (env1_19 != null) {
|
||||
env0_0[a0] = env1_19[a0];
|
||||
}
|
||||
}
|
||||
|
||||
function ChannelSettingsPermissionsStore() { // fn#116051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15383:2312, offset: 0x02479baf, size: 113 bytes, params: 1, frame: 20
|
||||
const value = environment.__proto__;
|
||||
env1_4(this, ChannelSettingsPermissionsStore);
|
||||
const value3 = env1_7(ChannelSettingsPermissionsStore);
|
||||
return env1_6(this, _isNativeReflectConstruct_116040() ? global.Reflect.construct(value3, arguments,
|
||||
env1_7(this).constructor) : value3.apply(this, arguments));
|
||||
}
|
||||
|
||||
function value_116055(a0) { // fn#116055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15383:2860, offset: 0x02479c20, size: 27 bytes, params: 2, frame: 3
|
||||
const value = environment.__proto__;
|
||||
return env1_19?.[a0];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user