Files
2026-07-28 01:06:53 +03:00

138 lines
6.7 KiB
TypeScript

/* Metro module 5088; source: modules/spoiler_channels/ChannelSpoilerAgreeStore.tsx; dependencies: [6, 7, 15, 17, 18, 1226, 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 AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun44178(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5266:6, offset: 0x01169d12, size: 308 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object = {users: {}};
const DeviceSettingsStore = (Flux).DeviceSettingsStore;
let value = _fun44182(DeviceSettingsStore);
value.displayName = 'ChannelSpoilerAgreeStore';
value.persistKey = 'ChannelSpoilerAgreeStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{CHANNEL_SPOILER_AGREE: CHANNEL_SPOILER_AGREE, CHANNEL_SPOILER_AGREE_CLEAR: CHANNEL_SPOILER_AGREE_CLEAR});
(FileImportTrackerModule).fileFinishedImporting('modules/spoiler_channels/ChannelSpoilerAgreeStore.tsx');
exports.default = value;
function _isNativeReflectConstruct_44179() { // fn#44179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5266:158, offset: 0x01169e46, 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_44179_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun44182(a0) { // fn#44182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5266:374, offset: 0x01169ea4, size: 137 bytes, params: 2, frame: 16
const ChannelSpoilerAgreeStore2 = ChannelSpoilerAgreeStore;
Inherits(ChannelSpoilerAgreeStore2, a0);
return CreateClass(ChannelSpoilerAgreeStore2, [{key: 'initialize', value: function(a0) {
this.waitFor(AuthenticationStore);
env1_6 = a0 == null ? {users: {}} : a0.users != null ? {users: a0.users} : {users: {}};
}}, {key: 'didAgree', value: value_44185}, {key: 'getState', value: value_44186}, {key: 'getUserAgnosticState',
value: value_44187}]);
function ChannelSpoilerAgreeStore() { // fn#44183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5266:386, offset: 0x00e3db8d, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, ChannelSpoilerAgreeStore);
const value3 = env1_3(ChannelSpoilerAgreeStore);
return env1_2(this, _isNativeReflectConstruct_44179() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_44185(a0) { // fn#44185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5266:828, offset: 0x01169f78, size: 80 bytes, params: 2, frame: 13
var r1;
var r0;
var property;
if (a0 == null) {
return false;
}
const value = environment.__proto__;
const id = AuthenticationStore.getId();
const value3 = id != null;
if (value3) {
property = env1_6.users[id];
r1 = property == null ? undefined : property.channels[a0];
r1 = !!r1 && r1;
r0 = r1;
} else {
r0 = value3;
}
return r0;
}
function value_44186() { // fn#44186, offset: 0x00c82288, size: 9 bytes, params: 1, frame: 1
return env1_6;
}
function value_44187() { // fn#44187, offset: 0x00c82288, size: 9 bytes, params: 1, frame: 1
return env1_6;
}
}
function CHANNEL_SPOILER_AGREE({channelId}) { // fn#44188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5266:1206, offset: 0x01169fc8, size: 106 bytes, params: 2, frame: 13
const id = AuthenticationStore.getId();
if (id == null) {
return false;
}
let users = env0_6.users;
if (users[id] == null) {
env0_6.users[id] = {channels: {}};
}
users = env0_6.users;
users[id].channels[channelId] = true;
}
function CHANNEL_SPOILER_AGREE_CLEAR({channelId}) { // fn#44189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5266:1392, offset: 0x0116a032, size: 86 bytes, params: 2, frame: 13
var r1;
var r0;
var value4;
const id = AuthenticationStore.getId();
const value3 = id != null;
if (value3) {
value4 = env0_6.users[id] != null;
if (value4) {
delete env0_6.users[id].channels[channelId];
r1 = undefined;
} else {
r1 = value4;
}
r0 = r1;
} else {
r0 = value3;
}
return r0;
}
}
global.__d(_fun44178, 5088, [6, 7, 15, 17, 18, 1226, 566, 694,
2]) /* metro module 5088, dependencies: [6, 7, 15, 17, 18, 1226, 566, 694, 2] */;