This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

+363 -326
View File
@@ -1,4 +1,23 @@
/* Metro module 12590; source: stores/ActivityTrackingStore.tsx; dependencies: [6, 7, 15, 17, 18, 4266, 1348, 1226, 4267, 4270, 4294, 1934, 661, 672, 587, 4278, 11328, 4041, 4482, 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 './AuthenticationStore.tsx'; /* Metro dependency 1226 */
import UserSettingsProtoStore from '../modules/user_settings/UserSettingsProtoStore.tsx'; /* Metro dependency 1348 */
import SelectedChannelStore from './SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import RunningGameStoreNative from '../modules/game_detection/RunningGameStore.native.tsx'; /* Metro dependency 4266 */
import DetectableGameStore from './DetectableGameStore.tsx'; /* Metro dependency 4267 */
import LibraryApplicationStore from './LibraryApplicationStore.tsx'; /* Metro dependency 4270 */
import RTCConnectionStore from './RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import ActivitiesActionCreators from '../actions/ActivitiesActionCreators.tsx'; /* Metro dependency 11328 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as StorageModule from '../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as LibraryApplicationUtilsModule from '../utils/LibraryApplicationUtils.tsx'; /* Metro dependency 4278 */
function _fun96464(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:6, offset: 0x0215ecdf, size: 654 bytes, params: 8, frame: 22
const env0_0 = require;
const _arrayLikeToArray_96470 = function(a0, a1) {
@@ -44,382 +63,400 @@ function _fun96464(global, require, importDefault, importAll, module, exports, d
}
return value;
};
const closure = LOGOUT_96475;
const LOGOUT_964752 = LOGOUT_96475;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const runningGameStoreNative = importDefault(4266) /* metro dependency 4266: RunningGameStoreNative */;
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const detectableGameStore = importDefault(4267) /* metro dependency 4267: DetectableGameStore */;
const libraryApplicationStore = importDefault(4270) /* metro dependency 4270: LibraryApplicationStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const env0_15 = (require(661) /* metro dependency 661: Constants */).Distributors;
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
let MINUTE = Millis.MINUTE;
const env0_17 = 30 * MINUTE;
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
MINUTE = Millis.MINUTE;
const env0_18 = 5 * MINUTE;
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
const Storage = (StorageModule).Storage;
const env0_19 = Storage.get('ActivityTrackingStore') ?? ({});
const env0_20 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun96476(Store).displayName = 'ActivityTrackingStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {RUNNING_GAMES_CHANGE: function() {
handleRunningGamesChange();
}, CONNECTION_OPEN: CONNECTION_OPEN_96481, CONNECTION_CLOSED: CONNECTION_CLOSED_96482, LOGOUT: closure,
}, CONNECTION_OPEN: CONNECTION_OPEN_96481, CONNECTION_CLOSED: CONNECTION_CLOSED_96482, LOGOUT: LOGOUT_964752,
ACTIVITY_UPDATE_SUCCESS: ACTIVITY_UPDATE_SUCCESS, ACTIVITY_UPDATE_FAIL: ACTIVITY_UPDATE_FAIL});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/ActivityTrackingStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/ActivityTrackingStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_96465() { // fn#96465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:253, offset: 0x0215ef6d, 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_96465_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_96468(a0, a1) { // fn#96468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:446, offset: 0x0215efcf, 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) {
function _isNativeReflectConstruct_96465() { // fn#96465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:253, offset: 0x0215ef6d, 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 _fun96469;
return (_isNativeReflectConstruct_96465_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_96470(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') {
function _createForOfIteratorHelperLoose_96468(a0, a1) { // fn#96468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:446, offset: 0x0215efcf, 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 _fun96469;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_96470(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_96470(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_96470(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun96469;
}
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 _fun96469() { // fn#96469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:1017, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
return _fun96469;
}
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 stopActivity(a0) { // fn#96471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:1493, offset: 0x0215f143, size: 137 bytes, params: 2, frame: 14
const value = a1;
if (!(value !== undefined) || value) {
updateActivity_96472(a0, true);
}
const property = env0_20[a0.applicationId];
if (property != null) {
property.stop();
delete env0_20[a0.applicationId];
}
delete env0_19[a0.applicationId];
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
Storage.set(env0_16, env0_19);
}
function updateActivity_96472(a0) { // fn#96472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:1671, offset: 0x0215f1cc, size: 483 bytes, params: 2, frame: 27
var interval;
var start;
var Storage;
var set;
let value = a1;
const env0_0 = a0;
const r2 = value !== undefined ? value : false;
const Date = global.Date;
value = Date.now();
const updatedAt = a0.updatedAt;
const value2 = 0;
let r16 = updatedAt != null ? value - a0.updatedAt : value2;
let binding = env0_17;
r16 = r16 > binding + env0_18 ? value2 : r16;
const libraryApplicationUtilsModule = require(4278) /* metro dependency 4278: LibraryApplicationUtils */;
const shouldShareApplicationActivity = libraryApplicationUtilsModule.shouldShareApplicationActivity;
let applicationId = a0.applicationId;
const shouldShareApplicationActivity2 = Reflect.apply(shouldShareApplicationActivity, libraryApplicationUtilsModule,
[applicationId, LibraryApplicationStore]);
const voiceChannelId = SelectedChannelStore.getVoiceChannelId();
const sessionId = AuthenticationStore.getSessionId();
const mediaSessionId = RTCConnectionStore.getMediaSessionId();
const defaultImport = importDefault(11328) /* metro dependency 11328: ActivitiesActionCreators */;
const updateActivity = defaultImport.updateActivity;
const object2 = {};
object2.applicationId = a0.applicationId;
object2.distributor = a0.isDiscordApplication ? Distributors.DISCORD : a0.distributor;
object2.shareActivity = shouldShareApplicationActivity2;
object2.token = a0.token;
const Math = global.Math;
object2.duration = Math.floor(r16 / 1000);
object2.closed = r2;
object2.exePath = a0.exePath;
object2.voiceChannelId = voiceChannelId;
object2.sessionId = sessionId;
object2.mediaSessionId = mediaSessionId;
Reflect.apply(updateActivity, defaultImport, [object2]);
a0.updatedAt = value;
binding = env0_20;
applicationId = a0.applicationId;
if (binding[applicationId] == null) {
function stopActivity(a0) { // fn#96471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:1493, offset: 0x0215f143, size: 137 bytes, params: 2, frame: 14
const value = a1;
if (!(value !== undefined) || value) {
updateActivity_96472(a0, true);
}
const property = env0_20[a0.applicationId];
if (property != null) {
property.stop();
delete env0_20[a0.applicationId];
}
delete env0_19[a0.applicationId];
const Storage = (StorageModule).Storage;
Storage.set(env0_16, env0_19);
}
function updateActivity_96472(a0) { // fn#96472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:1671, offset: 0x0215f1cc, size: 483 bytes, params: 2, frame: 27
var interval;
var start;
var Storage;
var set;
let value = a1;
const env0_0 = a0;
const r2 = value !== undefined ? value : false;
const Date = global.Date;
value = Date.now();
const updatedAt = a0.updatedAt;
const value2 = 0;
let r16 = updatedAt != null ? value - a0.updatedAt : value2;
let binding = env0_17;
r16 = r16 > binding + env0_18 ? value2 : r16;
const shouldShareApplicationActivity = LibraryApplicationUtilsModule.shouldShareApplicationActivity;
let applicationId = a0.applicationId;
const shouldShareApplicationActivity2 = Reflect.apply(shouldShareApplicationActivity, LibraryApplicationUtilsModule,
[applicationId, LibraryApplicationStore]);
const voiceChannelId = SelectedChannelStore.getVoiceChannelId();
const sessionId = AuthenticationStore.getSessionId();
const mediaSessionId = RTCConnectionStore.getMediaSessionId();
const defaultImport = ActivitiesActionCreators;
const updateActivity = defaultImport.updateActivity;
const object = {};
object.applicationId = a0.applicationId;
object.distributor = a0.isDiscordApplication ? Distributors.DISCORD : a0.distributor;
object.shareActivity = shouldShareApplicationActivity2;
object.token = a0.token;
const Math = global.Math;
object.duration = Math.floor(r16 / 1000);
object.closed = r2;
object.exePath = a0.exePath;
object.voiceChannelId = voiceChannelId;
object.sessionId = sessionId;
object.mediaSessionId = mediaSessionId;
Reflect.apply(updateActivity, defaultImport, [object]);
a0.updatedAt = value;
binding = env0_20;
applicationId = a0.applicationId;
interval = new (require(4041) /* metro dependency 4041: Timers */).Interval();
binding[applicationId] = interval;
start = interval.start;
binding = env0_17;
Reflect.apply(start, interval, [binding, _fun96473]);
}
if (!r2) {
binding = env0_19;
binding[a0.applicationId] = a0;
Storage = (require(587) /* metro dependency 587: Storage */).Storage;
set = Storage.set;
binding = env0_16;
Reflect.apply(set, Storage, [binding, env0_19]);
}
}
if (binding[applicationId] == null) {
binding = env0_20;
applicationId = a0.applicationId;
interval = new (require(4041) /* metro dependency 4041: Timers */).Interval();
binding[applicationId] = interval;
start = interval.start;
binding = env0_17;
Reflect.apply(start, interval, [binding, _fun96473]);
}
if (!r2) {
binding = env0_19;
binding[a0.applicationId] = a0;
Storage = (require(587) /* metro dependency 587: Storage */).Storage;
set = Storage.set;
binding = env0_16;
Reflect.apply(set, Storage, [binding, env0_19]);
}
function _fun96473() { // fn#96473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:2252, offset: 0x011c734f, size: 23 bytes, params: 1, frame: 11
updateActivity_96472(env0_0);
}
function handleRunningGamesChange() { // fn#96474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:2329, offset: 0x0215f3af, size: 368 bytes, params: 1, frame: 28
var r7;
var r15;
var r2;
var value8;
var game;
var add;
var id;
var updateActivity_96472Binding;
var object2;
var Date;
var distributor;
var moduleValue;
var removeExecutablePathPrefix;
var exePath;
var value9;
var property;
var has;
var value12;
const value = a0;
const r6 = !(value !== undefined) || value;
const visibleRunningGames = RunningGameStoreNative.getVisibleRunningGames();
const Set = global.Set;
const set = new Set();
const value5 = _createForOfIteratorHelperLoose_96468(visibleRunningGames);
const value6 = value5();
let done = value6.done;
if (!done) {
r7 = value6;
while (true) {
value8 = r7.value;
game = DetectableGameStore.findGame(value8);
if (game != null) {
add = set.add;
id = game.id;
Reflect.apply(add, set, [id]);
id = game.id;
if (id in env0_19) {
}
function handleRunningGamesChange() { // fn#96474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:2329, offset: 0x0215f3af, size: 368 bytes, params: 1, frame: 28
var r7;
var r15;
var r2;
var value8;
var game;
var add;
var id;
var updateActivity_96472Binding;
var object;
var Date;
var distributor;
var moduleValue;
var removeExecutablePathPrefix;
var exePath;
var value9;
var property;
var has;
var value12;
const value = a0;
const r6 = !(value !== undefined) || value;
const visibleRunningGames = RunningGameStoreNative.getVisibleRunningGames();
const Set = global.Set;
const set = new Set();
const value5 = _createForOfIteratorHelperLoose_96468(visibleRunningGames);
const value6 = value5();
let done = value6.done;
if (!done) {
r7 = value6;
while (true) {
value8 = r7.value;
game = DetectableGameStore.findGame(value8);
if (game != null) {
add = set.add;
id = game.id;
Reflect.apply(add, set, [id]);
id = game.id;
if (id in env0_19) {
break;
}
updateActivity_96472Binding = updateActivity_96472;
object = {};
id = game.id;
object.applicationId = id;
Date = global.Date;
object.updatedAt = Date.now();
distributor = value8.distributor;
object.distributor = distributor;
moduleValue = require(4482) /* metro dependency 4482: GameAnalyticsUtils */;
removeExecutablePathPrefix = moduleValue.removeExecutablePathPrefix;
exePath = value8.exePath;
if (exePath != null) {
r15 = exePath;
continue;
}
r15 = '';
continue;
object.exePath = Reflect.apply(removeExecutablePathPrefix, moduleValue, [r15]);
updateActivity_96472Binding(object);
break;
}
updateActivity_96472Binding = updateActivity_96472;
object2 = {};
id = game.id;
object2.applicationId = id;
Date = global.Date;
object2.updatedAt = Date.now();
distributor = value8.distributor;
object2.distributor = distributor;
moduleValue = require(4482) /* metro dependency 4482: GameAnalyticsUtils */;
removeExecutablePathPrefix = moduleValue.removeExecutablePathPrefix;
exePath = value8.exePath;
if (exePath != null) {
r15 = exePath;
value9 = value5();
done = value9.done;
if (done) {
break;
}
r7 = value9;
continue;
}
}
const Object = global.Object;
const value10 = Object.keys(env0_19);
let length = value10.length;
const value11 = 0;
if (value11 < length) {
r2 = value11;
while (true) {
property = value10[r2];
has = set.has;
if (!Reflect.apply(has, set, [property])) {
stopActivity(env0_19[property], r6);
}
value12 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = value10.length;
if (value12 < length) {
r2 = value12;
continue;
}
r15 = '';
continue;
object2.exePath = Reflect.apply(removeExecutablePathPrefix, moduleValue, [r15]);
updateActivity_96472Binding(object2);
break;
}
value9 = value5();
done = value9.done;
if (done) {
break;
}
r7 = value9;
continue;
}
}
const Object = global.Object;
const value10 = Object.keys(env0_19);
let length = value10.length;
const value11 = 0;
if (value11 < length) {
r2 = value11;
while (true) {
property = value10[r2];
has = set.has;
if (!Reflect.apply(has, set, [property])) {
stopActivity(env0_19[property], r6);
}
value12 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = value10.length;
if (value12 < length) {
r2 = value12;
continue;
}
break;
}
}
}
function LOGOUT_96475() { // fn#96475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:2780, offset: 0x0215f51f, size: 82 bytes, params: 1, frame: 15
var r3;
var property;
var value4;
const Object = global.Object;
const value2 = Object.keys(env0_19);
let length = value2.length;
const value3 = 0;
if (value3 < length) {
for (r3 = value3; true; r3 = value4) {
property = value2[r3];
stopActivity(env0_19[property]);
value4 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
length = value2.length;
if (!(value4 < length)) {
break;
}
}
}
}
function _fun96476(a0) { // fn#96476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:2890, offset: 0x0215f571, size: 97 bytes, params: 2, frame: 16
const closure = ActivityTrackingStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(AuthenticationStore, DetectableGameStore, LibraryApplicationStore, RTCConnectionStore,
RunningGameStoreNative, SelectedChannelStore, UserSettingsProtoStore);
this.syncWith([UserSettingsProtoStore], handleRunningGamesChange);
}}, {key: 'getActivities', value: value_96479}]);
}
function CONNECTION_OPEN_96481() { // fn#96481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:3506, offset: 0x0215f620, size: 104 bytes, params: 1, frame: 15
var r3;
var property;
var value4;
if (env0_21) {
return false;
}
const Object = global.Object;
const value2 = Object.keys(env0_19);
let length = value2.length;
const value3 = 0;
if (value3 < length) {
r3 = value3;
reducibleLoop2: while (true) {
property = value2[r3];
updateActivity_96472(env0_19[property]);
value4 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
length = value2.length;
if (value4 < length) {
r3 = value4;
continue reducibleLoop2;
function LOGOUT_96475() { // fn#96475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:2780, offset: 0x0215f51f, size: 82 bytes, params: 1, frame: 15
var r3;
var property;
var value4;
const Object = global.Object;
const value2 = Object.keys(env0_19);
let length = value2.length;
const value3 = 0;
if (value3 < length) {
for (r3 = value3; true; r3 = value4) {
property = value2[r3];
stopActivity(env0_19[property]);
value4 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
length = value2.length;
if (!(value4 < length)) {
break;
}
}
break reducibleLoop2;
}
}
handleRunningGamesChange(false);
}
function CONNECTION_CLOSED_96482({code}) { // fn#96482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:3682, offset: 0x0215f688, size: 35 bytes, params: 2, frame: 9
if (code === 4004) {
LOGOUT_96475();
function _fun96476(a0) { // fn#96476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:2890, offset: 0x0215f571, size: 97 bytes, params: 2, frame: 16
const ActivityTrackingStore2 = ActivityTrackingStore;
Inherits(ActivityTrackingStore2, a0);
return CreateClass(ActivityTrackingStore2, [{key: 'initialize', value: function() {
var authenticationStoreBinding = AuthenticationStore;
var detectableGameStoreBinding = DetectableGameStore;
var libraryApplicationStoreBinding = LibraryApplicationStore;
var rtcConnectionStoreBinding = RTCConnectionStore;
var runningGameStoreNativeBinding = RunningGameStoreNative;
var selectedChannelStoreBinding = SelectedChannelStore;
var userSettingsProtoStoreBinding = UserSettingsProtoStore;
this.waitFor(authenticationStoreBinding, detectableGameStoreBinding, libraryApplicationStoreBinding,
rtcConnectionStoreBinding, runningGameStoreNativeBinding, selectedChannelStoreBinding,
userSettingsProtoStoreBinding);
this.syncWith([userSettingsProtoStoreBinding], handleRunningGamesChange);
}}, {key: 'getActivities', value: value_96479}]);
function ActivityTrackingStore() { // fn#96477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:2902, offset: 0x00e3fd08, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, ActivityTrackingStore);
const value3 = env1_6(ActivityTrackingStore);
return env1_5(this, _isNativeReflectConstruct_96465() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_96479() { // fn#96479, offset: 0x00d406a2, size: 9 bytes, params: 1, frame: 1
return env1_19;
}
}
}
function ACTIVITY_UPDATE_SUCCESS({applicationId, token}) { // fn#96483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:3794, offset: 0x0215f6ab, size: 90 bytes, params: 2, frame: 14
const property = env0_19[applicationId];
if (property == null) {
return false;
function CONNECTION_OPEN_96481() { // fn#96481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:3506, offset: 0x0215f620, size: 104 bytes, params: 1, frame: 15
var r3;
var property;
var value4;
if (env0_21) {
return false;
}
const Object = global.Object;
const value2 = Object.keys(env0_19);
let length = value2.length;
const value3 = 0;
if (value3 < length) {
r3 = value3;
reducibleLoop2: while (true) {
property = value2[r3];
updateActivity_96472(env0_19[property]);
value4 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
length = value2.length;
if (value4 < length) {
r3 = value4;
continue reducibleLoop2;
}
break reducibleLoop2;
}
}
handleRunningGamesChange(false);
}
property.token = token;
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
Storage.set(env0_16, env0_19);
}
function ACTIVITY_UPDATE_FAIL({applicationId}) { // fn#96484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:3941, offset: 0x0215f705, size: 90 bytes, params: 2, frame: 14
const property = env0_19[applicationId];
if (property == null) {
return false;
function CONNECTION_CLOSED_96482({code}) { // fn#96482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:3682, offset: 0x0215f688, size: 35 bytes, params: 2, frame: 9
if (code === 4004) {
LOGOUT_96475();
}
}
property.token = null;
property.updatedAt = null;
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
Storage.set(env0_16, env0_19);
function ACTIVITY_UPDATE_SUCCESS({applicationId, token}) { // fn#96483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:3794, offset: 0x0215f6ab, size: 90 bytes, params: 2, frame: 14
const property = env0_19[applicationId];
if (property == null) {
return false;
}
property.token = token;
const Storage = (StorageModule).Storage;
Storage.set(env0_16, env0_19);
}
function ACTIVITY_UPDATE_FAIL({applicationId}) { // fn#96484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12780:3941, offset: 0x0215f705, size: 90 bytes, params: 2, frame: 14
const property = env0_19[applicationId];
if (property == null) {
return false;
}
property.token = null;
property.updatedAt = null;
const Storage = (StorageModule).Storage;
Storage.set(env0_16, env0_19);
}
}
global.__d(_fun96464, 12590, [6, 7, 15, 17, 18, 4266, 1348, 1226, 4267, 4270, 4294, 1934, 661, 672, 587, 4278,
11328, 4041, 4482, 566, 694,
2]) /* metro module 12590, dependencies: [6, 7, 15, 17, 18, 4266, 1348, 1226, 4267, 4270, 4294, 1934, 661, 672, 587, 4278, 11328, 4041, 4482, 566, 694, 2] */;
+29 -23
View File
@@ -1,15 +1,19 @@
/* Metro module 4874; source: stores/AnalyticsTrackingStore.tsx; dependencies: [1226, 661, 480, 694, 4875, 683, 681, 2] */
import AuthenticationStore from './AuthenticationStore.tsx'; /* Metro dependency 1226 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as AnalyticsUtilsModule from '../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as SessionHeartbeatSchedulerModule from '../modules/analytics_sessions/SessionHeartbeatScheduler.tsx'; /* Metro dependency 4875 */
function _fun42708(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5052:6, offset: 0x011405d4, size: 320 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const Endpoints = (require(661) /* metro dependency 661: Constants */).Endpoints;
const analyticsUtilsModule = require(480) /* metro dependency 480: AnalyticsUtils */;
const analyticsTrackingStoreMaker = analyticsUtilsModule.analyticsTrackingStoreMaker;
object2 = {dispatcher: importDefault(694) /* metro dependency 694: Dispatcher */};
object2.actionHandler = {CONNECTION_OPEN: function(a0) {
let value = AuthenticationStore;
const Endpoints = (ConstantsModule).Endpoints;
const analyticsTrackingStoreMaker = AnalyticsUtilsModule.analyticsTrackingStoreMaker;
object = {dispatcher: importDefault(694) /* metro dependency 694: Dispatcher */};
object.actionHandler = {CONNECTION_OPEN: function(a0) {
var AnalyticsActionHandlers = require(dependencyMap[2]).AnalyticsActionHandlers;
return AnalyticsActionHandlers.handleConnectionOpen(a0);
}, OVERLAY_INITIALIZE: function(a0) {
@@ -32,25 +36,27 @@ function _fun42708(global, require, importDefault, importAll, module, exports, d
return AnalyticsActionHandlers.handleSetAnalyticsToken(a0);
}};
const TRACK = Endpoints.TRACK;
object2.TRACKING_URL = TRACK;
object2.waitFor = [value];
object.TRACKING_URL = TRACK;
object.waitFor = [value];
const getFingerprint = value.getFingerprint;
object2.getFingerprint = getFingerprint;
object2.getSessionId = getSessionId;
object2.getLaunchSignature = function() {
object.getFingerprint = getFingerprint;
object.getSessionId = getSessionId;
object.getLaunchSignature = function() {
return require(dependencyMap[5]).launchSignature;
};
object2.scheduleWhenIdle = (require(681) /* metro dependency 681: requestSafeIdleCallback */).requestSafeIdleCallback;
value = Reflect.apply(analyticsTrackingStoreMaker, analyticsUtilsModule, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/AnalyticsTrackingStore.tsx');
object.scheduleWhenIdle = (require(681) /* metro dependency 681: requestSafeIdleCallback */).requestSafeIdleCallback;
value = Reflect.apply(analyticsTrackingStoreMaker, AnalyticsUtilsModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('stores/AnalyticsTrackingStore.tsx');
exports.default = value;
function getSessionId() { // fn#42716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5052:795, offset: 0x011407f7, size: 54 bytes, params: 1, frame: 11
let value = SessionHeartbeatSchedulerModule;
value = value.getSession();
return value.then(function(a0) {
return {sessionId: a0?.uuid};
});
}
}
function getSessionId() { // fn#42716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5052:795, offset: 0x011407f7, size: 54 bytes, params: 1, frame: 11
let value = require(4875) /* metro dependency 4875: SessionHeartbeatScheduler */;
value = value.getSession();
return value.then(function(a0) {
return {sessionId: a0?.uuid};
});
}
global.__d(_fun42708, 4874, [1226, 661, 480, 694, 4875, 683, 681,
2]) /* metro module 4874, dependencies: [1226, 661, 480, 694, 4875, 683, 681, 2] */;
+135 -122
View File
@@ -1,4 +1,14 @@
/* Metro module 8914; source: stores/ApplicationStreamPreviewStore.tsx; dependencies: [6, 7, 15, 17, 18, 4286, 22, 4285, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as StreamKeyUtilsModule from '../modules/go_live/utils/StreamKeyUtils.tsx'; /* Metro dependency 4285 */
import * as ConstantsModule from '../modules/go_live/Constants.tsx'; /* Metro dependency 4286 */
function _fun69564(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:6, offset: 0x01c76ddb, size: 400 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = function() {
@@ -7,146 +17,149 @@ function _fun69564(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const env0_8 = (require(4286) /* metro dependency 4286: Constants */).StreamTypes;
let env0_9 = {};
let env0_10 = {};
const Set = global.Set;
let set = new Set();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun69569(Store).displayName = 'ApplicationStreamPreviewStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: closure, LOGOUT: closure,
STREAM_PREVIEW_FETCH_START: STREAM_PREVIEW_FETCH_START,
STREAM_PREVIEW_FETCH_SUCCESS: STREAM_PREVIEW_FETCH_SUCCESS,
STREAM_PREVIEW_FETCH_FAIL: STREAM_PREVIEW_FETCH_FAIL, VOICE_STATE_UPDATES: VOICE_STATE_UPDATES_69578});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/ApplicationStreamPreviewStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/ApplicationStreamPreviewStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_69565() { // fn#69565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:170, offset: 0x01c76f6b, 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) {
function _isNativeReflectConstruct_69565() { // fn#69565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:170, offset: 0x01c76f6b, 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_69565_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_69565_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun69569(a0) { // fn#69569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:420, offset: 0x01c76fcd, size: 151 bytes, params: 2, frame: 16
const closure = ApplicationStreamPreviewStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'getPreviewURL', value: value_69571}, {key: 'shouldFetchPreview', value: value_69572},
{key: 'getPreviewURLForStreamKey', value: value_69573}, {key: 'getIsPreviewLoading', value: value_69574}]);
}
function _fun69569(a0) { // fn#69569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:420, offset: 0x01c76fcd, size: 151 bytes, params: 2, frame: 16
const ApplicationStreamPreviewStore2 = ApplicationStreamPreviewStore;
Inherits(ApplicationStreamPreviewStore2, a0);
return CreateClass(ApplicationStreamPreviewStore2, [{key: 'getPreviewURL', value: value_69571},
{key: 'shouldFetchPreview', value: value_69572}, {key: 'getPreviewURLForStreamKey', value: value_69573},
{key: 'getIsPreviewLoading', value: value_69574}]);
function ApplicationStreamPreviewStore() { // fn#69570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:432, offset: 0x0108afcb, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, ApplicationStreamPreviewStore);
const value3 = env1_6(ApplicationStreamPreviewStore);
return env1_5(this, _isNativeReflectConstruct_69565() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function STREAM_PREVIEW_FETCH_START({streamKey}) { // fn#69575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:1666, offset: 0x01c77254, size: 63 bytes, params: 2, frame: 14
const binding = env0_10;
binding[streamKey] = (binding[streamKey] ?? 0) + 1;
env0_11.add(streamKey);
}
function value_69571(a0, a1, a2) { // fn#69571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:798, offset: 0x01c77064, size: 117 bytes, params: 4, frame: 17
const value2 = undefined;
const property = env1_9[StreamKeyUtilsModule.encodeStreamKey({streamType: a0 != null ? StreamTypes.GUILD : StreamTypes.CALL,
guildId: a0, channelId: a1, ownerId: a2})];
return property == null ? value2 : property.url;
}
function STREAM_PREVIEW_FETCH_SUCCESS({streamKey, previewURL}) { // fn#69576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:1788, offset: 0x01c77293, size: 92 bytes, params: 2, frame: 14
const binding = env0_9;
const object2 = {url: previewURL};
const Date = global.Date;
object2.expires = Date.now() + 120000;
binding[streamKey] = object2;
env0_10[streamKey] = 0;
env0_11.delete(streamKey);
}
function value_69572(a0, a1, a2) { // fn#69572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:982, offset: 0x01c770d9, size: 197 bytes, params: 4, frame: 16
const value = environment.__proto__;
const value2 = (require(4285) /* metro dependency 4285: StreamKeyUtils */).encodeStreamKey({streamType: a0 != null ? StreamTypes.GUILD : StreamTypes.CALL,
guildId: a0, channelId: a1, ownerId: a2});
const property = env1_9[value2];
const r5 = env1_10[value2] ?? 0;
const r2 = property != null && global.Date.now() > property.expires;
let r0 = property == null && r5 < 5;
r0 = (!r0 ? r2 : r0) && !env1_11.has(value2);
return r0;
}
function STREAM_PREVIEW_FETCH_FAIL({streamKey, retryAfter}) { // fn#69577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:1940, offset: 0x01c772ef, size: 100 bytes, params: 2, frame: 16
const binding = env0_9;
const object2 = {url: null};
const Date = global.Date;
object2.expires = Date.now() + (retryAfter ?? 10000 * env0_10[streamKey]);
binding[streamKey] = object2;
env0_11.delete(streamKey);
}
function value_69573(a0) { // fn#69573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:1235, offset: 0x01c7719e, size: 73 bytes, params: 2, frame: 15
let value = environment.__proto__;
value = require(4285) /* metro dependency 4285: StreamKeyUtils */;
value = value.decodeStreamKey(a0);
return this.getPreviewURL(value.guildId, value.channelId, value.ownerId);
}
function value_69574(a0, a1, a2) { // fn#69574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:1386, offset: 0x01c771e7, size: 109 bytes, params: 4, frame: 15
return env1_11.has(StreamKeyUtilsModule.encodeStreamKey({streamType: a0 != null ? StreamTypes.GUILD : StreamTypes.CALL,
guildId: a0, channelId: a1, ownerId: a2}));
}
function VOICE_STATE_UPDATES_69578({voiceStates}) { // fn#69578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:2095, offset: 0x01c77353, size: 118 bytes, params: 2, frame: 16
var r0;
var defaultImport2;
const isEmpty2 = (importDefault(22) /* metro dependency 22 */).isEmpty(env0_9);
if (isEmpty2) {
defaultImport2 = importDefault(22) /* metro dependency 22 */;
r0 = !defaultImport2.isEmpty(env0_10);
} else {
r0 = !isEmpty2;
}
r0 = r0 && voiceStates.reduce(_fun69579, false);
return r0;
}
function value_69571(a0, a1, a2) { // fn#69571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:798, offset: 0x01c77064, size: 117 bytes, params: 4, frame: 17
const value2 = undefined;
const streamKeyUtilsModule = require(4285) /* metro dependency 4285: StreamKeyUtils */;
const property = env1_9[streamKeyUtilsModule.encodeStreamKey({streamType: a0 != null ? StreamTypes.GUILD : StreamTypes.CALL,
guildId: a0, channelId: a1, ownerId: a2})];
return property == null ? value2 : property.url;
}
function value_69572(a0, a1, a2) { // fn#69572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:982, offset: 0x01c770d9, size: 197 bytes, params: 4, frame: 16
const value = environment.__proto__;
const value2 = (require(4285) /* metro dependency 4285: StreamKeyUtils */).encodeStreamKey({streamType: a0 != null ? StreamTypes.GUILD : StreamTypes.CALL,
guildId: a0, channelId: a1, ownerId: a2});
const property = env1_9[value2];
const r5 = env1_10[value2] ?? 0;
const r2 = property != null && global.Date.now() > property.expires;
let r0 = property == null && r5 < 5;
r0 = (!r0 ? r2 : r0) && !env1_11.has(value2);
return r0;
}
function value_69573(a0) { // fn#69573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:1235, offset: 0x01c7719e, size: 73 bytes, params: 2, frame: 15
let value = environment.__proto__;
value = require(4285) /* metro dependency 4285: StreamKeyUtils */;
value = value.decodeStreamKey(a0);
return this.getPreviewURL(value.guildId, value.channelId, value.ownerId);
}
function value_69574(a0, a1, a2) { // fn#69574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:1386, offset: 0x01c771e7, size: 109 bytes, params: 4, frame: 15
const streamKeyUtilsModule = require(4285) /* metro dependency 4285: StreamKeyUtils */;
return env1_11.has(streamKeyUtilsModule.encodeStreamKey({streamType: a0 != null ? StreamTypes.GUILD : StreamTypes.CALL,
guildId: a0, channelId: a1, ownerId: a2}));
}
function _fun69579(a0, a1) { // fn#69579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:2205, offset: 0x01c773c9, size: 136 bytes, params: 3, frame: 17
const userId = a1.userId;
const guildId = a1.guildId;
const channelId = a1.channelId;
if (a1.selfStream) {
return a0;
function STREAM_PREVIEW_FETCH_START({streamKey}) { // fn#69575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:1666, offset: 0x01c77254, size: 63 bytes, params: 2, frame: 14
const binding = env0_10;
binding[streamKey] = (binding[streamKey] ?? 0) + 1;
env0_11.add(streamKey);
}
const value2 = (require(4285) /* metro dependency 4285: StreamKeyUtils */).encodeStreamKey({streamType: guildId != null ? StreamTypes.GUILD : StreamTypes.CALL,
guildId: guildId, channelId: channelId, ownerId: userId});
delete env1_9[value2];
delete env1_10[value2];
return true;
function STREAM_PREVIEW_FETCH_SUCCESS({streamKey, previewURL}) { // fn#69576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:1788, offset: 0x01c77293, size: 92 bytes, params: 2, frame: 14
const binding = env0_9;
const object = {url: previewURL};
const Date = global.Date;
object.expires = Date.now() + 120000;
binding[streamKey] = object;
env0_10[streamKey] = 0;
env0_11.delete(streamKey);
}
function STREAM_PREVIEW_FETCH_FAIL({streamKey, retryAfter}) { // fn#69577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:1940, offset: 0x01c772ef, size: 100 bytes, params: 2, frame: 16
const binding = env0_9;
const object = {url: null};
const Date = global.Date;
object.expires = Date.now() + (retryAfter ?? 10000 * env0_10[streamKey]);
binding[streamKey] = object;
env0_11.delete(streamKey);
}
function VOICE_STATE_UPDATES_69578({voiceStates}) { // fn#69578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:2095, offset: 0x01c77353, size: 118 bytes, params: 2, frame: 16
var r0;
var defaultImport2;
const isEmpty2 = (importDefault(22) /* metro dependency 22 */).isEmpty(env0_9);
if (isEmpty2) {
defaultImport2 = importDefault(22) /* metro dependency 22 */;
r0 = !defaultImport2.isEmpty(env0_10);
} else {
r0 = !isEmpty2;
}
r0 = r0 && voiceStates.reduce(_fun69579, false);
return r0;
function _fun69579(a0, a1) { // fn#69579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9099:2205, offset: 0x01c773c9, size: 136 bytes, params: 3, frame: 17
const userId = a1.userId;
const guildId = a1.guildId;
const channelId = a1.channelId;
if (a1.selfStream) {
return a0;
}
const value2 = (require(4285) /* metro dependency 4285: StreamKeyUtils */).encodeStreamKey({streamType: guildId != null ? StreamTypes.GUILD : StreamTypes.CALL,
guildId: guildId, channelId: channelId, ownerId: userId});
delete env1_9[value2];
delete env1_10[value2];
return true;
}
}
}
global.__d(_fun69564, 8914, [6, 7, 15, 17, 18, 4286, 22, 4285, 566, 694,
2]) /* metro module 8914, dependencies: [6, 7, 15, 17, 18, 4286, 22, 4285, 566, 694, 2] */;
@@ -1,109 +1,124 @@
/* Metro module 4399; source: stores/ApplicationStreamingSettingsStore.tsx; dependencies: [6, 7, 15, 17, 18, 4282, 4291, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as StreamSettingsConstantsModule from '../modules/go_live/StreamSettingsConstants.tsx'; /* Metro dependency 4282 */
import * as ConstantsModule from '../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */
function _fun37376(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#37376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4571:6, offset: 0x010a3d1c, size: 373 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let value = require(4282) /* metro dependency 4282: StreamSettingsConstants */;
let value = StreamSettingsConstantsModule;
const ApplicationStreamResolutions = value.ApplicationStreamResolutions;
const ApplicationStreamFPS = value.ApplicationStreamFPS;
const ApplicationStreamPresets = value.ApplicationStreamPresets;
const env0_6 = (require(4291) /* metro dependency 4291: Constants */).MediaEngineContextTypes;
const env0_7 = ApplicationStreamPresets.PRESET_VIDEO;
const env0_8 = ApplicationStreamResolutions.RESOLUTION_720;
const env0_9 = ApplicationStreamFPS.FPS_30;
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
value = _fun37380(PersistedStore);
value.displayName = 'ApplicationStreamingSettingsStore';
value.persistKey = 'ApplicationStreamingSettingStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{MEDIA_ENGINE_SET_GO_LIVE_SOURCE: MEDIA_ENGINE_SET_GO_LIVE_SOURCE_37384,
STREAM_UPDATE_SETTINGS: STREAM_UPDATE_SETTINGS});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/ApplicationStreamingSettingsStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/ApplicationStreamingSettingsStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_37377() { // fn#37377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4571:279, offset: 0x010a3e91, 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) {
function _isNativeReflectConstruct_37377() { // fn#37377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4571:279, offset: 0x010a3e91, 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_37377_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_37377_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun37380(a0) { // fn#37380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4571:534, offset: 0x010a3eef, size: 91 bytes, params: 2, frame: 16
const closure = ApplicationStreamingSettingsStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: value_37382}, {key: 'getState', value: value_37383}]);
}
function _fun37380(a0) { // fn#37380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4571:534, offset: 0x010a3eef, size: 91 bytes, params: 2, frame: 16
const ApplicationStreamingSettingsStore2 = ApplicationStreamingSettingsStore;
Inherits(ApplicationStreamingSettingsStore2, a0);
return CreateClass(ApplicationStreamingSettingsStore2, [{key: 'initialize', value: value_37382}, {key: 'getState',
value: value_37383}]);
function ApplicationStreamingSettingsStore() { // fn#37381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4571:546, offset: 0x010a3f4a, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, ApplicationStreamingSettingsStore);
const value3 = env1_3(ApplicationStreamingSettingsStore);
return env1_2(this, _isNativeReflectConstruct_37377() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_37382(a0) { // fn#37382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4571:929, offset: 0x010a3fbb, size: 83 bytes, params: 2, frame: 4
var r3;
var r0;
var value;
var resolution;
var fps;
var soundshareEnabled;
if (a0 != null) {
r3 = a0.preset ?? ApplicationStreamPresets.PRESET_VIDEO;
value = environment.__proto__;
resolution = a0.resolution;
fps = a0.fps;
soundshareEnabled = a0.soundshareEnabled;
r0 = soundshareEnabled == null || soundshareEnabled;
}
}
function value_37383() { // fn#37383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4571:1080, offset: 0x010a400e, size: 43 bytes, params: 1, frame: 3
return {preset: PRESET_VIDEO, resolution: RESOLUTION_720, fps: FPS_30, soundshareEnabled: env1_10};
}
function MEDIA_ENGINE_SET_GO_LIVE_SOURCE_37384({settings}) { // fn#37384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4571:1327, offset: 0x010a4039, size: 186 bytes, params: 2, frame: 6
const value = undefined;
const context = settings == null ? value : settings.context;
const STREAM = MediaEngineContextTypes.STREAM;
if (context !== STREAM) {
return false;
}
if ((settings == null ? value : settings.qualityOptions) == null) {
return false;
function MEDIA_ENGINE_SET_GO_LIVE_SOURCE_37384({settings}) { // fn#37384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4571:1327, offset: 0x010a4039, size: 186 bytes, params: 2, frame: 6
const value = undefined;
const context = settings == null ? value : settings.context;
const STREAM = MediaEngineContextTypes.STREAM;
if (context !== STREAM) {
return false;
}
if ((settings == null ? value : settings.qualityOptions) == null) {
return false;
}
let r0 = !(PRESET_VIDEO === settings.qualityOptions.preset) && true;
r0 = RESOLUTION_720 !== settings.qualityOptions.resolution || r0;
r0 = FPS_30 !== settings.qualityOptions.frameRate || r0;
return r0;
}
let r0 = !(PRESET_VIDEO === settings.qualityOptions.preset) && true;
r0 = RESOLUTION_720 !== settings.qualityOptions.resolution || r0;
r0 = FPS_30 !== settings.qualityOptions.frameRate || r0;
return r0;
}
function STREAM_UPDATE_SETTINGS({preset, resolution, frameRate, soundshareEnabled}) { // fn#37385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4571:1705, offset: 0x010a40f3, size: 153 bytes, params: 2, frame: 7
let r0 = preset != null && preset !== PRESET_VIDEO && true;
r0 = resolution != null && resolution !== RESOLUTION_720 || r0;
r0 = frameRate != null && frameRate !== FPS_30 || r0;
r0 = soundshareEnabled != null && soundshareEnabled !== env0_10 || r0;
return r0;
}
function value_37382(a0) { // fn#37382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4571:929, offset: 0x010a3fbb, size: 83 bytes, params: 2, frame: 4
var r3;
var r0;
var value;
var resolution;
var fps;
var soundshareEnabled;
if (a0 != null) {
r3 = a0.preset ?? ApplicationStreamPresets.PRESET_VIDEO;
value = environment.__proto__;
resolution = a0.resolution;
fps = a0.fps;
soundshareEnabled = a0.soundshareEnabled;
r0 = soundshareEnabled == null || soundshareEnabled;
function STREAM_UPDATE_SETTINGS({preset, resolution, frameRate, soundshareEnabled}) { // fn#37385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4571:1705, offset: 0x010a40f3, size: 153 bytes, params: 2, frame: 7
let r0 = preset != null && preset !== PRESET_VIDEO && true;
r0 = resolution != null && resolution !== RESOLUTION_720 || r0;
r0 = frameRate != null && frameRate !== FPS_30 || r0;
r0 = soundshareEnabled != null && soundshareEnabled !== env0_10 || r0;
return r0;
}
}
function value_37383() { // fn#37383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4571:1080, offset: 0x010a400e, size: 43 bytes, params: 1, frame: 3
return {preset: PRESET_VIDEO, resolution: RESOLUTION_720, fps: FPS_30, soundshareEnabled: env1_10};
}
global.__d(_fun37376, 4399, [6, 7, 15, 17, 18, 4282, 4291, 566, 694,
2]) /* metro module 4399, dependencies: [6, 7, 15, 17, 18, 4282, 4291, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
+131 -86
View File
@@ -1,18 +1,21 @@
/* Metro module 12346; source: stores/AppliedGuildBoostStore.tsx; dependencies: [6, 7, 15, 17, 18, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun94194(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:6, offset: 0x020f12ad, size: 422 bytes, params: 8, frame: 19
const closure = function() {
env0_9 = true;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_5 = {};
let env0_7 = [];
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun94199(Store);
value.displayName = 'AppliedGuildBoostStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
@@ -32,87 +35,129 @@ function _fun94194(global, require, importDefault, importAll, module, exports, d
}, USER_APPLIED_BOOSTS_FETCH_START: function() {
env0_8 = true;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/AppliedGuildBoostStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/AppliedGuildBoostStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_94195() { // fn#94195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:148, offset: 0x020f1453, 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) {
function _isNativeReflectConstruct_94195() { // fn#94195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:148, offset: 0x020f1453, 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_94195_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_94195_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun94199(a0) { // fn#94199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:441, offset: 0x020f14b5, size: 286 bytes, params: 2, frame: 16
const closure = AppliedGuildBoostStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getAppliedGuildBoostsForGuild', value: value_94201},
{key: 'getLastFetchedAtForGuild', value: value_94202}, {key: 'getCurrentUserAppliedBoosts', value: value_94203},
{key: 'getAppliedGuildBoost', value: value_94204}, {key: 'isModifyingAppliedBoost', get: get_94206},
{key: 'applyBoostError', get: get_94207}, {key: 'unapplyBoostError', get: get_94208}, {key: 'cooldownEndsAt',
get: get_94209}, {key: 'isFetchingCurrentUserAppliedBoosts', get: get_94210}]);
}
function GUILD_APPLIED_BOOSTS_FETCH_SUCCESS({guildId, appliedBoosts}) { // fn#94211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:1476, offset: 0x020f1645, size: 58 bytes, params: 2, frame: 12
const binding = env0_5;
const object2 = {subscriptions: appliedBoosts};
const Date = global.Date;
object2.lastFetchedAt = Date.now();
binding[guildId] = object2;
}
function GUILD_APPLY_BOOST_SUCCESS({appliedGuildBoost}) { // fn#94214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:1957, offset: 0x020f16ad, size: 127 bytes, params: 2, frame: 16
const Set = global.Set;
let set = new Set(appliedGuildBoost.map(function(a0) {
return a0.id;
}));
const items2 = [];
set = arraySpread(items2, appliedGuildBoost, 0, undefined);
const binding = env0_7;
arraySpread(items2, binding.filter(_fun94216), set, binding);
}
function GUILD_UNAPPLY_BOOST_SUCCESS({boostId}) { // fn#94218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:2200, offset: 0x020f1745, size: 53 bytes, params: 2, frame: 12
env0_7 = env0_7.filter(function({id}) {
return id !== boostId;
});
}
function value_94201(a0) { // fn#94201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:800, offset: 0x020f15d3, size: 39 bytes, params: 2, frame: 4
const value2 = null;
return value2 != env1_5[a0] ? env1_5[a0].subscriptions : value2;
}
function value_94202(a0) { // fn#94202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:894, offset: 0x020f15fa, size: 39 bytes, params: 2, frame: 4
const value2 = null;
return value2 != env1_5[a0] ? env1_5[a0].lastFetchedAt : value2;
}
function value_94204(a0) { // fn#94204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:1047, offset: 0x020f1621, size: 36 bytes, params: 2, frame: 11
const env0_0 = a0;
return env1_7.find(_fun94205);
function _fun94199(a0) { // fn#94199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:441, offset: 0x020f14b5, size: 286 bytes, params: 2, frame: 16
const AppliedGuildBoostStore2 = AppliedGuildBoostStore;
Inherits(AppliedGuildBoostStore2, a0);
return CreateClass(AppliedGuildBoostStore2, [{key: 'getAppliedGuildBoostsForGuild', value: value_94201},
{key: 'getLastFetchedAtForGuild', value: value_94202}, {key: 'getCurrentUserAppliedBoosts', value: value_94203},
{key: 'getAppliedGuildBoost', value: value_94204}, {key: 'isModifyingAppliedBoost', get: get_94206},
{key: 'applyBoostError', get: get_94207}, {key: 'unapplyBoostError', get: get_94208}, {key: 'cooldownEndsAt',
get: get_94209}, {key: 'isFetchingCurrentUserAppliedBoosts', get: get_94210}]);
function AppliedGuildBoostStore() { // fn#94200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:453, offset: 0x0118e5fe, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, AppliedGuildBoostStore);
const value3 = env1_3(AppliedGuildBoostStore);
return env1_2(this, _isNativeReflectConstruct_94195() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_94201(a0) { // fn#94201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:800, offset: 0x020f15d3, size: 39 bytes, params: 2, frame: 4
const value2 = null;
return value2 != env1_5[a0] ? env1_5[a0].subscriptions : value2;
}
function value_94202(a0) { // fn#94202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:894, offset: 0x020f15fa, size: 39 bytes, params: 2, frame: 4
const value2 = null;
return value2 != env1_5[a0] ? env1_5[a0].lastFetchedAt : value2;
}
function value_94203() { // fn#94203, offset: 0x00fbd9cb, size: 9 bytes, params: 1, frame: 1
return env1_7;
}
function value_94204(a0) { // fn#94204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:1047, offset: 0x020f1621, size: 36 bytes, params: 2, frame: 11
const env0_0 = a0;
return env1_7.find(_fun94205);
function _fun94205({id}) { // fn#94205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:1074, offset: 0x00db0c48, size: 21 bytes, params: 2, frame: 2
return id === env0_0;
}
}
function get_94206() { // fn#94206, offset: 0x00e07a77, size: 9 bytes, params: 1, frame: 1
return env1_9;
}
function get_94207() { // fn#94207, offset: 0x00fbd9ec, size: 9 bytes, params: 1, frame: 1
return env1_10;
}
function get_94208() { // fn#94208, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
function get_94209() { // fn#94209, offset: 0x00c82288, size: 9 bytes, params: 1, frame: 1
return env1_6;
}
function get_94210() { // fn#94210, offset: 0x00fbd9d4, size: 9 bytes, params: 1, frame: 1
return env1_8;
}
}
function GUILD_APPLIED_BOOSTS_FETCH_SUCCESS({guildId, appliedBoosts}) { // fn#94211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:1476, offset: 0x020f1645, size: 58 bytes, params: 2, frame: 12
const binding = env0_5;
const object = {subscriptions: appliedBoosts};
const Date = global.Date;
object.lastFetchedAt = Date.now();
binding[guildId] = object;
}
function GUILD_APPLY_BOOST_SUCCESS({appliedGuildBoost}) { // fn#94214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:1957, offset: 0x020f16ad, size: 127 bytes, params: 2, frame: 16
const Set = global.Set;
let set = new Set(appliedGuildBoost.map(function(a0) {
return a0.id;
}));
const items2 = [];
set = arraySpread(items2, appliedGuildBoost, 0, undefined);
const binding = env0_7;
arraySpread(items2, binding.filter(_fun94216), set, binding);
function _fun94216({id}) { // fn#94216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:2066, offset: 0x011289b2, size: 30 bytes, params: 2, frame: 11
return !ClassCallCheck.has(id);
}
}
function GUILD_UNAPPLY_BOOST_SUCCESS({boostId}) { // fn#94218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:2200, offset: 0x020f1745, size: 53 bytes, params: 2, frame: 12
env0_7 = env0_7.filter(function({id}) {
return id !== boostId;
});
}
}
global.__d(_fun94194, 12346, [6, 7, 15, 17, 18, 566, 694,
2]) /* metro module 12346, dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
+306 -277
View File
@@ -1,6 +1,17 @@
/* Metro module 5109; source: stores/AuthorizedAppsStore.tsx; dependencies: [6, 7, 15, 17, 18, 57, 1379, 5110, 4814, 1360, 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 Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */
import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */
import MessageStore from './MessageStore.tsx'; /* Metro dependency 4814 */
import ConnectedAppsStore from './ConnectedAppsStore.tsx'; /* Metro dependency 5110 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun44635(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:6, offset: 0x01175ccc, size: 555 bytes, params: 8, frame: 21
var object2;
const env0_0 = require;
const _arrayLikeToArray_44641 = function(a0, a1) {
var r0;
@@ -47,312 +58,330 @@ function _fun44635(global, require, importDefault, importAll, module, exports, d
};
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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const connectedAppsStore = importDefault(5110) /* metro dependency 5110: ConnectedAppsStore */;
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
object2 = {NOT_FETCHED: 'NOT_FETCHED', FETCHING: 'FETCHING', FETCHED: 'FETCHED'};
object = {NOT_FETCHED: 'NOT_FETCHED', FETCHING: 'FETCHING', FETCHED: 'FETCHED'};
let Map = global.Map;
let map = new Map();
const env0_13 = [];
const env0_14 = [];
const env0_15 = object2.NOT_FETCHED;
const env0_15 = object.NOT_FETCHED;
Map = global.Map;
map = new Map();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun44645(Store).displayName = 'AuthorizedAppsStore';
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */,
{USER_AUTHORIZED_APPS_REQUEST: USER_AUTHORIZED_APPS_REQUEST,
USER_AUTHORIZED_APPS_REQUEST_FAILED: USER_AUTHORIZED_APPS_REQUEST_FAILED,
USER_AUTHORIZED_APPS_UPDATE: USER_AUTHORIZED_APPS_UPDATE_44656, OAUTH2_TOKEN_CREATE: OAUTH2_TOKEN_CREATE_44657,
OAUTH2_TOKEN_DELETE: OAUTH2_TOKEN_DELETE, LOGOUT: LOGOUT_44659});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/AuthorizedAppsStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/AuthorizedAppsStore.tsx');
exports.default = map;
exports.FetchState = object2;
}
function _isNativeReflectConstruct_44636() { // fn#44636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:190, offset: 0x01175ef7, 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_44636_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_44639(a0, a1) { // fn#44639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:383, offset: 0x01175f55, 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) {
exports.FetchState = object;
function _isNativeReflectConstruct_44636() { // fn#44636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:190, offset: 0x01175ef7, 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 _fun44640;
return (_isNativeReflectConstruct_44636_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_44641(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') {
function _createForOfIteratorHelperLoose_44639(a0, a1) { // fn#44639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:383, offset: 0x01175f55, 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 _fun44640;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_44641(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_44641(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_44641(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun44640;
}
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 _fun44640() { // fn#44640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:954, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
function recomputeFromAppTokens() { // fn#44642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:1445, offset: 0x011760c7, size: 58 bytes, params: 1, frame: 14
const value2 = env0_12.values();
const items2 = [];
arraySpread(items2, value2, 0, items2);
env0_14 = items2.filter(function(a0) {
return a0.application.parent_id == null;
});
}
function updateFetchStates(a0, a1) { // fn#44644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:1548, offset: 0x01176117, size: 130 bytes, params: 3, frame: 17
var r3;
var value2;
var value3;
var done;
var value4;
var binding;
var set;
var value5;
if (a1 == null) {
env0_15 = a0;
env0_16.clear();
env0_17 += 1;
} else {
value2 = _createForOfIteratorHelperLoose_44639(a1);
value3 = value2();
done = value3.done;
if (!done) {
r3 = value3;
reducibleLoop2: while (true) {
value4 = r3.value;
binding = env0_16;
set = binding.set;
Reflect.apply(set, binding, [value4, a0]);
value5 = value2();
done = value5.done;
if (done) {
break reducibleLoop2;
}
r3 = value5;
continue reducibleLoop2;
}
}
r5 = r6;
env0_17 += 1;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
function _fun44645(a0) { // fn#44645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:1715, offset: 0x01176199, size: 208 bytes, params: 2, frame: 16
const AuthorizedAppsStore2 = AuthorizedAppsStore;
Inherits(AuthorizedAppsStore2, a0);
return CreateClass(AuthorizedAppsStore2, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, ConnectedAppsStore, MessageStore);
}}, {key: 'getNewestTokenForApplication', value: value_44648}, {key: 'getNewestTokens', value: value_44649},
{key: 'getNewestTokensForNonChildrenApplications', value: value_44650}, {key: 'getFetchState',
value: function() {
return NOT_FETCHED;
}}, {key: 'getFetchStateForApplication', value: value_44652}, {key: 'getApplicationFetchStateVersion',
value: value_44653}]);
function AuthorizedAppsStore() { // fn#44646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:1727, offset: 0x01176269, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, AuthorizedAppsStore);
const value3 = env1_5(AuthorizedAppsStore);
return env1_4(this, _isNativeReflectConstruct_44636() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
return _fun44640;
function value_44648(a0) { // fn#44648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:2115, offset: 0x011762da, size: 48 bytes, params: 2, frame: 13
var r0;
var value2;
var value3;
const value = null;
if (value == a0) {
r0 = value;
} else {
value2 = environment.__proto__;
value3 = env1_12.get(a0);
r0 = value != value3 ? value3 : value;
}
return r0;
}
function value_44649() { // fn#44649, offset: 0x00e2f9d5, size: 9 bytes, params: 1, frame: 1
return env1_13;
}
function value_44650() { // fn#44650, offset: 0x00df0f5a, size: 9 bytes, params: 1, frame: 1
return env1_14;
}
function value_44652(a0) { // fn#44652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:2399, offset: 0x0117630a, size: 74 bytes, params: 2, frame: 12
const FETCHING = env1_11.FETCHING;
return NOT_FETCHED === FETCHING || NOT_FETCHED === env1_11.FETCHED ? NOT_FETCHED : env1_16.get(a0) ?? NOT_FETCHED;
}
function value_44653() { // fn#44653, offset: 0x00e07553, size: 9 bytes, params: 1, frame: 1
return env1_17;
}
}
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 recomputeFromAppTokens() { // fn#44642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:1445, offset: 0x011760c7, size: 58 bytes, params: 1, frame: 14
const value2 = env0_12.values();
const items2 = [];
arraySpread(items2, value2, 0, items2);
env0_14 = items2.filter(function(a0) {
return a0.application.parent_id == null;
});
}
function USER_AUTHORIZED_APPS_REQUEST(a0) { // fn#44654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:2654, offset: 0x01176354, size: 89 bytes, params: 2, frame: 13
if (a0.request.type === 'full') {
updateFetchStates(env0_11.FETCHING);
} else {
updateFetchStates(env0_11.FETCHING, a0.request.applicationIds);
}
}
function updateFetchStates(a0, a1) { // fn#44644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:1548, offset: 0x01176117, size: 130 bytes, params: 3, frame: 17
var r3;
var value2;
var value3;
var done;
var value4;
var binding;
var set;
var value5;
if (a1 == null) {
env0_15 = a0;
function USER_AUTHORIZED_APPS_REQUEST_FAILED(a0) { // fn#44655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:2844, offset: 0x011763ad, size: 89 bytes, params: 2, frame: 13
if (a0.request.type === 'full') {
updateFetchStates(env0_11.FETCHED);
} else {
updateFetchStates(env0_11.FETCHED, a0.request.applicationIds);
}
}
function USER_AUTHORIZED_APPS_UPDATE_44656(a0) { // fn#44656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:3030, offset: 0x01176406, size: 294 bytes, params: 2, frame: 25
var r7;
var Object;
var keys;
var tokens;
var entries;
var value2;
var length;
var value3;
var property;
var value4;
var property2;
var binding;
var value5;
var Map;
var value6;
var value7;
var map;
const isFullFetch = a0.isFullFetch;
const updateFetchStatesBinding = updateFetchStates;
const FETCHED = env0_11.FETCHED;
if (isFullFetch) {
updateFetchStatesBinding(FETCHED);
Map = global.Map;
Object = global.Object;
value6 = Object.entries(a0.tokens);
value7 = value6.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isObjectEntryNotNullish);
map = new Map();
recomputeFromAppTokens();
} else {
Object = global.Object;
keys = Object.keys;
tokens = a0.tokens;
updateFetchStatesBinding(FETCHED, Reflect.apply(keys, Object, [tokens]));
Object = global.Object;
entries = Object.entries;
tokens = a0.tokens;
value2 = Reflect.apply(entries, Object, [tokens]);
length = value2.length;
value3 = 0;
if (value3 < length) {
r7 = value3;
while (true) {
property = value2[r7];
value4 = Module00057(property, 2);
property = value4[value3];
property2 = value4[1];
if (property2 == null) {
binding = env0_12;
binding.delete(property);
} else {
binding = env0_12;
binding.set(property, property2);
}
value5 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
length = value2.length;
if (value5 < length) {
r7 = value5;
continue;
}
break;
}
}
recomputeFromAppTokens();
}
}
function OAUTH2_TOKEN_CREATE_44657({id, application, scopes}) { // fn#44657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:3440, offset: 0x0117652c, size: 69 bytes, params: 2, frame: 17
const binding = env0_12;
binding.set(application.id, {id: id, application: application, scopes: scopes});
recomputeFromAppTokens();
}
function OAUTH2_TOKEN_DELETE({id, applicationId}) { // fn#44658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:3592, offset: 0x01176571, size: 85 bytes, params: 2, frame: 13
const value2 = env0_12.get(applicationId);
if (value2 == null) {
return false;
}
if (value2.id !== id) {
return false;
}
env0_12.delete(value2.application.id);
recomputeFromAppTokens();
}
function LOGOUT_44659() { // fn#44659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:3754, offset: 0x011765c6, size: 98 bytes, params: 1, frame: 10
const Map = global.Map;
const map = new Map();
env0_13 = [];
env0_14 = [];
env0_15 = env0_11.NOT_FETCHED;
env0_16.clear();
env0_17 += 1;
} else {
value2 = _createForOfIteratorHelperLoose_44639(a1);
value3 = value2();
done = value3.done;
if (!done) {
r3 = value3;
reducibleLoop2: while (true) {
value4 = r3.value;
binding = env0_16;
set = binding.set;
Reflect.apply(set, binding, [value4, a0]);
value5 = value2();
done = value5.done;
if (done) {
break reducibleLoop2;
}
r3 = value5;
continue reducibleLoop2;
}
}
env0_17 += 1;
}
}
function _fun44645(a0) { // fn#44645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:1715, offset: 0x01176199, size: 208 bytes, params: 2, frame: 16
const closure = AuthorizedAppsStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, ConnectedAppsStore, MessageStore);
}}, {key: 'getNewestTokenForApplication', value: value_44648}, {key: 'getNewestTokens', value: value_44649},
{key: 'getNewestTokensForNonChildrenApplications', value: value_44650}, {key: 'getFetchState',
value: function() {
return NOT_FETCHED;
}}, {key: 'getFetchStateForApplication', value: value_44652}, {key: 'getApplicationFetchStateVersion',
value: value_44653}]);
}
function USER_AUTHORIZED_APPS_REQUEST(a0) { // fn#44654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:2654, offset: 0x01176354, size: 89 bytes, params: 2, frame: 13
if (a0.request.type === 'full') {
updateFetchStates(env0_11.FETCHING);
} else {
updateFetchStates(env0_11.FETCHING, a0.request.applicationIds);
}
}
function USER_AUTHORIZED_APPS_REQUEST_FAILED(a0) { // fn#44655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:2844, offset: 0x011763ad, size: 89 bytes, params: 2, frame: 13
if (a0.request.type === 'full') {
updateFetchStates(env0_11.FETCHED);
} else {
updateFetchStates(env0_11.FETCHED, a0.request.applicationIds);
}
}
function USER_AUTHORIZED_APPS_UPDATE_44656(a0) { // fn#44656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:3030, offset: 0x01176406, size: 294 bytes, params: 2, frame: 25
var r7;
var Object;
var keys;
var tokens;
var entries;
var value2;
var length;
var value3;
var property;
var value4;
var property2;
var binding;
var value5;
var Map;
var value6;
var value7;
var map;
const isFullFetch = a0.isFullFetch;
const updateFetchStatesBinding = updateFetchStates;
const FETCHED = env0_11.FETCHED;
if (isFullFetch) {
updateFetchStatesBinding(FETCHED);
Map = global.Map;
Object = global.Object;
value6 = Object.entries(a0.tokens);
value7 = value6.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isObjectEntryNotNullish);
map = new Map();
recomputeFromAppTokens();
} else {
Object = global.Object;
keys = Object.keys;
tokens = a0.tokens;
updateFetchStatesBinding(FETCHED, Reflect.apply(keys, Object, [tokens]));
Object = global.Object;
entries = Object.entries;
tokens = a0.tokens;
value2 = Reflect.apply(entries, Object, [tokens]);
length = value2.length;
value3 = 0;
if (value3 < length) {
r7 = value3;
while (true) {
property = value2[r7];
value4 = env0_7(property, 2);
property = value4[value3];
property2 = value4[1];
if (property2 == null) {
binding = env0_12;
binding.delete(property);
} else {
binding = env0_12;
binding.set(property, property2);
}
value5 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
length = value2.length;
if (value5 < length) {
r7 = value5;
continue;
}
break;
}
}
recomputeFromAppTokens();
}
}
function OAUTH2_TOKEN_CREATE_44657({id, application, scopes}) { // fn#44657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:3440, offset: 0x0117652c, size: 69 bytes, params: 2, frame: 17
const binding = env0_12;
binding.set(application.id, {id: id, application: application, scopes: scopes});
recomputeFromAppTokens();
}
function OAUTH2_TOKEN_DELETE({id, applicationId}) { // fn#44658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:3592, offset: 0x01176571, size: 85 bytes, params: 2, frame: 13
const value2 = env0_12.get(applicationId);
if (value2 == null) {
return false;
}
if (value2.id !== id) {
return false;
}
env0_12.delete(value2.application.id);
recomputeFromAppTokens();
}
function LOGOUT_44659() { // fn#44659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:3754, offset: 0x011765c6, size: 98 bytes, params: 1, frame: 10
const Map = global.Map;
const map = new Map();
env0_13 = [];
env0_14 = [];
env0_15 = env0_11.NOT_FETCHED;
env0_16.clear();
env0_17 += 1;
}
function value_44648(a0) { // fn#44648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:2115, offset: 0x011762da, size: 48 bytes, params: 2, frame: 13
var r0;
var value2;
var value3;
const value = null;
if (value == a0) {
r0 = value;
} else {
value2 = environment.__proto__;
value3 = env1_12.get(a0);
r0 = value != value3 ? value3 : value;
}
return r0;
}
function value_44652(a0) { // fn#44652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5287:2399, offset: 0x0117630a, size: 74 bytes, params: 2, frame: 12
const FETCHING = env1_11.FETCHING;
return NOT_FETCHED === FETCHING || NOT_FETCHED === env1_11.FETCHED ? NOT_FETCHED : env1_16.get(a0) ?? NOT_FETCHED;
}
global.__d(_fun44635, 5109, [6, 7, 15, 17, 18, 57, 1379, 5110, 4814, 1360, 566, 694,
2]) /* metro module 5109, dependencies: [6, 7, 15, 17, 18, 57, 1379, 5110, 4814, 1360, 566, 694, 2] */;
+57 -43
View File
@@ -1,58 +1,72 @@
/* Metro module 4290; source: stores/BitRateStore.tsx; dependencies: [6, 7, 15, 17, 18, 4291, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */
function _fun36345(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4462:6, offset: 0x01089cb2, size: 281 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let env0_5 = (require(4291) /* metro dependency 4291: Constants */).DEFAULT_VOICE_BITRATE;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
let env0_5 = (ConstantsModule).DEFAULT_VOICE_BITRATE;
const Store = (Flux).Store;
let value = _fun36349(Store);
value.displayName = 'BitRateStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {SET_CHANNEL_BITRATE: function(a0) {
env0_5 = a0.bitrate;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/BitRateStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/BitRateStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_36346() { // fn#36346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4462:148, offset: 0x01089dcb, 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_36346_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _isNativeReflectConstruct_36346() { // fn#36346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4462:148, offset: 0x01089dcb, 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) {
function _fun36349(a0) { // fn#36349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4462:383, offset: 0x01089e29, size: 68 bytes, params: 2, frame: 15
const BitRateStore2 = BitRateStore;
Inherits(BitRateStore2, a0);
return CreateClass(BitRateStore2, [{key: 'bitrate', get: function() {
return DEFAULT_VOICE_BITRATE;
}}]);
function BitRateStore() { // fn#36350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4462:395, offset: 0x00c7a0d6, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, BitRateStore);
const value3 = env1_3(BitRateStore);
return env1_2(this, _isNativeReflectConstruct_36346() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
}
return (_isNativeReflectConstruct_36346_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun36349(a0) { // fn#36349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4462:383, offset: 0x01089e29, size: 68 bytes, params: 2, frame: 15
const closure = BitRateStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'bitrate', get: function() {
return DEFAULT_VOICE_BITRATE;
}}]);
}
global.__d(_fun36345, 4290, [6, 7, 15, 17, 18, 4291, 566, 694,
2]) /* metro module 4290, dependencies: [6, 7, 15, 17, 18, 4291, 566, 694, 2] */;
+60 -47
View File
@@ -1,60 +1,73 @@
/* Metro module 1227; source: stores/BrowserHandoffStore.native.tsx; dependencies: [6, 7, 15, 17, 18, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun13762(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#13762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1354:6, offset: 0x00df45e5, size: 246 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun13766(Store);
value.displayName = 'BrowserHandoffStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/BrowserHandoffStore.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/BrowserHandoffStore.native.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_13763() { // fn#13763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1354:148, offset: 0x00df46db, 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_13763_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _isNativeReflectConstruct_13763() { // fn#13763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1354:148, offset: 0x00df46db, 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) {
function _fun13766(a0) { // fn#13766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1354:347, offset: 0x00df4739, size: 139 bytes, params: 2, frame: 16
const BrowserHandoffStore2 = BrowserHandoffStore;
Inherits(BrowserHandoffStore2, a0);
return CreateClass(BrowserHandoffStore2, [{key: 'initialize', value: function() {
}}, {key: 'isHandoffAvailable', value: function() {
return false;
}}, {key: 'user', get: function() {
return null;
}}, {key: 'key', get: function() {
return null;
}}]);
function BrowserHandoffStore() { // fn#13767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1354:359, offset: 0x00df47c4, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, BrowserHandoffStore);
const value3 = env1_3(BrowserHandoffStore);
return env1_2(this, _isNativeReflectConstruct_13763() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
}
return (_isNativeReflectConstruct_13763_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun13766(a0) { // fn#13766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1354:347, offset: 0x00df4739, size: 139 bytes, params: 2, frame: 16
const closure = BrowserHandoffStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: function() {
}}, {key: 'isHandoffAvailable', value: function() {
return false;
}}, {key: 'user', get: function() {
return null;
}}, {key: 'key', get: function() {
return null;
}}]);
}
global.__d(_fun13762, 1227, [6, 7, 15, 17, 18, 566, 694,
2]) /* metro module 1227, dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */;
+201 -183
View File
@@ -1,20 +1,24 @@
/* Metro module 4258; source: stores/CallStore.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 1934, 3969, 661, 694, 507, 22, 566, 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 Module00022 from '../by-id/module-00022.js'; /* Metro dependency 22 */
import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectedChannelStore from './SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import SelectedGuildStore from './SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun35445(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#35445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:6, offset: 0x01072d96, size: 464 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const env0_11 = (require(661) /* metro dependency 661: Constants */).Endpoints;
let env0_12 = {};
let env0_13 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun35450(Store);
value.displayName = 'CallStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
@@ -36,191 +40,205 @@ function _fun35445(global, require, importDefault, importAll, module, exports, d
}, CHANNEL_DELETE: CHANNEL_DELETE_35464, CALL_CREATE: CALL_CREATE, CALL_UPDATE: CALL_UPDATE,
CALL_DELETE: CALL_DELETE_35467, CALL_ENQUEUE_RING: CALL_ENQUEUE_RING,
VOICE_CHANNEL_SELECT: VOICE_CHANNEL_SELECT_35469});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/CallStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/CallStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_35446() { // fn#35446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:198, offset: 0x01072f66, 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) {
function _isNativeReflectConstruct_35446() { // fn#35446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:198, offset: 0x01072f66, 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_35446_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_35446_isNativeReflectConstruct = function() {
return !!result;
})();
}
function callConnect() { // fn#35449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:405, offset: 0x01072fc4, size: 177 bytes, params: 1, frame: 15
var binding;
let value = a0;
const value2 = a1;
const r1 = value !== undefined ? value : false;
const r3 = value2 !== undefined ? value2 : SelectedChannelStore.getChannelId();
const channel = ChannelStore.getChannel(r3);
if (channel != null) {
var getGuildId = channel.getGuildId;
if (Reflect.apply(getGuildId, channel, []) != null) {
return false;
function callConnect() { // fn#35449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:405, offset: 0x01072fc4, size: 177 bytes, params: 1, frame: 15
var binding;
let value = a0;
const value2 = a1;
const r1 = value !== undefined ? value : false;
const r3 = value2 !== undefined ? value2 : SelectedChannelStore.getChannelId();
const channel = ChannelStore.getChannel(r3);
if (channel != null) {
var getGuildId = channel.getGuildId;
if (Reflect.apply(getGuildId, channel, []) != null) {
return false;
}
if (r3 == null) {
return false;
}
if (env0_12[r3] == null) {
binding = env0_12;
binding[r3] = binding[r3] ?? ({channelId: r3, ringing: []});
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'CALL_CONNECT', channelId: r3});
return true;
}
if (r1) {
binding = env0_12;
binding[r3] = binding[r3] ?? ({channelId: r3, ringing: []});
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'CALL_CONNECT', channelId: r3});
return true;
}
}
if (r3 == null) {
return false;
}
if (env0_12[r3] == null) {
binding = env0_12;
binding[r3] = binding[r3] ?? ({channelId: r3, ringing: []});
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'CALL_CONNECT', channelId: r3});
return true;
}
if (r1) {
binding = env0_12;
binding[r3] = binding[r3] ?? ({channelId: r3, ringing: []});
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'CALL_CONNECT', channelId: r3});
return true;
}
}
return false;
}
function _fun35450(a0) { // fn#35450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:660, offset: 0x01073075, size: 210 bytes, params: 2, frame: 16
const closure = CallStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, SelectedChannelStore, SelectedGuildStore);
}}, {key: 'getCall', value: value_35453}, {key: 'getCalls', value: value_35454}, {key: 'getMessageId',
value: function(a0) {
var value = this.getCall(a0);
var value2 = null;
return value2 != value ? value.messageId : value2;
}}, {key: 'isCallActive', value: value_35456}, {key: 'isCallUnavailable', value: value_35457},
{key: 'getInternalState', value: value_35458}]);
}
function CHANNEL_DELETE_35464({channel}) { // fn#35464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:1953, offset: 0x0107329a, size: 81 bytes, params: 2, frame: 5
if (env0_13[channel.id] != null) {
delete env0_13[channel.id];
}
if (env0_12[channel.id] == null) {
return false;
}
delete env0_12[channel.id];
}
function CALL_CREATE({channelId, messageId, region, ongoingRings}) { // fn#35465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:2079, offset: 0x010732eb, size: 228 bytes, params: 2, frame: 16
var r4;
var property;
var HTTP;
var post;
const binding = env0_12;
let object2 = {channelId: channelId, messageId: messageId, region: region};
const Object = global.Object;
object2.ringing = Object.keys(ongoingRings);
object2.unavailable = false;
object2.regionUpdated = false;
binding[channelId] = object2;
if (env0_13[channelId] != null) {
property = env0_13[channelId];
delete env0_13[channelId];
r4 = property.indexOf('all') === 1 ? property : null;
HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
post = HTTP.post;
object2 = {};
object2.url = Endpoints.CALL_RING(channelId);
object2.body = {recipients: r4};
object2.oldFormErrors = true;
object2.rejectWithError = true;
Reflect.apply(post, HTTP, [object2]);
function _fun35450(a0) { // fn#35450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:660, offset: 0x01073075, size: 210 bytes, params: 2, frame: 16
const CallStore2 = CallStore;
Inherits(CallStore2, a0);
return CreateClass(CallStore2, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, SelectedChannelStore, SelectedGuildStore);
}}, {key: 'getCall', value: value_35453}, {key: 'getCalls', value: value_35454}, {key: 'getMessageId',
value: function(a0) {
var value = this.getCall(a0);
var value2 = null;
return value2 != value ? value.messageId : value2;
}}, {key: 'isCallActive', value: value_35456}, {key: 'isCallUnavailable', value: value_35457},
{key: 'getInternalState', value: value_35458}]);
function CallStore() { // fn#35451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:672, offset: 0x00e2f839, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, CallStore);
const value3 = env1_6(CallStore);
return env1_5(this, _isNativeReflectConstruct_35446() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_35453(a0) { // fn#35453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:989, offset: 0x00f8559b, size: 16 bytes, params: 2, frame: 2
return env1_12[a0];
}
function value_35454() { // fn#35454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:1037, offset: 0x0107316a, size: 27 bytes, params: 1, frame: 11
const Object = global.Object;
return Object.values(env1_12);
}
function value_35456(a0, a1) { // fn#35456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:1194, offset: 0x010731a6, size: 68 bytes, params: 3, frame: 5
const value = environment.__proto__;
const property = env1_12[a0];
return property != null && !property.unavailable && (a1 != null ? property.messageId === a1 : property.region != null);
}
function value_35457(a0) { // fn#35457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:1325, offset: 0x010731ea, size: 31 bytes, params: 2, frame: 3
const value = environment.__proto__;
const property = env1_12[a0];
return property != null && property.unavailable;
}
function value_35458() { // fn#35458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:1410, offset: 0x01073209, size: 25 bytes, params: 1, frame: 3
return {calls: env1_12, enqueuedRings: env1_13};
}
}
}
function CALL_UPDATE({channelId, messageId, region, ongoingRings}) { // fn#35466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:2431, offset: 0x010733cf, size: 146 bytes, params: 2, frame: 18
const property = env0_12[channelId];
const r4 = property != null && (property.regionUpdated || property.region !== region);
const binding = env0_12;
const object2 = {};
copyDataProperties(object2, binding[channelId], undefined);
object2['messageId'] = messageId;
object2['region'] = region;
const Object = global.Object;
object2['ringing'] = Object.keys(ongoingRings);
object2['regionUpdated'] = r4;
binding[channelId] = object2;
}
function CALL_DELETE_35467({channelId, unavailable}) { // fn#35467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:2650, offset: 0x01073461, size: 132 bytes, params: 2, frame: 16
var r2;
var object2;
const property = env0_12[channelId];
const binding = env0_12;
if (unavailable !== true) {
r2 = {'channelId': null, 'ringing': null, 'messageId': null, 'region': null, 'regionUpdated': false,
channelId: channelId, ringing: [], unavailable: unavailable};
} else if (property != null) {
object2 = {};
copyDataProperties(object2, property, unavailable);
object2['unavailable'] = unavailable;
r2 = object2;
} else {
r2 = {'channelId': null, 'ringing': null, 'messageId': null, 'region': null, 'regionUpdated': false,
channelId: channelId, ringing: [], unavailable: unavailable};
function CHANNEL_DELETE_35464({channel}) { // fn#35464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:1953, offset: 0x0107329a, size: 81 bytes, params: 2, frame: 5
if (env0_13[channel.id] != null) {
delete env0_13[channel.id];
}
if (env0_12[channel.id] == null) {
return false;
}
delete env0_12[channel.id];
}
binding[channelId] = r2;
if (env0_13[channelId] != null) {
delete env0_13[channelId];
function CALL_CREATE({channelId, messageId, region, ongoingRings}) { // fn#35465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:2079, offset: 0x010732eb, size: 228 bytes, params: 2, frame: 16
var r4;
var property;
var HTTP;
var post;
const binding = env0_12;
let object = {channelId: channelId, messageId: messageId, region: region};
const Object = global.Object;
object.ringing = Object.keys(ongoingRings);
object.unavailable = false;
object.regionUpdated = false;
binding[channelId] = object;
if (env0_13[channelId] != null) {
property = env0_13[channelId];
delete env0_13[channelId];
r4 = property.indexOf('all') === 1 ? property : null;
HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
post = HTTP.post;
object = {};
object.url = Endpoints.CALL_RING(channelId);
object.body = {recipients: r4};
object.oldFormErrors = true;
object.rejectWithError = true;
Reflect.apply(post, HTTP, [object]);
}
}
}
function CALL_ENQUEUE_RING({channelId, recipients}) { // fn#35468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:2884, offset: 0x010734e5, size: 93 bytes, params: 2, frame: 18
const binding = env0_13;
const defaultImport = importDefault(22) /* metro dependency 22 */;
binding[channelId] = defaultImport.union(env0_13[channelId] ?? [], recipients ?? ['all']);
}
function VOICE_CHANNEL_SELECT_35469({channelId}) { // fn#35469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:3030, offset: 0x01073542, size: 27 bytes, params: 2, frame: 2
if (channelId == null) {
env0_13 = {};
function CALL_UPDATE({channelId, messageId, region, ongoingRings}) { // fn#35466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:2431, offset: 0x010733cf, size: 146 bytes, params: 2, frame: 18
const property = env0_12[channelId];
const r4 = property != null && (property.regionUpdated || property.region !== region);
const binding = env0_12;
const object = {};
copyDataProperties(object, binding[channelId], undefined);
object['messageId'] = messageId;
object['region'] = region;
const Object = global.Object;
object['ringing'] = Object.keys(ongoingRings);
object['regionUpdated'] = r4;
binding[channelId] = object;
}
function CALL_DELETE_35467({channelId, unavailable}) { // fn#35467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:2650, offset: 0x01073461, size: 132 bytes, params: 2, frame: 16
var r2;
var object;
const property = env0_12[channelId];
const binding = env0_12;
if (unavailable !== true) {
r2 = {'channelId': null, 'ringing': null, 'messageId': null, 'region': null, 'regionUpdated': false,
channelId: channelId, ringing: [], unavailable: unavailable};
} else if (property != null) {
object = {};
copyDataProperties(object, property, unavailable);
object['unavailable'] = unavailable;
r2 = object;
} else {
r2 = {'channelId': null, 'ringing': null, 'messageId': null, 'region': null, 'regionUpdated': false,
channelId: channelId, ringing: [], unavailable: unavailable};
}
binding[channelId] = r2;
if (env0_13[channelId] != null) {
delete env0_13[channelId];
}
}
function CALL_ENQUEUE_RING({channelId, recipients}) { // fn#35468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:2884, offset: 0x010734e5, size: 93 bytes, params: 2, frame: 18
const binding = env0_13;
const defaultImport = Module00022;
binding[channelId] = defaultImport.union(env0_13[channelId] ?? [], recipients ?? ['all']);
}
function VOICE_CHANNEL_SELECT_35469({channelId}) { // fn#35469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:3030, offset: 0x01073542, size: 27 bytes, params: 2, frame: 2
if (channelId == null) {
env0_13 = {};
}
}
}
function value_35454() { // fn#35454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:1037, offset: 0x0107316a, size: 27 bytes, params: 1, frame: 11
const Object = global.Object;
return Object.values(env1_12);
}
function value_35456(a0, a1) { // fn#35456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:1194, offset: 0x010731a6, size: 68 bytes, params: 3, frame: 5
const value = environment.__proto__;
const property = env1_12[a0];
return property != null && !property.unavailable && (a1 != null ? property.messageId === a1 : property.region != null);
}
function value_35457(a0) { // fn#35457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:1325, offset: 0x010731ea, size: 31 bytes, params: 2, frame: 3
const value = environment.__proto__;
const property = env1_12[a0];
return property != null && property.unavailable;
}
function value_35458() { // fn#35458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4430:1410, offset: 0x01073209, size: 25 bytes, params: 1, frame: 3
return {calls: env1_12, enqueuedRings: env1_13};
}
global.__d(_fun35445, 4258, [6, 7, 15, 17, 18, 1379, 1934, 3969, 661, 694, 507, 22, 566,
2]) /* metro module 4258, dependencies: [6, 7, 15, 17, 18, 1379, 1934, 3969, 661, 694, 507, 22, 566, 2] */;
+323 -293
View File
@@ -1,4 +1,16 @@
/* Metro module 5090; source: stores/CategoryCollapseStore.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 4646, 1935, 661, 1360, 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 ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildChannelStore from './GuildChannelStore.tsx'; /* Metro dependency 1935 */
import GuildAvailabilityStore from './GuildAvailabilityStore.tsx'; /* Metro dependency 4646 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun44193(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:6, offset: 0x0116a213, size: 455 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_44199 = function(a0, a1) {
@@ -46,17 +58,8 @@ function _fun44193(global, require, importDefault, importAll, module, exports, d
};
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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildAvailabilityStore = importDefault(4646) /* metro dependency 4646: GuildAvailabilityStore */;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const env0_10 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
const env0_11 = {};
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
let value = _fun44202(PersistedStore);
value.displayName = 'CategoryCollapseStore';
value.persistKey = 'collapsedCategories';
@@ -73,328 +76,355 @@ function _fun44193(global, require, importDefault, importAll, module, exports, d
}, CHANNEL_DELETE: function(a0) {
return deleteCategory(a0.channel.id);
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/CategoryCollapseStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/CategoryCollapseStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_44194() { // fn#44194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:204, offset: 0x0116a3da, 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_44194_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_44197(a0, a1) { // fn#44197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:397, offset: 0x0116a438, 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) {
function _isNativeReflectConstruct_44194() { // fn#44194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:204, offset: 0x0116a3da, 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 _fun44198;
return (_isNativeReflectConstruct_44194_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_44199(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') {
function _createForOfIteratorHelperLoose_44197(a0, a1) { // fn#44197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:397, offset: 0x0116a438, 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 _fun44198;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_44199(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_44199(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_44199(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun44198;
}
return _fun44198;
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 _fun44198() { // fn#44198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:968, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
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 incrementVersion() { // fn#44200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:1320, offset: 0x0116a5aa, size: 22 bytes, params: 1, frame: 3
env0_12 += 1;
}
function deleteCategory(a0) { // fn#44201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:1353, offset: 0x0116a5c0, size: 36 bytes, params: 2, frame: 4
if (env0_11[a0] == null) {
return false;
function incrementVersion() { // fn#44200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:1320, offset: 0x0116a5aa, size: 22 bytes, params: 1, frame: 3
env0_12 += 1;
}
delete env0_11[a0];
}
function _fun44202(a0) { // fn#44202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:1421, offset: 0x0116a5e4, size: 160 bytes, params: 2, frame: 16
const closure = CategoryCollapseStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function(a0) {
var value = a0;
this.waitFor(ChannelStore, GuildAvailabilityStore, GuildChannelStore);
var incrementVersionBinding = incrementVersion;
this.removeChangeListener(incrementVersionBinding);
this.addChangeListener(incrementVersionBinding);
env1_11 = value ?? ({});
}}, {key: 'getState', value: value_44205}, {key: 'isCollapsed', value: value_44206}, {key: 'getCollapsedCategories',
value: value_44207}, {key: 'version', get: get_44208}]);
}
function deleteCategory(a0) { // fn#44201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:1353, offset: 0x0116a5c0, size: 36 bytes, params: 2, frame: 4
if (env0_11[a0] == null) {
return false;
}
delete env0_11[a0];
}
function CONNECTION_OPEN_44209(a0) { // fn#44209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:2253, offset: 0x0116a708, size: 218 bytes, params: 2, frame: 24
var r5;
var r11;
var value4;
var channel_overrides;
var value5;
var value6;
var value7;
var collapsed;
var binding;
var channel_id;
var value8;
var value9;
let userGuildSettings = a0.userGuildSettings;
env0_11 = !userGuildSettings.partial ? {} : env0_11;
let _createForOfIteratorHelperLoose_44197Binding = _createForOfIteratorHelperLoose_44197;
userGuildSettings = a0.userGuildSettings;
const value2 = _createForOfIteratorHelperLoose_44197Binding(userGuildSettings.entries);
const value3 = value2();
let done = value3.done;
if (!done) {
r5 = value3;
while (true) {
value4 = r5.value;
channel_overrides = value4.channel_overrides;
if (channel_overrides != null) {
_createForOfIteratorHelperLoose_44197Binding = _createForOfIteratorHelperLoose_44197;
function _fun44202(a0) { // fn#44202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:1421, offset: 0x0116a5e4, size: 160 bytes, params: 2, frame: 16
const CategoryCollapseStore2 = CategoryCollapseStore;
Inherits(CategoryCollapseStore2, a0);
return CreateClass(CategoryCollapseStore2, [{key: 'initialize', value: function(a0) {
var value = a0;
this.waitFor(ChannelStore, GuildAvailabilityStore, GuildChannelStore);
var incrementVersionBinding = incrementVersion;
this.removeChangeListener(incrementVersionBinding);
this.addChangeListener(incrementVersionBinding);
env1_11 = value ?? ({});
}}, {key: 'getState', value: value_44205}, {key: 'isCollapsed', value: value_44206}, {key: 'getCollapsedCategories',
value: value_44207}, {key: 'version', get: get_44208}]);
function CategoryCollapseStore() { // fn#44203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:1433, offset: 0x00ea76ec, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, CategoryCollapseStore);
const value3 = env1_5(CategoryCollapseStore);
return env1_4(this, _isNativeReflectConstruct_44194() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_44205() { // fn#44205, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
function value_44206(a0) { // fn#44206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:1959, offset: 0x0116a6d0, size: 56 bytes, params: 2, frame: 3
let value = a0 == null;
let r1 = value || a0 === 'null';
if (!r1) {
value = environment.__proto__;
value = !env1_11[a0];
r1 = value;
}
return !r1 && env1_11[a0];
}
function value_44207() { // fn#44207, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
function get_44208() { // fn#44208, offset: 0x00e2f9de, size: 9 bytes, params: 1, frame: 1
return env1_12;
}
}
function CONNECTION_OPEN_44209(a0) { // fn#44209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:2253, offset: 0x0116a708, size: 218 bytes, params: 2, frame: 24
var r5;
var r11;
var value4;
var channel_overrides;
var value5;
var value6;
var value7;
var collapsed;
var binding;
var channel_id;
var value8;
var value9;
let userGuildSettings = a0.userGuildSettings;
env0_11 = !userGuildSettings.partial ? {} : env0_11;
let _createForOfIteratorHelperLoose_44197Binding = _createForOfIteratorHelperLoose_44197;
userGuildSettings = a0.userGuildSettings;
const value2 = _createForOfIteratorHelperLoose_44197Binding(userGuildSettings.entries);
const value3 = value2();
let done = value3.done;
if (!done) {
r5 = value3;
while (true) {
value4 = r5.value;
channel_overrides = value4.channel_overrides;
value5 = _createForOfIteratorHelperLoose_44197Binding(channel_overrides);
value6 = value5();
done = value6.done;
if (channel_overrides != null) {
_createForOfIteratorHelperLoose_44197Binding = _createForOfIteratorHelperLoose_44197;
channel_overrides = value4.channel_overrides;
value5 = _createForOfIteratorHelperLoose_44197Binding(channel_overrides);
value6 = value5();
done = value6.done;
if (done) {
break;
}
r11 = value6;
while (true) {
value7 = r11.value;
collapsed = value7.collapsed;
binding = env0_11;
channel_id = value7.channel_id;
if (collapsed) {
binding[channel_id] = true;
} else {
delete binding[channel_id];
}
value8 = value5();
done = value8.done;
if (done) {
break;
}
r11 = value8;
continue;
}
}
value9 = value2();
done = value9.done;
if (done) {
break;
}
r11 = value6;
while (true) {
value7 = r11.value;
collapsed = value7.collapsed;
binding = env0_11;
channel_id = value7.channel_id;
if (collapsed) {
binding[channel_id] = true;
} else {
delete binding[channel_id];
}
value8 = value5();
done = value8.done;
if (done) {
break;
}
r11 = value8;
continue;
}
r5 = value9;
continue;
}
value9 = value2();
done = value9.done;
if (done) {
break;
}
r5 = value9;
continue;
}
}
}
function USER_GUILD_SETTINGS_FULL_UPDATE_44210({userGuildSettings}) { // fn#44210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:2638, offset: 0x0116a7e2, size: 309 bytes, params: 2, frame: 22
var r5;
var r11;
var r3;
var r7;
var propertyName;
var propertyName2;
var channel;
var value5;
var guild_id;
var value6;
var has;
var value7;
var binding2;
var id;
var value9;
var channel_overrides;
var value10;
var value11;
var value12;
var collapsed;
var channel_id;
var value13;
var value14;
const Set = global.Set;
let value = userGuildSettings.map(function(a0) {
return a0.guild_id;
});
value = value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
let set = new Set(value);
let binding = env0_11;
for (propertyName in binding) {
channel = ChannelStore.getChannel(propertyName);
value5 = channel != null;
if (!value5) {
r11 = value5;
continue;
}
guild_id = channel.guild_id;
value6 = guild_id != null;
r11 = value6;
if (!r11) {
continue;
}
has = set.has;
guild_id = channel.guild_id;
value7 = Reflect.apply(has, set, [guild_id]);
r11 = value7;
if (!r11) {
function USER_GUILD_SETTINGS_FULL_UPDATE_44210({userGuildSettings}) { // fn#44210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:2638, offset: 0x0116a7e2, size: 309 bytes, params: 2, frame: 22
var r5;
var r11;
var r3;
var r7;
var propertyName;
var propertyName2;
var channel;
var value5;
var guild_id;
var value6;
var has;
var value7;
var binding2;
var id;
var value9;
var channel_overrides;
var value10;
var value11;
var value12;
var collapsed;
var channel_id;
var value13;
var value14;
const Set = global.Set;
let value = userGuildSettings.map(function(a0) {
return a0.guild_id;
});
value = value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
let set = new Set(value);
let binding = env0_11;
for (propertyName in binding) {
channel = ChannelStore.getChannel(propertyName);
value5 = channel != null;
if (!value5) {
r11 = value5;
continue;
}
guild_id = channel.guild_id;
value6 = guild_id != null;
r11 = value6;
if (!r11) {
continue;
}
has = set.has;
guild_id = channel.guild_id;
value7 = Reflect.apply(has, set, [guild_id]);
r11 = value7;
if (!r11) {
r5 = propertyName2;
continue;
}
binding2 = env0_11;
id = channel.id;
delete binding2[id];
r5 = propertyName2;
continue;
}
binding2 = env0_11;
id = channel.id;
delete binding2[id];
r5 = propertyName2;
}
set = _createForOfIteratorHelperLoose_44197(userGuildSettings);
const value8 = set();
let done = value8.done;
if (!done) {
r3 = value8;
while (true) {
_createForOfIteratorHelperLoose_44197Binding = _createForOfIteratorHelperLoose_44197;
value9 = r3.value;
channel_overrides = value9.channel_overrides;
value10 = _createForOfIteratorHelperLoose_44197Binding(channel_overrides);
value11 = value10();
done = value11.done;
if (!done) {
r7 = value11;
while (true) {
value12 = r7.value;
collapsed = value12.collapsed;
if (collapsed) {
binding = env0_11;
channel_id = value12.channel_id;
binding[channel_id] = true;
set = _createForOfIteratorHelperLoose_44197(userGuildSettings);
const value8 = set();
let done = value8.done;
if (!done) {
r3 = value8;
while (true) {
_createForOfIteratorHelperLoose_44197Binding = _createForOfIteratorHelperLoose_44197;
value9 = r3.value;
channel_overrides = value9.channel_overrides;
value10 = _createForOfIteratorHelperLoose_44197Binding(channel_overrides);
value11 = value10();
done = value11.done;
if (!done) {
r7 = value11;
while (true) {
value12 = r7.value;
collapsed = value12.collapsed;
if (collapsed) {
binding = env0_11;
channel_id = value12.channel_id;
binding[channel_id] = true;
}
value13 = value10();
done = value13.done;
if (done) {
break;
}
r7 = value13;
continue;
}
value13 = value10();
done = value13.done;
if (done) {
break;
}
r7 = value13;
continue;
}
value14 = set();
done = value14.done;
if (done) {
break;
}
r3 = value14;
continue;
}
value14 = set();
done = value14.done;
if (done) {
break;
}
r3 = value14;
continue;
}
}
}
function CATEGORY_COLLAPSE_44212({id}) { // fn#44212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:3088, offset: 0x0116a917, size: 40 bytes, params: 2, frame: 3
if (env0_11[id]) {
return false;
function CATEGORY_COLLAPSE_44212({id}) { // fn#44212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:3088, offset: 0x0116a917, size: 40 bytes, params: 2, frame: 3
if (env0_11[id]) {
return false;
}
env0_11[id] = true;
}
env0_11[id] = true;
}
function CATEGORY_COLLAPSE_ALL({guildId}) { // fn#44214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:3256, offset: 0x0116a957, size: 61 bytes, params: 2, frame: 12
const channels = GuildChannelStore.getChannels(guildId);
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
channels[GUILD_CATEGORY].forEach(_fun44215);
}
function CATEGORY_COLLAPSE_ALL({guildId}) { // fn#44214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:3256, offset: 0x0116a957, size: 61 bytes, params: 2, frame: 12
const channels = GuildChannelStore.getChannels(guildId);
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
channels[GUILD_CATEGORY].forEach(_fun44215);
function _fun44215({channel}) { // fn#44215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:3348, offset: 0x0116a994, size: 43 bytes, params: 2, frame: 3
var value;
if (channel.id !== 'null') {
value = environment.__proto__;
env1_11[channel.id] = true;
}
}
function CATEGORY_EXPAND_ALL({guildId}) { // fn#44216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:3416, offset: 0x0116a9bf, size: 61 bytes, params: 2, frame: 12
const channels = GuildChannelStore.getChannels(guildId);
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
channels[GUILD_CATEGORY].forEach(_fun44217);
}
function value_44206(a0) { // fn#44206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:1959, offset: 0x0116a6d0, size: 56 bytes, params: 2, frame: 3
let value = a0 == null;
let r1 = value || a0 === 'null';
if (!r1) {
value = environment.__proto__;
value = !env1_11[a0];
r1 = value;
}
return !r1 && env1_11[a0];
}
function _fun44215({channel}) { // fn#44215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:3348, offset: 0x0116a994, size: 43 bytes, params: 2, frame: 3
var value;
if (channel.id !== 'null') {
value = environment.__proto__;
env1_11[channel.id] = true;
function CATEGORY_EXPAND_ALL({guildId}) { // fn#44216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:3416, offset: 0x0116a9bf, size: 61 bytes, params: 2, frame: 12
const channels = GuildChannelStore.getChannels(guildId);
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
channels[GUILD_CATEGORY].forEach(_fun44217);
function _fun44217({channel}) { // fn#44217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:3506, offset: 0x0116a9fc, size: 28 bytes, params: 2, frame: 2
delete env1_11[channel.id];
}
}
}
function _fun44217({channel}) { // fn#44217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5268:3506, offset: 0x0116a9fc, size: 28 bytes, params: 2, frame: 2
delete env1_11[channel.id];
}
global.__d(_fun44193, 5090, [6, 7, 15, 17, 18, 1379, 4646, 1935, 661, 1360, 566, 694,
2]) /* metro module 5090, dependencies: [6, 7, 15, 17, 18, 1379, 4646, 1935, 661, 1360, 566, 694, 2] */;
+216 -174
View File
@@ -1,195 +1,237 @@
/* Metro module 4293; source: stores/CertifiedDeviceStore.tsx; dependencies: [6, 7, 15, 17, 18, 4291, 587, 22, 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 Module00022 from '../by-id/module-00022.js'; /* Metro dependency 22 */
import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as StorageModule from '../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */
import * as ConstantsModule from '../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */
function _fun36360(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:6, offset: 0x0108ac47, size: 327 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const env0_8 = (require(4291) /* metro dependency 4291: Constants */).DeviceTypes;
const env0_9 = {};
const env0_10 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun36368(Store);
value.displayName = 'CertifiedDeviceStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{CERTIFIED_DEVICES_SET: CERTIFIED_DEVICES_SET_36391});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/CertifiedDeviceStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/CertifiedDeviceStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_36361() { // fn#36361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:170, offset: 0x0108ad8e, 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_36361_isNativeReflectConstruct = function() {
return !!result;
})();
}
function getOrElse(a0, a1, a2) { // fn#36364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:406, offset: 0x0108adec, size: 35 bytes, params: 4, frame: 12
const value = a1;
const property = env0_10[a0];
return property == null ? value : a2(property);
}
function updateDevicesForApplication(a0, a1) { // fn#36365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:465, offset: 0x0108ae0f, size: 67 bytes, params: 3, frame: 15
const property = env0_9[a0];
if (property != null) {
property.forEach(_fun36366);
}
env0_9[a0] = a1;
a1.forEach(_fun36367);
}
function _fun36368(a0) { // fn#36368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:597, offset: 0x0108ae7c, size: 335 bytes, params: 2, frame: 16
const closure = CertifiedDeviceStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: value_36370}, {key: 'isCertified', value: value_36373},
{key: 'getCertifiedDevice', value: value_36374}, {key: 'getCertifiedDeviceName', value: function(a0, a1) {
var value = a1;
var value2 = this.getCertifiedDevice(a0);
return value2 == null ? value : '' + value2.vendor.name + ' ' + value2.model.name;
}}, {key: 'getCertifiedDeviceByType', value: value_36376}, {key: 'isHardwareMute', value: function(a0) {
return getOrElse(a0, false, _fun36379);
}}, {key: 'hasEchoCancellation', value: function(a0) {
return getOrElse(a0, false, _fun36381);
}}, {key: 'hasNoiseSuppression', value: function(a0) {
return getOrElse(a0, false, _fun36383);
}}, {key: 'hasAutomaticGainControl', value: function(a0) {
return getOrElse(a0, false, _fun36385);
}}, {key: 'getVendor', value: function(a0) {
return getOrElse(a0, null, _fun36387);
}}, {key: 'getModel', value: function(a0) {
return getOrElse(a0, null, _fun36389);
}}, {key: 'getRevision', value: value_36390}]);
}
function CERTIFIED_DEVICES_SET_36391({applicationId, devices}) { // fn#36391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:2227, offset: 0x0108b2fb, size: 89 bytes, params: 2, frame: 15
updateDevicesForApplication(applicationId, devices);
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
Storage.set('CertifiedDeviceStore', env0_9);
const binding = env0_11;
env0_11 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
function _fun36366({id}) { // fn#36366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:538, offset: 0x0108ae52, size: 21 bytes, params: 2, frame: 2
return delete env1_10[id];
}
function _fun36367(a0) { // fn#36367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:576, offset: 0x0108ae67, size: 21 bytes, params: 2, frame: 3
env1_10[a0.id] = a0;
return a0;
}
function value_36370() { // fn#36370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:927, offset: 0x0108b03c, size: 93 bytes, params: 1, frame: 14
var environment;
const value = environment.__proto__;
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
const value2 = Storage.get('CertifiedDeviceStore');
if (value2 != null) {
(importDefault(22) /* metro dependency 22 */).forEach(value2, function(a0, a1) {
a0.forEach(_fun36372);
updateDevicesForApplication(a1, a0);
});
}
}
function value_36373(a0) { // fn#36373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1143, offset: 0x0108b0eb, size: 22 bytes, params: 2, frame: 2
return env1_10[a0] != null;
}
function value_36376(a0) { // fn#36376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1408, offset: 0x0108b153, size: 57 bytes, params: 2, frame: 14
const env0_0 = a0;
const defaultImport = importDefault(22) /* metro dependency 22 */;
return defaultImport.find(env1_10, _fun36377);
}
function value_36378(a0) { // fn#36378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1489, offset: 0x0108b1a1, size: 30 bytes, params: 2, frame: 15
return getOrElse(a0, false, _fun36379);
}
function value_36380(a0) { // fn#36380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1603, offset: 0x0108b1e3, size: 30 bytes, params: 2, frame: 15
return getOrElse(a0, false, _fun36381);
}
function value_36382(a0) { // fn#36382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1721, offset: 0x0108b225, size: 30 bytes, params: 2, frame: 15
return getOrElse(a0, false, _fun36383);
}
function value_36384(a0) { // fn#36384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1843, offset: 0x0108b267, size: 30 bytes, params: 2, frame: 15
return getOrElse(a0, false, _fun36385);
}
function value_36386(a0) { // fn#36386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1955, offset: 0x0108b2a9, size: 30 bytes, params: 2, frame: 15
return getOrElse(a0, null, function(a0) {
return a0.vendor;
});
}
function value_36388(a0) { // fn#36388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:2030, offset: 0x0108b2d2, size: 30 bytes, params: 2, frame: 15
return getOrElse(a0, null, function(a0) {
return a0.model;
});
}
function _fun36371(a0, a1) { // fn#36371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:995, offset: 0x0108b099, size: 40 bytes, params: 3, frame: 13
a0.forEach(function(a0) {
if (a0.type === 'audioinput' && a0.hardwareMute) {
a0.hardwareMute = false;
function _isNativeReflectConstruct_36361() { // fn#36361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:170, offset: 0x0108ad8e, 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) {
}
});
updateDevicesForApplication(a1, a0);
return (_isNativeReflectConstruct_36361_isNativeReflectConstruct = function() {
return !!result;
})();
}
function getOrElse(a0, a1, a2) { // fn#36364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:406, offset: 0x0108adec, size: 35 bytes, params: 4, frame: 12
const value = a1;
const property = env0_10[a0];
return property == null ? value : a2(property);
}
function updateDevicesForApplication(a0, a1) { // fn#36365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:465, offset: 0x0108ae0f, size: 67 bytes, params: 3, frame: 15
const property = env0_9[a0];
if (property != null) {
property.forEach(_fun36366);
}
env0_9[a0] = a1;
a1.forEach(_fun36367);
function _fun36366({id}) { // fn#36366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:538, offset: 0x0108ae52, size: 21 bytes, params: 2, frame: 2
return delete env1_10[id];
}
function _fun36367(a0) { // fn#36367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:576, offset: 0x0108ae67, size: 21 bytes, params: 2, frame: 3
env1_10[a0.id] = a0;
return a0;
}
}
function _fun36368(a0) { // fn#36368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:597, offset: 0x0108ae7c, size: 335 bytes, params: 2, frame: 16
const CertifiedDeviceStore2 = CertifiedDeviceStore;
Inherits(CertifiedDeviceStore2, a0);
return CreateClass(CertifiedDeviceStore2, [{key: 'initialize', value: value_36370}, {key: 'isCertified',
value: value_36373}, {key: 'getCertifiedDevice', value: value_36374}, {key: 'getCertifiedDeviceName',
value: function(a0, a1) {
var value = a1;
var value2 = this.getCertifiedDevice(a0);
return value2 == null ? value : '' + value2.vendor.name + ' ' + value2.model.name;
}}, {key: 'getCertifiedDeviceByType', value: value_36376}, {key: 'isHardwareMute', value: function(a0) {
return getOrElse(a0, false, _fun36379);
}}, {key: 'hasEchoCancellation', value: function(a0) {
return getOrElse(a0, false, _fun36381);
}}, {key: 'hasNoiseSuppression', value: function(a0) {
return getOrElse(a0, false, _fun36383);
}}, {key: 'hasAutomaticGainControl', value: function(a0) {
return getOrElse(a0, false, _fun36385);
}}, {key: 'getVendor', value: function(a0) {
return getOrElse(a0, null, _fun36387);
}}, {key: 'getModel', value: function(a0) {
return getOrElse(a0, null, _fun36389);
}}, {key: 'getRevision', value: value_36390}]);
function CertifiedDeviceStore() { // fn#36369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:609, offset: 0x0108afcb, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, CertifiedDeviceStore);
const value3 = env1_6(CertifiedDeviceStore);
return env1_5(this, _isNativeReflectConstruct_36361() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_36370() { // fn#36370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:927, offset: 0x0108b03c, size: 93 bytes, params: 1, frame: 14
var environment;
const value = environment.__proto__;
const Storage = (StorageModule).Storage;
const value2 = Storage.get('CertifiedDeviceStore');
if (value2 != null) {
(importDefault(22) /* metro dependency 22 */).forEach(value2, function(a0, a1) {
a0.forEach(_fun36372);
updateDevicesForApplication(a1, a0);
});
}
function _fun36371(a0, a1) { // fn#36371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:995, offset: 0x0108b099, size: 40 bytes, params: 3, frame: 13
a0.forEach(function(a0) {
if (a0.type === 'audioinput' && a0.hardwareMute) {
a0.hardwareMute = false;
}
});
updateDevicesForApplication(a1, a0);
}
}
function value_36373(a0) { // fn#36373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1143, offset: 0x0108b0eb, size: 22 bytes, params: 2, frame: 2
return env1_10[a0] != null;
}
function value_36374(a0) { // fn#36374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1207, offset: 0x010353e1, size: 16 bytes, params: 2, frame: 2
return env1_10[a0];
}
function value_36376(a0) { // fn#36376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1408, offset: 0x0108b153, size: 57 bytes, params: 2, frame: 14
const env0_0 = a0;
const defaultImport = Module00022;
return defaultImport.find(env1_10, _fun36377);
function _fun36377({type}) { // fn#36377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1443, offset: 0x0108b18c, size: 21 bytes, params: 2, frame: 2
return type === env0_0;
}
}
function value_36378(a0) { // fn#36378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1489, offset: 0x0108b1a1, size: 30 bytes, params: 2, frame: 15
return getOrElse(a0, false, _fun36379);
function _fun36379(a0) { // fn#36379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1524, offset: 0x0108b1bf, size: 36 bytes, params: 2, frame: 3
const type = a0.type;
const value = environment.__proto__.__proto__;
const AUDIO_INPUT = DeviceTypes.AUDIO_INPUT;
return type === AUDIO_INPUT && a0.hardwareMute;
}
}
function value_36380(a0) { // fn#36380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1603, offset: 0x0108b1e3, size: 30 bytes, params: 2, frame: 15
return getOrElse(a0, false, _fun36381);
function _fun36381(a0) { // fn#36381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1638, offset: 0x0108b201, size: 36 bytes, params: 2, frame: 3
const type = a0.type;
const value = environment.__proto__.__proto__;
const AUDIO_INPUT = DeviceTypes.AUDIO_INPUT;
return type === AUDIO_INPUT && a0.echoCancellation;
}
}
function value_36382(a0) { // fn#36382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1721, offset: 0x0108b225, size: 30 bytes, params: 2, frame: 15
return getOrElse(a0, false, _fun36383);
function _fun36383(a0) { // fn#36383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1756, offset: 0x0108b243, size: 36 bytes, params: 2, frame: 3
const type = a0.type;
const value = environment.__proto__.__proto__;
const AUDIO_INPUT = DeviceTypes.AUDIO_INPUT;
return type === AUDIO_INPUT && a0.noiseSuppression;
}
}
function value_36384(a0) { // fn#36384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1843, offset: 0x0108b267, size: 30 bytes, params: 2, frame: 15
return getOrElse(a0, false, _fun36385);
function _fun36385(a0) { // fn#36385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1878, offset: 0x0108b285, size: 36 bytes, params: 2, frame: 3
const type = a0.type;
const value = environment.__proto__.__proto__;
const AUDIO_INPUT = DeviceTypes.AUDIO_INPUT;
return type === AUDIO_INPUT && a0.automaticGainControl;
}
}
function value_36386(a0) { // fn#36386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1955, offset: 0x0108b2a9, size: 30 bytes, params: 2, frame: 15
return getOrElse(a0, null, function(a0) {
return a0.vendor;
});
}
function value_36388(a0) { // fn#36388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:2030, offset: 0x0108b2d2, size: 30 bytes, params: 2, frame: 15
return getOrElse(a0, null, function(a0) {
return a0.model;
});
}
function value_36390() { // fn#36390, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
}
function CERTIFIED_DEVICES_SET_36391({applicationId, devices}) { // fn#36391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:2227, offset: 0x0108b2fb, size: 89 bytes, params: 2, frame: 15
updateDevicesForApplication(applicationId, devices);
const Storage = (StorageModule).Storage;
Storage.set('CertifiedDeviceStore', env0_9);
const binding = env0_11;
env0_11 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
}
function _fun36379(a0) { // fn#36379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1524, offset: 0x0108b1bf, size: 36 bytes, params: 2, frame: 3
const type = a0.type;
const value = environment.__proto__.__proto__;
const AUDIO_INPUT = DeviceTypes.AUDIO_INPUT;
return type === AUDIO_INPUT && a0.hardwareMute;
function _fun36372(a0) { // fn#36372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1014, offset: 0x0108b0c1, size: 42 bytes, params: 2, frame: 3
if (a0.type === 'audioinput' && a0.hardwareMute) {
a0.hardwareMute = false;
}
}
function _fun36381(a0) { // fn#36381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1638, offset: 0x0108b201, size: 36 bytes, params: 2, frame: 3
const type = a0.type;
const value = environment.__proto__.__proto__;
const AUDIO_INPUT = DeviceTypes.AUDIO_INPUT;
return type === AUDIO_INPUT && a0.echoCancellation;
function _fun36387(a0) { // fn#36387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1992, offset: 0x0108b2c7, size: 11 bytes, params: 2, frame: 1
return a0.vendor;
}
function _fun36383(a0) { // fn#36383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1756, offset: 0x0108b243, size: 36 bytes, params: 2, frame: 3
const type = a0.type;
const value = environment.__proto__.__proto__;
const AUDIO_INPUT = DeviceTypes.AUDIO_INPUT;
return type === AUDIO_INPUT && a0.noiseSuppression;
}
function _fun36385(a0) { // fn#36385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1878, offset: 0x0108b285, size: 36 bytes, params: 2, frame: 3
const type = a0.type;
const value = environment.__proto__.__proto__;
const AUDIO_INPUT = DeviceTypes.AUDIO_INPUT;
return type === AUDIO_INPUT && a0.automaticGainControl;
function _fun36389(a0) { // fn#36389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:2067, offset: 0x0108b2f0, size: 11 bytes, params: 2, frame: 1
return a0.model;
}
global.__d(_fun36360, 4293, [6, 7, 15, 17, 18, 4291, 587, 22, 566, 694,
2]) /* metro module 4293, dependencies: [6, 7, 15, 17, 18, 4291, 587, 22, 566, 694, 2] */;
+62 -48
View File
@@ -1,16 +1,20 @@
/* Metro module 15980; source: stores/ChangeVanityURLModalStore.tsx; dependencies: [6, 7, 15, 17, 18, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun123609(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16188:6, offset: 0x025954c2, size: 353 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const FormStates = (require(661) /* metro dependency 661: Constants */).FormStates;
const FormStates = (ConstantsModule).FormStates;
const env0_8 = {};
let env0_9 = FormStates.CLOSED;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun123613(Store);
value.displayName = 'ChangeVanityURLModalStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
@@ -30,50 +34,60 @@ function _fun123609(global, require, importDefault, importAll, module, exports,
env0_7 = null;
env0_10 = null;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/ChangeVanityURLModalStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/ChangeVanityURLModalStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_123610() { // fn#123610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16188:169, offset: 0x02595623, 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) {
function _isNativeReflectConstruct_123610() { // fn#123610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16188:169, offset: 0x02595623, 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_123610_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_123610_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun123613(a0) { // fn#123613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16188:399, offset: 0x02595685, size: 97 bytes, params: 2, frame: 16
const closure = ChangeVanityURLModalStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'isOpen', value: function() {
return CLOSED !== FormStates.CLOSED;
}}, {key: 'getProps', value: value_123616}]);
}
function _fun123613(a0) { // fn#123613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16188:399, offset: 0x02595685, size: 97 bytes, params: 2, frame: 16
const ChangeVanityURLModalStore2 = ChangeVanityURLModalStore;
Inherits(ChangeVanityURLModalStore2, a0);
return CreateClass(ChangeVanityURLModalStore2, [{key: 'isOpen', value: function() {
return CLOSED !== FormStates.CLOSED;
}}, {key: 'getProps', value: value_123616}]);
function ChangeVanityURLModalStore() { // fn#123614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16188:411, offset: 0x010a3f4a, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, ChangeVanityURLModalStore);
const value3 = env1_3(ChangeVanityURLModalStore);
return env1_2(this, _isNativeReflectConstruct_123610() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_123616() { // fn#123616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16188:805, offset: 0x025956fd, size: 64 bytes, params: 1, frame: 4
const SUBMITTING = FormStates.SUBMITTING;
return {submitting: CLOSED === SUBMITTING, errorDetails: env1_10, errors: env1_8, guildId: env1_6, code: env1_7};
}
}
function value_123616() { // fn#123616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16188:805, offset: 0x025956fd, size: 64 bytes, params: 1, frame: 4
const SUBMITTING = FormStates.SUBMITTING;
return {submitting: CLOSED === SUBMITTING, errorDetails: env1_10, errors: env1_8, guildId: env1_6, code: env1_7};
}
global.__d(_fun123609, 15980, [6, 7, 15, 17, 18, 661, 566, 694,
2]) /* metro module 15980, dependencies: [6, 7, 15, 17, 18, 661, 566, 694, 2] */;
+86 -69
View File
@@ -1,88 +1,105 @@
/* Metro module 11165; source: stores/ChannelFollowerStatsStore.tsx; dependencies: [6, 7, 15, 17, 18, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun85245(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11351:6, offset: 0x01f68d30, size: 327 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
object = {FAILED: 'failed', SUCCEEDED: 'succeeded'};
let env0_6 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun85249(Store);
value.displayName = 'ChannelFollowerStatsStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
env0_6 = {};
}, CHANNEL_FOLLOWER_STATS_FETCH_SUCCESS: CHANNEL_FOLLOWER_STATS_FETCH_SUCCESS,
CHANNEL_FOLLOWER_STATS_FETCH_FAILURE: CHANNEL_FOLLOWER_STATS_FETCH_FAILURE});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/ChannelFollowerStatsStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/ChannelFollowerStatsStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_85246() { // fn#85246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11351:148, offset: 0x01f68e77, 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) {
function _isNativeReflectConstruct_85246() { // fn#85246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11351:148, offset: 0x01f68e77, 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_85246_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_85246_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun85249(a0) { // fn#85249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11351:429, offset: 0x01f68ed9, size: 74 bytes, params: 2, frame: 15
const closure = ChannelFollowerStatsStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getFollowerStatsForChannel', value: value_85251}]);
}
function _fun85249(a0) { // fn#85249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11351:429, offset: 0x01f68ed9, size: 74 bytes, params: 2, frame: 15
const ChannelFollowerStatsStore2 = ChannelFollowerStatsStore;
Inherits(ChannelFollowerStatsStore2, a0);
return CreateClass(ChannelFollowerStatsStore2, [{key: 'getFollowerStatsForChannel', value: value_85251}]);
function ChannelFollowerStatsStore() { // fn#85250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11351:441, offset: 0x00e3db8d, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, ChannelFollowerStatsStore);
const value3 = env1_3(ChannelFollowerStatsStore);
return env1_2(this, _isNativeReflectConstruct_85246() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function CHANNEL_FOLLOWER_STATS_FETCH_SUCCESS({channelId, stats}) { // fn#85253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11351:998, offset: 0x01f68f23, size: 154 bytes, params: 2, frame: 13
const r3 = stats ?? ({});
const binding = env0_6;
const object2 = {};
const SUCCEEDED = env0_5.SUCCEEDED;
object2.loadingStatus = SUCCEEDED;
const Date = global.Date;
object2.lastFetched = Date.now();
object2.channelsFollowing = r3.channels_following;
object2.guildMembers = r3.guild_members;
object2.guildsFollowing = r3.guilds_following;
const users_seen_ever = r3.users_seen_ever;
object2.usersSeenEver = users_seen_ever;
object2.subscribersGainedSinceLastPost = r3.subscribers_gained_since_last_post;
object2.subscribersLostSinceLastPost = r3.subscribers_lost_since_last_post;
binding[channelId] = object2;
}
function value_85251(a0) { // fn#85251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11351:800, offset: 0x00fbe09c, size: 16 bytes, params: 2, frame: 2
return env1_6[a0];
}
}
function CHANNEL_FOLLOWER_STATS_FETCH_SUCCESS({channelId, stats}) { // fn#85253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11351:998, offset: 0x01f68f23, size: 154 bytes, params: 2, frame: 13
const r3 = stats ?? ({});
const binding = env0_6;
const object = {};
const SUCCEEDED = env0_5.SUCCEEDED;
object.loadingStatus = SUCCEEDED;
const Date = global.Date;
object.lastFetched = Date.now();
object.channelsFollowing = r3.channels_following;
object.guildMembers = r3.guild_members;
object.guildsFollowing = r3.guilds_following;
const users_seen_ever = r3.users_seen_ever;
object.usersSeenEver = users_seen_ever;
object.subscribersGainedSinceLastPost = r3.subscribers_gained_since_last_post;
object.subscribersLostSinceLastPost = r3.subscribers_lost_since_last_post;
binding[channelId] = object;
}
function CHANNEL_FOLLOWER_STATS_FETCH_FAILURE({channelId}) { // fn#85254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11351:1438, offset: 0x01f68fbd, size: 76 bytes, params: 2, frame: 12
const binding = env0_6;
const object = {'loadingStatus': null, 'lastFetched': null, 'channelsFollowing': 0, 'guildMembers': 0,
'guildsFollowing': 0, 'usersSeenEver': 0, 'subscribersGainedSinceLastPost': 0,
'subscribersLostSinceLastPost': 0};
const FAILED = env0_5.FAILED;
object.loadingStatus = FAILED;
const Date = global.Date;
object.lastFetched = Date.now();
binding[channelId] = object;
}
function CHANNEL_FOLLOWER_STATS_FETCH_FAILURE({channelId}) { // fn#85254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11351:1438, offset: 0x01f68fbd, size: 76 bytes, params: 2, frame: 12
const binding = env0_6;
const object2 = {'loadingStatus': null, 'lastFetched': null, 'channelsFollowing': 0, 'guildMembers': 0,
'guildsFollowing': 0, 'usersSeenEver': 0, 'subscribersGainedSinceLastPost': 0,
'subscribersLostSinceLastPost': 0};
const FAILED = env0_5.FAILED;
object2.loadingStatus = FAILED;
const Date = global.Date;
object2.lastFetched = Date.now();
binding[channelId] = object2;
}
global.__d(_fun85245, 11165, [6, 7, 15, 17, 18, 566, 694,
2]) /* metro module 11165, dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
+294 -271
View File
@@ -1,301 +1,324 @@
/* Metro module 11169; source: stores/ChannelPinsStore.tsx; dependencies: [6, 7, 15, 17, 18, 1949, 1379, 1945, 1867, 4814, 3793, 1878, 4625, 22, 4821, 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 Module00022 from '../by-id/module-00022.js'; /* Metro dependency 22 */
import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from './GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from './UserStore.tsx'; /* Metro dependency 1878 */
import GuildMemberStore from './GuildMemberStore.tsx'; /* Metro dependency 1945 */
import LocaleStore from '../modules/user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import RelationshipStore from './RelationshipStore.tsx'; /* Metro dependency 3793 */
import MessageStore from './MessageStore.tsx'; /* Metro dependency 4814 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ExplicitMediaRedactionUtilsModule from '../modules/explicit_media_redaction/ExplicitMediaRedactionUtils.tsx'; /* Metro dependency 4821 */
function _fun85277(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:6, offset: 0x01f69f3d, size: 588 bytes, params: 8, frame: 22
const env0_0 = require;
const closure = CHANNEL_DELETE_85281;
const closure2 = RELATIONSHIP_ADD_85282;
const CHANNEL_DELETE_852812 = CHANNEL_DELETE_85281;
const RELATIONSHIP_ADD_852822 = RELATIONSHIP_ADD_85282;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let env0_16 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun85285(Store);
value.displayName = 'ChannelPinsStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
env0_16 = {};
}, LOAD_PINNED_MESSAGES: LOAD_PINNED_MESSAGES, LOAD_PINNED_MESSAGES_SUCCESS: LOAD_PINNED_MESSAGES_SUCCESS_85291,
LOAD_PINNED_MESSAGES_FAILURE: LOAD_PINNED_MESSAGES_FAILURE, CHANNEL_DELETE: closure, THREAD_DELETE: closure,
GUILD_DELETE: GUILD_DELETE_85294, MESSAGE_DELETE: MESSAGE_DELETE_85296,
LOAD_PINNED_MESSAGES_FAILURE: LOAD_PINNED_MESSAGES_FAILURE, CHANNEL_DELETE: CHANNEL_DELETE_852812,
THREAD_DELETE: CHANNEL_DELETE_852812, GUILD_DELETE: GUILD_DELETE_85294, MESSAGE_DELETE: MESSAGE_DELETE_85296,
MESSAGE_DELETE_BULK: MESSAGE_DELETE_BULK_85298, MESSAGE_UPDATE: MESSAGE_UPDATE_85300,
RELATIONSHIP_ADD: closure2, RELATIONSHIP_REMOVE: closure2, RELATIONSHIP_UPDATE: closure2,
RELATIONSHIP_ADD: RELATIONSHIP_ADD_852822, RELATIONSHIP_REMOVE: RELATIONSHIP_ADD_852822,
RELATIONSHIP_UPDATE: RELATIONSHIP_ADD_852822,
MESSAGE_EXPLICIT_CONTENT_SCAN_TIMEOUT: MESSAGE_EXPLICIT_CONTENT_SCAN_TIMEOUT_85304});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/ChannelPinsStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/ChannelPinsStore.tsx');
exports.default = value;
exports.FetchState = {LOADING: 'LOADING', LOADED_HAS_MORE: 'LOADED_HAS_MORE', LOADED_FINISHED: 'LOADING_FINISHED',
FAILED: 'FAILED'};
}
function _isNativeReflectConstruct_85278() { // fn#85278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:220, offset: 0x01f6a189, 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_85278_isNativeReflectConstruct = function() {
return !!result;
})();
}
function CHANNEL_DELETE_85281({channel}) { // fn#85281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:561, offset: 0x01f6a1eb, size: 28 bytes, params: 2, frame: 2
delete env0_16[channel.id];
}
function RELATIONSHIP_ADD_85282() { // fn#85282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:618, offset: 0x01f6a207, size: 51 bytes, params: 1, frame: 14
const defaultImport = importDefault(22) /* metro dependency 22 */;
defaultImport.forEach(env0_16, function(a0) {
a0.items.forEach(_fun85284);
a0.items = a0.items.slice();
});
}
function _fun85285(a0) { // fn#85285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:831, offset: 0x01f6a2ba, size: 97 bytes, params: 2, frame: 16
const closure = ChannelPinsStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, GuildMemberStore, GuildStore, LocaleStore, MessageStore, RelationshipStore,
UserStore);
}}, {key: 'getPins', value: value_85288}]);
}
function LOAD_PINNED_MESSAGES(a0) { // fn#85290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:1378, offset: 0x01f6a34e, size: 155 bytes, params: 2, frame: 15
var channel;
var value3;
const channelId = a0.channelId;
if (a0.reset) {
channel = ChannelStore.getChannel(channelId);
value3 = undefined;
env0_16[channelId] = {id: channelId, items: [], state: env0_15.LOADING,
guildId: (channel == null ? value3 : channel.getGuildId()) ?? value3};
} else if (env0_16[channelId] == null) {
channel = ChannelStore.getChannel(channelId);
value3 = undefined;
env0_16[channelId] = {id: channelId, items: [], state: env0_15.LOADING,
guildId: (channel == null ? value3 : channel.getGuildId()) ?? value3};
} else {
env0_16[channelId].state = env0_15.LOADING;
}
}
function LOAD_PINNED_MESSAGES_SUCCESS_85291({channelId, pins, hasMore}) { // fn#85291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:1628, offset: 0x01f6a3e9, size: 126 bytes, params: 2, frame: 17
const property = env0_16[channelId];
if (property == null) {
return false;
}
const value2 = pins.map(_fun85292);
const items3 = property.items;
const items2 = [];
arraySpread(items2, value2, arraySpread(items2, items3, 0, undefined), undefined);
property.items = items2;
const binding = env0_15;
property.state = hasMore ? binding.LOADED_HAS_MORE : binding.LOADED_FINISHED;
}
function LOAD_PINNED_MESSAGES_FAILURE({channelId}) { // fn#85293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:1939, offset: 0x01f6a4d5, size: 49 bytes, params: 2, frame: 3
const property = env0_16[channelId];
if (property == null) {
return false;
}
const FAILED = env0_15.FAILED;
property.state = FAILED;
}
function GUILD_DELETE_85294({guild}) { // fn#85294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:2109, offset: 0x01f6a506, size: 95 bytes, params: 2, frame: 13
env0_16 = (importDefault(22) /* metro dependency 22 */)(env0_16).filter(function({guildId}) {
return guildId !== guild.id;
}).keyBy('id').value();
}
function MESSAGE_DELETE_85296({id, channelId}) { // fn#85296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:2227, offset: 0x01f6a57f, size: 136 bytes, params: 2, frame: 17
var r1;
var r0;
var value3;
var defaultImport;
var value4;
const property = env0_16[channelId];
const value2 = property != null;
if (value2) {
value3 = undefined;
defaultImport = importDefault(22) /* metro dependency 22 */;
value4 = defaultImport.remove(property.items, function(a0) {
return a0.message.id === id;
}).length !== 0;
if (value4) {
property.items = property.items.slice();
env0_16[channelId] = property;
r1 = value3;
} else {
r1 = value4;
function _isNativeReflectConstruct_85278() { // fn#85278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:220, offset: 0x01f6a189, 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) {
}
r0 = r1;
} else {
r0 = value2;
return (_isNativeReflectConstruct_85278_isNativeReflectConstruct = function() {
return !!result;
})();
}
return r0;
}
function MESSAGE_DELETE_BULK_85298({ids, channelId}) { // fn#85298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:2428, offset: 0x01f6a621, size: 74 bytes, params: 2, frame: 12
const property = env0_16[channelId];
if (property == null) {
return false;
function CHANNEL_DELETE_85281({channel}) { // fn#85281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:561, offset: 0x01f6a1eb, size: 28 bytes, params: 2, frame: 2
delete env0_16[channel.id];
}
property.items = property.items.filter(function({message}) {
return !ids.includes(message.id);
});
}
function MESSAGE_UPDATE_85300(a0) { // fn#85300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:2588, offset: 0x01f6a68e, size: 621 bytes, params: 2, frame: 21
var findIndex;
var items2;
var updateMessageRecord;
var value3;
var object2;
var defaultImport2;
var index2;
var property3;
var unshift;
let message = a0.message;
const env0_0 = message.id;
const channel_id = a0.message.channel_id;
if (channel_id == null) {
return false;
}
var value;
const property = env0_16[channel_id];
if (property == null) {
return false;
}
if (a0.message.author != null) {
if (a0.message.pinned) {
items2 = property.items;
property.items = items2.slice();
defaultImport2 = importDefault(22) /* metro dependency 22 */;
findIndex = defaultImport2.findIndex;
items2 = property.items;
index2 = Reflect.apply(findIndex, defaultImport2, [items2, function(a0) {
return a0.message.id === id;
}]);
if (index2 === -1) {
items2 = property.items;
unshift = items2.unshift;
object2 = {};
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
object2.message = value.createMessageRecord(a0.message);
object2.pinnedAt = new global.Date();
Reflect.apply(unshift, items2, [object2]);
} else {
items2 = property.items;
property3 = items2[index2];
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
updateMessageRecord = value.updateMessageRecord;
items2 = property.items;
property3.message = Reflect.apply(updateMessageRecord, value, [items2[index2].message, a0.message]);
function RELATIONSHIP_ADD_85282() { // fn#85282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:618, offset: 0x01f6a207, size: 51 bytes, params: 1, frame: 14
const defaultImport = Module00022;
defaultImport.forEach(env0_16, function(a0) {
a0.items.forEach(_fun85284);
a0.items = a0.items.slice();
});
function _fun85283(a0) { // fn#85283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:674, offset: 0x01f6a23a, size: 53 bytes, params: 2, frame: 12
let items2 = a0.items;
items2.forEach(_fun85284);
items2 = a0.items;
a0.items = items2.slice();
function _fun85284({message}) { // fn#85284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:695, offset: 0x01f6a26f, size: 75 bytes, params: 2, frame: 14
const set = message.set;
const value = environment.__proto__.__proto__;
Reflect.apply(set, message, ['blocked', RelationshipStore.isBlockedForMessage(message)]);
message.set('ignored', RelationshipStore.isIgnoredForMessage(message));
}
return undefined;
}
value = importDefault(22) /* metro dependency 22 */;
findIndex = value.findIndex;
items2 = property.items;
value = Reflect.apply(findIndex, value, [items2, _fun85302]);
if (value === -1) {
}
function _fun85285(a0) { // fn#85285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:831, offset: 0x01f6a2ba, size: 97 bytes, params: 2, frame: 16
const ChannelPinsStore2 = ChannelPinsStore;
Inherits(ChannelPinsStore2, a0);
return CreateClass(ChannelPinsStore2, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, GuildMemberStore, GuildStore, LocaleStore, MessageStore, RelationshipStore,
UserStore);
}}, {key: 'getPins', value: value_85288}]);
function ChannelPinsStore() { // fn#85286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:843, offset: 0x01100674, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, ChannelPinsStore);
const value3 = env1_6(ChannelPinsStore);
return env1_5(this, _isNativeReflectConstruct_85278() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_85288(a0) { // fn#85288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:1203, offset: 0x00df0ead, size: 16 bytes, params: 2, frame: 2
return env1_16[a0];
}
}
function LOAD_PINNED_MESSAGES(a0) { // fn#85290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:1378, offset: 0x01f6a34e, size: 155 bytes, params: 2, frame: 15
var channel;
var value3;
const channelId = a0.channelId;
if (a0.reset) {
channel = ChannelStore.getChannel(channelId);
value3 = undefined;
env0_16[channelId] = {id: channelId, items: [], state: env0_15.LOADING,
guildId: (channel == null ? value3 : channel.getGuildId()) ?? value3};
} else if (env0_16[channelId] == null) {
channel = ChannelStore.getChannel(channelId);
value3 = undefined;
env0_16[channelId] = {id: channelId, items: [], state: env0_15.LOADING,
guildId: (channel == null ? value3 : channel.getGuildId()) ?? value3};
} else {
env0_16[channelId].state = env0_15.LOADING;
}
}
function LOAD_PINNED_MESSAGES_SUCCESS_85291({channelId, pins, hasMore}) { // fn#85291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:1628, offset: 0x01f6a3e9, size: 126 bytes, params: 2, frame: 17
const property = env0_16[channelId];
if (property == null) {
return false;
}
items2 = property.items;
property.items = items2.slice();
items2 = property.items;
items2.splice(value, 1);
} else {
var defaultImport = importDefault(22) /* metro dependency 22 */;
findIndex = defaultImport.findIndex;
items2 = property.items;
var index = Reflect.apply(findIndex, defaultImport, [items2, function(a0) {
return a0.message.id === id;
}]);
const value2 = pins.map(_fun85292);
const items3 = property.items;
const items2 = [];
arraySpread(items2, value2, arraySpread(items2, items3, 0, undefined), undefined);
property.items = items2;
const binding = env0_15;
property.state = hasMore ? binding.LOADED_HAS_MORE : binding.LOADED_FINISHED;
function _fun85292({pinned_at, message}) { // fn#85292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:1731, offset: 0x01f6a467, size: 110 bytes, params: 2, frame: 14
const object = {};
const Date = global.Date;
const Date2 = global.Date;
let value = Date2.parse(pinned_at);
const value2 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date(value);
object.pinnedAt = date instanceof Object ? date : value2;
value = environment.__proto__;
object.message = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(message);
return object;
}
}
function LOAD_PINNED_MESSAGES_FAILURE({channelId}) { // fn#85293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:1939, offset: 0x01f6a4d5, size: 49 bytes, params: 2, frame: 3
const property = env0_16[channelId];
if (property == null) {
return false;
}
const FAILED = env0_15.FAILED;
property.state = FAILED;
}
function GUILD_DELETE_85294({guild}) { // fn#85294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:2109, offset: 0x01f6a506, size: 95 bytes, params: 2, frame: 13
env0_16 = (importDefault(22) /* metro dependency 22 */)(env0_16).filter(function({guildId}) {
return guildId !== guild.id;
}).keyBy('id').value();
}
function MESSAGE_DELETE_85296({id, channelId}) { // fn#85296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:2227, offset: 0x01f6a57f, size: 136 bytes, params: 2, frame: 17
var r1;
var r0;
var value3;
var defaultImport;
var value4;
const property = env0_16[channelId];
const value2 = property != null;
if (value2) {
value3 = undefined;
defaultImport = importDefault(22) /* metro dependency 22 */;
value4 = defaultImport.remove(property.items, function(a0) {
return a0.message.id === id;
}).length !== 0;
if (value4) {
property.items = property.items.slice();
env0_16[channelId] = property;
r1 = value3;
} else {
r1 = value4;
}
r0 = r1;
} else {
r0 = value2;
}
return r0;
}
function MESSAGE_DELETE_BULK_85298({ids, channelId}) { // fn#85298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:2428, offset: 0x01f6a621, size: 74 bytes, params: 2, frame: 12
const property = env0_16[channelId];
if (property == null) {
return false;
}
property.items = property.items.filter(function({message}) {
return !ids.includes(message.id);
});
}
function MESSAGE_UPDATE_85300(a0) { // fn#85300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:2588, offset: 0x01f6a68e, size: 621 bytes, params: 2, frame: 21
var findIndex;
var items2;
var updateMessageRecord;
var value3;
var object;
var defaultImport2;
var index2;
var property3;
var unshift;
let message = a0.message;
const env0_0 = message.id;
const channel_id = a0.message.channel_id;
if (channel_id == null) {
return false;
}
var value;
const property = env0_16[channel_id];
if (property == null) {
return false;
}
if (a0.message.author != null) {
if (a0.message.pinned) {
items2 = property.items;
property.items = items2.slice();
defaultImport2 = importDefault(22) /* metro dependency 22 */;
findIndex = defaultImport2.findIndex;
items2 = property.items;
index2 = Reflect.apply(findIndex, defaultImport2, [items2, function(a0) {
return a0.message.id === id;
}]);
if (index2 === -1) {
items2 = property.items;
unshift = items2.unshift;
object = {};
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
object.message = value.createMessageRecord(a0.message);
object.pinnedAt = new global.Date();
Reflect.apply(unshift, items2, [object]);
} else {
items2 = property.items;
property3 = items2[index2];
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
updateMessageRecord = value.updateMessageRecord;
items2 = property.items;
property3.message = Reflect.apply(updateMessageRecord, value, [items2[index2].message, a0.message]);
}
return undefined;
}
value = importDefault(22) /* metro dependency 22 */;
findIndex = value.findIndex;
items2 = property.items;
value = Reflect.apply(findIndex, value, [items2, _fun85302]);
if (value === -1) {
return false;
}
items2 = property.items;
property.items = items2.slice();
items2 = property.items;
items2.splice(value, 1);
} else {
var defaultImport = importDefault(22) /* metro dependency 22 */;
findIndex = defaultImport.findIndex;
items2 = property.items;
var index = Reflect.apply(findIndex, defaultImport, [items2, function(a0) {
return a0.message.id === id;
}]);
if (index === -1) {
return undefined;
}
items2 = property.items;
var {pinnedAt, message} = items2[index];
var moduleValue = require(4625) /* metro dependency 4625: MessageRecordUtils */;
var value2 = moduleValue.updateMessageRecord(message, a0.message);
if (value2 !== message) {
value3 = property.items.slice();
value3[index] = {pinnedAt: pinnedAt, message: value2};
env0_16[channel_id].items = value3;
}
}
function _fun85302({message}) { // fn#85302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:3053, offset: 0x01f6a607, size: 26 bytes, params: 2, frame: 2
return message.id === id;
}
}
function MESSAGE_EXPLICIT_CONTENT_SCAN_TIMEOUT_85304({messageId, channelId}) { // fn#85304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:3556, offset: 0x01f6a8fb, size: 189 bytes, params: 2, frame: 16
const property = env0_16[channelId];
if (property == null) {
return false;
}
const defaultImport = Module00022;
const index = defaultImport.findIndex(property.items, function(a0) {
return a0.message.id === messageId;
});
if (index === -1) {
return undefined;
}
items2 = property.items;
var {pinnedAt, message} = items2[index];
var moduleValue = require(4625) /* metro dependency 4625: MessageRecordUtils */;
var value2 = moduleValue.updateMessageRecord(message, a0.message);
if (value2 !== message) {
value3 = property.items.slice();
value3[index] = {pinnedAt: pinnedAt, message: value2};
env0_16[channel_id].items = value3;
return false;
}
property.items = property.items.slice();
const property2 = property.items[index];
property2.message = ExplicitMediaRedactionUtilsModule.handleExplicitMediaScanTimeoutForMessage(property.items[index].message);
}
}
function MESSAGE_EXPLICIT_CONTENT_SCAN_TIMEOUT_85304({messageId, channelId}) { // fn#85304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:3556, offset: 0x01f6a8fb, size: 189 bytes, params: 2, frame: 16
const property = env0_16[channelId];
if (property == null) {
return false;
}
const defaultImport = importDefault(22) /* metro dependency 22 */;
const index = defaultImport.findIndex(property.items, function(a0) {
return a0.message.id === messageId;
});
if (index === -1) {
return false;
}
property.items = property.items.slice();
const property2 = property.items[index];
const explicitMediaRedactionUtilsModule = require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */;
property2.message = explicitMediaRedactionUtilsModule.handleExplicitMediaScanTimeoutForMessage(property.items[index].message);
}
function _fun85283(a0) { // fn#85283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:674, offset: 0x01f6a23a, size: 53 bytes, params: 2, frame: 12
let items2 = a0.items;
items2.forEach(_fun85284);
items2 = a0.items;
a0.items = items2.slice();
}
function _fun85292({pinned_at, message}) { // fn#85292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:1731, offset: 0x01f6a467, size: 110 bytes, params: 2, frame: 14
const object2 = {};
const Date = global.Date;
const Date2 = global.Date;
let value = Date2.parse(pinned_at);
const value2 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date(value);
object2.pinnedAt = date instanceof Object ? date : value2;
value = environment.__proto__;
object2.message = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(message);
return object2;
}
function _fun85284({message}) { // fn#85284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11355:695, offset: 0x01f6a26f, size: 75 bytes, params: 2, frame: 14
const set = message.set;
const value = environment.__proto__.__proto__;
Reflect.apply(set, message, ['blocked', RelationshipStore.isBlockedForMessage(message)]);
message.set('ignored', RelationshipStore.isIgnoredForMessage(message));
}
global.__d(_fun85277, 11169, [6, 7, 15, 17, 18, 1949, 1379, 1945, 1867, 4814, 3793, 1878, 4625, 22, 4821, 566, 694,
2]) /* metro module 11169, dependencies: [6, 7, 15, 17, 18, 1949, 1379, 1945, 1867, 4814, 3793, 1878, 4625, 22, 4821, 566, 694, 2] */;
+62 -45
View File
@@ -1,62 +1,79 @@
/* Metro module 12591; source: stores/ChannelSKUStore.tsx; dependencies: [6, 7, 15, 17, 18, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun96485(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12781:6, offset: 0x0215f75f, size: 283 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let env0_5 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun96489(Store);
value.displayName = 'ChannelSKUStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
env0_5 = {};
}, STORE_LISTING_FETCH_SUCCESS: STORE_LISTING_FETCH_SUCCESS_96493});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/ChannelSKUStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/ChannelSKUStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_96486() { // fn#96486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12781:148, offset: 0x0215f87a, 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) {
function _isNativeReflectConstruct_96486() { // fn#96486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12781:148, offset: 0x0215f87a, 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_96486_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_96486_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun96489(a0) { // fn#96489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12781:356, offset: 0x0215f8dc, size: 74 bytes, params: 2, frame: 15
const closure = ChannelSKUStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getSkuIdForChannel', value: value_96491}]);
}
function _fun96489(a0) { // fn#96489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12781:356, offset: 0x0215f8dc, size: 74 bytes, params: 2, frame: 15
const ChannelSKUStore2 = ChannelSKUStore;
Inherits(ChannelSKUStore2, a0);
return CreateClass(ChannelSKUStore2, [{key: 'getSkuIdForChannel', value: value_96491}]);
function ChannelSKUStore() { // fn#96490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12781:368, offset: 0x00c7a0d6, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, ChannelSKUStore);
const value3 = env1_3(ChannelSKUStore);
return env1_2(this, _isNativeReflectConstruct_96486() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_96491(a0) { // fn#96491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12781:669, offset: 0x01e1641f, size: 16 bytes, params: 2, frame: 2
return env1_5[a0];
}
function STORE_LISTING_FETCH_SUCCESS_96493({channelId, storeListing}) { // fn#96493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12781:848, offset: 0x0215f926, size: 46 bytes, params: 2, frame: 3
if (channelId != null) {
env0_5[channelId] = storeListing.sku.id;
}
function STORE_LISTING_FETCH_SUCCESS_96493({channelId, storeListing}) { // fn#96493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12781:848, offset: 0x0215f926, size: 46 bytes, params: 2, frame: 3
if (channelId != null) {
env0_5[channelId] = storeListing.sku.id;
}
}
}
global.__d(_fun96485, 12591, [6, 7, 15, 17, 18, 566, 694,
2]) /* metro module 12591, dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */;
+456 -432
View File
@@ -1,4 +1,23 @@
/* Metro module 4791; source: stores/ChannelSectionStore.tsx; dependencies: [6, 7, 15, 17, 18, 4107, 4792, 1379, 1867, 3784, 1934, 3969, 1878, 661, 1386, 482, 4793, 1239, 21, 4140, 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 ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from './GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from './UserStore.tsx'; /* Metro dependency 1878 */
import SelectedChannelStore from './SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import PermissionStore from './PermissionStore.tsx'; /* Metro dependency 3784 */
import SelectedGuildStore from './SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import ExperimentStore from '../modules/experiments/ExperimentStore.tsx'; /* Metro dependency 4107 */
import SearchMessageStore from '../modules/search/SearchMessageStore.tsx'; /* Metro dependency 4792 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as ConstantsModule2 from '../Constants.tsx'; /* Metro dependency 661 */
import * as SidebarActionTypesModule from '../modules/sidebar/SidebarActionTypes.tsx'; /* Metro dependency 4793 */
function _fun41400(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:6, offset: 0x0111ddd7, size: 758 bytes, params: 8, frame: 20
const env0_0 = require;
const parseChannelId = function(a0) {
@@ -15,29 +34,15 @@ function _fun41400(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const experimentStore = importDefault(4107) /* metro dependency 4107: ExperimentStore */;
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule2;
const env0_16 = value.ChannelSections;
const env0_17 = value.ComponentActions;
value = require(1386) /* metro dependency 1386: ChannelConstants */;
const env0_18 = value.isStaticChannelRoute;
const env0_19 = value.buildGuildStaticChannelId;
const env0_20 = (require(482) /* metro dependency 482: Constants */).Permissions;
const env0_25 = {};
const env0_26 = {};
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
value = _fun41408(PersistedStore);
value.displayName = 'ChannelSectionStore';
value.persistKey = 'ChannelSectionStore2';
@@ -54,475 +59,494 @@ function _fun41400(global, require, importDefault, importAll, module, exports, d
SIDEBAR_CREATE_THREAD: SIDEBAR_CREATE_THREAD, SIDEBAR_CLOSE: SIDEBAR_CLOSE,
SIDEBAR_CLOSE_GUILD: SIDEBAR_CLOSE_GUILD, CHANNEL_DELETE: CHANNEL_DELETE_41429,
CHANNEL_SELECT: CHANNEL_SELECT_41430, THREAD_CREATE: THREAD_CREATE_41431, THREAD_DELETE: THREAD_DELETE_41432});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/ChannelSectionStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/ChannelSectionStore.tsx');
exports.default = value;
exports.MESSAGE_REQUESTS_BASE_CHANNEL_ID = 'message_requests';
exports.isViewChannelSidebar = isViewChannelSidebar;
}
function _isNativeReflectConstruct_41401() { // fn#41401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:372, offset: 0x0111e0cd, 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) {
function _isNativeReflectConstruct_41401() { // fn#41401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:372, offset: 0x0111e0cd, 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_41401_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_41401_isNativeReflectConstruct = function() {
return !!result;
})();
}
function toggleSection(a0) { // fn#41405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:727, offset: 0x0111e16c, size: 92 bytes, params: 2, frame: 14
var r0;
const value = a0;
if (env0_27) {
r0 = true;
} else {
r0 = false;
function toggleSection(a0) { // fn#41405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:727, offset: 0x0111e16c, size: 92 bytes, params: 2, frame: 14
var r0;
const value = a0;
if (env0_27) {
r0 = true;
} else {
r0 = false;
}
const channelId = parseChannelId(SelectedChannelStore.getChannelId());
if (channelId != null && channelId in env0_25) {
delete env0_25[channelId];
r0 = true;
}
r0 = r0 && value ? value : !value;
return r0;
}
const channelId = parseChannelId(SelectedChannelStore.getChannelId());
if (channelId != null && channelId in env0_25) {
delete env0_25[channelId];
r0 = true;
}
r0 = r0 && value ? value : !value;
return r0;
}
function handlePermissionsChange() { // fn#41406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:869, offset: 0x0111e1c8, size: 223 bytes, params: 1, frame: 29
var r2;
var r10;
var r14;
var r0;
var propertyName;
var propertyName2;
var property;
var type;
const SidebarType = (require(4793) /* metro dependency 4793: SidebarActionTypes */).SidebarType;
var VIEW_THREAD;
var VIEW_CHANNEL;
var getChannel;
var channelId;
var value3;
var value4;
var can;
var value5;
var value6;
const binding = env0_25;
const value2 = false;
const properties = Object.keys(binding);
const properties2 = 0;
const properties3 = properties.length;
if (properties === undefined) {
r0 = value2;
} else {
r2 = value2;
r10 = properties2;
reducibleLoop1: while (true) {
propertyName = properties[r10];
propertyName2 = r10 + 1;
if (propertyName === undefined) {
r0 = r2;
break reducibleLoop1;
}
property = env0_25[propertyName];
type = property.type;
VIEW_THREAD = SidebarType.VIEW_THREAD;
if (type !== VIEW_THREAD) {
type = property.type;
VIEW_CHANNEL = SidebarType.VIEW_CHANNEL;
reducibleJoin4: while (true) {
if (type !== VIEW_CHANNEL) {
r10 = propertyName2;
continue reducibleLoop1;
}
break reducibleJoin4;
function handlePermissionsChange() { // fn#41406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:869, offset: 0x0111e1c8, size: 223 bytes, params: 1, frame: 29
var r2;
var r10;
var r14;
var r0;
var propertyName;
var propertyName2;
var property;
var type;
const SidebarType = (SidebarActionTypesModule).SidebarType;
var VIEW_THREAD;
var VIEW_CHANNEL;
var channelStoreBinding;
var getChannel;
var channelId;
var value3;
var value4;
var permissionStoreBinding;
var can;
var value5;
var value6;
const binding = env0_25;
const value2 = false;
const properties = Object.keys(binding);
const properties2 = 0;
const properties3 = properties.length;
if (properties === undefined) {
r0 = value2;
} else {
r2 = value2;
r10 = properties2;
reducibleLoop1: while (true) {
propertyName = properties[r10];
propertyName2 = r10 + 1;
if (propertyName === undefined) {
r0 = r2;
break reducibleLoop1;
}
}
getChannel = ChannelStore.getChannel;
channelId = property.channelId;
value3 = Reflect.apply(getChannel, ChannelStore, [channelId]);
value4 = value3 != null;
reducibleJoin6: while (true) {
if (value4) {
can = PermissionStore.can;
VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
value5 = Reflect.apply(can, PermissionStore, [VIEW_CHANNEL, value3]);
r14 = value5;
property = env0_25[propertyName];
type = property.type;
VIEW_THREAD = SidebarType.VIEW_THREAD;
if (type !== VIEW_THREAD) {
type = property.type;
VIEW_CHANNEL = SidebarType.VIEW_CHANNEL;
reducibleJoin4: while (true) {
if (type !== VIEW_CHANNEL) {
r10 = propertyName2;
continue reducibleLoop1;
}
break reducibleJoin4;
}
}
channelStoreBinding = ChannelStore;
getChannel = channelStoreBinding.getChannel;
channelId = property.channelId;
value3 = Reflect.apply(getChannel, channelStoreBinding, [channelId]);
value4 = value3 != null;
reducibleJoin6: while (true) {
if (value4) {
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
value5 = Reflect.apply(can, permissionStoreBinding, [VIEW_CHANNEL, value3]);
r14 = value5;
break reducibleJoin6;
}
r14 = value4;
break reducibleJoin6;
}
r14 = value4;
break reducibleJoin6;
}
if (r14) {
if (r14) {
r10 = propertyName2;
continue reducibleLoop1;
}
delete env0_25[propertyName];
value6 = true;
r2 = value6;
r10 = propertyName2;
continue reducibleLoop1;
}
delete env0_25[propertyName];
value6 = true;
r2 = value6;
r10 = propertyName2;
continue reducibleLoop1;
}
return r0;
}
function setIsSearchSidebarOpen() { // fn#41407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:1125, offset: 0x0111e2a7, size: 57 bytes, params: 1, frame: 13
if ((env0_28 != null && SearchMessageStore.hasSearchState(env0_28)) === env0_27) {
return false;
}
}
return r0;
}
function setIsSearchSidebarOpen() { // fn#41407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:1125, offset: 0x0111e2a7, size: 57 bytes, params: 1, frame: 13
if ((env0_28 != null && SearchMessageStore.hasSearchState(env0_28)) === env0_27) {
return false;
}
}
function _fun41408(a0) { // fn#41408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:1222, offset: 0x0111e2e0, size: 237 bytes, params: 2, frame: 16
const ChannelSectionStore2 = ChannelSectionStore;
Inherits(ChannelSectionStore2, a0);
return CreateClass(ChannelSectionStore2, [{key: 'initialize', value: value_41410}, {key: 'getState', value: value_41411},
{key: 'getSection', value: value_41412}, {key: 'getSidebarState', value: value_41413},
{key: 'getGuildSidebarState', value: value_41414}, {key: 'getCurrentSidebarChannelId', value: value_41415},
{key: 'getCurrentSidebarMessageId', value: value_41416}, {key: 'getCurrentSearchContextId',
value: value_41417}]);
function ChannelSectionStore() { // fn#41409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:1234, offset: 0x0111e3cd, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, ChannelSectionStore);
const value3 = env1_6(ChannelSectionStore);
return env1_5(this, _isNativeReflectConstruct_41401() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function _fun41408(a0) { // fn#41408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:1222, offset: 0x0111e2e0, size: 237 bytes, params: 2, frame: 16
const closure = ChannelSectionStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: value_41410}, {key: 'getState', value: value_41411},
{key: 'getSection', value: value_41412}, {key: 'getSidebarState', value: value_41413},
{key: 'getGuildSidebarState', value: value_41414}, {key: 'getCurrentSidebarChannelId', value: value_41415},
{key: 'getCurrentSidebarMessageId', value: value_41416}, {key: 'getCurrentSearchContextId',
value: value_41417}]);
}
function value_41410(a0) { // fn#41410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:1547, offset: 0x0111e43e, size: 215 bytes, params: 2, frame: 25
var r3;
var r0;
var isMembersOpen;
var value;
var isSummariesOpen;
var isProfileOpen;
if (a0 != null) {
isMembersOpen = a0.isMembersOpen;
value = isMembersOpen != null;
r3 = value && isMembersOpen;
value = environment.__proto__;
isSummariesOpen = a0.isSummariesOpen;
r3 = isSummariesOpen != null && isSummariesOpen;
isProfileOpen = a0.isProfileOpen;
r3 = isProfileOpen == null || isProfileOpen;
r3 = a0.sidebars ?? ({});
r0 = a0.guildSidebars ?? ({});
}
const syncWith = this.syncWith;
value = environment.__proto__;
Reflect.apply(syncWith, this, [[SearchMessageStore], setIsSearchSidebarOpen]);
this.syncWith([PermissionStore], handlePermissionsChange);
this.waitFor(ChannelStore, ExperimentStore, GuildStore, PermissionStore, SearchMessageStore, SelectedChannelStore,
SelectedGuildStore, UserStore);
}
function CHANNEL_TOGGLE_MEMBERS_SECTION() { // fn#41419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:3319, offset: 0x0111e7d4, size: 131 bytes, params: 1, frame: 12
var ComponentDispatch;
if (env0_27) {
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.SEARCH_RESULTS_CLOSE);
}
if (env0_22) {
env0_22 = toggleSection(env0_22);
}
if (env0_23) {
env0_23 = toggleSection(env0_23);
}
env0_21 = toggleSection(env0_21);
}
function value_41411() { // fn#41411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:1879, offset: 0x0111e515, size: 52 bytes, params: 1, frame: 3
return {isMembersOpen: env1_21, isSummariesOpen: env1_22, isProfileOpen: env1_24, sidebars: env1_25,
guildSidebars: env1_26};
}
function USER_PROFILE_SIDEBAR_TOGGLE_SECTION() { // fn#41420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:3531, offset: 0x0111e857, size: 79 bytes, params: 1, frame: 12
var ComponentDispatch;
if (!env0_24) {
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.SEARCH_RESULTS_CLOSE);
}
env0_24 = toggleSection(env0_24);
}
function value_41412(a0, a1) { // fn#41412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:2001, offset: 0x0111e549, size: 159 bytes, params: 3, frame: 12
if (env1_27) {
return ChannelSections.SEARCH;
}
const channelId = parseChannelId(a0);
return channelId == null ? a1 && env1_24 ? ChannelSections.PROFILE : env1_22 ? ChannelSections.SUMMARIES : env1_21 ? ChannelSections.MEMBERS : env1_23 ? ChannelSections.CONVERSATIONS : ChannelSections.NONE : env1_25[channelId] != null ? ChannelSections.SIDEBAR_CHAT : a1 && env1_24 ? ChannelSections.PROFILE : env1_22 ? ChannelSections.SUMMARIES : env1_21 ? ChannelSections.MEMBERS : env1_23 ? ChannelSections.CONVERSATIONS : ChannelSections.NONE;
}
function CHANNEL_TOGGLE_SUMMARIES_SECTION() { // fn#41421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:3696, offset: 0x0111e8a6, size: 76 bytes, params: 1, frame: 12
if (env0_21) {
env0_21 = toggleSection(env0_21);
}
if (env0_23) {
env0_23 = toggleSection(env0_23);
}
env0_22 = toggleSection(env0_22);
}
function value_41413(a0) { // fn#41413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:2199, offset: 0x0111e5e8, size: 36 bytes, params: 2, frame: 12
const parseChannelIdBinding = parseChannelId;
const value2 = undefined;
const channelId = parseChannelIdBinding(a0);
return channelId == null ? value2 : env1_25[channelId];
}
function CHANNEL_TOGGLE_CONVERSATIONS_SECTION() { // fn#41422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:3848, offset: 0x0111e8f2, size: 89 bytes, params: 1, frame: 12
var ComponentDispatch;
if (env0_27) {
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.SEARCH_RESULTS_CLOSE);
}
env0_23 = toggleSection(env0_23);
}
function value_41414(a0) { // fn#41414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:2298, offset: 0x0111e60c, size: 27 bytes, params: 2, frame: 3
return a0 == null ? undefined : env1_26[a0];
}
function CHANNEL_OPEN_CONVERSATIONS_SECTION() { // fn#41423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:4027, offset: 0x0111e94b, size: 88 bytes, params: 1, frame: 13
var r0;
var ComponentDispatch;
const binding = env0_23;
if (binding) {
r0 = !binding;
} else {
function value_41415(a0) { // fn#41415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:2379, offset: 0x0111e627, size: 189 bytes, params: 2, frame: 17
const SidebarType = (SidebarActionTypesModule).SidebarType;
const channelId2 = parseChannelId(a0);
const value2 = null;
if (value2 == channelId2) {
return value2;
}
if (env1_27) {
return value2;
}
const property = env1_25[channelId2];
return value2 == property ? value2 : property.type === SidebarType.VIEW_THREAD || property.type === SidebarType.VIEW_CHANNEL ? property.channelId : property.type !== SidebarType.VIEW_MOD_REPORT ? value2 : property.channelId;
}
function value_41416(a0) { // fn#41416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:2678, offset: 0x0111e6e4, size: 210 bytes, params: 2, frame: 17
const SidebarType = (SidebarActionTypesModule).SidebarType;
const parseChannelIdBinding = parseChannelId;
const value2 = undefined;
const channelId = parseChannelIdBinding(a0);
const value3 = null;
if (value3 == channelId) {
return value3;
}
if (env1_27) {
return value3;
}
const property = env1_25[channelId];
return value3 == property ? value3 : property.type === SidebarType.VIEW_THREAD || property.type === SidebarType.VIEW_CHANNEL ? value3 == property.details ? value2 : property.details.initialMessageId : property.type !== SidebarType.VIEW_MOD_REPORT ? value3 : value3 == property.details ? value2 : property.details.initialMessageId;
}
function value_41417() { // fn#41417, offset: 0x0108042c, size: 9 bytes, params: 1, frame: 1
return env1_28;
}
}
function CHANNEL_TOGGLE_MEMBERS_SECTION() { // fn#41419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:3319, offset: 0x0111e7d4, size: 131 bytes, params: 1, frame: 12
var ComponentDispatch;
if (env0_27) {
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.SEARCH_RESULTS_CLOSE);
}
r0 = true;
if (env0_22) {
env0_22 = toggleSection(env0_22);
}
if (env0_23) {
env0_23 = toggleSection(env0_23);
}
env0_21 = toggleSection(env0_21);
}
return r0;
}
function SIDEBAR_VIEW_CHANNEL({sidebarType, baseChannelId, channelId, details}) { // fn#41424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:4191, offset: 0x0111e9a3, size: 144 bytes, params: 2, frame: 19
var r2;
var object3;
const channelId2 = parseChannelId(baseChannelId);
if (channelId2 == null) {
return false;
function USER_PROFILE_SIDEBAR_TOGGLE_SECTION() { // fn#41420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:3531, offset: 0x0111e857, size: 79 bytes, params: 1, frame: 12
var ComponentDispatch;
if (!env0_24) {
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.SEARCH_RESULTS_CLOSE);
}
env0_24 = toggleSection(env0_24);
}
const object4 = {type: sidebarType, channelId: channelId, details: details};
const SidebarType = require(dependencyMap[16]).SidebarType;
const VIEW_MOD_REPORT = SidebarType.VIEW_MOD_REPORT;
if (sidebarType !== VIEW_MOD_REPORT) {
r2 = object4;
} else {
object3 = {};
copyDataProperties(object3, object4, dependencyMap);
object3['baseChannelId'] = baseChannelId;
r2 = object3;
}
env0_25[channelId2] = r2;
return true;
}
function SIDEBAR_VIEW_GUILD({sidebarType, guildId, baseChannelId, details}) { // fn#41425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:4472, offset: 0x0111ea33, size: 87 bytes, params: 2, frame: 15
var r0;
const channelId = parseChannelId(baseChannelId);
const value2 = channelId != null;
if (value2) {
env0_26[guildId] = {type: sidebarType, baseChannelId: channelId, guildId: guildId, details: details};
r0 = true;
} else {
r0 = value2;
function CHANNEL_TOGGLE_SUMMARIES_SECTION() { // fn#41421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:3696, offset: 0x0111e8a6, size: 76 bytes, params: 1, frame: 12
if (env0_21) {
env0_21 = toggleSection(env0_21);
}
if (env0_23) {
env0_23 = toggleSection(env0_23);
}
env0_22 = toggleSection(env0_22);
}
return r0;
}
function SIDEBAR_CREATE_THREAD({parentChannelId, parentMessageId, location}) { // fn#41426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:4680, offset: 0x0111ea8a, size: 108 bytes, params: 2, frame: 18
var binding;
var object2;
const channelId = parseChannelId(parentChannelId);
if (channelId != null) {
binding = env0_25;
object2 = {};
object2.type = (require(4793) /* metro dependency 4793: SidebarActionTypes */).SidebarType.CREATE_THREAD;
object2.parentChannelId = parentChannelId;
object2.parentMessageId = parentMessageId;
object2.location = location;
binding[channelId] = object2;
function CHANNEL_TOGGLE_CONVERSATIONS_SECTION() { // fn#41422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:3848, offset: 0x0111e8f2, size: 89 bytes, params: 1, frame: 12
var ComponentDispatch;
if (env0_27) {
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.SEARCH_RESULTS_CLOSE);
}
env0_23 = toggleSection(env0_23);
}
}
function SIDEBAR_CLOSE({baseChannelId}) { // fn#41427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:4907, offset: 0x0111eaf6, size: 39 bytes, params: 2, frame: 12
const channelId = parseChannelId(baseChannelId);
if (channelId != null) {
delete env0_25[channelId];
function CHANNEL_OPEN_CONVERSATIONS_SECTION() { // fn#41423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:4027, offset: 0x0111e94b, size: 88 bytes, params: 1, frame: 13
var r0;
var ComponentDispatch;
const binding = env0_23;
if (binding) {
r0 = !binding;
} else {
if (env0_27) {
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.SEARCH_RESULTS_CLOSE);
}
r0 = true;
}
return r0;
}
}
function SIDEBAR_CLOSE_GUILD({guildId}) { // fn#41428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:5020, offset: 0x0111eb1d, size: 40 bytes, params: 2, frame: 4
var r0;
const value2 = env0_26[guildId] != null;
if (value2) {
delete env0_26[guildId];
r0 = true;
} else {
r0 = value2;
}
return r0;
}
function CHANNEL_DELETE_41429({channel}) { // fn#41429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:5118, offset: 0x0111eb45, size: 171 bytes, params: 2, frame: 28
var r3;
var r10;
var r14;
var r2;
var propertyName;
var propertyName2;
var property;
var value4;
var type;
var SidebarType;
var VIEW_CHANNEL;
var value5;
var channelId;
var value6;
var value7;
let id = channel.id;
const value2 = id in env0_25;
const binding = env0_25;
if (value2) {
delete binding[channel.id];
function SIDEBAR_VIEW_CHANNEL({sidebarType, baseChannelId, channelId, details}) { // fn#41424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:4191, offset: 0x0111e9a3, size: 144 bytes, params: 2, frame: 19
var r2;
var object;
const channelId2 = parseChannelId(baseChannelId);
if (channelId2 == null) {
return false;
}
const object2 = {type: sidebarType, channelId: channelId, details: details};
const SidebarType = require(dependencyMap[16]).SidebarType;
const VIEW_MOD_REPORT = SidebarType.VIEW_MOD_REPORT;
if (sidebarType !== VIEW_MOD_REPORT) {
r2 = object2;
} else {
object = {};
copyDataProperties(object, object2, dependencyMap);
object['baseChannelId'] = baseChannelId;
r2 = object;
}
env0_25[channelId2] = r2;
return true;
}
const properties = Object.keys(binding);
const properties3 = properties.length;
if (properties === undefined) {
r2 = false;
} else {
r3 = false;
r10 = 0;
while (true) {
propertyName = properties[r10];
propertyName2 = r10 + 1;
if (propertyName === undefined) {
r2 = r3;
break;
}
property = env0_25[propertyName];
value4 = property != null;
if (!value4) {
r14 = value4;
continue;
}
type = property.type;
SidebarType = (require(4793) /* metro dependency 4793: SidebarActionTypes */).SidebarType;
VIEW_CHANNEL = SidebarType.VIEW_CHANNEL;
value5 = type === VIEW_CHANNEL;
r14 = value5;
if (!r14) {
continue;
}
channelId = property.channelId;
id = channel.id;
value6 = channelId === id;
r14 = value6;
if (!r14) {
r10 = propertyName2;
continue;
}
delete env0_25[propertyName];
value7 = true;
r3 = value7;
r10 = propertyName2;
function SIDEBAR_VIEW_GUILD({sidebarType, guildId, baseChannelId, details}) { // fn#41425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:4472, offset: 0x0111ea33, size: 87 bytes, params: 2, frame: 15
var r0;
const channelId = parseChannelId(baseChannelId);
const value2 = channelId != null;
if (value2) {
env0_26[guildId] = {type: sidebarType, baseChannelId: channelId, guildId: guildId, details: details};
r0 = true;
} else {
r0 = value2;
}
return r0;
}
function SIDEBAR_CREATE_THREAD({parentChannelId, parentMessageId, location}) { // fn#41426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:4680, offset: 0x0111ea8a, size: 108 bytes, params: 2, frame: 18
var binding;
var object;
const channelId = parseChannelId(parentChannelId);
if (channelId != null) {
binding = env0_25;
object = {};
object.type = (require(4793) /* metro dependency 4793: SidebarActionTypes */).SidebarType.CREATE_THREAD;
object.parentChannelId = parentChannelId;
object.parentMessageId = parentMessageId;
object.location = location;
binding[channelId] = object;
}
}
return r2;
}
function CHANNEL_SELECT_41430() { // fn#41430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:5351, offset: 0x0111ebf0, size: 57 bytes, params: 1, frame: 12
if ((require(4140) /* metro dependency 4140: PlatformUtils */).isMobile && env0_21) {
function SIDEBAR_CLOSE({baseChannelId}) { // fn#41427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:4907, offset: 0x0111eaf6, size: 39 bytes, params: 2, frame: 12
const channelId = parseChannelId(baseChannelId);
if (channelId != null) {
delete env0_25[channelId];
}
}
}
function THREAD_CREATE_41431({channel}) { // fn#41431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:5436, offset: 0x0111ec29, size: 236 bytes, params: 2, frame: 17
const SidebarType = (require(4793) /* metro dependency 4793: SidebarActionTypes */).SidebarType;
var parentMessageId;
var defaultImport;
if (channel.ownerId === UserStore.getCurrentUser()?.id) {
return false;
function SIDEBAR_CLOSE_GUILD({guildId}) { // fn#41428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:5020, offset: 0x0111eb1d, size: 40 bytes, params: 2, frame: 4
var r0;
const value2 = env0_26[guildId] != null;
if (value2) {
delete env0_26[guildId];
r0 = true;
} else {
r0 = value2;
}
return r0;
}
const property = env0_25[channel.parent_id];
let r1 = property != null && property.type === SidebarType.CREATE_THREAD;
if (r1) {
parentMessageId = property.parentMessageId;
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
r1 = parentMessageId === defaultImport.castChannelIdAsMessageId(channel.id);
}
if (r1) {
env0_25[channel.parent_id] = {type: SidebarType.VIEW_THREAD, channelId: channel.id};
}
}
function THREAD_DELETE_41432({channel}) { // fn#41432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:5773, offset: 0x0111ed15, size: 108 bytes, params: 2, frame: 15
const property = env0_25[channel.parent_id];
if (property == null) {
return false;
}
const type = property.type;
const SidebarType = (require(4793) /* metro dependency 4793: SidebarActionTypes */).SidebarType;
const VIEW_THREAD = SidebarType.VIEW_THREAD;
if (type !== VIEW_THREAD) {
return false;
function CHANNEL_DELETE_41429({channel}) { // fn#41429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:5118, offset: 0x0111eb45, size: 171 bytes, params: 2, frame: 28
var r3;
var r10;
var r14;
var r2;
var propertyName;
var propertyName2;
var property;
var value4;
var type;
var SidebarType;
var VIEW_CHANNEL;
var value5;
var channelId;
var value6;
var value7;
let id = channel.id;
const value2 = id in env0_25;
const binding = env0_25;
if (value2) {
delete binding[channel.id];
return true;
}
const properties = Object.keys(binding);
const properties3 = properties.length;
if (properties === undefined) {
r2 = false;
} else {
r3 = false;
r10 = 0;
while (true) {
propertyName = properties[r10];
propertyName2 = r10 + 1;
if (propertyName === undefined) {
r2 = r3;
break;
}
property = env0_25[propertyName];
value4 = property != null;
if (!value4) {
r14 = value4;
continue;
}
type = property.type;
SidebarType = (require(4793) /* metro dependency 4793: SidebarActionTypes */).SidebarType;
VIEW_CHANNEL = SidebarType.VIEW_CHANNEL;
value5 = type === VIEW_CHANNEL;
r14 = value5;
if (!r14) {
continue;
}
channelId = property.channelId;
id = channel.id;
value6 = channelId === id;
r14 = value6;
if (!r14) {
r10 = propertyName2;
continue;
}
delete env0_25[propertyName];
value7 = true;
r3 = value7;
r10 = propertyName2;
}
}
return r2;
}
if (property.channelId !== channel.id) {
return false;
}
delete env0_25[channel.parent_id];
}
function isViewChannelSidebar({type}) { // fn#41433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:6100, offset: 0x0111ed81, size: 140 bytes, params: 2, frame: 14
const {VIEW_CHANNEL, VIEW_THREAD, VIEW_MESSAGE_REQUEST,
VIEW_MOD_REPORT} = (require(4793) /* metro dependency 4793: SidebarActionTypes */).SidebarType;
return [VIEW_CHANNEL, VIEW_THREAD, VIEW_MESSAGE_REQUEST, VIEW_MOD_REPORT].includes(type);
}
function value_41410(a0) { // fn#41410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:1547, offset: 0x0111e43e, size: 215 bytes, params: 2, frame: 25
var r3;
var r0;
var isMembersOpen;
var value;
var isSummariesOpen;
var isProfileOpen;
if (a0 != null) {
isMembersOpen = a0.isMembersOpen;
value = isMembersOpen != null;
r3 = value && isMembersOpen;
value = environment.__proto__;
isSummariesOpen = a0.isSummariesOpen;
r3 = isSummariesOpen != null && isSummariesOpen;
isProfileOpen = a0.isProfileOpen;
r3 = isProfileOpen == null || isProfileOpen;
r3 = a0.sidebars ?? ({});
r0 = a0.guildSidebars ?? ({});
function CHANNEL_SELECT_41430() { // fn#41430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:5351, offset: 0x0111ebf0, size: 57 bytes, params: 1, frame: 12
if ((require(4140) /* metro dependency 4140: PlatformUtils */).isMobile && env0_21) {
}
}
const syncWith = this.syncWith;
value = environment.__proto__;
Reflect.apply(syncWith, this, [[SearchMessageStore], setIsSearchSidebarOpen]);
this.syncWith([PermissionStore], handlePermissionsChange);
this.waitFor(ChannelStore, ExperimentStore, GuildStore, PermissionStore, SearchMessageStore, SelectedChannelStore,
SelectedGuildStore, UserStore);
}
function value_41411() { // fn#41411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:1879, offset: 0x0111e515, size: 52 bytes, params: 1, frame: 3
return {isMembersOpen: env1_21, isSummariesOpen: env1_22, isProfileOpen: env1_24, sidebars: env1_25,
guildSidebars: env1_26};
}
function value_41412(a0, a1) { // fn#41412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:2001, offset: 0x0111e549, size: 159 bytes, params: 3, frame: 12
if (env1_27) {
return ChannelSections.SEARCH;
function THREAD_CREATE_41431({channel}) { // fn#41431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:5436, offset: 0x0111ec29, size: 236 bytes, params: 2, frame: 17
const SidebarType = (SidebarActionTypesModule).SidebarType;
var parentMessageId;
var defaultImport;
if (channel.ownerId === UserStore.getCurrentUser()?.id) {
return false;
}
const property = env0_25[channel.parent_id];
let r1 = property != null && property.type === SidebarType.CREATE_THREAD;
if (r1) {
parentMessageId = property.parentMessageId;
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
r1 = parentMessageId === defaultImport.castChannelIdAsMessageId(channel.id);
}
if (r1) {
env0_25[channel.parent_id] = {type: SidebarType.VIEW_THREAD, channelId: channel.id};
}
}
const channelId = parseChannelId(a0);
return channelId == null ? a1 && env1_24 ? ChannelSections.PROFILE : env1_22 ? ChannelSections.SUMMARIES : env1_21 ? ChannelSections.MEMBERS : env1_23 ? ChannelSections.CONVERSATIONS : ChannelSections.NONE : env1_25[channelId] != null ? ChannelSections.SIDEBAR_CHAT : a1 && env1_24 ? ChannelSections.PROFILE : env1_22 ? ChannelSections.SUMMARIES : env1_21 ? ChannelSections.MEMBERS : env1_23 ? ChannelSections.CONVERSATIONS : ChannelSections.NONE;
}
function value_41413(a0) { // fn#41413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:2199, offset: 0x0111e5e8, size: 36 bytes, params: 2, frame: 12
const parseChannelIdBinding = parseChannelId;
const value2 = undefined;
const channelId = parseChannelIdBinding(a0);
return channelId == null ? value2 : env1_25[channelId];
}
function value_41414(a0) { // fn#41414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:2298, offset: 0x0111e60c, size: 27 bytes, params: 2, frame: 3
return a0 == null ? undefined : env1_26[a0];
}
function value_41415(a0) { // fn#41415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:2379, offset: 0x0111e627, size: 189 bytes, params: 2, frame: 17
const SidebarType = (require(4793) /* metro dependency 4793: SidebarActionTypes */).SidebarType;
const channelId2 = parseChannelId(a0);
const value2 = null;
if (value2 == channelId2) {
return value2;
}
if (env1_27) {
return value2;
function THREAD_DELETE_41432({channel}) { // fn#41432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:5773, offset: 0x0111ed15, size: 108 bytes, params: 2, frame: 15
const property = env0_25[channel.parent_id];
if (property == null) {
return false;
}
const type = property.type;
const SidebarType = (SidebarActionTypesModule).SidebarType;
const VIEW_THREAD = SidebarType.VIEW_THREAD;
if (type !== VIEW_THREAD) {
return false;
}
if (property.channelId !== channel.id) {
return false;
}
delete env0_25[channel.parent_id];
}
const property = env1_25[channelId2];
return value2 == property ? value2 : property.type === SidebarType.VIEW_THREAD || property.type === SidebarType.VIEW_CHANNEL ? property.channelId : property.type !== SidebarType.VIEW_MOD_REPORT ? value2 : property.channelId;
}
function value_41416(a0) { // fn#41416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:2678, offset: 0x0111e6e4, size: 210 bytes, params: 2, frame: 17
const SidebarType = (require(4793) /* metro dependency 4793: SidebarActionTypes */).SidebarType;
const parseChannelIdBinding = parseChannelId;
const value2 = undefined;
const channelId = parseChannelIdBinding(a0);
const value3 = null;
if (value3 == channelId) {
return value3;
function isViewChannelSidebar({type}) { // fn#41433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:6100, offset: 0x0111ed81, size: 140 bytes, params: 2, frame: 14
const {VIEW_CHANNEL, VIEW_THREAD, VIEW_MESSAGE_REQUEST,
VIEW_MOD_REPORT} = (SidebarActionTypesModule).SidebarType;
return [VIEW_CHANNEL, VIEW_THREAD, VIEW_MESSAGE_REQUEST, VIEW_MOD_REPORT].includes(type);
}
if (env1_27) {
return value3;
}
const property = env1_25[channelId];
return value3 == property ? value3 : property.type === SidebarType.VIEW_THREAD || property.type === SidebarType.VIEW_CHANNEL ? value3 == property.details ? value2 : property.details.initialMessageId : property.type !== SidebarType.VIEW_MOD_REPORT ? value3 : value3 == property.details ? value2 : property.details.initialMessageId;
}
global.__d(_fun41400, 4791, [6, 7, 15, 17, 18, 4107, 4792, 1379, 1867, 3784, 1934, 3969, 1878, 661, 1386, 482, 4793,
1239, 21, 4140, 566, 694,
2]) /* metro module 4791, dependencies: [6, 7, 15, 17, 18, 4107, 4792, 1379, 1867, 3784, 1934, 3969, 1878, 661, 1386, 482, 4793, 1239, 21, 4140, 566, 694, 2] */;
+327 -278
View File
@@ -1,4 +1,19 @@
/* Metro module 15186; source: stores/ChannelSettingsPermissionsStore.tsx; dependencies: [6, 7, 15, 17, 18, 8149, 1379, 661, 8120, 587, 3789, 22, 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 Module00022 from '../by-id/module-00022.js'; /* Metro dependency 22 */
import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */
import ChannelSettingsStore from './ChannelSettingsStore.tsx'; /* Metro dependency 8149 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as StorageModule from '../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as PermissionUtilsModule from '../utils/PermissionUtils.tsx'; /* Metro dependency 3789 */
import * as ChannelPermissionsConstantsModule from '../modules/channel_permissions/ChannelPermissionsConstants.tsx'; /* Metro dependency 8120 */
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) {
@@ -44,30 +59,22 @@ function _fun116039(global, require, importDefault, importAll, module, exports,
}
return value;
};
const closure = CHANNEL_SETTINGS_PERMISSIONS_INIT;
const CHANNEL_SETTINGS_PERMISSIONS_INIT2 = 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 FormStates = ConstantsModule.FormStates;
const ADVANCED_MODE_ON_KEY = (ChannelPermissionsConstantsModule).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 Storage = (StorageModule).Storage;
let env0_25 = Storage.get(ADVANCED_MODE_ON_KEY) || set;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (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_SET_SECTION: CHANNEL_SETTINGS_SET_SECTION_116065,
CHANNEL_SETTINGS_PERMISSIONS_INIT: CHANNEL_SETTINGS_PERMISSIONS_INIT2,
CHANNEL_SETTINGS_PERMISSIONS_UPDATE_PERMISSION: CHANNEL_SETTINGS_PERMISSIONS_UPDATE_PERMISSION,
CHANNEL_SETTINGS_PERMISSIONS_SELECT_PERMISSION: CHANNEL_SETTINGS_PERMISSIONS_SELECT_PERMISSION,
CHANNEL_SETTINGS_INIT: function() {
@@ -89,300 +96,342 @@ function _fun116039(global, require, importDefault, importAll, module, exports,
var Storage = require(dependencyMap[9]).Storage;
Storage.set(ADVANCED_MODE_ON_KEY, advancedMode);
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/ChannelSettingsPermissionsStore.tsx');
(FileImportTrackerModule).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) {
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 _fun116044;
return (_isNativeReflectConstruct_116040_isNativeReflectConstruct = function() {
return !!result;
})();
}
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') {
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);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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 {
r6 = value;
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;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun116044;
}
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 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 _fun116044() { // fn#116044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15383:1020, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
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;
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 object = {};
copyDataProperties(object, a0.permissionOverwrites, undefined);
if (guildId != null && object[guildId] == null) {
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
object[guildId] = moduleValue.makeEveryoneOverwrite(guildId);
}
return object;
}
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) {
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
channel = ChannelSettingsStore.getChannel();
category = ChannelSettingsStore.getCategory();
if (channel == null) {
return false;
}
} else {
if (env0_19[id] != null) {
return undefined;
const value2 = channel.getGuildId();
if (getPermissionOverwrites(channel)[env0_23] != null) {
}
result = category != null;
env0_14 = PermissionUtilsModule.areChannelsLocked(channel, category);
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 (channel2 == null) {
return false;
}
if (channel2.id !== a0) {
return false;
}
const channel = ChannelStore.getChannel(a0);
channel2 = channel;
if (channel == null) {
return false;
}
category = ChannelSettingsStore.getCategory();
let binding = channel2;
const guildId = binding.getGuildId();
if (guildId == null) {
return false;
}
env0_20 = getPermissionOverwrites(channel2);
const object = {};
binding = env0_16;
binding.forEach(_fun116049);
if (object[guildId] == null && channel2.permissionOverwrites[guildId] == null) {
moduleValue = importAll(dependencyMap[10]);
object[guildId] = moduleValue.makeEveryoneOverwrite(guildId);
r7 = dependencyMap;
} else {
r7 = binding;
}
const object2 = {};
copyDataProperties(object2, channel2.permissionOverwrites, r7);
copyDataProperties(object2, object, r7);
if (object2[env0_23] != null) {
if (env0_24 != null && object2[env0_24] != null) {
}
}
const moduleValue2 = importAll(dependencyMap[10]);
env0_14 = moduleValue2.areChannelsLocked(channel2, category);
return true;
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 _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 ChannelSettingsPermissionsStore2 = ChannelSettingsPermissionsStore;
Inherits(ChannelSettingsPermissionsStore2, a0);
return CreateClass(ChannelSettingsPermissionsStore2, [{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 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_116053() { // fn#116053, offset: 0x00df0e82, size: 9 bytes, params: 1, frame: 1
return env1_18;
}
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];
}
function get_116056() { // fn#116056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15383:2942, offset: 0x01bf6ebf, size: 27 bytes, params: 1, frame: 11
const Array = global.Array;
return Array.from(env1_16);
}
function get_116057() { // fn#116057, offset: 0x00d406a2, size: 9 bytes, params: 1, frame: 1
return env1_19;
}
function get_116058() { // fn#116058, offset: 0x00df3ac4, size: 9 bytes, params: 1, frame: 1
return env1_23;
}
function get_116060() { // fn#116060, offset: 0x00df0e8b, size: 9 bytes, params: 1, frame: 1
return env1_15;
}
function get_116061() { // fn#116061, offset: 0x00df0f5a, size: 9 bytes, params: 1, frame: 1
return env1_14;
}
function get_116062() { // fn#116062, offset: 0x00f854d6, size: 9 bytes, params: 1, frame: 1
return env1_21;
}
function get_116063() { // fn#116063, offset: 0x00e425c8, size: 9 bytes, params: 1, frame: 1
return env1_22;
}
function get_116064() { // fn#116064, offset: 0x00df3ad6, size: 9 bytes, params: 1, frame: 1
return env1_25;
}
}
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 object = {};
copyDataProperties(object, r1, value2);
object['allow'] = allow;
object['deny'] = deny;
const object2 = {};
copyDataProperties(object2, env0_19, value2);
object2[id] = object;
env0_19 = object2;
env0_16.add(id);
env0_17 = FormStates.OPEN;
const defaultImport = Module00022;
result = !defaultImport.isEqual(env0_19, env0_20);
env0_14 = PermissionUtilsModule.areChannelsLocked(env0_21, env0_22);
}
}
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;
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;
}
value7 = value2();
done = value7.done;
if (done) {
r0 = r2;
break;
} else {
if (env0_19[id] != null) {
return undefined;
}
if (env0_21 == null) {
return false;
}
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 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 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];
}
global.__d(_fun116039, 15186, [6, 7, 15, 17, 18, 8149, 1379, 661, 8120, 587, 3789, 22, 566, 694,
2]) /* metro module 15186, dependencies: [6, 7, 15, 17, 18, 8149, 1379, 661, 8120, 587, 3789, 22, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+102 -79
View File
@@ -1,96 +1,119 @@
/* Metro module 5091; source: stores/CollapsedVoiceChannelStore.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 21, 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 SnowflakeUtils from '../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun44219(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5269:6, offset: 0x0116aa35, size: 320 bytes, params: 8, frame: 19
const closure = CONNECTION_OPEN_44223;
const CONNECTION_OPEN_442232 = CONNECTION_OPEN_44223;
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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
object = {};
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
let value = _fun44225(PersistedStore);
value.displayName = 'CollapsedVoiceChannelStore';
value.persistKey = 'collapsedChannels';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: closure,
OVERLAY_INITIALIZE: closure, CHANNEL_COLLAPSE: CHANNEL_COLLAPSE_44231});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/CollapsedVoiceChannelStore.tsx');
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{CONNECTION_OPEN: CONNECTION_OPEN_442232, OVERLAY_INITIALIZE: CONNECTION_OPEN_442232,
CHANNEL_COLLAPSE: CHANNEL_COLLAPSE_44231});
(FileImportTrackerModule).fileFinishedImporting('stores/CollapsedVoiceChannelStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_44220() { // fn#44220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5269:158, offset: 0x0116ab75, 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) {
function _isNativeReflectConstruct_44220() { // fn#44220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5269:158, offset: 0x0116ab75, 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_44220_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_44220_isNativeReflectConstruct = function() {
return !!result;
})();
}
function CONNECTION_OPEN_44223() { // fn#44223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5269:364, offset: 0x0116abd3, size: 58 bytes, params: 1, frame: 12
(importDefault(21) /* metro dependency 21: SnowflakeUtils */).keys(env0_9).forEach(_fun44224);
}
function CONNECTION_OPEN_44223() { // fn#44223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5269:364, offset: 0x0116abd3, size: 58 bytes, params: 1, frame: 12
(SnowflakeUtils).keys(env0_9).forEach(_fun44224);
function _fun44224(a0) { // fn#44224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5269:421, offset: 0x0116ac0d, size: 38 bytes, params: 2, frame: 12
if (ChannelStore.getChannel(a0) == null) {
delete env1_9[a0];
}
}
function _fun44225(a0) { // fn#44225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5269:469, offset: 0x0116ac33, size: 139 bytes, params: 2, frame: 16
const closure = CollapsedVoiceChannelStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: value_44227}, {key: 'getState', value: value_44228},
{key: 'getCollapsed', value: value_44229}, {key: 'isCollapsed', value: value_44230}]);
}
function CHANNEL_COLLAPSE_44231({channelId}) { // fn#44231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5269:1238, offset: 0x0116acfd, size: 59 bytes, params: 2, frame: 13
var r3;
var value2;
const property = env0_9[channelId];
const binding = env0_9;
if (property) {
delete binding[channelId];
r3 = property;
} else {
value2 = true;
binding[channelId] = value2;
r3 = value2;
}
copyDataProperties({}, env0_9, r3);
}
function _fun44224(a0) { // fn#44224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5269:421, offset: 0x0116ac0d, size: 38 bytes, params: 2, frame: 12
if (ChannelStore.getChannel(a0) == null) {
delete env1_9[a0];
function _fun44225(a0) { // fn#44225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5269:469, offset: 0x0116ac33, size: 139 bytes, params: 2, frame: 16
const CollapsedVoiceChannelStore2 = CollapsedVoiceChannelStore;
Inherits(CollapsedVoiceChannelStore2, a0);
return CreateClass(CollapsedVoiceChannelStore2, [{key: 'initialize', value: value_44227}, {key: 'getState',
value: value_44228}, {key: 'getCollapsed', value: value_44229}, {key: 'isCollapsed', value: value_44230}]);
function CollapsedVoiceChannelStore() { // fn#44226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5269:481, offset: 0x00ec62ac, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, CollapsedVoiceChannelStore);
const value3 = env1_5(CollapsedVoiceChannelStore);
return env1_4(this, _isNativeReflectConstruct_44220() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_44227(a0) { // fn#44227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5269:829, offset: 0x0116acbe, size: 42 bytes, params: 2, frame: 13
const value = a0;
this.waitFor(ChannelStore);
env1_9 = value ?? env1_8;
}
function value_44228() { // fn#44228, offset: 0x00e07a77, size: 9 bytes, params: 1, frame: 1
return env1_9;
}
function value_44229() { // fn#44229, offset: 0x00e07a77, size: 9 bytes, params: 1, frame: 1
return env1_9;
}
function value_44230(a0) { // fn#44230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5269:990, offset: 0x0116ace8, size: 21 bytes, params: 2, frame: 2
const value = environment.__proto__;
return env1_9[a0] || false;
}
}
function CHANNEL_COLLAPSE_44231({channelId}) { // fn#44231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5269:1238, offset: 0x0116acfd, size: 59 bytes, params: 2, frame: 13
var r3;
var value2;
const property = env0_9[channelId];
const binding = env0_9;
if (property) {
delete binding[channelId];
r3 = property;
} else {
value2 = true;
binding[channelId] = value2;
r3 = value2;
}
copyDataProperties({}, env0_9, r3);
}
}
function value_44227(a0) { // fn#44227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5269:829, offset: 0x0116acbe, size: 42 bytes, params: 2, frame: 13
const value = a0;
this.waitFor(ChannelStore);
env1_9 = value ?? env1_8;
}
function value_44230(a0) { // fn#44230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5269:990, offset: 0x0116ace8, size: 21 bytes, params: 2, frame: 2
const value = environment.__proto__;
return env1_9[a0] || false;
}
global.__d(_fun44219, 5091, [6, 7, 15, 17, 18, 1379, 21, 566, 694,
2]) /* metro module 5091, dependencies: [6, 7, 15, 17, 18, 1379, 21, 566, 694, 2] */;
+215 -172
View File
@@ -1,15 +1,21 @@
/* Metro module 5040; source: stores/ConnectedAccountsStore.tsx; dependencies: [6, 7, 15, 17, 18, 5041, 661, 4915, 1418, 5042, 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 ConnectedAccountRecord from '../records/ConnectedAccountRecord.tsx'; /* Metro dependency 5041 */
import ConnectedAccountsActionCreators from '../actions/ConnectedAccountsActionCreators.tsx'; /* Metro dependency 5042 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as GuildRecordUtilsModule from '../utils/GuildRecordUtils.tsx'; /* Metro dependency 1418 */
function _fun43605(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:6, offset: 0x01157407, size: 485 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const connectedAccountRecord = importDefault(5041) /* metro dependency 5041: ConnectedAccountRecord */;
const PlatformTypes = (require(661) /* metro dependency 661: Constants */).PlatformTypes;
const PlatformTypes = (ConstantsModule).PlatformTypes;
let Set = global.Set;
const CONTACTS = PlatformTypes.CONTACTS;
let set = new Set([CONTACTS]);
@@ -25,7 +31,7 @@ function _fun43605(global, require, importDefault, importAll, module, exports, d
env0_12 = a0.filter(_fun43611);
env0_10 = false;
};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun43612(Store).displayName = 'ConnectedAccountsStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */,
{CONNECTION_OPEN: function({connectedAccounts}) {
@@ -35,186 +41,223 @@ function _fun43605(global, require, importDefault, importAll, module, exports, d
USER_CONNECTION_UPDATE: USER_CONNECTION_UPDATE,
USER_CONNECTIONS_INTEGRATION_JOINING_ERROR: USER_CONNECTIONS_INTEGRATION_JOINING_ERROR,
USER_CONNECTIONS_CALLBACK: USER_CONNECTIONS_CALLBACK});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/ConnectedAccountsStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/ConnectedAccountsStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_43606() { // fn#43606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:182, offset: 0x011575ec, 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) {
function _isNativeReflectConstruct_43606() { // fn#43606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:182, offset: 0x011575ec, 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_43606_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_43606_isNativeReflectConstruct = function() {
return !!result;
})();
}
function updateAccounts(a0) { // fn#43609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:458, offset: 0x0115764a, size: 56 bytes, params: 2, frame: 12
const value = a0.filter(_fun43610);
env0_12 = a0.filter(_fun43611);
}
function updateAccounts(a0) { // fn#43609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:458, offset: 0x0115764a, size: 56 bytes, params: 2, frame: 12
const value = a0.filter(_fun43610);
env0_12 = a0.filter(_fun43611);
function _fun43610(a0) { // fn#43610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:474, offset: 0x01157682, size: 71 bytes, params: 2, frame: 13
var r0;
let value = environment.__proto__;
const binding = env1_9;
const value2 = binding.has(a0.type);
if (value2) {
r0 = !value2;
} else {
value = importDefault(4915) /* metro dependency 4915: Platforms */;
value = value.isSupported(a0.type);
r0 = value;
}
return r0;
}
function _fun43612(a0) { // fn#43612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:566, offset: 0x011576e4, size: 310 bytes, params: 2, frame: 16
const closure = ConnectedAccountsStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'isJoining', value: value_43614}, {key: 'joinErrorMessage', value: value_43615},
{key: 'isFetching', value: value_43616}, {key: 'getAccounts', value: value_43617}, {key: 'getLocalAccounts',
value: value_43618}, {key: 'getAccount', value: value_43619}, {key: 'getLocalAccount', value: value_43621},
{key: 'isSuggestedAccountType', value: value_43623}, {key: 'addPendingAuthorizedState', value: value_43624},
{key: 'deletePendingAuthorizedState', value: value_43625}, {key: 'hasPendingAuthorizedState',
value: value_43626}]);
}
function _fun43611({type}) { // fn#43611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:535, offset: 0x011576c9, size: 27 bytes, params: 2, frame: 11
return env1_9.has(type);
}
function CONNECTION_OPEN_43627({connectedAccounts}) { // fn#43627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1663, offset: 0x01157907, size: 42 bytes, params: 2, frame: 11
updateAccounts(connectedAccounts.map(_fun43628));
}
}
function USER_CONNECTIONS_UPDATE(a0) { // fn#43629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1784, offset: 0x01157951, size: 102 bytes, params: 2, frame: 12
if (a0.local) {
if (a0.accounts != null) {
updateAccounts(a0.accounts.map(_fun43630));
function _fun43612(a0) { // fn#43612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:566, offset: 0x011576e4, size: 310 bytes, params: 2, frame: 16
const ConnectedAccountsStore2 = ConnectedAccountsStore;
Inherits(ConnectedAccountsStore2, a0);
return CreateClass(ConnectedAccountsStore2, [{key: 'isJoining', value: value_43614}, {key: 'joinErrorMessage',
value: value_43615}, {key: 'isFetching', value: value_43616}, {key: 'getAccounts', value: value_43617},
{key: 'getLocalAccounts', value: value_43618}, {key: 'getAccount', value: value_43619}, {key: 'getLocalAccount',
value: value_43621}, {key: 'isSuggestedAccountType', value: value_43623}, {key: 'addPendingAuthorizedState',
value: value_43624}, {key: 'deletePendingAuthorizedState', value: value_43625},
{key: 'hasPendingAuthorizedState', value: value_43626}]);
function ConnectedAccountsStore() { // fn#43613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:578, offset: 0x00e08324, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, ConnectedAccountsStore);
const value3 = env1_6(ConnectedAccountsStore);
return env1_5(this, _isNativeReflectConstruct_43606() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_43614(a0) { // fn#43614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:905, offset: 0x0115781a, size: 21 bytes, params: 2, frame: 2
const value = environment.__proto__;
return env1_13[a0] || false;
}
function value_43615(a0) { // fn#43615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:965, offset: 0x00df0ead, size: 16 bytes, params: 2, frame: 2
return env1_16[a0];
}
function value_43616() { // fn#43616, offset: 0x00fbd9ec, size: 9 bytes, params: 1, frame: 1
return env1_10;
}
function value_43617() { // fn#43617, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
function value_43618() { // fn#43618, offset: 0x00e2f9de, size: 9 bytes, params: 1, frame: 1
return env1_12;
}
function value_43619(a0, a1) { // fn#43619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1160, offset: 0x0115782f, size: 41 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
return env1_11.find(_fun43620);
function _fun43620(a0) { // fn#43620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1189, offset: 0x01157858, size: 50 bytes, params: 2, frame: 5
return (env0_0 == null || a0.id === env0_0) && a0.type === require;
}
}
function value_43621(a0) { // fn#43621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1257, offset: 0x0115788a, size: 34 bytes, params: 2, frame: 11
const env0_0 = a0;
return env1_12.find(_fun43622);
function _fun43622({type}) { // fn#43622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1284, offset: 0x0108b18c, size: 21 bytes, params: 2, frame: 2
return type === env0_0;
}
}
function value_43623(a0) { // fn#43623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1338, offset: 0x011578ac, size: 21 bytes, params: 2, frame: 2
const value = environment.__proto__;
return env1_15[a0] || false;
}
function value_43624(a0) { // fn#43624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1407, offset: 0x011578c1, size: 24 bytes, params: 2, frame: 11
env1_14.add(a0);
}
function value_43625(a0) { // fn#43625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1472, offset: 0x011578d9, size: 24 bytes, params: 2, frame: 11
env1_14.delete(a0);
}
function value_43626(a0) { // fn#43626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1537, offset: 0x011578f1, size: 22 bytes, params: 2, frame: 11
return env1_14.has(a0);
}
}
function CONNECTION_OPEN_43627({connectedAccounts}) { // fn#43627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1663, offset: 0x01157907, size: 42 bytes, params: 2, frame: 11
updateAccounts(connectedAccounts.map(_fun43628));
function _fun43628(a0) { // fn#43628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1727, offset: 0x01157931, size: 32 bytes, params: 2, frame: 11
let value = environment.__proto__;
const connectedAccountRecordBinding = ConnectedAccountRecord;
value = Object.create(connectedAccountRecordBinding.prototype,
{constructor: {value: connectedAccountRecordBinding}});
const connectedAccountRecord2 = new connectedAccountRecordBinding(a0);
return connectedAccountRecord2 instanceof Object ? connectedAccountRecord2 : value;
}
}
function USER_CONNECTIONS_UPDATE(a0) { // fn#43629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1784, offset: 0x01157951, size: 102 bytes, params: 2, frame: 12
if (a0.local) {
if (a0.accounts != null) {
updateAccounts(a0.accounts.map(_fun43630));
} else {
(importDefault(5042) /* metro dependency 5042: ConnectedAccountsActionCreators */).fetch();
}
} else {
(importDefault(5042) /* metro dependency 5042: ConnectedAccountsActionCreators */).fetch();
}
} else {
(importDefault(5042) /* metro dependency 5042: ConnectedAccountsActionCreators */).fetch();
function _fun43630(a0) { // fn#43630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1872, offset: 0x011579b7, size: 79 bytes, params: 2, frame: 14
var environment;
let value = environment.__proto__;
const connectedAccountRecordBinding = ConnectedAccountRecord;
const object = {};
copyDataProperties(object, a0, undefined);
object['integrations'] = a0.integrations.map(_fun43631);
value = Object.create(connectedAccountRecordBinding.prototype,
{constructor: {value: connectedAccountRecordBinding}});
const connectedAccountRecord2 = new connectedAccountRecordBinding(object);
return connectedAccountRecord2 instanceof Object ? connectedAccountRecord2 : value;
function _fun43631(a0) { // fn#43631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1920, offset: 0x01157a06, size: 89 bytes, params: 2, frame: 15
const object = {};
copyDataProperties(object, a0, undefined);
let value = environment.__proto__.__proto__;
const fromGuildBasic = (GuildRecordUtilsModule).fromGuildBasic;
const object2 = {};
copyDataProperties(object2, a0.guild, undefined);
object2['features'] = [];
value = Reflect.apply(fromGuildBasic, value, [object2]);
object['guild'] = value;
return object;
}
}
}
}
function USER_CONNECTIONS_INTEGRATION_JOINING({integrationId, joining}) { // fn#43632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:2070, offset: 0x01157a5f, size: 30 bytes, params: 2, frame: 3
env0_13[integrationId] = joining;
}
function USER_CONNECTION_UPDATE({platformType, id, revoked, accessToken}) { // fn#43633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:2149, offset: 0x01157a7d, size: 93 bytes, params: 2, frame: 13
const value = env0_11.find(_fun43634);
if (value == null) {
return false;
function USER_CONNECTIONS_INTEGRATION_JOINING({integrationId, joining}) { // fn#43632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:2070, offset: 0x01157a5f, size: 30 bytes, params: 2, frame: 3
env0_13[integrationId] = joining;
}
if (revoked != null) {
value.revoked = revoked;
function USER_CONNECTION_UPDATE({platformType, id, revoked, accessToken}) { // fn#43633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:2149, offset: 0x01157a7d, size: 93 bytes, params: 2, frame: 13
const value = env0_11.find(_fun43634);
if (value == null) {
return false;
}
if (revoked != null) {
value.revoked = revoked;
}
if (accessToken != null) {
value.accessToken = accessToken;
}
function _fun43634(a0) { // fn#43634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:2246, offset: 0x01157ada, size: 37 bytes, params: 2, frame: 4
return a0.id === id && a0.type === platformType;
}
}
if (accessToken != null) {
value.accessToken = accessToken;
function USER_CONNECTIONS_INTEGRATION_JOINING_ERROR(a0) { // fn#43635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:2386, offset: 0x01157aff, size: 42 bytes, params: 2, frame: 6
const binding = env0_16;
const integrationId = a0.integrationId;
let error = a0.error;
error = error === undefined ? '' : a0.error;
binding[integrationId] = error;
}
}
function USER_CONNECTIONS_INTEGRATION_JOINING_ERROR(a0) { // fn#43635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:2386, offset: 0x01157aff, size: 42 bytes, params: 2, frame: 6
const binding = env0_16;
const integrationId = a0.integrationId;
let error = a0.error;
error = error === undefined ? '' : a0.error;
binding[integrationId] = error;
}
function USER_CONNECTIONS_CALLBACK({code, state, openid_params, provider}) { // fn#43636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:2491, offset: 0x01157b29, size: 79 bytes, params: 2, frame: 17
const connectedAccountsActionCreators = importDefault(5042) /* metro dependency 5042: ConnectedAccountsActionCreators */;
connectedAccountsActionCreators.callback(provider, {code: code, state: state, openid_params: openid_params});
}
function _fun43610(a0) { // fn#43610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:474, offset: 0x01157682, size: 71 bytes, params: 2, frame: 13
var r0;
let value = environment.__proto__;
const binding = env1_9;
const value2 = binding.has(a0.type);
if (value2) {
r0 = !value2;
} else {
value = importDefault(4915) /* metro dependency 4915: Platforms */;
value = value.isSupported(a0.type);
r0 = value;
function USER_CONNECTIONS_CALLBACK({code, state, openid_params, provider}) { // fn#43636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:2491, offset: 0x01157b29, size: 79 bytes, params: 2, frame: 17
ConnectedAccountsActionCreators.callback(provider, {code: code, state: state, openid_params: openid_params});
}
return r0;
}
function _fun43611({type}) { // fn#43611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:535, offset: 0x011576c9, size: 27 bytes, params: 2, frame: 11
return env1_9.has(type);
}
function value_43614(a0) { // fn#43614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:905, offset: 0x0115781a, size: 21 bytes, params: 2, frame: 2
const value = environment.__proto__;
return env1_13[a0] || false;
}
function value_43619(a0, a1) { // fn#43619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1160, offset: 0x0115782f, size: 41 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
return env1_11.find(_fun43620);
}
function value_43621(a0) { // fn#43621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1257, offset: 0x0115788a, size: 34 bytes, params: 2, frame: 11
const env0_0 = a0;
return env1_12.find(_fun43622);
}
function value_43623(a0) { // fn#43623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1338, offset: 0x011578ac, size: 21 bytes, params: 2, frame: 2
const value = environment.__proto__;
return env1_15[a0] || false;
}
function value_43624(a0) { // fn#43624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1407, offset: 0x011578c1, size: 24 bytes, params: 2, frame: 11
env1_14.add(a0);
}
function value_43625(a0) { // fn#43625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1472, offset: 0x011578d9, size: 24 bytes, params: 2, frame: 11
env1_14.delete(a0);
}
function _fun43628(a0) { // fn#43628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1727, offset: 0x01157931, size: 32 bytes, params: 2, frame: 11
let value = environment.__proto__;
value = Object.create(ConnectedAccountRecord.prototype, {constructor: {value: ConnectedAccountRecord}});
const connectedAccountRecord = new ConnectedAccountRecord(a0);
return connectedAccountRecord instanceof Object ? connectedAccountRecord : value;
}
function _fun43630(a0) { // fn#43630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1872, offset: 0x011579b7, size: 79 bytes, params: 2, frame: 14
var environment;
let value = environment.__proto__;
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['integrations'] = a0.integrations.map(_fun43631);
value = Object.create(ConnectedAccountRecord.prototype, {constructor: {value: ConnectedAccountRecord}});
const connectedAccountRecord = new ConnectedAccountRecord(object2);
return connectedAccountRecord instanceof Object ? connectedAccountRecord : value;
}
function _fun43634(a0) { // fn#43634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:2246, offset: 0x01157ada, size: 37 bytes, params: 2, frame: 4
return a0.id === id && a0.type === platformType;
}
function _fun43620(a0) { // fn#43620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1189, offset: 0x01157858, size: 50 bytes, params: 2, frame: 5
return (env0_0 == null || a0.id === env0_0) && a0.type === require;
}
function _fun43631(a0) { // fn#43631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5218:1920, offset: 0x01157a06, size: 89 bytes, params: 2, frame: 15
const object3 = {};
copyDataProperties(object3, a0, undefined);
let value = environment.__proto__.__proto__;
const fromGuildBasic = (require(1418) /* metro dependency 1418: GuildRecordUtils */).fromGuildBasic;
const object4 = {};
copyDataProperties(object4, a0.guild, undefined);
object4['features'] = [];
value = Reflect.apply(fromGuildBasic, value, [object4]);
object3['guild'] = value;
return object3;
}
global.__d(_fun43605, 5040, [6, 7, 15, 17, 18, 5041, 661, 4915, 1418, 5042, 566, 694,
2]) /* metro module 5040, dependencies: [6, 7, 15, 17, 18, 5041, 661, 4915, 1418, 5042, 566, 694, 2] */;
+129 -103
View File
@@ -1,14 +1,18 @@
/* Metro module 5110; source: stores/ConnectedAppsStore.tsx; dependencies: [6, 7, 15, 17, 18, 22, 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 Module00022 from '../by-id/module-00022.js'; /* Metro dependency 22 */
import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun44660(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:6, offset: 0x01176628, size: 305 bytes, params: 8, frame: 18
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 */;
let env0_7 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun44664(Store);
value.displayName = 'ConnectedAppsStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
@@ -18,114 +22,136 @@ function _fun44660(global, require, importDefault, importAll, module, exports, d
env0_7 = object;
}, RPC_APP_CONNECTED: RPC_APP_CONNECTED_44673, RPC_APP_AUTHENTICATED: RPC_APP_AUTHENTICATED,
RPC_APP_DISCONNECTED: RPC_APP_DISCONNECTED_44675});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/ConnectedAppsStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/ConnectedAppsStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_44661() { // fn#44661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:148, offset: 0x01176759, 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) {
function _isNativeReflectConstruct_44661() { // fn#44661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:148, offset: 0x01176759, 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_44661_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_44661_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun44664(a0) { // fn#44664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:356, offset: 0x011767b7, size: 164 bytes, params: 2, frame: 16
const closure = ConnectedAppsStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'isConnected', value: value_44666}, {key: 'isChildConnected', value: value_44667},
{key: 'connections', get: get_44669}, {key: 'getApplication', value: value_44670}, {key: 'getAllConnections',
value: value_44671}]);
}
function _fun44664(a0) { // fn#44664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:356, offset: 0x011767b7, size: 164 bytes, params: 2, frame: 16
const ConnectedAppsStore2 = ConnectedAppsStore;
Inherits(ConnectedAppsStore2, a0);
return CreateClass(ConnectedAppsStore2, [{key: 'isConnected', value: value_44666}, {key: 'isChildConnected',
value: value_44667}, {key: 'connections', get: get_44669}, {key: 'getApplication', value: value_44670},
{key: 'getAllConnections', value: value_44671}]);
function ConnectedAppsStore() { // fn#44665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:368, offset: 0x00c6223c, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, ConnectedAppsStore);
const value3 = env1_5(ConnectedAppsStore);
return env1_4(this, _isNativeReflectConstruct_44661() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_44666(a0) { // fn#44666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:677, offset: 0x0117685b, size: 22 bytes, params: 2, frame: 2
return env1_7[a0] != null;
}
function value_44667(a0) { // fn#44667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:739, offset: 0x01176871, size: 61 bytes, params: 2, frame: 13
var environment;
var r0;
var Object;
var values;
const env0_0 = a0;
let value = a0 != null;
if (value) {
Object = global.Object;
values = Object.values;
value = environment.__proto__;
value = Reflect.apply(values, Object, [env1_7]);
value = value.some(_fun44668);
r0 = value;
} else {
r0 = value;
}
return r0;
function _fun44668({parentId}) { // fn#44668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:790, offset: 0x011768ae, size: 22 bytes, params: 2, frame: 2
return parentId === env0_0;
}
}
function get_44669() { // fn#44669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:835, offset: 0x011768c4, size: 41 bytes, params: 1, frame: 12
return (Module00022).values(env1_7);
}
function value_44670(a0) { // fn#44670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:901, offset: 0x0103ab8e, size: 16 bytes, params: 2, frame: 2
return env1_7[a0];
}
function value_44671() { // fn#44671, offset: 0x00fbd9cb, size: 9 bytes, params: 1, frame: 1
return env1_7;
}
function RPC_APP_CONNECTED_44673({application}) { // fn#44673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:1153, offset: 0x0117690c, size: 141 bytes, params: 2, frame: 6
let id = application.id;
if (id == null) {
return false;
}
id = application.id;
if (env0_7[id] == null) {
env0_7[id] = {count: 0, id: application.id, parentId: application.parentId, name: application.name,
icon: application.icon, coverImage: application.coverImage, authenticated: false};
}
const property = env0_7[id];
const count = property.count;
property.count = typeof count === 'bigint' ? count + 1n : +count + 1;
}
function RPC_APP_AUTHENTICATED({application}) { // fn#44674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:1391, offset: 0x01176999, size: 73 bytes, params: 2, frame: 5
if (application.id != null && env0_7[application.id] != null) {
env0_7[application.id].authenticated = true;
}
}
function RPC_APP_DISCONNECTED_44675({application}) { // fn#44675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:1516, offset: 0x011769e2, size: 116 bytes, params: 2, frame: 5
var binding;
var property;
var count;
let id = application.id;
if (id != null && env0_7[application.id] != null) {
binding = env0_7;
function RPC_APP_CONNECTED_44673({application}) { // fn#44673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:1153, offset: 0x0117690c, size: 141 bytes, params: 2, frame: 6
let id = application.id;
if (id == null) {
return false;
}
id = application.id;
property = binding[id];
count = property.count;
property.count = typeof count === 'bigint' ? count - 1n : +count - 1;
binding = env0_7;
id = application.id;
count = binding[id].count;
if (count === 0) {
delete env0_7[application.id];
if (env0_7[id] == null) {
env0_7[id] = {count: 0, id: application.id, parentId: application.parentId, name: application.name,
icon: application.icon, coverImage: application.coverImage, authenticated: false};
}
const property = env0_7[id];
const count = property.count;
property.count = typeof count === 'bigint' ? count + 1n : +count + 1;
}
function RPC_APP_AUTHENTICATED({application}) { // fn#44674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:1391, offset: 0x01176999, size: 73 bytes, params: 2, frame: 5
if (application.id != null && env0_7[application.id] != null) {
env0_7[application.id].authenticated = true;
}
}
}
function value_44666(a0) { // fn#44666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:677, offset: 0x0117685b, size: 22 bytes, params: 2, frame: 2
return env1_7[a0] != null;
}
function value_44667(a0) { // fn#44667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:739, offset: 0x01176871, size: 61 bytes, params: 2, frame: 13
var environment;
var r0;
var Object;
var values;
const env0_0 = a0;
let value = a0 != null;
if (value) {
Object = global.Object;
values = Object.values;
value = environment.__proto__;
value = Reflect.apply(values, Object, [env1_7]);
value = value.some(_fun44668);
r0 = value;
} else {
r0 = value;
function RPC_APP_DISCONNECTED_44675({application}) { // fn#44675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:1516, offset: 0x011769e2, size: 116 bytes, params: 2, frame: 5
var binding;
var property;
var count;
let id = application.id;
if (id != null && env0_7[application.id] != null) {
binding = env0_7;
id = application.id;
property = binding[id];
count = property.count;
property.count = typeof count === 'bigint' ? count - 1n : +count - 1;
binding = env0_7;
id = application.id;
count = binding[id].count;
if (count === 0) {
delete env0_7[application.id];
}
}
}
return r0;
}
function get_44669() { // fn#44669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:835, offset: 0x011768c4, size: 41 bytes, params: 1, frame: 12
return (importDefault(22) /* metro dependency 22 */).values(env1_7);
}
global.__d(_fun44660, 5110, [6, 7, 15, 17, 18, 22, 566, 694,
2]) /* metro module 5110, dependencies: [6, 7, 15, 17, 18, 22, 566, 694, 2] */;
+82 -53
View File
@@ -1,14 +1,17 @@
/* Metro module 5078; source: stores/ConsentStore.tsx; dependencies: [6, 7, 15, 17, 18, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun44082(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5256:6, offset: 0x01167f30, size: 325 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let env0_7 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun44086(Store);
value.displayName = 'ConsentStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
@@ -29,57 +32,83 @@ function _fun44082(global, require, importDefault, importAll, module, exports, d
}, LOGOUT: function() {
env0_8 = null;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/ConsentStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/ConsentStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_44083() { // fn#44083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5256:148, offset: 0x01168075, 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) {
function _isNativeReflectConstruct_44083() { // fn#44083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5256:148, offset: 0x01168075, 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_44083_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_44083_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun44086(a0) { // fn#44086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5256:373, offset: 0x011680d3, size: 164 bytes, params: 2, frame: 16
const closure = ConsentStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'hasConsented', value: value_44088}, {key: 'consents', get: get_44089},
{key: 'fetchedConsents', get: get_44090}, {key: 'receivedConsentsInConnectionOpen', get: get_44091},
{key: 'getAuthenticationConsentRequired', value: value_44092}]);
}
function _fun44086(a0) { // fn#44086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5256:373, offset: 0x011680d3, size: 164 bytes, params: 2, frame: 16
const ConsentStore2 = ConsentStore;
Inherits(ConsentStore2, a0);
return CreateClass(ConsentStore2, [{key: 'hasConsented', value: value_44088}, {key: 'consents', get: get_44089},
{key: 'fetchedConsents', get: get_44090}, {key: 'receivedConsentsInConnectionOpen', get: get_44091},
{key: 'getAuthenticationConsentRequired', value: value_44092}]);
function ConsentStore() { // fn#44087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5256:385, offset: 0x00fbdfd6, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, ConsentStore);
const value3 = env1_3(ConsentStore);
return env1_2(this, _isNativeReflectConstruct_44083() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_44088(a0) { // fn#44088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5256:665, offset: 0x01168177, size: 39 bytes, params: 2, frame: 4
return env1_7[a0] != null && env1_7[a0].consented;
}
function get_44089() { // fn#44089, offset: 0x00fbd9cb, size: 9 bytes, params: 1, frame: 1
return env1_7;
}
function get_44090() { // fn#44090, offset: 0x00e40571, size: 9 bytes, params: 1, frame: 1
return env1_5;
}
function get_44091() { // fn#44091, offset: 0x00c82288, size: 9 bytes, params: 1, frame: 1
return env1_6;
}
function value_44092() { // fn#44092, offset: 0x00fbd9d4, size: 9 bytes, params: 1, frame: 1
return env1_8;
}
function CONNECTION_OPEN_44093({consents}) { // fn#44093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5256:1022, offset: 0x0116819e, size: 55 bytes, params: 2, frame: 13
var object2;
if (consents != null) {
object2 = {};
copyDataProperties(object2, consents, copyDataProperties(object2, env0_7, undefined));
}
function CONNECTION_OPEN_44093({consents}) { // fn#44093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5256:1022, offset: 0x0116819e, size: 55 bytes, params: 2, frame: 13
var object;
if (consents != null) {
object = {};
copyDataProperties(object, consents, copyDataProperties(object, env0_7, undefined));
}
}
}
function value_44088(a0) { // fn#44088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5256:665, offset: 0x01168177, size: 39 bytes, params: 2, frame: 4
return env1_7[a0] != null && env1_7[a0].consented;
}
global.__d(_fun44082, 5078, [6, 7, 15, 17, 18, 566, 694,
2]) /* metro module 5078, dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */;
+142 -96
View File
@@ -1,4 +1,18 @@
/* Metro module 9152; source: stores/CreateInviteModalStore.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 1867, 8880, 661, 9153, 9155, 44, 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 Module00044 from '../by-id/module-00044.js'; /* Metro dependency 44 */
import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from './GuildStore.tsx'; /* Metro dependency 1867 */
import InstantInviteStore from './InstantInviteStore.tsx'; /* Metro dependency 8880 */
import InstantInviteUtils from '../utils/InstantInviteUtils.tsx'; /* Metro dependency 9153 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun71695(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9337:6, offset: 0x01d2a4b3, size: 508 bytes, params: 8, frame: 19
const env0_0 = require;
const init_71701 = function(a0) {
@@ -15,19 +29,11 @@ function _fun71695(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const instantInviteStore = importDefault(8880) /* metro dependency 8880: InstantInviteStore */;
const FormStates = (require(661) /* metro dependency 661: Constants */).FormStates;
const INVITE_OPTIONS_UNLIMITED = (importDefault(9153) /* metro dependency 9153: InstantInviteUtils */).INVITE_OPTIONS_UNLIMITED;
const FormStates = (ConstantsModule).FormStates;
const INVITE_OPTIONS_UNLIMITED = (InstantInviteUtils).INVITE_OPTIONS_UNLIMITED;
let value = INVITE_OPTIONS_UNLIMITED.value;
let env0_19 = FormStates.CLOSED;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun71702(Store).displayName = 'CreateInviteModalStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{CREATE_INVITE_MODAL_INIT: function(a0) {
@@ -51,94 +57,134 @@ function _fun71695(global, require, importDefault, importAll, module, exports, d
env0_19 = FormStates.CLOSED;
env0_17 = undefined;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/CreateInviteModalStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/CreateInviteModalStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_71696() { // fn#71696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9337:201, offset: 0x01d2a6af, 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) {
function _isNativeReflectConstruct_71696() { // fn#71696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9337:201, offset: 0x01d2a6af, 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_71696_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_71696_isNativeReflectConstruct = function() {
return !!result;
})();
}
function updateWithLatestInvite(a0, {targetType, targetUserId, targetApplicationId}) { // fn#71699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9337:467, offset: 0x01d2a711, size: 343 bytes, params: 3, frame: 21
var object2;
const defaultInviteExpiration = (require(9155) /* metro dependency 9155: DefaultInviteExpirationExperiments */).getDefaultInviteExpiration({guild: GuildStore.getGuild(ChannelStore.getChannel(a0)?.guild_id)});
const invite = InstantInviteStore.getInvite(a0, {targetType: targetType, targetUserId: targetUserId,
targetApplicationId: targetApplicationId});
env0_14 = invite;
object2 = {channelId: a0};
object2.maxAge = invite == null ? defaultInviteExpiration : env0_14.maxAge;
object2.maxUses = env0_14 != null ? env0_14.maxUses : value;
object2.temporary = env0_14 != null && env0_14.temporary;
object2.flags = env0_14 != null ? env0_14.flags : 0;
object2.targetType = targetType;
object2.targetUserId = targetUserId;
object2.targetApplicationId = targetApplicationId;
const binding = env0_14;
let r3 = binding == null || binding.roles == null ? undefined : binding.roles.map(function(a0) {
return a0.id;
});
r3 = r3 ?? [];
object2.roleIds = r3;
}
function _fun71702(a0) { // fn#71702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9337:1247, offset: 0x01d2a8d7, size: 322 bytes, params: 2, frame: 16
const closure = CreateInviteModalStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, GuildStore, InstantInviteStore);
}}, {key: 'init', value: function() {
this.waitFor(InstantInviteStore);
}}, {key: 'isOpen', value: function() {
return CLOSED !== FormStates.CLOSED;
}}, {key: 'isSubmitting', value: value_71707}, {key: 'getGuildId', value: value_71708}, {key: 'getError',
value: value_71709}, {key: 'getInvite', value: value_71710}, {key: 'getInviteSettings', value: value_71711},
{key: 'getPendingSettings', value: value_71712}, {key: 'getProps', value: function() {
return {};
}}, {key: 'onClose', get: get_71714}]);
}
function CREATE_INVITE_MODAL_UPDATE_SETTINGS({settings}) { // fn#71717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9337:2376, offset: 0x01d2aa7c, size: 53 bytes, params: 2, frame: 13
var object2;
const binding = env0_16;
if (binding != null) {
object2 = {};
copyDataProperties(object2, settings, copyDataProperties(object2, env0_16, binding));
function updateWithLatestInvite(a0, {targetType, targetUserId, targetApplicationId}) { // fn#71699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9337:467, offset: 0x01d2a711, size: 343 bytes, params: 3, frame: 21
const defaultInviteExpiration = (require(9155) /* metro dependency 9155: DefaultInviteExpirationExperiments */).getDefaultInviteExpiration({guild: GuildStore.getGuild(ChannelStore.getChannel(a0)?.guild_id)});
const invite = InstantInviteStore.getInvite(a0, {targetType: targetType, targetUserId: targetUserId,
targetApplicationId: targetApplicationId});
invite2 = invite;
object = {channelId: a0};
object.maxAge = invite == null ? defaultInviteExpiration : invite2.maxAge;
object.maxUses = invite2 != null ? invite2.maxUses : value;
object.temporary = invite2 != null && invite2.temporary;
object.flags = invite2 != null ? invite2.flags : 0;
object.targetType = targetType;
object.targetUserId = targetUserId;
object.targetApplicationId = targetApplicationId;
const binding = invite2;
let r3 = binding == null || binding.roles == null ? undefined : binding.roles.map(function(a0) {
return a0.id;
});
r3 = r3 ?? [];
object.roleIds = r3;
}
function _fun71702(a0) { // fn#71702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9337:1247, offset: 0x01d2a8d7, size: 322 bytes, params: 2, frame: 16
const CreateInviteModalStore2 = CreateInviteModalStore;
Inherits(CreateInviteModalStore2, a0);
return CreateClass(CreateInviteModalStore2, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, GuildStore, InstantInviteStore);
}}, {key: 'init', value: function() {
this.waitFor(InstantInviteStore);
}}, {key: 'isOpen', value: function() {
return CLOSED !== FormStates.CLOSED;
}}, {key: 'isSubmitting', value: value_71707}, {key: 'getGuildId', value: value_71708}, {key: 'getError',
value: value_71709}, {key: 'getInvite', value: value_71710}, {key: 'getInviteSettings', value: value_71711},
{key: 'getPendingSettings', value: value_71712}, {key: 'getProps', value: function() {
return {};
}}, {key: 'onClose', get: get_71714}]);
function CreateInviteModalStore() { // fn#71703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9337:1259, offset: 0x010e3a31, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, CreateInviteModalStore);
const value3 = env1_6(CreateInviteModalStore);
return env1_5(this, _isNativeReflectConstruct_71696() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_71707() { // fn#71707, offset: 0x00e4253a, size: 9 bytes, params: 1, frame: 1
return env1_20;
}
function value_71708() { // fn#71708, offset: 0x00e2f9de, size: 9 bytes, params: 1, frame: 1
return env1_12;
}
function value_71709() { // fn#71709, offset: 0x00e2f9d5, size: 9 bytes, params: 1, frame: 1
return env1_13;
}
function value_71710() { // fn#71710, offset: 0x00df0f5a, size: 9 bytes, params: 1, frame: 1
return env1_14;
}
function value_71711() { // fn#71711, offset: 0x00df0e8b, size: 9 bytes, params: 1, frame: 1
return env1_15;
}
function value_71712() { // fn#71712, offset: 0x00df0e94, size: 9 bytes, params: 1, frame: 1
return env1_16;
}
function get_71714() { // fn#71714, offset: 0x00e07553, size: 9 bytes, params: 1, frame: 1
return env1_17;
}
}
function CREATE_INVITE_MODAL_UPDATE_SETTINGS({settings}) { // fn#71717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9337:2376, offset: 0x01d2aa7c, size: 53 bytes, params: 2, frame: 13
var object;
const binding = env0_16;
if (binding != null) {
object = {};
copyDataProperties(object, settings, copyDataProperties(object, env0_16, binding));
}
}
function CREATE_INVITE_MODAL_RESET_SETTINGS() { // fn#71718, offset: 0x01d2aab1, size: 15 bytes, params: 1, frame: 2
}
function CREATE_INVITE_MODAL_GENERATE_INVITE() { // fn#71719, offset: 0x01d2aac0, size: 21 bytes, params: 1, frame: 2
}
function CREATE_INVITE_MODAL_GENERATE_INVITE_SUCCESS({channelId}) { // fn#71720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9337:2639, offset: 0x01d2aad5, size: 116 bytes, params: 2, frame: 15
(Module00044)(env0_15 != null, 'No invite settings for generated invite');
const binding = env0_15;
updateWithLatestInvite(channelId, {targetType: binding.targetType, targetUserId: binding.targetUserId,
targetApplicationId: binding.targetApplicationId});
}
}
function CREATE_INVITE_MODAL_GENERATE_INVITE() { // fn#71719, offset: 0x01d2aac0, size: 21 bytes, params: 1, frame: 2
}
function CREATE_INVITE_MODAL_GENERATE_INVITE_SUCCESS({channelId}) { // fn#71720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9337:2639, offset: 0x01d2aad5, size: 116 bytes, params: 2, frame: 15
(importDefault(44) /* metro dependency 44 */)(env0_15 != null, 'No invite settings for generated invite');
const binding = env0_15;
updateWithLatestInvite(channelId, {targetType: binding.targetType, targetUserId: binding.targetUserId,
targetApplicationId: binding.targetApplicationId});
}
global.__d(_fun71695, 9152, [6, 7, 15, 17, 18, 1379, 1867, 8880, 661, 9153, 9155, 44, 566, 694,
2]) /* metro module 9152, dependencies: [6, 7, 15, 17, 18, 1379, 1867, 8880, 661, 9153, 9155, 44, 566, 694, 2] */;
+89 -71
View File
@@ -1,95 +1,113 @@
/* Metro module 3973; source: stores/DefaultRouteStore.tsx; dependencies: [6, 7, 15, 17, 18, 661, 566, 587, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as StorageModule from '../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun32588(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#32588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:6, offset: 0x01019ddc, size: 350 bytes, params: 8, frame: 19
const env0_0 = require;
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 = (require(661) /* metro dependency 661: Constants */).Routes;
object = {'lastViewedPath': null, 'lastViewedNonVoicePath': null};
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
let value = _fun32592(PersistedStore);
value.displayName = 'DefaultRouteStore';
value.persistKey = 'DefaultRouteStore';
value.migrations = [_fun32599];
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {SAVE_LAST_ROUTE: SAVE_LAST_ROUTE,
SAVE_LAST_NON_VOICE_ROUTE: SAVE_LAST_NON_VOICE_ROUTE});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/DefaultRouteStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/DefaultRouteStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_32589() { // fn#32589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:165, offset: 0x01019f3a, 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) {
function _isNativeReflectConstruct_32589() { // fn#32589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:165, offset: 0x01019f3a, 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_32589_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_32589_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun32592(a0) { // fn#32592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:445, offset: 0x01019f98, size: 162 bytes, params: 2, frame: 16
const closure = DefaultRouteStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: value_32594}, {key: 'defaultRoute', get: get_32595},
{key: 'lastNonVoiceRoute', get: get_32596}, {key: 'fallbackRoute', get: function() {
return Routes.ME;
}}, {key: 'getState', value: value_32598}]);
}
function _fun32592(a0) { // fn#32592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:445, offset: 0x01019f98, size: 162 bytes, params: 2, frame: 16
const DefaultRouteStore2 = DefaultRouteStore;
Inherits(DefaultRouteStore2, a0);
return CreateClass(DefaultRouteStore2, [{key: 'initialize', value: value_32594}, {key: 'defaultRoute', get: get_32595},
{key: 'lastNonVoiceRoute', get: get_32596}, {key: 'fallbackRoute', get: function() {
return Routes.ME;
}}, {key: 'getState', value: value_32598}]);
function DefaultRouteStore() { // fn#32593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:457, offset: 0x00ec62ac, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, DefaultRouteStore);
const value3 = env1_5(DefaultRouteStore);
return env1_4(this, _isNativeReflectConstruct_32589() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function _fun32599() { // fn#32599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:1173, offset: 0x0101a0ad, size: 85 bytes, params: 1, frame: 17
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
const value = Storage.get('LAST_VIEWED_PATH', null);
Storage.remove('LAST_VIEWED_PATH');
return {lastViewedPath: value};
}
function value_32594() { // fn#32594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:760, offset: 0x0101a03a, size: 38 bytes, params: 1, frame: 3
let value = a0;
if ((value !== undefined ? value : env1_8) == null) {
value = environment.__proto__;
}
value = environment.__proto__;
}
function SAVE_LAST_ROUTE({path}) { // fn#32600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:1303, offset: 0x0101a102, size: 26 bytes, params: 2, frame: 2
env0_9.lastViewedPath = path;
return true;
}
function get_32595() { // fn#32595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:814, offset: 0x0101a060, size: 31 bytes, params: 1, frame: 3
return env1_9.lastViewedPath ?? Routes.ME;
}
function SAVE_LAST_NON_VOICE_ROUTE({path}) { // fn#32601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:1394, offset: 0x0101a11c, size: 26 bytes, params: 2, frame: 2
env0_9.lastViewedNonVoicePath = path;
return true;
}
function get_32596() { // fn#32596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:903, offset: 0x0101a07f, size: 31 bytes, params: 1, frame: 3
return env1_9.lastViewedNonVoicePath ?? Routes.ME;
}
function value_32598() { // fn#32598, offset: 0x00e07a77, size: 9 bytes, params: 1, frame: 1
return env1_9;
}
function value_32594() { // fn#32594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:760, offset: 0x0101a03a, size: 38 bytes, params: 1, frame: 3
let value = a0;
if ((value !== undefined ? value : env1_8) == null) {
value = environment.__proto__;
}
value = environment.__proto__;
}
function get_32595() { // fn#32595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:814, offset: 0x0101a060, size: 31 bytes, params: 1, frame: 3
return env1_9.lastViewedPath ?? Routes.ME;
}
function _fun32599() { // fn#32599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:1173, offset: 0x0101a0ad, size: 85 bytes, params: 1, frame: 17
const Storage = (StorageModule).Storage;
const value = Storage.get('LAST_VIEWED_PATH', null);
Storage.remove('LAST_VIEWED_PATH');
return {lastViewedPath: value};
}
function SAVE_LAST_ROUTE({path}) { // fn#32600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:1303, offset: 0x0101a102, size: 26 bytes, params: 2, frame: 2
env0_9.lastViewedPath = path;
return true;
}
function SAVE_LAST_NON_VOICE_ROUTE({path}) { // fn#32601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:1394, offset: 0x0101a11c, size: 26 bytes, params: 2, frame: 2
env0_9.lastViewedNonVoicePath = path;
return true;
}
function get_32596() { // fn#32596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:903, offset: 0x0101a07f, size: 31 bytes, params: 1, frame: 3
return env1_9.lastViewedNonVoicePath ?? Routes.ME;
}
global.__d(_fun32588, 3973, [6, 7, 15, 17, 18, 661, 566, 587, 694,
2]) /* metro module 3973, dependencies: [6, 7, 15, 17, 18, 661, 566, 587, 694, 2] */;
File diff suppressed because it is too large. Load diff
+102 -89
View File
@@ -1,4 +1,16 @@
/* Metro module 7112; source: stores/DeveloperExperimentStore.tsx; dependencies: [6, 7, 15, 17, 18, 1867, 1878, 4108, 1884, 1883, 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 GuildStore from './GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from './UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UserStoreConstantsModule from '../modules/user/UserStoreConstants.tsx'; /* Metro dependency 1884 */
import * as ExperimentConstantsModule from '../modules/experiments/ExperimentConstants.tsx'; /* Metro dependency 4108 */
function _fun56841(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7290:6, offset: 0x013d37d5, size: 402 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = function() {
@@ -6,106 +18,107 @@ function _fun56841(global, require, importDefault, importAll, module, exports, d
};
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 guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_9 = (require(4108) /* metro dependency 4108: ExperimentConstants */).ExperimentBuckets;
const Environments = (require(1884) /* metro dependency 1884: UserStoreConstants */).Environments;
const Environments = (UserStoreConstantsModule).Environments;
const DEVELOPMENT = Environments.DEVELOPMENT;
let env0_10 = DEVELOPMENT === 'production' || global.window.GLOBAL_ENV.RELEASE_CHANNEL === Environments.STAGING;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun56846(Store).displayName = 'DeveloperExperimentStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: closure,
OVERLAY_INITIALIZE: closure, CURRENT_USER_UPDATE: closure});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/DeveloperExperimentStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/DeveloperExperimentStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_56842() { // fn#56842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7290:219, offset: 0x013d3967, 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) {
function _isNativeReflectConstruct_56842() { // fn#56842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7290:219, offset: 0x013d3967, 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_56842_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_56842_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun56846(a0) { // fn#56846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7290:557, offset: 0x013d39fc, size: 93 bytes, params: 2, frame: 16
const closure = DeveloperExperimentStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
var env0_0 = this;
this.waitFor(UserStore, GuildStore);
global.Object.defineProperties(this, {isDeveloper: {configurable: false, get: _fun56849, set: _fun56850}});
CONNECTION_OPEN_56845();
global.setTimeout(_fun56851);
}}, {key: 'getExperimentDescriptor', value: value_56852}]);
}
function _fun56846(a0) { // fn#56846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7290:557, offset: 0x013d39fc, size: 93 bytes, params: 2, frame: 16
const DeveloperExperimentStore2 = DeveloperExperimentStore;
Inherits(DeveloperExperimentStore2, a0);
return CreateClass(DeveloperExperimentStore2, [{key: 'initialize', value: function() {
var env0_0 = this;
this.waitFor(UserStore, GuildStore);
global.Object.defineProperties(this, {isDeveloper: {configurable: false, get: _fun56849, set: _fun56850}});
CONNECTION_OPEN_56845();
global.setTimeout(_fun56851);
}}, {key: 'getExperimentDescriptor', value: value_56852}]);
function DeveloperExperimentStore(a0) { // fn#56847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7290:569, offset: 0x013d3a59, size: 134 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, DeveloperExperimentStore);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(DeveloperExperimentStore);
binding = env1_4;
if (_isNativeReflectConstruct_56842()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.isDeveloper = false;
return value;
}
function value_56848() { // fn#56848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7290:935, offset: 0x013d3adf, size: 114 bytes, params: 1, frame: 18
this.waitFor(UserStore, GuildStore);
const Object = global.Object;
Object.defineProperties(this, {isDeveloper: {configurable: false, get: get_56849, set: function() {
}}});
CONNECTION_OPEN_56845();
global.setTimeout(_fun56851);
function value_56848Get() { // fn#56849, owner: value_56848.get, offset: 0x00e311cf, size: 9 bytes, params: 1, frame: 1
return env2_10;
}
function _fun56851() { // fn#56851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7290:1066, offset: 0x013d3b51, size: 28 bytes, params: 1, frame: 11
const Object = global.Object;
return Object.freeze(env0_0);
}
}
function value_56852() { // fn#56852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7290:1131, offset: 0x013d3b6d, size: 46 bytes, params: 1, frame: 3
return env1_10 ? {'type': 'developer', 'name': 'discord_dev_testing', 'revision': 1, 'override': true,
bucket: ExperimentBuckets.TREATMENT_1} : null;
}
function DeveloperExperimentStore(a0) { // fn#56847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7290:569, offset: 0x013d3a59, size: 134 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, DeveloperExperimentStore);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(DeveloperExperimentStore);
binding = env1_4;
if (_isNativeReflectConstruct_56842()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.isDeveloper = false;
return value;
}
function value_56848() { // fn#56848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7290:935, offset: 0x013d3adf, size: 114 bytes, params: 1, frame: 18
this.waitFor(UserStore, GuildStore);
const Object = global.Object;
Object.defineProperties(this, {isDeveloper: {configurable: false, get: get_56849, set: function() {
}}});
CONNECTION_OPEN_56845();
global.setTimeout(_fun56851);
}
function value_56852() { // fn#56852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7290:1131, offset: 0x013d3b6d, size: 46 bytes, params: 1, frame: 3
return env1_10 ? {'type': 'developer', 'name': 'discord_dev_testing', 'revision': 1, 'override': true,
bucket: ExperimentBuckets.TREATMENT_1} : null;
}
function _fun56851() { // fn#56851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7290:1066, offset: 0x013d3b51, size: 28 bytes, params: 1, frame: 11
const Object = global.Object;
return Object.freeze(env0_0);
function value_56848Set() { // fn#56850, owner: value_56848.set, offset: 0x00c37b63, size: 4 bytes, params: 1, frame: 1
}
global.__d(_fun56841, 7112, [6, 7, 15, 17, 18, 1867, 1878, 4108, 1884, 1883, 566, 694,
2]) /* metro module 7112, dependencies: [6, 7, 15, 17, 18, 1867, 1878, 4108, 1884, 1883, 566, 694, 2] */;
+275 -250
View File
@@ -1,16 +1,22 @@
/* Metro module 691; source: stores/DeveloperOptionsStore.tsx; dependencies: [6, 7, 15, 17, 18, 661, 561, 672, 507, 692, 693, 587, 1216, 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 Backoff from '../external/discord_common/js/packages/backoff/Backoff.tsx'; /* Metro dependency 561 */
import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as HTTPUtilsModule from '../external/discord_common/js/packages/http-utils/HTTPUtils.tsx'; /* Metro dependency 507 */
import * as StorageModule from '../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun8402(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#8402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:6, offset: 0x00d3fc63, size: 583 bytes, params: 8, frame: 26
const env0_0 = require;
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 env0_9 = (require(661) /* metro dependency 661: Constants */).UserFlags;
const env0_10 = '' + global.location.protocol + '//' + global.location.host + '/__development/source_maps';
let value = importDefault(561) /* metro dependency 561: Backoff */;
let value = Backoff;
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const SECOND = Millis.SECOND;
const value2 = 5 * SECOND;
@@ -25,7 +31,7 @@ function _fun8402(global, require, importDefault, importAll, module, exports, de
'isStreamInfoOverlayEnabled': false, 'preventPopoutClose': false, 'logKeyboardMismatches': false,
'alertStartupMetrics': false, 'logQuestEvents': false}, true);
const env0_19 = [];
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun8412(Store).displayName = 'DeveloperOptionsStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: LOGOUT,
CONNECTION_OPEN: CONNECTION_OPEN, DEVELOPER_OPTIONS_UPDATE_SETTINGS: function({settings}) {
@@ -33,263 +39,282 @@ function _fun8402(global, require, importDefault, importAll, module, exports, de
}, DEVELOPER_OPTIONS_SET_ROUTING_KEY: function({tags}) {
setRoutingKeyTags(tags);
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/DeveloperOptionsStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/DeveloperOptionsStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_8403() { // fn#8403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:168, offset: 0x00d3feaa, 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) {
function _isNativeReflectConstruct_8403() { // fn#8403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:168, offset: 0x00d3feaa, 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_8403_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_8403_isNativeReflectConstruct = function() {
return !!result;
})();
}
function setOptions(a0) { // fn#8406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:1559, offset: 0x00d3ff08, size: 114 bytes, params: 2, frame: 14
const object2 = {};
copyDataProperties(object2, env0_16, undefined);
copyDataProperties(object2, env0_17, undefined);
copyDataProperties(object2, a0, undefined);
env0_17 = object2;
const binding = env0_14;
binding.set(object2.sourceMapsEnabled);
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
Storage.set(env0_15, env0_17);
}
function setOptions(a0) { // fn#8406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:1559, offset: 0x00d3ff08, size: 114 bytes, params: 2, frame: 14
var object3;
const object = {};
copyDataProperties(object, env0_16, undefined);
copyDataProperties(object, object3, undefined);
copyDataProperties(object, a0, undefined);
object3 = object;
const binding = env0_14;
binding.set(object.sourceMapsEnabled);
const Storage = (StorageModule).Storage;
Storage.set(env0_15, object3);
}
function setRoutingKeyTags(a0) { // fn#8407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:1654, offset: 0x00d3ff7a, size: 59 bytes, params: 2, frame: 14
env0_19 = a0;
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
Storage.set(env0_18, env0_19);
}
function setRoutingKeyTags(a0) { // fn#8407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:1654, offset: 0x00d3ff7a, size: 59 bytes, params: 2, frame: 14
env0_19 = a0;
const Storage = (StorageModule).Storage;
Storage.set(env0_18, env0_19);
}
function y() { // fn#8408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:521, offset: 0x00d3ffb5, size: 125 bytes, params: 1, frame: 18
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const put = HTTP.put;
const object3 = {url: env0_10};
const object4 = {};
object4.Authorization = (importAll(692) /* metro dependency 692: TokenManager */).getToken();
object3.headers = object4;
object3.oldFormErrors = true;
object3.rejectWithError = true;
Reflect.apply(put, HTTP, [object3]).then(_fun8409, _fun8410);
}
function y() { // fn#8408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:521, offset: 0x00d3ffb5, size: 125 bytes, params: 1, frame: 18
const HTTP = (HTTPUtilsModule).HTTP;
const put = HTTP.put;
const object = {url: env0_10};
const object2 = {};
object2.Authorization = (importAll(692) /* metro dependency 692: TokenManager */).getToken();
object.headers = object2;
object.oldFormErrors = true;
object.rejectWithError = true;
Reflect.apply(put, HTTP, [object]).then(_fun8409, _fun8410);
function _fun8409(a0) { // fn#8409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:637, offset: 0x00d40032, size: 253 bytes, params: 2, frame: 16
var value;
var setTimeout;
if (a0.status === 401) {
value = environment.__proto__;
value = require(693) /* metro dependency 693: DeveloperOptionsActionCreators */;
value.setDeveloperOptionSettings({sourceMapsEnabled: false});
} else if (a0.status === 403) {
value = environment.__proto__;
value = require(693) /* metro dependency 693: DeveloperOptionsActionCreators */;
value.setDeveloperOptionSettings({sourceMapsEnabled: false});
} else if (a0.status !== 200) {
setTimeout = global.setTimeout;
value = environment.__proto__;
env1_11 = setTimeout(y, env1_12.fail());
} else {
value = environment.__proto__;
env1_12.succeed();
env1_11 = global.setTimeout(y,
a0.body.sourceMapCookieTTLSeconds * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND * 0.75);
}
}
function set_8411(a0) { // fn#8411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:912, offset: 0x00d4015a, size: 174 bytes, params: 2, frame: 19
var HTTP;
var del;
var object3;
var object4;
if (a0 !== (env0_11 != null)) {
if (a0) {
env0_11 = global.setTimeout(y, 0);
} else {
global.clearTimeout(env0_11);
HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
del = HTTP.del;
object3 = {url: env0_10};
object4 = {};
object4.Authorization = (importAll(692) /* metro dependency 692: TokenManager */).getToken();
object3.headers = object4;
object3.oldFormErrors = true;
object3.rejectWithError = true;
Reflect.apply(del, HTTP, [object3]);
function _fun8410() { // fn#8410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:873, offset: 0x00d4012f, size: 43 bytes, params: 1, frame: 14
env1_11 = global.setTimeout(y, env1_12.fail());
}
}
function set_8411(a0) { // fn#8411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:912, offset: 0x00d4015a, size: 174 bytes, params: 2, frame: 19
var HTTP;
var del;
var object;
var object2;
if (a0 !== (env0_11 != null)) {
if (a0) {
env0_11 = global.setTimeout(y, 0);
} else {
global.clearTimeout(env0_11);
HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
del = HTTP.del;
object = {url: env0_10};
object2 = {};
object2.Authorization = (importAll(692) /* metro dependency 692: TokenManager */).getToken();
object.headers = object2;
object.oldFormErrors = true;
object.rejectWithError = true;
Reflect.apply(del, HTTP, [object]);
}
}
}
}
function _fun8412(a0) { // fn#8412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:1720, offset: 0x00d40208, size: 561 bytes, params: 2, frame: 16
const closure = DeveloperOptionsStore;
env0_8(closure, a0);
return env0_5(closure, [{key: 'initialize', value: value_8414}, {key: 'isTracingRequests', get: get_8415},
{key: 'isForcedCanary', get: get_8416}, {key: 'isLoggingGatewayEvents', get: get_8417},
{key: 'isLoggingOverlayEvents', get: get_8418}, {key: 'isLoggingAnalyticsEvents', get: get_8419},
{key: 'isAxeEnabled', get: get_8420}, {key: 'cssDebuggingEnabled', get: get_8421},
{key: 'layoutDebuggingEnabled', get: get_8422}, {key: 'sourceMapsEnabled', get: get_8423},
{key: 'isBugReporterEnabled', get: get_8424}, {key: 'isIdleStatusIndicatorEnabled', get: get_8425},
{key: 'onlyShowPreviewAppCollections', get: get_8426}, {key: 'disableAppCollectionsCache', get: get_8427},
{key: 'isStreamInfoOverlayEnabled', get: get_8428}, {key: 'preventPopoutClose', get: get_8429},
{key: 'logKeyboardMismatches', get: get_8430}, {key: 'alertStartupMetrics', get: get_8431},
{key: 'isLoggingQuestEvents', get: get_8432}, {key: 'getDebugOptionsHeaderValue', value: value_8433},
{key: 'routingKeyTags', get: get_8436}, {key: 'getRoutingKeyHeaderValue', value: value_8437}]);
}
function _fun8412(a0) { // fn#8412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:1720, offset: 0x00d40208, size: 561 bytes, params: 2, frame: 16
const DeveloperOptionsStore2 = DeveloperOptionsStore;
Inherits(DeveloperOptionsStore2, a0);
return CreateClass(DeveloperOptionsStore2, [{key: 'initialize', value: value_8414}, {key: 'isTracingRequests',
get: get_8415}, {key: 'isForcedCanary', get: get_8416}, {key: 'isLoggingGatewayEvents', get: get_8417},
{key: 'isLoggingOverlayEvents', get: get_8418}, {key: 'isLoggingAnalyticsEvents', get: get_8419},
{key: 'isAxeEnabled', get: get_8420}, {key: 'cssDebuggingEnabled', get: get_8421},
{key: 'layoutDebuggingEnabled', get: get_8422}, {key: 'sourceMapsEnabled', get: get_8423},
{key: 'isBugReporterEnabled', get: get_8424}, {key: 'isIdleStatusIndicatorEnabled', get: get_8425},
{key: 'onlyShowPreviewAppCollections', get: get_8426}, {key: 'disableAppCollectionsCache', get: get_8427},
{key: 'isStreamInfoOverlayEnabled', get: get_8428}, {key: 'preventPopoutClose', get: get_8429},
{key: 'logKeyboardMismatches', get: get_8430}, {key: 'alertStartupMetrics', get: get_8431},
{key: 'isLoggingQuestEvents', get: get_8432}, {key: 'getDebugOptionsHeaderValue', value: value_8433},
{key: 'routingKeyTags', get: get_8436}, {key: 'getRoutingKeyHeaderValue', value: value_8437}]);
function DeveloperOptionsStore() { // fn#8413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:1732, offset: 0x00d40439, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_4(this, DeveloperOptionsStore);
const value3 = env1_7(DeveloperOptionsStore);
return env1_6(this, _isNativeReflectConstruct_8403() ? global.Reflect.construct(value3, arguments,
env1_7(this).constructor) : value3.apply(this, arguments));
}
function LOGOUT(a0) { // fn#8438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3918, offset: 0x00d406d3, size: 33 bytes, params: 2, frame: 12
setOptions(env0_16);
setRoutingKeyTags([]);
}
function value_8414() { // fn#8414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2055, offset: 0x00d404aa, size: 125 bytes, params: 1, frame: 16
var object;
const Storage = (StorageModule).Storage;
const value2 = Storage.get(env1_15);
if (value2 != null) {
object = {};
copyDataProperties(object, value2, copyDataProperties(object, env1_16, undefined));
}
if (Storage.get(env1_18) == null) {
}
}
function get_8415() { // fn#8415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2208, offset: 0x00d40527, size: 15 bytes, params: 1, frame: 1
return env1_17.trace;
}
function get_8416() { // fn#8416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2262, offset: 0x00d40536, size: 15 bytes, params: 1, frame: 1
return env1_17.canary;
}
function get_8417() { // fn#8417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2325, offset: 0x00d40545, size: 15 bytes, params: 1, frame: 1
return env1_17.logGatewayEvents;
}
function get_8418() { // fn#8418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2398, offset: 0x00d40554, size: 15 bytes, params: 1, frame: 1
return env1_17.logOverlayEvents;
}
function get_8419() { // fn#8419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2473, offset: 0x00d40563, size: 15 bytes, params: 1, frame: 1
return env1_17.logAnalyticsEvents;
}
function get_8420() { // fn#8420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2538, offset: 0x00d40572, size: 15 bytes, params: 1, frame: 1
return env1_17.axeEnabled;
}
function get_8421() { // fn#8421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2602, offset: 0x00d40581, size: 15 bytes, params: 1, frame: 1
return env1_17.cssDebuggingEnabled;
}
function get_8422() { // fn#8422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2678, offset: 0x00d40590, size: 15 bytes, params: 1, frame: 1
return env1_17.layoutDebuggingEnabled;
}
function get_8423() { // fn#8423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2752, offset: 0x00d4059f, size: 15 bytes, params: 1, frame: 1
return env1_17.sourceMapsEnabled;
}
function get_8424() { // fn#8424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2824, offset: 0x00d405ae, size: 15 bytes, params: 1, frame: 1
return env1_17.bugReporterEnabled;
}
function get_8425() { // fn#8425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2905, offset: 0x00d405bd, size: 15 bytes, params: 1, frame: 1
return env1_17.idleStatusIndicatorEnabled;
}
function get_8426() { // fn#8426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2995, offset: 0x00d405cc, size: 15 bytes, params: 1, frame: 1
return env1_17.onlyShowPreviewAppCollections;
}
function get_8427() { // fn#8427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3085, offset: 0x00d405db, size: 15 bytes, params: 1, frame: 1
return env1_17.disableAppCollectionsCache;
}
function get_8428() { // fn#8428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3172, offset: 0x00d405ea, size: 15 bytes, params: 1, frame: 1
return env1_17.isStreamInfoOverlayEnabled;
}
function get_8429() { // fn#8429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3251, offset: 0x00d405f9, size: 15 bytes, params: 1, frame: 1
return env1_17.preventPopoutClose;
}
function get_8430() { // fn#8430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3325, offset: 0x00d40608, size: 15 bytes, params: 1, frame: 1
return env1_17.logKeyboardMismatches;
}
function get_8431() { // fn#8431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3400, offset: 0x00d40617, size: 15 bytes, params: 1, frame: 1
return env1_17.alertStartupMetrics;
}
function get_8432() { // fn#8432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3474, offset: 0x00d40626, size: 15 bytes, params: 1, frame: 1
return env1_17.logQuestEvents;
}
function value_8433() { // fn#8433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3551, offset: 0x00d40635, size: 93 bytes, params: 1, frame: 14
var environment;
let Object = global.Object;
const keys = Object.keys;
let value = environment.__proto__;
Reflect.apply(keys, Object, [env1_17]).map(_fun8434);
Object = global.Object;
value = Object.keys(env1_17);
value = value.filter(_fun8435);
return value.join(',');
function _fun8434(a0) { // fn#8434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3609, offset: 0x00d40692, size: 16 bytes, params: 2, frame: 2
return env2_17[a0];
}
function _fun8435(a0) { // fn#8435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3649, offset: 0x00d40692, size: 16 bytes, params: 2, frame: 2
return env2_17[a0];
}
}
function get_8436() { // fn#8436, offset: 0x00d406a2, size: 9 bytes, params: 1, frame: 1
return env1_19;
}
function value_8437() { // fn#8437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3757, offset: 0x00d406ab, size: 40 bytes, params: 1, frame: 12
const value = environment.__proto__;
return env1_19.length === 0 ? null : env1_19.join(',');
}
function CONNECTION_OPEN(a0) { // fn#8439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3996, offset: 0x00d406f4, size: 153 bytes, params: 2, frame: 14
var binding;
const user = a0.user;
let r5 = user.flags ?? 0;
let STAFF = UserFlags.STAFF;
const value2 = r5 & STAFF;
STAFF = UserFlags.STAFF;
const value3 = value2 === STAFF;
r5 = value3 || a0.user.personal_connection_id != null;
if (value3) {
binding = env0_14;
binding.set(env0_17.sourceMapsEnabled);
}
value = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
const setTags = value.setTags;
const object2 = {};
object2.isStaff = r5.toString();
Reflect.apply(setTags, value, [object2]);
}
function _fun8409(a0) { // fn#8409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:637, offset: 0x00d40032, size: 253 bytes, params: 2, frame: 16
var value;
var setTimeout;
if (a0.status === 401) {
value = environment.__proto__;
value = require(693) /* metro dependency 693: DeveloperOptionsActionCreators */;
value.setDeveloperOptionSettings({sourceMapsEnabled: false});
} else if (a0.status === 403) {
value = environment.__proto__;
value = require(693) /* metro dependency 693: DeveloperOptionsActionCreators */;
value.setDeveloperOptionSettings({sourceMapsEnabled: false});
} else if (a0.status !== 200) {
setTimeout = global.setTimeout;
value = environment.__proto__;
env1_11 = setTimeout(y, env1_12.fail());
} else {
value = environment.__proto__;
env1_12.succeed();
env1_11 = global.setTimeout(y,
a0.body.sourceMapCookieTTLSeconds * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND * 0.75);
function LOGOUT(a0) { // fn#8438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3918, offset: 0x00d406d3, size: 33 bytes, params: 2, frame: 12
setOptions(env0_16);
setRoutingKeyTags([]);
}
}
function _fun8410() { // fn#8410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:873, offset: 0x00d4012f, size: 43 bytes, params: 1, frame: 14
env1_11 = global.setTimeout(y, env1_12.fail());
}
function value_8414() { // fn#8414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2055, offset: 0x00d404aa, size: 125 bytes, params: 1, frame: 16
var object2;
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
const value2 = Storage.get(env1_15);
if (value2 != null) {
object2 = {};
copyDataProperties(object2, value2, copyDataProperties(object2, env1_16, undefined));
}
if (Storage.get(env1_18) == null) {
function CONNECTION_OPEN(a0) { // fn#8439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3996, offset: 0x00d406f4, size: 153 bytes, params: 2, frame: 14
var binding;
const user = a0.user;
let r5 = user.flags ?? 0;
let STAFF = UserFlags.STAFF;
const value2 = r5 & STAFF;
STAFF = UserFlags.STAFF;
const value3 = value2 === STAFF;
r5 = value3 || a0.user.personal_connection_id != null;
if (value3) {
binding = env0_14;
binding.set(env0_17.sourceMapsEnabled);
}
value = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
const setTags = value.setTags;
const object = {};
object.isStaff = r5.toString();
Reflect.apply(setTags, value, [object]);
}
}
function get_8415() { // fn#8415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2208, offset: 0x00d40527, size: 15 bytes, params: 1, frame: 1
return env1_17.trace;
}
function get_8416() { // fn#8416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2262, offset: 0x00d40536, size: 15 bytes, params: 1, frame: 1
return env1_17.canary;
}
function get_8417() { // fn#8417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2325, offset: 0x00d40545, size: 15 bytes, params: 1, frame: 1
return env1_17.logGatewayEvents;
}
function get_8418() { // fn#8418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2398, offset: 0x00d40554, size: 15 bytes, params: 1, frame: 1
return env1_17.logOverlayEvents;
}
function get_8419() { // fn#8419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2473, offset: 0x00d40563, size: 15 bytes, params: 1, frame: 1
return env1_17.logAnalyticsEvents;
}
function get_8420() { // fn#8420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2538, offset: 0x00d40572, size: 15 bytes, params: 1, frame: 1
return env1_17.axeEnabled;
}
function get_8421() { // fn#8421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2602, offset: 0x00d40581, size: 15 bytes, params: 1, frame: 1
return env1_17.cssDebuggingEnabled;
}
function get_8422() { // fn#8422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2678, offset: 0x00d40590, size: 15 bytes, params: 1, frame: 1
return env1_17.layoutDebuggingEnabled;
}
function get_8423() { // fn#8423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2752, offset: 0x00d4059f, size: 15 bytes, params: 1, frame: 1
return env1_17.sourceMapsEnabled;
}
function get_8424() { // fn#8424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2824, offset: 0x00d405ae, size: 15 bytes, params: 1, frame: 1
return env1_17.bugReporterEnabled;
}
function get_8425() { // fn#8425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2905, offset: 0x00d405bd, size: 15 bytes, params: 1, frame: 1
return env1_17.idleStatusIndicatorEnabled;
}
function get_8426() { // fn#8426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:2995, offset: 0x00d405cc, size: 15 bytes, params: 1, frame: 1
return env1_17.onlyShowPreviewAppCollections;
}
function get_8427() { // fn#8427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3085, offset: 0x00d405db, size: 15 bytes, params: 1, frame: 1
return env1_17.disableAppCollectionsCache;
}
function get_8428() { // fn#8428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3172, offset: 0x00d405ea, size: 15 bytes, params: 1, frame: 1
return env1_17.isStreamInfoOverlayEnabled;
}
function get_8429() { // fn#8429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3251, offset: 0x00d405f9, size: 15 bytes, params: 1, frame: 1
return env1_17.preventPopoutClose;
}
function get_8430() { // fn#8430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3325, offset: 0x00d40608, size: 15 bytes, params: 1, frame: 1
return env1_17.logKeyboardMismatches;
}
function get_8431() { // fn#8431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3400, offset: 0x00d40617, size: 15 bytes, params: 1, frame: 1
return env1_17.alertStartupMetrics;
}
function get_8432() { // fn#8432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3474, offset: 0x00d40626, size: 15 bytes, params: 1, frame: 1
return env1_17.logQuestEvents;
}
function value_8433() { // fn#8433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3551, offset: 0x00d40635, size: 93 bytes, params: 1, frame: 14
var environment;
let Object = global.Object;
const keys = Object.keys;
let value = environment.__proto__;
Reflect.apply(keys, Object, [env1_17]).map(_fun8434);
Object = global.Object;
value = Object.keys(env1_17);
value = value.filter(_fun8435);
return value.join(',');
}
function value_8437() { // fn#8437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3757, offset: 0x00d406ab, size: 40 bytes, params: 1, frame: 12
const value = environment.__proto__;
return env1_19.length === 0 ? null : env1_19.join(',');
}
function _fun8434(a0) { // fn#8434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:818:3609, offset: 0x00d40692, size: 16 bytes, params: 2, frame: 2
return env2_17[a0];
}
global.__d(_fun8402, 691, [6, 7, 15, 17, 18, 661, 561, 672, 507, 692, 693, 587, 1216, 566, 694,
2]) /* metro module 691, dependencies: [6, 7, 15, 17, 18, 661, 561, 672, 507, 692, 693, 587, 1216, 566, 694, 2] */;
+145 -124
View File
@@ -1,154 +1,175 @@
/* Metro module 4794; source: stores/DimensionStore.tsx; dependencies: [6, 7, 15, 17, 18, 628, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun41498(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4972:6, offset: 0x0111fd47, size: 342 bytes, params: 8, frame: 18
const guildDimensionFactory = function(a0) {
return {'guildId': null, 'scrollTop': null, 'scrollTo': null, guildId: a0};
};
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 = {};
const env0_8 = {};
object = {scrollTop: 0};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun41504(Store);
value.displayName = 'DimensionStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{UPDATE_CHANNEL_DIMENSIONS: UPDATE_CHANNEL_DIMENSIONS_41511,
UPDATE_CHANNEL_LIST_DIMENSIONS: UPDATE_CHANNEL_LIST_DIMENSIONS,
UPDATE_GUILD_LIST_DIMENSIONS: UPDATE_GUILD_LIST_DIMENSIONS, CALL_CREATE: CALL_CREATE_41514});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/DimensionStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/DimensionStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_41499() { // fn#41499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4972:148, offset: 0x0111fe9d, 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_41499_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _isAtBottom(a0) { // fn#41503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4972:452, offset: 0x0111ff14, size: 60 bytes, params: 2, frame: 4
var property;
if (env0_7[a0] != null) {
property = env0_7[a0];
return property.scrollTop === property.scrollHeight - property.offsetHeight;
}
}
function _fun41504(a0) { // fn#41504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4972:560, offset: 0x0111ff50, size: 168 bytes, params: 2, frame: 16
const closure = DimensionStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'percentageScrolled', value: value_41506}, {key: 'getChannelDimensions',
value: value_41507}, {key: 'getGuildDimensions', value: value_41508}, {key: 'getGuildListDimensions',
value: value_41509}, {key: 'isAtBottom', value: function(a0) {
return _isAtBottom(a0);
}}]);
}
function UPDATE_CHANNEL_DIMENSIONS_41511({channelId, scrollTop, scrollHeight, offsetHeight}) { // fn#41511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4972:1326, offset: 0x0112005f, size: 141 bytes, params: 2, frame: 18
const property = env0_7[channelId];
if (scrollTop == null) {
if (property == null) {
return false;
function _isNativeReflectConstruct_41499() { // fn#41499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4972:148, offset: 0x0111fe9d, 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) {
}
delete env0_7[channelId];
} else {
if (scrollHeight == null) {
return (_isNativeReflectConstruct_41499_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _isAtBottom(a0) { // fn#41503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4972:452, offset: 0x0111ff14, size: 60 bytes, params: 2, frame: 4
var property;
if (env0_7[a0] != null) {
property = env0_7[a0];
return property.scrollTop === property.scrollHeight - property.offsetHeight;
}
}
function _fun41504(a0) { // fn#41504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4972:560, offset: 0x0111ff50, size: 168 bytes, params: 2, frame: 16
const DimensionStore2 = DimensionStore;
Inherits(DimensionStore2, a0);
return CreateClass(DimensionStore2, [{key: 'percentageScrolled', value: value_41506}, {key: 'getChannelDimensions',
value: value_41507}, {key: 'getGuildDimensions', value: value_41508}, {key: 'getGuildListDimensions',
value: value_41509}, {key: 'isAtBottom', value: function(a0) {
return _isAtBottom(a0);
}}]);
function DimensionStore() { // fn#41505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4972:572, offset: 0x00ec62ac, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, DimensionStore);
const value3 = env1_5(DimensionStore);
return env1_4(this, _isNativeReflectConstruct_41499() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_41506(a0) { // fn#41506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4972:868, offset: 0x0111fff8, size: 51 bytes, params: 2, frame: 4
var property;
if (env1_7[a0] != null) {
property = env1_7[a0];
return property.scrollTop / property.scrollHeight;
}
return 1;
}
function value_41507(a0) { // fn#41507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4972:985, offset: 0x0103ab8e, size: 16 bytes, params: 2, frame: 2
return env1_7[a0];
}
function value_41508(a0) { // fn#41508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4972:1043, offset: 0x0112002b, size: 33 bytes, params: 2, frame: 12
const value = environment.__proto__;
return env1_8[a0] ?? guildDimensionFactory(a0);
}
function value_41509() { // fn#41509, offset: 0x00e07a77, size: 9 bytes, params: 1, frame: 1
return env1_9;
}
}
function UPDATE_CHANNEL_DIMENSIONS_41511({channelId, scrollTop, scrollHeight, offsetHeight}) { // fn#41511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4972:1326, offset: 0x0112005f, size: 141 bytes, params: 2, frame: 18
const property = env0_7[channelId];
if (scrollTop == null) {
if (property == null) {
return false;
}
delete env0_7[channelId];
return undefined;
}
if (offsetHeight == null) {
} else {
if (scrollHeight == null) {
if (property == null) {
return false;
}
delete env0_7[channelId];
return undefined;
}
if (offsetHeight == null) {
if (property == null) {
return false;
}
delete env0_7[channelId];
return undefined;
}
var object = {channelId: channelId, scrollTop: scrollTop, scrollHeight: scrollHeight,
offsetHeight: offsetHeight};
if (property == null) {
env0_7[channelId] = object;
return undefined;
}
if ((importDefault(628) /* metro dependency 628: shallowEqual */)(property, object)) {
return false;
}
env0_7[channelId] = object;
}
}
function UPDATE_CHANNEL_LIST_DIMENSIONS({guildId, scrollTop, scrollTo}) { // fn#41512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4972:1626, offset: 0x011200ec, size: 122 bytes, params: 2, frame: 16
var r1;
var binding;
var value;
if (env0_8[guildId] == null) {
env0_8[guildId] = guildDimensionFactory(guildId);
}
if (scrollTop !== undefined) {
env0_8[guildId].scrollTop = scrollTop;
}
if (scrollTo === undefined) {
r1 = false;
} else {
binding = env0_8;
value = binding[guildId].scrollTo !== scrollTo;
binding[guildId].scrollTo = scrollTo;
r1 = value;
}
return scrollTo != null || r1;
}
function UPDATE_GUILD_LIST_DIMENSIONS({scrollTop}) { // fn#41513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4972:1871, offset: 0x01120166, size: 26 bytes, params: 2, frame: 2
env0_9.scrollTop = scrollTop;
}
function CALL_CREATE_41514({channelId}) { // fn#41514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4972:1944, offset: 0x01120180, size: 35 bytes, params: 2, frame: 12
if (_isAtBottom(channelId)) {
delete env0_7[channelId];
return undefined;
}
var object2 = {channelId: channelId, scrollTop: scrollTop, scrollHeight: scrollHeight,
offsetHeight: offsetHeight};
if (property == null) {
env0_7[channelId] = object2;
return undefined;
}
if ((importDefault(628) /* metro dependency 628: shallowEqual */)(property, object2)) {
return false;
}
env0_7[channelId] = object2;
}
}
function UPDATE_CHANNEL_LIST_DIMENSIONS({guildId, scrollTop, scrollTo}) { // fn#41512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4972:1626, offset: 0x011200ec, size: 122 bytes, params: 2, frame: 16
var r1;
var binding;
var value;
if (env0_8[guildId] == null) {
env0_8[guildId] = guildDimensionFactory(guildId);
}
if (scrollTop !== undefined) {
env0_8[guildId].scrollTop = scrollTop;
}
if (scrollTo === undefined) {
r1 = false;
} else {
binding = env0_8;
value = binding[guildId].scrollTo !== scrollTo;
binding[guildId].scrollTo = scrollTo;
r1 = value;
}
return scrollTo != null || r1;
}
function UPDATE_GUILD_LIST_DIMENSIONS({scrollTop}) { // fn#41513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4972:1871, offset: 0x01120166, size: 26 bytes, params: 2, frame: 2
env0_9.scrollTop = scrollTop;
}
function CALL_CREATE_41514({channelId}) { // fn#41514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4972:1944, offset: 0x01120180, size: 35 bytes, params: 2, frame: 12
if (_isAtBottom(channelId)) {
delete env0_7[channelId];
}
}
function value_41506(a0) { // fn#41506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4972:868, offset: 0x0111fff8, size: 51 bytes, params: 2, frame: 4
var property;
if (env1_7[a0] != null) {
property = env1_7[a0];
return property.scrollTop / property.scrollHeight;
}
return 1;
}
function value_41508(a0) { // fn#41508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4972:1043, offset: 0x0112002b, size: 33 bytes, params: 2, frame: 12
const value = environment.__proto__;
return env1_8[a0] ?? guildDimensionFactory(a0);
}
global.__d(_fun41498, 4794, [6, 7, 15, 17, 18, 628, 566, 694,
2]) /* metro module 4794, dependencies: [6, 7, 15, 17, 18, 628, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
+131 -112
View File
@@ -1,17 +1,23 @@
/* Metro module 7075; source: stores/EditMessageStore.tsx; dependencies: [6, 7, 15, 17, 18, 4814, 3829, 7076, 7079, 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 MessageStore from './MessageStore.tsx'; /* Metro dependency 4814 */
import MessageParser from '../modules/messages/MessageParser.tsx'; /* Metro dependency 7076 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UserSettingsModule from '../modules/user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as SlateUtilsModule from '../modules/channel_text_area/slate/SlateUtils.tsx'; /* Metro dependency 7079 */
function _fun56398(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:6, offset: 0x013c6bf0, size: 343 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
let env0_9 = {};
let env0_10 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun56402(Store);
value.displayName = 'EditMessageStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
@@ -20,122 +26,135 @@ function _fun56398(global, require, importDefault, importAll, module, exports, d
env0_9 = {};
env0_10 = {};
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/EditMessageStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/EditMessageStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_56399() { // fn#56399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:158, offset: 0x013c6d47, 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) {
function _isNativeReflectConstruct_56399() { // fn#56399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:158, offset: 0x013c6d47, 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_56399_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_56399_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun56402(a0) { // fn#56402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:371, offset: 0x013c6da5, size: 237 bytes, params: 2, frame: 16
const closure = EditMessageStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(MessageStore);
}}, {key: 'isEditing', value: value_56405}, {key: 'isEditingAny', value: value_56406}, {key: 'getEditingTextValue',
value: value_56407}, {key: 'getEditingRichValue', value: value_56408}, {key: 'getEditingMessageId',
value: value_56409}, {key: 'getEditingMessage', value: value_56410}, {key: 'getEditActionSource',
value: value_56411}]);
}
function _fun56402(a0) { // fn#56402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:371, offset: 0x013c6da5, size: 237 bytes, params: 2, frame: 16
const EditMessageStore2 = EditMessageStore;
Inherits(EditMessageStore2, a0);
return CreateClass(EditMessageStore2, [{key: 'initialize', value: function() {
this.waitFor(MessageStore);
}}, {key: 'isEditing', value: value_56405}, {key: 'isEditingAny', value: value_56406}, {key: 'getEditingTextValue',
value: value_56407}, {key: 'getEditingRichValue', value: value_56408}, {key: 'getEditingMessageId',
value: value_56409}, {key: 'getEditingMessage', value: value_56410}, {key: 'getEditActionSource',
value: value_56411}]);
function EditMessageStore() { // fn#56403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:383, offset: 0x0102b796, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, EditMessageStore);
const value3 = env1_6(EditMessageStore);
return env1_5(this, _isNativeReflectConstruct_56399() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function MESSAGE_START_EDIT({channelId, messageId, content, source}) { // fn#56412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:1415, offset: 0x013c6f6f, size: 159 bytes, params: 2, frame: 22
const UseLegacyChatInput = (require(3829) /* metro dependency 3829: UserSettings */).UseLegacyChatInput;
const setting = UseLegacyChatInput.getSetting();
const value3 = (importDefault(7076) /* metro dependency 7076: MessageParser */).unparse(content, channelId);
const binding = env0_9;
const object2 = {channelId: channelId, messageId: messageId, textValue: value3};
const slateUtilsModule = require(7079) /* metro dependency 7079: SlateUtils */;
object2.richValue = slateUtilsModule.toRichValue(setting ? value3 : content);
binding[channelId] = object2;
env0_10[channelId] = source;
}
function value_56405(a0, a1) { // fn#56405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:733, offset: 0x013c6e92, size: 39 bytes, params: 3, frame: 3
const value = environment.__proto__;
return env1_9[a0]?.messageId === a1;
}
function value_56406(a0) { // fn#56406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:827, offset: 0x013c6eb9, size: 22 bytes, params: 2, frame: 2
return env1_9[a0] != null;
}
function value_56407(a0) { // fn#56407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:892, offset: 0x013c6ecf, size: 33 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_9[a0]?.textValue;
}
function value_56408(a0) { // fn#56408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:986, offset: 0x013c6ef0, size: 33 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_9[a0]?.richValue;
}
function value_56409(a0) { // fn#56409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:1080, offset: 0x013c6f11, size: 32 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_9[a0]?.messageId;
}
function value_56410(a0) { // fn#56410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:1172, offset: 0x013c6f31, size: 62 bytes, params: 2, frame: 15
const value = environment.__proto__;
const property = env1_9[a0];
const value2 = null;
return value2 != property && value2 != property.messageId ? MessageStore.getMessage(a0, property.messageId) : value2;
}
function value_56411(a0) { // fn#56411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:1297, offset: 0x010353e1, size: 16 bytes, params: 2, frame: 2
return env1_10[a0];
}
function MESSAGE_UPDATE_EDIT({channelId, textValue, richValue}) { // fn#56413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:1670, offset: 0x013c700e, size: 83 bytes, params: 2, frame: 15
const property = env0_9[channelId];
if (property == null) {
return false;
}
const binding = env0_9;
const object2 = {};
copyDataProperties(object2, property, textValue);
object2['textValue'] = textValue;
object2['richValue'] = richValue;
binding[channelId] = object2;
}
function MESSAGE_END_EDIT({channelId}) { // fn#56414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:1827, offset: 0x013c7061, size: 53 bytes, params: 2, frame: 4
if (channelId == null) {
return false;
function MESSAGE_START_EDIT({channelId, messageId, content, source}) { // fn#56412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:1415, offset: 0x013c6f6f, size: 159 bytes, params: 2, frame: 22
const UseLegacyChatInput = (UserSettingsModule).UseLegacyChatInput;
const setting = UseLegacyChatInput.getSetting();
const value3 = (MessageParser).unparse(content, channelId);
const binding = env0_9;
const object = {channelId: channelId, messageId: messageId, textValue: value3};
object.richValue = SlateUtilsModule.toRichValue(setting ? value3 : content);
binding[channelId] = object;
env0_10[channelId] = source;
}
if (env0_9[channelId] == null) {
return false;
}
delete env0_9[channelId];
delete env0_10[channelId];
}
function MESSAGE_DELETE_56415({channelId, id}) { // fn#56415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:1944, offset: 0x013c7096, size: 64 bytes, params: 2, frame: 7
if (env0_9[channelId]?.messageId === id) {
function MESSAGE_UPDATE_EDIT({channelId, textValue, richValue}) { // fn#56413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:1670, offset: 0x013c700e, size: 83 bytes, params: 2, frame: 15
const property = env0_9[channelId];
if (property == null) {
return false;
}
const binding = env0_9;
const object = {};
copyDataProperties(object, property, textValue);
object['textValue'] = textValue;
object['richValue'] = richValue;
binding[channelId] = object;
}
function MESSAGE_END_EDIT({channelId}) { // fn#56414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:1827, offset: 0x013c7061, size: 53 bytes, params: 2, frame: 4
if (channelId == null) {
return false;
}
if (env0_9[channelId] == null) {
return false;
}
delete env0_9[channelId];
delete env0_10[channelId];
}
function MESSAGE_DELETE_56415({channelId, id}) { // fn#56415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:1944, offset: 0x013c7096, size: 64 bytes, params: 2, frame: 7
if (env0_9[channelId]?.messageId === id) {
delete env0_9[channelId];
delete env0_10[channelId];
}
}
}
function value_56405(a0, a1) { // fn#56405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:733, offset: 0x013c6e92, size: 39 bytes, params: 3, frame: 3
const value = environment.__proto__;
return env1_9[a0]?.messageId === a1;
}
function value_56406(a0) { // fn#56406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:827, offset: 0x013c6eb9, size: 22 bytes, params: 2, frame: 2
return env1_9[a0] != null;
}
function value_56407(a0) { // fn#56407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:892, offset: 0x013c6ecf, size: 33 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_9[a0]?.textValue;
}
function value_56408(a0) { // fn#56408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:986, offset: 0x013c6ef0, size: 33 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_9[a0]?.richValue;
}
function value_56409(a0) { // fn#56409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:1080, offset: 0x013c6f11, size: 32 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_9[a0]?.messageId;
}
function value_56410(a0) { // fn#56410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7253:1172, offset: 0x013c6f31, size: 62 bytes, params: 2, frame: 15
const value = environment.__proto__;
const property = env1_9[a0];
const value2 = null;
return value2 != property && value2 != property.messageId ? MessageStore.getMessage(a0, property.messageId) : value2;
}
global.__d(_fun56398, 7075, [6, 7, 15, 17, 18, 4814, 3829, 7076, 7079, 566, 694,
2]) /* metro module 7075, dependencies: [6, 7, 15, 17, 18, 4814, 3829, 7076, 7079, 566, 694, 2] */;
+217 -186
View File
@@ -1,4 +1,13 @@
/* Metro module 4897; source: stores/ExpandedGuildFolderStore.tsx; dependencies: [6, 7, 15, 17, 18, 1348, 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 UserSettingsProtoStore from '../modules/user_settings/UserSettingsProtoStore.tsx'; /* Metro dependency 1348 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun43140(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:6, offset: 0x0114b643, size: 359 bytes, params: 8, frame: 19
const _arrayLikeToArray_43146 = function(a0, a1) {
var r0;
@@ -45,220 +54,242 @@ function _fun43140(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
const Set = global.Set;
let set = new Set();
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
set = _fun43147(PersistedStore);
set.displayName = 'ExpandedGuildFolderStore';
set.persistKey = 'ExpandedGuildFolderStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */,
{TOGGLE_GUILD_FOLDER_EXPAND: TOGGLE_GUILD_FOLDER_EXPAND, SET_GUILD_FOLDER_EXPANDED: SET_GUILD_FOLDER_EXPANDED,
USER_SETTINGS_PROTO_UPDATE: USER_SETTINGS_PROTO_UPDATE_43155, GUILD_FOLDER_COLLAPSE: GUILD_FOLDER_COLLAPSE});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/ExpandedGuildFolderStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/ExpandedGuildFolderStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_43141() { // fn#43141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:160, offset: 0x0114b7aa, 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_43141_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_43144(a0, a1) { // fn#43144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:353, offset: 0x0114b808, 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) {
function _isNativeReflectConstruct_43141() { // fn#43141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:160, offset: 0x0114b7aa, 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 _fun43145;
return (_isNativeReflectConstruct_43141_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_43146(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') {
function _createForOfIteratorHelperLoose_43144(a0, a1) { // fn#43144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:353, offset: 0x0114b808, 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 _fun43145;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_43146(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_43146(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_43146(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun43145;
}
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 _fun43147(a0) { // fn#43147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:1283, offset: 0x0114b97a, size: 139 bytes, params: 2, frame: 16
const closure = ExpandedGuildFolderStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: value_43149}, {key: 'getState', value: value_43150},
{key: 'getExpandedFolders', value: value_43151}, {key: 'isFolderExpanded', value: value_43152}]);
}
function TOGGLE_GUILD_FOLDER_EXPAND({folderId}) { // fn#43153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:2102, offset: 0x0114ba72, size: 91 bytes, params: 2, frame: 13
const Set = global.Set;
let binding = env0_6;
const set = new Set(binding);
env0_6 = set;
const value4 = set.has(folderId);
binding = env0_6;
if (value4) {
binding.delete(folderId);
} else {
binding.add(folderId);
}
}
function SET_GUILD_FOLDER_EXPANDED({folderId, expanded}) { // fn#43154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:2214, offset: 0x0114bacd, size: 104 bytes, params: 2, frame: 14
const Set = global.Set;
const set = new Set(env0_6);
if (expanded) {
set.add(folderId);
} else if (set.has(folderId)) {
set.delete(folderId);
}
}
function USER_SETTINGS_PROTO_UPDATE_43155() { // fn#43155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:2340, offset: 0x0114bb35, size: 102 bytes, params: 1, frame: 15
var r2;
var value4;
var value5;
if (UserSettingsProtoStore.getGuildFolders() == null) {
return false;
}
const env0_1 = false;
const closure = USER_SETTINGS_PROTO_UPDATE_43155_loop;
const value = _createForOfIteratorHelperLoose_43144(env0_6);
const value3 = value();
let done = value3.done;
if (!done) {
r2 = value3;
reducibleLoop2: while (true) {
value4 = r2.value;
closure(value4);
value5 = value();
done = value5.done;
if (done) {
break reducibleLoop2;
if (r5) {
}
r2 = value5;
continue reducibleLoop2;
return _fun43145;
}
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 _fun43145() { // fn#43145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:924, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return CreateClass >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof CreateClass === 'bigint' ? CreateClass : +CreateClass]};
}
}
function _fun43147(a0) { // fn#43147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:1283, offset: 0x0114b97a, size: 139 bytes, params: 2, frame: 16
const ExpandedGuildFolderStore2 = ExpandedGuildFolderStore;
Inherits(ExpandedGuildFolderStore2, a0);
return CreateClass(ExpandedGuildFolderStore2, [{key: 'initialize', value: value_43149}, {key: 'getState',
value: value_43150}, {key: 'getExpandedFolders', value: value_43151}, {key: 'isFolderExpanded',
value: value_43152}]);
function ExpandedGuildFolderStore() { // fn#43148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:1295, offset: 0x00e3db8d, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, ExpandedGuildFolderStore);
const value3 = env1_3(ExpandedGuildFolderStore);
return env1_2(this, _isNativeReflectConstruct_43141() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_43149(a0) { // fn#43149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:1633, offset: 0x0114ba05, size: 75 bytes, params: 2, frame: 12
var Set;
var expandedFolders;
var set;
var value2;
if (a0 != null) {
Set = global.Set;
expandedFolders = a0.expandedFolders;
set = new Set();
value2 = environment.__proto__;
}
const waitFor = this.waitFor;
const value = environment.__proto__;
Reflect.apply(waitFor, this, [UserSettingsProtoStore]);
}
function value_43150() { // fn#43150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:1736, offset: 0x0114ba50, size: 34 bytes, params: 1, frame: 12
const object = {};
const Array = global.Array;
object.expandedFolders = Array.from(env1_6);
return object;
}
function value_43151() { // fn#43151, offset: 0x00c82288, size: 9 bytes, params: 1, frame: 1
return env1_6;
}
function value_43152(a0) { // fn#43152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:1899, offset: 0x010e8020, size: 22 bytes, params: 2, frame: 11
return env1_6.has(a0);
}
}
function TOGGLE_GUILD_FOLDER_EXPAND({folderId}) { // fn#43153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:2102, offset: 0x0114ba72, size: 91 bytes, params: 2, frame: 13
const Set = global.Set;
let binding = set2;
const set = new Set(binding);
set2 = set;
const value4 = set.has(folderId);
binding = set2;
if (value4) {
binding.delete(folderId);
} else {
binding.add(folderId);
}
}
return env0_1;
}
function GUILD_FOLDER_COLLAPSE() { // fn#43158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:2613, offset: 0x0114bbf9, size: 58 bytes, params: 1, frame: 10
if (env0_6.size === 0) {
return false;
function SET_GUILD_FOLDER_EXPANDED({folderId, expanded}) { // fn#43154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:2214, offset: 0x0114bacd, size: 104 bytes, params: 2, frame: 14
const Set = global.Set;
const set = new Set(env0_6);
if (expanded) {
set.add(folderId);
} else if (set.has(folderId)) {
set.delete(folderId);
}
}
const Set = global.Set;
const set = new Set();
}
function value_43149(a0) { // fn#43149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:1633, offset: 0x0114ba05, size: 75 bytes, params: 2, frame: 12
var Set;
var expandedFolders;
var set;
var value2;
if (a0 != null) {
Set = global.Set;
expandedFolders = a0.expandedFolders;
set = new Set();
value2 = environment.__proto__;
function USER_SETTINGS_PROTO_UPDATE_43155() { // fn#43155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:2340, offset: 0x0114bb35, size: 102 bytes, params: 1, frame: 15
var r2;
var value4;
var value5;
if (UserSettingsProtoStore.getGuildFolders() == null) {
return false;
}
const env0_1 = false;
const USER_SETTINGS_PROTO_UPDATE_43155_loop2 = USER_SETTINGS_PROTO_UPDATE_43155_loop;
const value = _createForOfIteratorHelperLoose_43144(env0_6);
const value3 = value();
let done = value3.done;
if (!done) {
r2 = value3;
reducibleLoop2: while (true) {
value4 = r2.value;
USER_SETTINGS_PROTO_UPDATE_43155_loop2(value4);
value5 = value();
done = value5.done;
if (done) {
break reducibleLoop2;
}
r2 = value5;
continue reducibleLoop2;
}
}
return env0_1;
function USER_SETTINGS_PROTO_UPDATE_43155_loop(a0) { // fn#43156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:2439, owner: USER_SETTINGS_PROTO_UPDATE_43155._loop, offset: 0x0114bb9b, size: 94 bytes, params: 2, frame: 14
var environment;
var Set;
var value2;
var value3;
var set;
let binding = a0;
if (!binding.some(_fun43157)) {
Set = global.Set;
value2 = environment.__proto__;
binding = env1_6;
value3 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set(binding);
(set instanceof Object ? set : value3).delete(a0);
}
function _fun43157({folderId}) { // fn#43157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:2459, offset: 0x0114b597, size: 22 bytes, params: 2, frame: 2
return folderId === ClassCallCheck;
}
}
}
const waitFor = this.waitFor;
const value = environment.__proto__;
Reflect.apply(waitFor, this, [UserSettingsProtoStore]);
}
function value_43150() { // fn#43150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:1736, offset: 0x0114ba50, size: 34 bytes, params: 1, frame: 12
const object2 = {};
const Array = global.Array;
object2.expandedFolders = Array.from(env1_6);
return object2;
}
function USER_SETTINGS_PROTO_UPDATE_43155_loop(a0) { // fn#43156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:2439, owner: USER_SETTINGS_PROTO_UPDATE_43155._loop, offset: 0x0114bb9b, size: 94 bytes, params: 2, frame: 14
var environment;
var Set;
var value2;
var value3;
var set;
let binding = a0;
if (!binding.some(_fun43157)) {
Set = global.Set;
value2 = environment.__proto__;
binding = env1_6;
value3 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set(binding);
(set instanceof Object ? set : value3).delete(a0);
function GUILD_FOLDER_COLLAPSE() { // fn#43158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5075:2613, offset: 0x0114bbf9, size: 58 bytes, params: 1, frame: 10
if (env0_6.size === 0) {
return false;
}
const Set = global.Set;
const set = new Set();
}
}
global.__d(_fun43140, 4897, [6, 7, 15, 17, 18, 1348, 566, 694,
2]) /* metro module 4897, dependencies: [6, 7, 15, 17, 18, 1348, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
+229 -203
View File
@@ -1,21 +1,25 @@
/* Metro module 6586; source: stores/FrecencyStore.tsx; dependencies: [6, 7, 15, 17, 18, 1348, 1379, 1867, 1934, 3969, 661, 670, 4393, 22, 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 UserSettingsProtoStore from '../modules/user_settings/UserSettingsProtoStore.tsx'; /* Metro dependency 1348 */
import ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from './GuildStore.tsx'; /* Metro dependency 1867 */
import SelectedChannelStore from './SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import SelectedGuildStore from './SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import Frecency from '../lib/Frecency.tsx'; /* Metro dependency 4393 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as UserSettingsConstantsModule from '../modules/user_settings/UserSettingsConstants.tsx'; /* Metro dependency 670 */
function _fun51828(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:6, offset: 0x012e5944, size: 546 bytes, params: 8, frame: 22
const closure = CHANNEL_SELECT_51832;
const CHANNEL_SELECT_518322 = CHANNEL_SELECT_51832;
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 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const env0_12 = (require(661) /* metro dependency 661: Constants */).ID_REGEX;
const env0_13 = (require(670) /* metro dependency 670: UserSettingsConstants */).UserSettingsTypes;
let value = importDefault(4393) /* metro dependency 4393: Frecency */;
let value = Frecency;
value = new value({computeBonus: function() {
return 100;
}, computeWeight: function(a0) {
@@ -23,218 +27,240 @@ function _fun51828(global, require, importDefault, importAll, module, exports, d
}, lookupKey: lookupKey_51838, afterCompute: function() {
}, numFrequentlyItems: 100, maxSamples: 10});
object = {pendingUsages: []};
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
value = _fun51840(PersistedStore);
value.displayName = 'FrecencyStore';
value.persistKey = 'FrecencyStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CHANNEL_SELECT: closure,
VOICE_CHANNEL_SELECT: closure, USER_SETTINGS_PROTO_UPDATE: USER_SETTINGS_PROTO_UPDATE_51853});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/FrecencyStore.tsx');
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CHANNEL_SELECT: CHANNEL_SELECT_518322,
VOICE_CHANNEL_SELECT: CHANNEL_SELECT_518322, USER_SETTINGS_PROTO_UPDATE: USER_SETTINGS_PROTO_UPDATE_51853});
(FileImportTrackerModule).fileFinishedImporting('stores/FrecencyStore.tsx');
exports.default = value;
exports.MAX_NUM_SELECTED_ITEMS = 100;
}
function _isNativeReflectConstruct_51829() { // fn#51829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:247, offset: 0x012e5b66, 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) {
function _isNativeReflectConstruct_51829() { // fn#51829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:247, offset: 0x012e5b66, 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_51829_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_51829_isNativeReflectConstruct = function() {
return !!result;
})();
}
function CHANNEL_SELECT_51832({guildId, channelId}) { // fn#51832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:780, offset: 0x012e5bc4, size: 259 bytes, params: 2, frame: 17
var r4;
var r0;
var r1;
var value3;
var pendingUsages;
var push;
var object2;
var value7;
if (channelId === env0_15) {
r1 = false;
} else {
value3 = null;
r4 = value3 != channelId ? channelId : value3;
if (value3 != channelId && ID_REGEX.test(channelId)) {
env0_14.track(channelId);
pendingUsages = env0_17.pendingUsages;
push = pendingUsages.push;
object2 = {key: channelId};
object2.timestamp = global.Date.now();
Reflect.apply(push, pendingUsages, [object2]);
r0 = true;
function CHANNEL_SELECT_51832({guildId, channelId}) { // fn#51832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:780, offset: 0x012e5bc4, size: 259 bytes, params: 2, frame: 17
var r4;
var r0;
var r1;
var value3;
var pendingUsages;
var push;
var object;
var value7;
if (channelId === env0_15) {
r1 = false;
} else {
r0 = false;
value3 = null;
r4 = value3 != channelId ? channelId : value3;
if (value3 != channelId && ID_REGEX.test(channelId)) {
env0_14.track(channelId);
pendingUsages = env0_17.pendingUsages;
push = pendingUsages.push;
object = {key: channelId};
object.timestamp = global.Date.now();
Reflect.apply(push, pendingUsages, [object]);
r0 = true;
} else {
r0 = false;
}
r1 = r0;
}
r1 = r0;
}
if (guildId === env0_16) {
r0 = r1;
} else {
value7 = null;
r4 = value7 != guildId ? guildId : value7;
if (value7 != guildId && ID_REGEX.test(guildId)) {
env0_14.track(guildId);
pendingUsages = env0_17.pendingUsages;
push = pendingUsages.push;
object2 = {key: guildId};
object2.timestamp = global.Date.now();
Reflect.apply(push, pendingUsages, [object2]);
r1 = true;
if (guildId === env0_16) {
r0 = r1;
} else {
value7 = null;
r4 = value7 != guildId ? guildId : value7;
if (value7 != guildId && ID_REGEX.test(guildId)) {
env0_14.track(guildId);
pendingUsages = env0_17.pendingUsages;
push = pendingUsages.push;
object = {key: guildId};
object.timestamp = global.Date.now();
Reflect.apply(push, pendingUsages, [object]);
r1 = true;
}
r0 = r1;
}
r0 = r1;
return r0;
}
return r0;
}
function initFrecency() { // fn#51833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:1082, offset: 0x012e5cc7, size: 113 bytes, params: 1, frame: 17
const guildAndChannelFrecency = UserSettingsProtoStore.frecencyWithoutFetchingLatest.guildAndChannelFrecency;
const value2 = undefined;
const guildAndChannels = guildAndChannelFrecency == null ? value2 : guildAndChannelFrecency.guildAndChannels;
if (guildAndChannels == null) {
return false;
}
const binding = env0_14;
binding.overwriteHistory((importDefault(22) /* metro dependency 22 */).mapValues(guildAndChannels, function(a0) {
var r3;
var object = {};
copyDataProperties(object, a0, r3);
var value = a0.recentUses.map(global.Number);
value = value.filter(_fun51835);
object['recentUses'] = value;
return object;
}), env0_17.pendingUsages);
return value2;
}
function lookupKey_51838(a0) { // fn#51838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:598, offset: 0x012e5dd5, size: 72 bytes, params: 2, frame: 14
let r0 = GuildStore.getGuild(a0) ?? ChannelStore.getChannel(a0);
r0 = r0 ?? ChannelStore.getChannel(ChannelStore.getDMFromUserId(a0));
return r0;
}
function _fun51840(a0) { // fn#51840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:1378, offset: 0x012e5e1d, size: 281 bytes, params: 2, frame: 16
const closure = FrecencyStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function(a0) {
this.waitFor(ChannelStore, GuildStore, SelectedChannelStore, SelectedGuildStore, UserSettingsProtoStore);
if (a0 != null) {
a0.pendingUsages = a0.pendingUsages.filter(_fun51843);
env1_17 = a0;
function initFrecency() { // fn#51833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:1082, offset: 0x012e5cc7, size: 113 bytes, params: 1, frame: 17
const guildAndChannelFrecency = UserSettingsProtoStore.frecencyWithoutFetchingLatest.guildAndChannelFrecency;
const value2 = undefined;
const guildAndChannels = guildAndChannelFrecency == null ? value2 : guildAndChannelFrecency.guildAndChannels;
if (guildAndChannels == null) {
return false;
}
const binding = env0_14;
binding.overwriteHistory((importDefault(22) /* metro dependency 22 */).mapValues(guildAndChannels, function(a0) {
var r3;
var object = {};
copyDataProperties(object, a0, r3);
var value = a0.recentUses.map(global.Number);
value = value.filter(_fun51835);
object['recentUses'] = value;
return object;
}), env0_17.pendingUsages);
return value2;
function _fun51834(a0) { // fn#51834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:1267, offset: 0x012e5d38, size: 67 bytes, params: 2, frame: 13
const object = {};
copyDataProperties(object, 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;
});
object['recentUses'] = value;
return object;
}
this.syncWith([UserSettingsProtoStore], initFrecency);
}}, {key: 'getState', value: value_51844}, {key: 'hasPendingUsage', value: value_51845},
{key: 'frecencyWithoutFetchingLatest', get: get_51846}, {key: 'getFrequentlyWithoutFetchingLatest',
value: value_51847}, {key: 'getScoreWithoutFetchingLatest', value: value_51848},
{key: 'getScoreForDMWithoutFetchingLatest', value: value_51849}, {key: 'getMaxScore', value: function() {
return 1000;
}}, {key: 'getBonusScore', value: function() {
return 100;
}}, {key: 'getVersion', value: value_51852}]);
}
function USER_SETTINGS_PROTO_UPDATE_51853({settings, wasSaved}) { // fn#51853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:2699, offset: 0x012e6062, size: 67 bytes, params: 2, frame: 4
var r0;
const type = settings.type;
const FRECENCY_AND_FAVORITES_SETTINGS = UserSettingsTypes.FRECENCY_AND_FAVORITES_SETTINGS;
const r2 = type !== FRECENCY_AND_FAVORITES_SETTINGS || !wasSaved;
if (r2) {
r0 = !r2;
} else {
env0_17.pendingUsages = [];
r0 = true;
}
return r0;
}
function _fun51834(a0) { // fn#51834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:1267, offset: 0x012e5d38, 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_51842(a0) { // fn#51842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:1673, offset: 0x012e5f36, size: 113 bytes, params: 2, frame: 21
var pendingUsages;
this.waitFor(ChannelStore, GuildStore, SelectedChannelStore, SelectedGuildStore, UserSettingsProtoStore);
if (a0 != null) {
pendingUsages = a0.pendingUsages;
a0.pendingUsages = pendingUsages.filter(_fun51843);
env1_17 = a0;
function lookupKey_51838(a0) { // fn#51838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:598, offset: 0x012e5dd5, size: 72 bytes, params: 2, frame: 14
let r0 = GuildStore.getGuild(a0) ?? ChannelStore.getChannel(a0);
r0 = r0 ?? ChannelStore.getChannel(ChannelStore.getDMFromUserId(a0));
return r0;
}
this.syncWith([UserSettingsProtoStore], initFrecency);
}
function value_51845() { // fn#51845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:1899, offset: 0x012e5fcb, size: 26 bytes, params: 1, frame: 2
return env1_17.pendingUsages.length > 0;
}
function _fun51840(a0) { // fn#51840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:1378, offset: 0x012e5e1d, size: 281 bytes, params: 2, frame: 16
const FrecencyStore2 = FrecencyStore;
Inherits(FrecencyStore2, a0);
return CreateClass(FrecencyStore2, [{key: 'initialize', value: function(a0) {
this.waitFor(ChannelStore, GuildStore, SelectedChannelStore, SelectedGuildStore, UserSettingsProtoStore);
if (a0 != null) {
a0.pendingUsages = a0.pendingUsages.filter(_fun51843);
env1_17 = a0;
}
this.syncWith([UserSettingsProtoStore], initFrecency);
}}, {key: 'getState', value: value_51844}, {key: 'hasPendingUsage', value: value_51845},
{key: 'frecencyWithoutFetchingLatest', get: get_51846}, {key: 'getFrequentlyWithoutFetchingLatest',
value: value_51847}, {key: 'getScoreWithoutFetchingLatest', value: value_51848},
{key: 'getScoreForDMWithoutFetchingLatest', value: value_51849}, {key: 'getMaxScore', value: function() {
return 1000;
}}, {key: 'getBonusScore', value: function() {
return 100;
}}, {key: 'getVersion', value: value_51852}]);
function FrecencyStore() { // fn#51841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:1390, offset: 0x01176269, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, FrecencyStore);
const value3 = env1_5(FrecencyStore);
return env1_4(this, _isNativeReflectConstruct_51829() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_51847() { // fn#51847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:2055, offset: 0x012e5fe5, size: 15 bytes, params: 1, frame: 1
return env1_14.frequently;
}
function value_51842(a0) { // fn#51842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:1673, offset: 0x012e5f36, size: 113 bytes, params: 2, frame: 21
var pendingUsages;
this.waitFor(ChannelStore, GuildStore, SelectedChannelStore, SelectedGuildStore, UserSettingsProtoStore);
if (a0 != null) {
pendingUsages = a0.pendingUsages;
a0.pendingUsages = pendingUsages.filter(_fun51843);
env1_17 = a0;
}
this.syncWith([UserSettingsProtoStore], initFrecency);
function _fun51843(a0) { // fn#51843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:1759, offset: 0x012e5fa7, size: 36 bytes, params: 2, frame: 12
var r0;
let value = a0 != null;
if (value) {
value = environment.__proto__.__proto__;
value = ID_REGEX.test(a0.key);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function value_51848(a0) { // fn#51848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:2131, offset: 0x012e5ff4, size: 39 bytes, params: 2, frame: 11
const value = environment.__proto__;
return env1_14.getFrecency(a0) ?? 0;
}
}
function value_51844() { // fn#51844, offset: 0x00e07553, size: 9 bytes, params: 1, frame: 1
return env1_17;
}
function value_51845() { // fn#51845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:1899, offset: 0x012e5fcb, size: 26 bytes, params: 1, frame: 2
return env1_17.pendingUsages.length > 0;
}
function get_51846() { // fn#51846, offset: 0x00df0f5a, size: 9 bytes, params: 1, frame: 1
return env1_14;
}
function value_51847() { // fn#51847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:2055, offset: 0x012e5fe5, size: 15 bytes, params: 1, frame: 1
return env1_14.frequently;
}
function value_51848(a0) { // fn#51848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:2131, offset: 0x012e5ff4, size: 39 bytes, params: 2, frame: 11
const value = environment.__proto__;
return env1_14.getFrecency(a0) ?? 0;
}
function value_51849(a0) { // fn#51849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:2237, offset: 0x012e601b, size: 48 bytes, params: 2, frame: 12
var r0;
let value = environment.__proto__;
value = ChannelStore.getDMFromUserId(a0);
if (value != null) {
value = this.getScoreWithoutFetchingLatest(value);
r0 = value;
} else {
r0 = 0;
}
return r0;
}
function value_51852() { // fn#51852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:2457, offset: 0x012e6053, size: 15 bytes, params: 1, frame: 1
return env1_14.version;
}
function value_51849(a0) { // fn#51849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:2237, offset: 0x012e601b, size: 48 bytes, params: 2, frame: 12
var r0;
let value = environment.__proto__;
value = ChannelStore.getDMFromUserId(a0);
if (value != null) {
value = this.getScoreWithoutFetchingLatest(value);
r0 = value;
} else {
r0 = 0;
}
return r0;
}
function value_51852() { // fn#51852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:2457, offset: 0x012e6053, size: 15 bytes, params: 1, frame: 1
return env1_14.version;
}
function _fun51843(a0) { // fn#51843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:1759, offset: 0x012e5fa7, size: 36 bytes, params: 2, frame: 12
var r0;
let value = a0 != null;
if (value) {
value = environment.__proto__.__proto__;
value = ID_REGEX.test(a0.key);
r0 = value;
} else {
r0 = value;
function USER_SETTINGS_PROTO_UPDATE_51853({settings, wasSaved}) { // fn#51853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:2699, offset: 0x012e6062, size: 67 bytes, params: 2, frame: 4
var r0;
const type = settings.type;
const FRECENCY_AND_FAVORITES_SETTINGS = UserSettingsTypes.FRECENCY_AND_FAVORITES_SETTINGS;
const r2 = type !== FRECENCY_AND_FAVORITES_SETTINGS || !wasSaved;
if (r2) {
r0 = !r2;
} else {
env0_17.pendingUsages = [];
r0 = true;
}
return r0;
}
return r0;
}
function _fun51835(a0) { // fn#51835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6764:1321, offset: 0x011bbce4, size: 11 bytes, params: 2, frame: 2
return a0 > 0;
}
global.__d(_fun51828, 6586, [6, 7, 15, 17, 18, 1348, 1379, 1867, 1934, 3969, 661, 670, 4393, 22, 566, 694,
2]) /* metro module 6586, dependencies: [6, 7, 15, 17, 18, 1348, 1379, 1867, 1934, 3969, 661, 670, 4393, 22, 566, 694, 2] */;
+472 -434
View File
@@ -1,4 +1,17 @@
/* Metro module 10580; source: stores/GamePartyStore.tsx; dependencies: [6, 7, 15, 17, 18, 1226, 3793, 6876, 661, 22, 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 Module00022 from '../by-id/module-00022.js'; /* Metro dependency 22 */
import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import AuthenticationStore from './AuthenticationStore.tsx'; /* Metro dependency 1226 */
import RelationshipStore from './RelationshipStore.tsx'; /* Metro dependency 3793 */
import SelfPresenceStore from './SelfPresenceStore.tsx'; /* Metro dependency 6876 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun81607(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:6, offset: 0x01ed7b3f, size: 571 bytes, params: 8, frame: 22
const _arrayLikeToArray_81613 = function(a0, a1) {
var r0;
@@ -88,24 +101,13 @@ function _fun81607(global, require, importDefault, importAll, module, exports, d
const handleLocalPresenceUpdate_81621 = function() {
return updateParty(ME, AuthenticationStore.getId(), SelfPresenceStore.getActivities());
};
const closure2 = RELATIONSHIP_ADD_81622;
const RELATIONSHIP_ADD_816222 = RELATIONSHIP_ADD_81622;
let 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 authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const selfPresenceStore = importDefault(6876) /* metro dependency 6876: SelfPresenceStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_10 = constantsModule.StatusTypes;
const env0_11 = constantsModule.ME;
let env0_12 = {};
let Map = global.Map;
let map = new Map();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun81623(Store).displayName = 'GamePartyStore';
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */,
{CONNECTION_OPEN_SUPPLEMENTAL: CONNECTION_OPEN_SUPPLEMENTAL_81629, OVERLAY_INITIALIZE: function(a0) {
@@ -167,477 +169,513 @@ function _fun81607(global, require, importDefault, importAll, module, exports, d
}, PRESENCE_UPDATES: function({updates}) {
return updates.map(_fun81634).some(_fun81635);
}, THREAD_MEMBER_LIST_UPDATE: THREAD_MEMBER_LIST_UPDATE_81636, THREAD_MEMBERS_UPDATE: THREAD_MEMBERS_UPDATE_81638,
RELATIONSHIP_ADD: closure2, RELATIONSHIP_UPDATE: closure2, RELATIONSHIP_REMOVE: RELATIONSHIP_REMOVE_81640});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/GamePartyStore.tsx');
RELATIONSHIP_ADD: RELATIONSHIP_ADD_816222, RELATIONSHIP_UPDATE: RELATIONSHIP_ADD_816222,
RELATIONSHIP_REMOVE: RELATIONSHIP_REMOVE_81640});
(FileImportTrackerModule).fileFinishedImporting('stores/GamePartyStore.tsx');
exports.default = map;
}
function _isNativeReflectConstruct_81608() { // fn#81608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:214, offset: 0x01ed7d7a, 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_81608_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_81611(a0, a1) { // fn#81611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:407, offset: 0x01ed7ddc, 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) {
function _isNativeReflectConstruct_81608() { // fn#81608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:214, offset: 0x01ed7d7a, 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 _fun81612;
return (_isNativeReflectConstruct_81608_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_81613(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') {
function _createForOfIteratorHelperLoose_81611(a0, a1) { // fn#81611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:407, offset: 0x01ed7ddc, 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 _fun81612;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_81613(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_81613(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_81613(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun81612;
}
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 getPartyForUser(a0, a1) { // fn#81614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:1336, offset: 0x01ed7f50, size: 31 bytes, params: 3, frame: 2
return (env0_12[a0] ?? ({}))[a1];
}
function removeUserFromParty(a0, a1) { // fn#81615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:1403, offset: 0x01ed7f6f, size: 136 bytes, params: 3, frame: 18
var property;
var defaultImport;
var value3;
const partyForUser = getPartyForUser(a0, a1);
if (partyForUser != null) {
property = env0_12[a0];
delete property[a1];
defaultImport = importDefault(22) /* metro dependency 22 */;
if (defaultImport.isEmpty(property)) {
delete env0_12[a0];
}
value3 = env0_13.get(partyForUser);
if (value3 != null) {
value3.delete(a0);
if (value3.size === 0) {
env0_13.delete(partyForUser);
if (r5) {
}
return _fun81612;
}
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 _fun81612() { // fn#81612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:978, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
}
function updateParty(a0, a1, a2, a3) { // fn#81616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:1594, offset: 0x01ed7ff7, size: 294 bytes, params: 5, frame: 19
var r6;
var r7;
var r0;
var property;
var binding;
var object2;
var value4;
var set;
var value7;
const value = a2.find(function(a0) {
return a0.party != null && a0.party.id;
});
const value2 = null;
const id = value2 != value && value2 != value.party ? value.party.id : value2;
const partyForUser = getPartyForUser(a1, a0);
if (value2 == id) {
value7 = value2 != partyForUser;
if (value7) {
removeUserFromParty(a1, a0);
r0 = true;
} else {
r0 = value7;
}
return r0;
}
const OFFLINE = StatusTypes.OFFLINE;
if (a3 === OFFLINE) {
value7 = value2 != partyForUser;
if (value7) {
removeUserFromParty(a1, a0);
r0 = true;
} else {
r0 = value7;
}
return r0;
function getPartyForUser(a0, a1) { // fn#81614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:1336, offset: 0x01ed7f50, size: 31 bytes, params: 3, frame: 2
return (env0_12[a0] ?? ({}))[a1];
}
if (value2 == partyForUser) {
property = env0_12[a1];
if (value2 != property) {
r6 = property;
} else {
binding = env0_12;
object2 = {};
binding[a1] = object2;
r6 = object2;
}
r6[a0] = id;
if (!RelationshipStore.isBlocked(a1)) {
if (!RelationshipStore.isIgnored(a1)) {
binding = env0_13;
value4 = binding.get(id);
if (value2 != value4) {
r7 = value4;
} else {
set = new global.Set();
function removeUserFromParty(a0, a1) { // fn#81615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:1403, offset: 0x01ed7f6f, size: 136 bytes, params: 3, frame: 18
var property;
var defaultImport;
var value3;
const partyForUser = getPartyForUser(a0, a1);
if (partyForUser != null) {
property = env0_12[a0];
delete property[a1];
defaultImport = importDefault(22) /* metro dependency 22 */;
if (defaultImport.isEmpty(property)) {
delete env0_12[a0];
}
value3 = env0_13.get(partyForUser);
if (value3 != null) {
value3.delete(a0);
if (value3.size === 0) {
env0_13.delete(partyForUser);
}
binding = env0_13;
binding.set(id, r7);
r7.add(a1);
}
}
} else {
if (partyForUser === id) {
return false;
}
removeUserFromParty(a1, a0);
property = env0_12[a1];
if (value2 != property) {
r6 = property;
} else {
binding = env0_12;
object2 = {};
binding[a1] = object2;
r6 = object2;
}
r6[a0] = id;
if (!RelationshipStore.isBlocked(a1)) {
if (!RelationshipStore.isIgnored(a1)) {
binding = env0_13;
value4 = binding.get(id);
if (value2 != value4) {
r7 = value4;
} else {
set = new global.Set();
}
binding = env0_13;
binding.set(id, r7);
r7.add(a1);
}
}
}
return true;
}
function batchUpdatePresences(a0, a1) { // fn#81619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:2257, offset: 0x01ed81b0, size: 41 bytes, params: 3, frame: 12
const env0_0 = a0;
const env0_1 = false;
a1.forEach(_fun81620);
return env0_1;
}
function RELATIONSHIP_ADD_81622({relationship}) { // fn#81622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:2491, offset: 0x01ed8250, size: 193 bytes, params: 2, frame: 17
var r2;
var value4;
var get;
var value5;
var value6;
const isBlocked = RelationshipStore.isBlocked;
let id = relationship.id;
if (!Reflect.apply(isBlocked, RelationshipStore, [id])) {
reducibleJoin3: while (true) {
if (!RelationshipStore.isIgnored(relationship.id)) {
function updateParty(a0, a1, a2, a3) { // fn#81616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:1594, offset: 0x01ed7ff7, size: 294 bytes, params: 5, frame: 19
var r6;
var r7;
var r0;
var property;
var binding;
var object;
var relationshipStoreBinding;
var value4;
var set;
var value7;
const value = a2.find(function(a0) {
return a0.party != null && a0.party.id;
});
const value2 = null;
const id = value2 != value && value2 != value.party ? value.party.id : value2;
const partyForUser = getPartyForUser(a1, a0);
if (value2 == id) {
value7 = value2 != partyForUser;
if (value7) {
removeUserFromParty(a1, a0);
r0 = true;
} else {
r0 = value7;
}
return r0;
}
const OFFLINE = StatusTypes.OFFLINE;
if (a3 === OFFLINE) {
value7 = value2 != partyForUser;
if (value7) {
removeUserFromParty(a1, a0);
r0 = true;
} else {
r0 = value7;
}
return r0;
}
if (value2 == partyForUser) {
property = env0_12[a1];
if (value2 != property) {
r6 = property;
} else {
binding = env0_12;
object = {};
binding[a1] = object;
r6 = object;
}
r6[a0] = id;
if (!Reflect.apply(RelationshipStore.isBlocked, relationshipStoreBinding, [a1])) {
relationshipStoreBinding = RelationshipStore;
if (!relationshipStoreBinding.isIgnored(a1)) {
binding = env0_13;
value4 = binding.get(id);
if (value2 != value4) {
r7 = value4;
} else {
set = new global.Set();
}
binding = env0_13;
binding.set(id, r7);
r7.add(a1);
}
}
} else {
if (partyForUser === id) {
return false;
}
break reducibleJoin3;
removeUserFromParty(a1, a0);
property = env0_12[a1];
if (value2 != property) {
r6 = property;
} else {
binding = env0_12;
object = {};
binding[a1] = object;
r6 = object;
}
r6[a0] = id;
if (!Reflect.apply(RelationshipStore.isBlocked, relationshipStoreBinding, [a1])) {
relationshipStoreBinding = RelationshipStore;
if (!relationshipStoreBinding.isIgnored(a1)) {
binding = env0_13;
value4 = binding.get(id);
if (value2 != value4) {
r7 = value4;
} else {
set = new global.Set();
}
binding = env0_13;
binding.set(id, r7);
r7.add(a1);
}
}
}
return true;
}
let binding = env0_12;
const property = binding[relationship.id];
if (property == null) {
return false;
function batchUpdatePresences(a0, a1) { // fn#81619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:2257, offset: 0x01ed81b0, size: 41 bytes, params: 3, frame: 12
const env0_0 = a0;
const env0_1 = false;
a1.forEach(_fun81620);
return env0_1;
function _fun81620(a0) { // fn#81620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:2319, offset: 0x01ed81d9, size: 69 bytes, params: 2, frame: 18
var r0;
let value = a0 != null;
if (value) {
value = environment.__proto__;
value = updateParty(env0_0, a0.user.id, a0.activities, a0.status);
r0 = value;
} else {
r0 = value;
}
if (r0) {
}
}
}
const _createForOfIteratorHelperLoose_81611Binding = _createForOfIteratorHelperLoose_81611;
const defaultImport = importDefault(22) /* metro dependency 22 */;
const value2 = _createForOfIteratorHelperLoose_81611Binding(defaultImport.values(property));
const value3 = value2();
let done = value3.done;
if (!done) {
r2 = value3;
reducibleLoop5: while (true) {
value4 = r2.value;
binding = env0_13;
get = binding.get;
value5 = Reflect.apply(get, binding, [value4]);
reducibleJoin7: while (true) {
if (value5 == null) {
function RELATIONSHIP_ADD_81622({relationship}) { // fn#81622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:2491, offset: 0x01ed8250, size: 193 bytes, params: 2, frame: 17
var r2;
var value4;
var get;
var value5;
var value6;
const isBlocked = RelationshipStore.isBlocked;
let id = relationship.id;
if (!Reflect.apply(isBlocked, relationshipStoreBinding, [id])) {
relationshipStoreBinding = RelationshipStore;
reducibleJoin3: while (true) {
if (!relationshipStoreBinding.isIgnored(relationship.id)) {
return false;
}
break reducibleJoin3;
}
}
let binding = env0_12;
const property = binding[relationship.id];
if (property == null) {
return false;
}
const _createForOfIteratorHelperLoose_81611Binding = _createForOfIteratorHelperLoose_81611;
const defaultImport = Module00022;
const value2 = _createForOfIteratorHelperLoose_81611Binding(defaultImport.values(property));
const value3 = value2();
let done = value3.done;
if (!done) {
r2 = value3;
reducibleLoop5: while (true) {
value4 = r2.value;
binding = env0_13;
get = binding.get;
value5 = Reflect.apply(get, binding, [value4]);
reducibleJoin7: while (true) {
if (value5 == null) {
break reducibleJoin7;
}
id = relationship.id;
value5.delete(id);
break reducibleJoin7;
}
id = relationship.id;
value5.delete(id);
break reducibleJoin7;
value6 = value2();
done = value6.done;
if (done) {
break reducibleLoop5;
}
r2 = value6;
continue reducibleLoop5;
}
value6 = value2();
done = value6.done;
if (done) {
break reducibleLoop5;
}
r2 = value6;
continue reducibleLoop5;
}
}
}
function _fun81623(a0) { // fn#81623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:2768, offset: 0x01ed8311, size: 153 bytes, params: 2, frame: 16
const closure = GamePartyStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.syncWith([SelfPresenceStore], handleLocalPresenceUpdate_81621);
this.waitFor(AuthenticationStore, RelationshipStore, SelfPresenceStore);
}}, {key: 'getParty', value: value_81626}, {key: 'getUserParties', value: value_81627}, {key: 'getParties',
value: value_81628}]);
}
function _fun81623(a0) { // fn#81623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:2768, offset: 0x01ed8311, size: 153 bytes, params: 2, frame: 16
const GamePartyStore2 = GamePartyStore;
Inherits(GamePartyStore2, a0);
return CreateClass(GamePartyStore2, [{key: 'initialize', value: function() {
this.syncWith([SelfPresenceStore], handleLocalPresenceUpdate_81621);
this.waitFor(AuthenticationStore, RelationshipStore, SelfPresenceStore);
}}, {key: 'getParty', value: value_81626}, {key: 'getUserParties', value: value_81627}, {key: 'getParties',
value: value_81628}]);
function GamePartyStore() { // fn#81624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:2780, offset: 0x0118e06f, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, GamePartyStore);
const value3 = env1_5(GamePartyStore);
return env1_4(this, _isNativeReflectConstruct_81608() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function CONNECTION_OPEN_SUPPLEMENTAL_81629({guilds, presences}) { // fn#81629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:3418, offset: 0x01ed841d, size: 205 bytes, params: 2, frame: 27
var r3;
var r4;
var r1;
var r0;
var r2;
var value5;
var user;
var status;
var activities;
var value6;
var updatePartyBinding;
var id;
var value7;
var value8;
var value9;
var object2;
var value12;
var value13;
var value14;
const value2 = _createForOfIteratorHelperLoose_81611(presences);
const value3 = value2();
let done = value3.done;
if (done) {
r0 = false;
} else {
r3 = false;
r4 = value3;
while (true) {
value5 = r4.value;
user = value5.user;
status = value5.status;
activities = value5.activities;
value6 = user != null;
if (value6) {
updatePartyBinding = updateParty;
id = user.id;
value7 = updatePartyBinding(ME, id, activities, status) !== false;
r1 = value7;
} else {
r1 = value6;
}
if (!r1) {
function value_81626(a0) { // fn#81626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:3168, offset: 0x01ed83e9, size: 52 bytes, params: 2, frame: 14
const value = null;
return value != a0 && env1_13.has(a0) ? env1_13.get(a0) : value;
}
function value_81627() { // fn#81627, offset: 0x00e2f9de, size: 9 bytes, params: 1, frame: 1
return env1_12;
}
function value_81628() { // fn#81628, offset: 0x00e2f9d5, size: 9 bytes, params: 1, frame: 1
return env1_13;
}
}
function CONNECTION_OPEN_SUPPLEMENTAL_81629({guilds, presences}) { // fn#81629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:3418, offset: 0x01ed841d, size: 205 bytes, params: 2, frame: 27
var r3;
var r4;
var r1;
var r0;
var r2;
var value5;
var user;
var status;
var activities;
var value6;
var updatePartyBinding;
var id;
var value7;
var value8;
var value9;
var object;
var value12;
var value13;
var value14;
const value2 = _createForOfIteratorHelperLoose_81611(presences);
const value3 = value2();
let done = value3.done;
if (done) {
r0 = false;
} else {
r3 = false;
r4 = value3;
while (true) {
value5 = r4.value;
user = value5.user;
status = value5.status;
activities = value5.activities;
value6 = user != null;
if (value6) {
updatePartyBinding = updateParty;
id = user.id;
value7 = updatePartyBinding(ME, id, activities, status) !== false;
r1 = value7;
} else {
r1 = value6;
}
if (!r1) {
continue;
}
value8 = true;
r3 = value8;
value9 = value2();
done = value9.done;
if (done) {
r0 = r3;
break;
}
r4 = value9;
continue;
}
value8 = true;
r3 = value8;
value9 = value2();
done = value9.done;
if (done) {
r0 = r3;
break;
}
r4 = value9;
continue;
}
}
const value10 = _createForOfIteratorHelperLoose_81611(guilds);
const value11 = value10();
done = value11.done;
if (!done) {
r2 = value11;
r3 = r0;
while (true) {
object2 = {};
value12 = r2.value;
object2.guild = value12;
if (GUILD_CREATE_81618(object2) !== false) {
value13 = true;
r3 = value13;
const value10 = _createForOfIteratorHelperLoose_81611(guilds);
const value11 = value10();
done = value11.done;
if (!done) {
r2 = value11;
r3 = r0;
while (true) {
object = {};
value12 = r2.value;
object.guild = value12;
if (GUILD_CREATE_81618(object) !== false) {
value13 = true;
r3 = value13;
}
value14 = value10();
done = value14.done;
if (done) {
r0 = r3;
break;
}
r2 = value14;
continue;
}
value14 = value10();
done = value14.done;
if (done) {
r0 = r3;
break;
}
r2 = value14;
continue;
}
return r0;
}
return r0;
}
function OVERLAY_INITIALIZE_81630({parties, userParties}) { // fn#81630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:3787, offset: 0x01ed84ea, size: 110 bytes, params: 2, frame: 15
const Map = global.Map;
const map = new Map();
copyDataProperties({}, userParties, undefined);
const Object = global.Object;
Object.keys(parties).forEach(_fun81631);
}
function OVERLAY_INITIALIZE_81630({parties, userParties}) { // fn#81630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:3787, offset: 0x01ed84ea, size: 110 bytes, params: 2, frame: 15
const Map = global.Map;
const map = new Map();
copyDataProperties({}, userParties, undefined);
const Object = global.Object;
Object.keys(parties).forEach(_fun81631);
function _fun81631(a0) { // fn#81631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:3890, offset: 0x01ed8558, size: 62 bytes, params: 2, frame: 15
const value = environment.__proto__;
const binding = env1_13;
const set = binding.set;
const Set = global.Set;
return Reflect.apply(set, binding, [a0, new Set(parties[a0])]);
}
function PRESENCE_UPDATES_81633({updates}) { // fn#81633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:4191, offset: 0x01ed860c, size: 48 bytes, params: 2, frame: 12
return updates.map(function({guildId, user, status, activities}) {
return updateParty(guildId ?? ME, user.id, activities, status);
}).some(function(a0) {
return a0;
});
}
}
function THREAD_MEMBER_LIST_UPDATE_81636({guildId, members}) { // fn#81636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:4369, offset: 0x01ed867b, size: 50 bytes, params: 2, frame: 14
return batchUpdatePresences(guildId, members.map(function(a0) {
return a0.presence;
}));
}
function THREAD_MEMBERS_UPDATE_81638({guildId, addedMembers}) { // fn#81638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:4507, offset: 0x01ed86b8, size: 59 bytes, params: 2, frame: 15
var r0;
var batchUpdatePresencesBinding;
let value = addedMembers != null;
if (value) {
batchUpdatePresencesBinding = batchUpdatePresences;
value = addedMembers.map(function(a0) {
return a0.presence;
function PRESENCE_UPDATES_81633({updates}) { // fn#81633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:4191, offset: 0x01ed860c, size: 48 bytes, params: 2, frame: 12
return updates.map(function({guildId, user, status, activities}) {
return updateParty(guildId ?? ME, user.id, activities, status);
}).some(function(a0) {
return a0;
});
value = batchUpdatePresencesBinding(guildId, value);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _fun81634({guildId, user, status, activities}) { // fn#81634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:4249, offset: 0x01ed863c, size: 63 bytes, params: 2, frame: 18
return updateParty(guildId ?? ME, user.id, activities, status);
}
function RELATIONSHIP_REMOVE_81640({relationship}) { // fn#81640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:4751, offset: 0x01ed86f3, size: 143 bytes, params: 2, frame: 17
var r2;
var value4;
var value5;
var add;
var value6;
let binding = env0_12;
let id = relationship.id;
const property = binding[id];
if (property == null) {
return false;
}
const _createForOfIteratorHelperLoose_81611Binding = _createForOfIteratorHelperLoose_81611;
const defaultImport = importDefault(22) /* metro dependency 22 */;
const value2 = _createForOfIteratorHelperLoose_81611Binding(defaultImport.values(property));
const value3 = value2();
let done = value3.done;
if (!done) {
r2 = value3;
while (true) {
value4 = r2.value;
binding = env0_13;
value5 = binding.get(value4);
if (value5 != null) {
add = value5.add;
id = relationship.id;
Reflect.apply(add, value5, [id]);
function THREAD_MEMBER_LIST_UPDATE_81636({guildId, members}) { // fn#81636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:4369, offset: 0x01ed867b, size: 50 bytes, params: 2, frame: 14
return batchUpdatePresences(guildId, members.map(function(a0) {
return a0.presence;
}));
}
function THREAD_MEMBERS_UPDATE_81638({guildId, addedMembers}) { // fn#81638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:4507, offset: 0x01ed86b8, size: 59 bytes, params: 2, frame: 15
var r0;
var batchUpdatePresencesBinding;
let value = addedMembers != null;
if (value) {
batchUpdatePresencesBinding = batchUpdatePresences;
value = addedMembers.map(function(a0) {
return a0.presence;
});
value = batchUpdatePresencesBinding(guildId, value);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function RELATIONSHIP_REMOVE_81640({relationship}) { // fn#81640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:4751, offset: 0x01ed86f3, size: 143 bytes, params: 2, frame: 17
var r2;
var value4;
var value5;
var add;
var value6;
let binding = env0_12;
let id = relationship.id;
const property = binding[id];
if (property == null) {
return false;
}
const _createForOfIteratorHelperLoose_81611Binding = _createForOfIteratorHelperLoose_81611;
const defaultImport = Module00022;
const value2 = _createForOfIteratorHelperLoose_81611Binding(defaultImport.values(property));
const value3 = value2();
let done = value3.done;
if (!done) {
r2 = value3;
while (true) {
value4 = r2.value;
binding = env0_13;
value5 = binding.get(value4);
if (value5 != null) {
add = value5.add;
id = relationship.id;
Reflect.apply(add, value5, [id]);
}
value6 = value2();
done = value6.done;
if (done) {
break;
}
r2 = value6;
continue;
}
value6 = value2();
done = value6.done;
if (done) {
break;
}
r2 = value6;
continue;
}
}
}
function _fun81620(a0) { // fn#81620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:2319, offset: 0x01ed81d9, size: 69 bytes, params: 2, frame: 18
var r0;
let value = a0 != null;
if (value) {
value = environment.__proto__;
value = updateParty(env0_0, a0.user.id, a0.activities, a0.status);
r0 = value;
} else {
r0 = value;
}
if (r0) {
}
}
function value_81626(a0) { // fn#81626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:3168, offset: 0x01ed83e9, size: 52 bytes, params: 2, frame: 14
const value = null;
return value != a0 && env1_13.has(a0) ? env1_13.get(a0) : value;
}
function _fun81631(a0) { // fn#81631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10766:3890, offset: 0x01ed8558, size: 62 bytes, params: 2, frame: 15
const value = environment.__proto__;
const binding = env1_13;
const set = binding.set;
const Set = global.Set;
return Reflect.apply(set, binding, [a0, new Set(parties[a0])]);
function _fun81635(a0) { // fn#81635, offset: 0x00c37049, size: 5 bytes, params: 2, frame: 1
return a0;
}
global.__d(_fun81607, 10580, [6, 7, 15, 17, 18, 1226, 3793, 6876, 661, 22, 566, 694,
2]) /* metro module 10580, dependencies: [6, 7, 15, 17, 18, 1226, 3793, 6876, 661, 22, 566, 694, 2] */;
+77 -60
View File
@@ -1,77 +1,94 @@
/* Metro module 12592; source: stores/GeoRestrictedGuildStore.tsx; dependencies: [6, 7, 15, 17, 18, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun96494(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12782:6, offset: 0x0215f954, size: 297 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let env0_5 = [];
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun96498(Store);
value.displayName = 'GeoRestrictedGuildStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function(a0) {
env0_5 = a0.geoRestrictedGuilds;
}, GUILD_DELETE: GUILD_DELETE_96502, GUILD_GEO_RESTRICTED: GUILD_GEO_RESTRICTED_96505});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/GeoRestrictedGuildStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/GeoRestrictedGuildStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_96495() { // fn#96495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12782:149, offset: 0x0215fa7d, 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) {
function _isNativeReflectConstruct_96495() { // fn#96495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12782:149, offset: 0x0215fa7d, 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_96495_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_96495_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun96498(a0) { // fn#96498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12782:357, offset: 0x0215fadf, size: 74 bytes, params: 2, frame: 15
const closure = GeoRestrictedGuildStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getGeoRestrictedGuilds', value: value_96500}]);
}
function _fun96498(a0) { // fn#96498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12782:357, offset: 0x0215fadf, size: 74 bytes, params: 2, frame: 15
const GeoRestrictedGuildStore2 = GeoRestrictedGuildStore;
Inherits(GeoRestrictedGuildStore2, a0);
return CreateClass(GeoRestrictedGuildStore2, [{key: 'getGeoRestrictedGuilds', value: value_96500}]);
function GeoRestrictedGuildStore() { // fn#96499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12782:369, offset: 0x00c7a0d6, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, GeoRestrictedGuildStore);
const value3 = env1_3(GeoRestrictedGuildStore);
return env1_2(this, _isNativeReflectConstruct_96495() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_96500() { // fn#96500, offset: 0x00e40571, size: 9 bytes, params: 1, frame: 1
return env1_5;
}
function GUILD_DELETE_96502({guild}) { // fn#96502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12782:902, offset: 0x0215fb3d, size: 82 bytes, params: 2, frame: 13
if (env0_5.findIndex(function({id}) {
return id === guild.id;
}) === -1) {
return false;
}
env0_5 = env0_5.filter(function({id}) {
return id !== guild.id;
});
}
function GUILD_GEO_RESTRICTED_96505(a0) { // fn#96505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12782:1038, offset: 0x0215fb8f, size: 92 bytes, params: 2, frame: 14
const env0_0 = a0;
env0_5.filter(_fun96506).push({id: a0.guildId, name: a0.name, icon: a0.icon, unavailable: true,
geo_restricted: true});
}
function _fun96506({id}) { // fn#96506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12782:1089, offset: 0x0215fbeb, size: 26 bytes, params: 2, frame: 2
return id !== env0_0.guildId;
function GUILD_DELETE_96502({guild}) { // fn#96502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12782:902, offset: 0x0215fb3d, size: 82 bytes, params: 2, frame: 13
if (env0_5.findIndex(function({id}) {
return id === guild.id;
}) === -1) {
return false;
}
env0_5 = env0_5.filter(function({id}) {
return id !== guild.id;
});
}
function GUILD_GEO_RESTRICTED_96505(a0) { // fn#96505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12782:1038, offset: 0x0215fb8f, size: 92 bytes, params: 2, frame: 14
const env0_0 = a0;
env0_5.filter(_fun96506).push({id: a0.guildId, name: a0.name, icon: a0.icon, unavailable: true,
geo_restricted: true});
function _fun96506({id}) { // fn#96506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12782:1089, offset: 0x0215fbeb, size: 26 bytes, params: 2, frame: 2
return id !== env0_0.guildId;
}
}
}
global.__d(_fun96494, 12592, [6, 7, 15, 17, 18, 566, 694,
2]) /* metro module 12592, dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */;
+466 -424
View File
@@ -1,12 +1,24 @@
/* Metro module 8450; source: stores/GiftCodeStore.tsx; dependencies: [6, 7, 15, 17, 18, 7671, 661, 4041, 3738, 4129, 694, 8451, 566, 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 GiftCodeRecord from '../records/GiftCodeRecord.tsx'; /* Metro dependency 7671 */
import GiftCodeActionCreators from '../actions/GiftCodeActionCreators.tsx'; /* Metro dependency 8451 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as GiftCodeUtilsModule from '../utils/GiftCodeUtils.tsx'; /* Metro dependency 4129 */
function _fun67037(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:6, offset: 0x01c1458b, size: 786 bytes, params: 8, frame: 24
const env0_0 = require;
const closure = GIFT_CODE_RESOLVE_67047;
const GIFT_CODE_RESOLVE_670472 = GIFT_CODE_RESOLVE_67047;
const closure2 = function({message}) {
resolveMessageGiftCodes(message, true);
return false;
};
const closure3 = LOCAL_MESSAGES_LOADED_67049;
const LOCAL_MESSAGES_LOADED_670492 = LOCAL_MESSAGES_LOADED_67049;
const closure4 = function({firstMessages}) {
if (firstMessages == null) {
return false;
@@ -17,16 +29,6 @@ function _fun67037(global, require, importDefault, importAll, module, exports, d
};
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const giftCodeRecord = importDefault(7671) /* metro dependency 7671: GiftCodeRecord */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_9 = constantsModule.AbortCodes;
const env0_10 = constantsModule.MAX_TIMEOUT_MS;
const env0_11 = constantsModule.NOOP_NULL;
const env0_12 = {};
const Map = global.Map;
const map = new Map();
@@ -39,10 +41,10 @@ function _fun67037(global, require, importDefault, importAll, module, exports, d
const env0_19 = {};
Set = global.Set;
set = new Set();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun67053(Store).displayName = 'GiftCodeStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: CONNECTION_OPEN_67067,
CHANNEL_SELECT: CHANNEL_SELECT_67068, GIFT_CODE_RESOLVE: closure,
CHANNEL_SELECT: CHANNEL_SELECT_67068, GIFT_CODE_RESOLVE: GIFT_CODE_RESOLVE_670472,
GIFT_CODE_RESOLVE_SUCCESS: GIFT_CODE_RESOLVE_SUCCESS_67069,
GIFT_CODE_RESOLVE_FAILURE: GIFT_CODE_RESOLVE_FAILURE, GIFT_CODE_REDEEM: GIFT_CODE_REDEEM_67073,
GIFT_CODE_REDEEM_SUCCESS: GIFT_CODE_REDEEM_SUCCESS, GIFT_CODE_REDEEM_FAILURE: GIFT_CODE_REDEEM_FAILURE,
@@ -50,8 +52,8 @@ function _fun67037(global, require, importDefault, importAll, module, exports, d
updateGiftCode(giftCode);
}, GIFT_CODES_FETCH: GIFT_CODES_FETCH, GIFT_CODES_FETCH_SUCCESS: GIFT_CODES_FETCH_SUCCESS,
GIFT_CODES_FETCH_FAILURE: GIFT_CODES_FETCH_FAILURE, MESSAGE_CREATE: closure2, MESSAGE_UPDATE: closure2,
LOCAL_MESSAGES_LOADED: closure3, LOAD_MESSAGES_SUCCESS: closure3, LOAD_MESSAGES_AROUND_SUCCESS: closure3,
LOAD_RECENT_MENTIONS_SUCCESS: function({messages}) {
LOCAL_MESSAGES_LOADED: LOCAL_MESSAGES_LOADED_670492, LOAD_MESSAGES_SUCCESS: LOCAL_MESSAGES_LOADED_670492,
LOAD_MESSAGES_AROUND_SUCCESS: LOCAL_MESSAGES_LOADED_670492, LOAD_RECENT_MENTIONS_SUCCESS: function({messages}) {
messages.forEach(_fun67084);
}, LOAD_PINNED_MESSAGES_SUCCESS: function({pins}) {
pins.forEach(_fun67086);
@@ -62,459 +64,499 @@ function _fun67037(global, require, importDefault, importAll, module, exports, d
var Object = global.Object;
Object.values(threads).map(_fun67093);
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/GiftCodeStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/GiftCodeStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_67038() { // fn#67038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:216, offset: 0x01c1489d, 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) {
function _isNativeReflectConstruct_67038() { // fn#67038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:216, offset: 0x01c1489d, 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_67038_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_67038_isNativeReflectConstruct = function() {
return !!result;
})();
}
function updateGiftCode(a0) { // fn#67041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:473, offset: 0x01c148ff, size: 172 bytes, params: 2, frame: 17
var Timeout;
var value3;
var timeout;
var value;
const fromServer = GiftCodeRecord.createFromServer(a0);
const code = fromServer.code;
let binding = env0_13;
const value2 = binding.has(code);
binding = env0_13;
const set = binding.set;
if (value2) {
value = env0_13.get(code);
Reflect.apply(set, binding, [code, value.merge(fromServer)]);
} else {
Reflect.apply(set, binding, [code, fromServer]);
if (fromServer.expiresAt != null) {
Timeout = (require(4041) /* metro dependency 4041: Timers */).Timeout;
value3 = Object.create(Timeout.prototype, {constructor: {value: Timeout}});
timeout = new Timeout();
env0_12[code] = timeout instanceof Object ? timeout : value3;
checkGiftCodeExpiry(code);
function updateGiftCode(a0) { // fn#67041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:473, offset: 0x01c148ff, size: 172 bytes, params: 2, frame: 17
var Timeout;
var value3;
var timeout;
var value;
const fromServer = GiftCodeRecord.createFromServer(a0);
const code = fromServer.code;
let binding = env0_13;
const value2 = binding.has(code);
binding = env0_13;
const set = binding.set;
if (value2) {
value = env0_13.get(code);
Reflect.apply(set, binding, [code, value.merge(fromServer)]);
} else {
Reflect.apply(set, binding, [code, fromServer]);
if (fromServer.expiresAt != null) {
Timeout = (require(4041) /* metro dependency 4041: Timers */).Timeout;
value3 = Object.create(Timeout.prototype, {constructor: {value: Timeout}});
timeout = new Timeout();
env0_12[code] = timeout instanceof Object ? timeout : value3;
checkGiftCodeExpiry(code);
}
}
}
}
function checkGiftCodeExpiry(a0) { // fn#67042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:672, offset: 0x01c149ab, size: 205 bytes, params: 2, frame: 19
const env0_0 = a0;
let binding = env0_13;
const value2 = binding.get(a0);
if (value2 != null) {
var expiresAt = value2.expiresAt;
if (expiresAt == null) {
return undefined;
function checkGiftCodeExpiry(a0) { // fn#67042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:672, offset: 0x01c149ab, size: 205 bytes, params: 2, frame: 19
const env0_0 = a0;
let binding = env0_13;
const value2 = binding.get(a0);
if (value2 != null) {
var expiresAt = value2.expiresAt;
if (expiresAt == null) {
return undefined;
}
expiresAt = value2.expiresAt;
var valueOf = expiresAt.valueOf;
var value3 = Reflect.apply(valueOf, expiresAt, []);
var value4 = (importDefault(3738) /* metro dependency 3738 */)();
valueOf = value4.valueOf;
var value5 = value3 - Reflect.apply(valueOf, value4, []);
if (value5 <= 0) {
binding = env0_13;
binding.delete(a0);
delete env0_12[a0];
binding = env0_21;
binding.emitChange();
return undefined;
}
var property = env0_12[a0];
if (property == null) {
return undefined;
}
var start = property.start;
var Math = global.Math;
Reflect.apply(start, property, [Math.min(MAX_TIMEOUT_MS, value5), _fun67043]);
}
expiresAt = value2.expiresAt;
var valueOf = expiresAt.valueOf;
var value3 = Reflect.apply(valueOf, expiresAt, []);
var value4 = (importDefault(3738) /* metro dependency 3738 */)();
valueOf = value4.valueOf;
var value5 = value3 - Reflect.apply(valueOf, value4, []);
if (value5 <= 0) {
binding = env0_13;
binding.delete(a0);
delete env0_12[a0];
binding = env0_21;
binding.emitChange();
return undefined;
function _fun67043() { // fn#67043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:902, offset: 0x01c14a78, size: 23 bytes, params: 1, frame: 11
checkGiftCodeExpiry(env0_0);
}
var property = env0_12[a0];
if (property == null) {
return undefined;
}
var start = property.start;
var Math = global.Math;
Reflect.apply(start, property, [Math.min(MAX_TIMEOUT_MS, value5), _fun67043]);
}
}
function resolveMessageGiftCodes(a0) { // fn#67044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:933, offset: 0x01c14a8f, size: 212 bytes, params: 2, frame: 16
var r2;
var binding;
var isGiftCodeEmbed2;
var findGiftCodes;
let value = a1;
const value2 = undefined;
if (value !== value2 ? value : false) {
binding = env0_20;
if (binding.has(a0.channel_id)) {
function resolveMessageGiftCodes(a0) { // fn#67044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:933, offset: 0x01c14a8f, size: 212 bytes, params: 2, frame: 16
var r2;
var binding;
var isGiftCodeEmbed2;
var findGiftCodes;
let value = a1;
const value2 = undefined;
if (value !== value2 ? value : false) {
binding = env0_20;
if (binding.has(a0.channel_id)) {
isGiftCodeEmbed2 = (require(4129) /* metro dependency 4129: GiftCodeUtils */).isGiftCodeEmbed(a0);
value = require(4129) /* metro dependency 4129: GiftCodeUtils */;
findGiftCodes = value.findGiftCodes;
r2 = isGiftCodeEmbed2 ? Reflect.apply(findGiftCodes, value,
[(a0 == null ? value2 : a0.embeds) != null ? a0 == null ? value2 : a0.embeds[0].url : value2]) : Reflect.apply(findGiftCodes,
value, [a0.content]);
if (r2.length !== 0) {
r2.forEach(_fun67045);
}
return false;
}
} else {
isGiftCodeEmbed2 = (require(4129) /* metro dependency 4129: GiftCodeUtils */).isGiftCodeEmbed(a0);
value = require(4129) /* metro dependency 4129: GiftCodeUtils */;
findGiftCodes = value.findGiftCodes;
r2 = isGiftCodeEmbed2 ? Reflect.apply(findGiftCodes, value,
[(a0 == null ? value2 : a0.embeds) != null ? a0 == null ? value2 : a0.embeds[0].url : value2]) : Reflect.apply(findGiftCodes,
value, [a0.content]);
if (r2.length !== 0) {
r2.forEach(_fun67045);
}
return false;
}
} else {
isGiftCodeEmbed2 = (require(4129) /* metro dependency 4129: GiftCodeUtils */).isGiftCodeEmbed(a0);
value = require(4129) /* metro dependency 4129: GiftCodeUtils */;
findGiftCodes = value.findGiftCodes;
r2 = isGiftCodeEmbed2 ? Reflect.apply(findGiftCodes, value,
[(a0 == null ? value2 : a0.embeds) != null ? a0 == null ? value2 : a0.embeds[0].url : value2]) : Reflect.apply(findGiftCodes,
value, [a0.content]);
if (r2.length !== 0) {
r2.forEach(_fun67045);
return false;
function _fun67045(a0) { // fn#67045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:1201, offset: 0x01c14b63, size: 105 bytes, params: 2, frame: 14
var environment;
const env0_0 = a0;
const value = environment.__proto__;
if (!(env1_14.includes(a0) || env1_16.includes(a0))) {
GIFT_CODE_RESOLVE_67047({code: a0});
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun67046);
}
function _fun67046() { // fn#67046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:1283, offset: 0x01c14bcc, size: 66 bytes, params: 1, frame: 16
return (GiftCodeActionCreators).resolveGiftCode(env0_0, false,
true).catch(NOOP_NULL);
}
}
}
function GIFT_CODE_RESOLVE_67047({code}) { // fn#67047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:1339, offset: 0x01c14c0e, size: 65 bytes, params: 2, frame: 15
var items2;
var value2;
let binding = env0_14;
if (!binding.includes(code)) {
binding = env0_14;
items2 = [];
value2 = arraySpread(items2, binding, 0, undefined);
items2[value2] = code;
value2 + 1;
}
}
return false;
}
function GIFT_CODE_RESOLVE_67047({code}) { // fn#67047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:1339, offset: 0x01c14c0e, size: 65 bytes, params: 2, frame: 15
var items2;
var value2;
let binding = env0_14;
if (!binding.includes(code)) {
binding = env0_14;
items2 = [];
value2 = arraySpread(items2, binding, 0, undefined);
items2[value2] = code;
value2 + 1;
}
}
function LOAD_MESSAGES_AROUND_SUCCESS_67049({channelId, messages}) { // fn#67049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:1481, offset: 0x01c14c6c, size: 54 bytes, params: 2, frame: 12
env0_20.add(channelId);
messages.forEach(function(a0) {
resolveMessageGiftCodes(a0, true);
return false;
});
}
function LOAD_ARCHIVED_THREADS_SUCCESS_67051({firstMessages}) { // fn#67051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:1590, offset: 0x01c14cba, size: 46 bytes, params: 2, frame: 11
if (firstMessages == null) {
return false;
}
if (firstMessages != null) {
firstMessages.forEach(function(a0) {
resolveMessageGiftCodes(a0);
function LOAD_MESSAGES_AROUND_SUCCESS_67049({channelId, messages}) { // fn#67049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:1481, offset: 0x01c14c6c, size: 54 bytes, params: 2, frame: 12
env0_20.add(channelId);
messages.forEach(function(a0) {
resolveMessageGiftCodes(a0, true);
return false;
});
}
}
function _fun67053(a0) { // fn#67053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:1721, offset: 0x01c14cfd, size: 338 bytes, params: 2, frame: 16
const closure = GiftCodeStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'get', value: value_67055}, {key: 'getError', value: value_67056},
{key: 'getForGifterSKUAndPlan', value: value_67057}, {key: 'getIsResolving', value: value_67059},
{key: 'getIsResolved', value: value_67060}, {key: 'getIsAccepting', value: value_67061},
{key: 'getUserGiftCodesFetchingForSKUAndPlan', value: value_67062},
{key: 'getUserGiftCodesLoadedAtForSKUAndPlan', value: value_67063}, {key: 'getResolvingCodes',
value: value_67064}, {key: 'getResolvedCodes', value: value_67065}, {key: 'getAcceptingCodes',
value: value_67066}]);
}
function LOAD_ARCHIVED_THREADS_SUCCESS_67051({firstMessages}) { // fn#67051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:1590, offset: 0x01c14cba, size: 46 bytes, params: 2, frame: 11
if (firstMessages == null) {
return false;
}
if (firstMessages != null) {
firstMessages.forEach(function(a0) {
resolveMessageGiftCodes(a0);
return false;
});
}
function _fun67052(a0) { // fn#67052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:1683, offset: 0x01c14ce8, size: 21 bytes, params: 2, frame: 11
resolveMessageGiftCodes(a0);
return false;
}
function CONNECTION_OPEN_67067() { // fn#67067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:2953, offset: 0x01c14fef, size: 21 bytes, params: 1, frame: 9
env0_20.clear();
return false;
}
function CHANNEL_SELECT_67068({channelId}) { // fn#67068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:3021, offset: 0x01c15004, size: 35 bytes, params: 2, frame: 11
if (channelId != null) {
env0_20.add(channelId);
}
return false;
}
function GIFT_CODE_RESOLVE_SUCCESS_67069({giftCode}) { // fn#67069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:3160, offset: 0x01c15027, size: 116 bytes, params: 2, frame: 15
var binding2;
var items2;
var value2;
let binding = env0_14;
env0_14 = binding.filter(function(a0) {
return a0 !== giftCode.code;
});
binding = env0_16;
if (!binding.includes(giftCode.code)) {
binding2 = env0_16;
items2 = [];
value2 = arraySpread(items2, binding2, 0, binding);
items2[value2] = giftCode.code;
value2 + 1;
}
updateGiftCode(giftCode);
}
function _fun67053(a0) { // fn#67053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:1721, offset: 0x01c14cfd, size: 338 bytes, params: 2, frame: 16
const GiftCodeStore2 = GiftCodeStore;
Inherits(GiftCodeStore2, a0);
return CreateClass(GiftCodeStore2, [{key: 'get', value: value_67055}, {key: 'getError', value: value_67056},
{key: 'getForGifterSKUAndPlan', value: value_67057}, {key: 'getIsResolving', value: value_67059},
{key: 'getIsResolved', value: value_67060}, {key: 'getIsAccepting', value: value_67061},
{key: 'getUserGiftCodesFetchingForSKUAndPlan', value: value_67062},
{key: 'getUserGiftCodesLoadedAtForSKUAndPlan', value: value_67063}, {key: 'getResolvingCodes',
value: value_67064}, {key: 'getResolvedCodes', value: value_67065}, {key: 'getAcceptingCodes',
value: value_67066}]);
function GiftCodeStore() { // fn#67054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:1733, offset: 0x00e3fd08, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, GiftCodeStore);
const value3 = env1_6(GiftCodeStore);
return env1_5(this, _isNativeReflectConstruct_67038() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function GIFT_CODE_RESOLVE_FAILURE({code, error}) { // fn#67071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:3330, offset: 0x01c150b0, size: 115 bytes, params: 2, frame: 16
var binding3;
var items2;
var value2;
const binding = env0_14;
env0_14 = binding.filter(function(a0) {
return a0 !== code;
});
const binding2 = env0_16;
if (!binding2.includes(code)) {
binding3 = env0_16;
items2 = [];
value2 = arraySpread(items2, binding3, 0, binding);
items2[value2] = code;
value2 + 1;
}
if (error != null) {
env0_19[code] = error;
}
}
function value_67055(a0) { // fn#67055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:2009, offset: 0x01c14e4f, size: 51 bytes, params: 2, frame: 12
let value = environment.__proto__;
value = env1_13.get(a0);
const value2 = null;
return value2 == value || value.isExpired() ? value2 : value;
}
function GIFT_CODE_REDEEM_67073({code}) { // fn#67073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:3473, offset: 0x01c15123, size: 65 bytes, params: 2, frame: 15
var items2;
var value2;
let binding = env0_15;
if (!binding.includes(code)) {
binding = env0_15;
items2 = [];
value2 = arraySpread(items2, binding, 0, undefined);
items2[value2] = code;
value2 + 1;
}
}
function value_67056(a0) { // fn#67056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:2097, offset: 0x01c14e82, size: 25 bytes, params: 2, frame: 3
const value = null;
return value != a0 ? env1_19[a0] : value;
}
function GIFT_CODE_REDEEM_SUCCESS({code}) { // fn#67074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:3567, offset: 0x01c15164, size: 119 bytes, params: 2, frame: 17
let binding = env0_15;
env0_15 = binding.filter(function(a0) {
return a0 !== code;
});
const value2 = env0_13.get(code);
if (value2 != null) {
binding = env0_13;
binding.set(code, value2.merge({redeemed: true, uses: value2.uses + 1}));
}
}
function value_67057(a0, a1, a2) { // fn#67057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:2172, offset: 0x01c14e9b, size: 76 bytes, params: 4, frame: 13
var environment;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const Array = global.Array;
const from = Array.from;
const value = environment.__proto__;
const binding = env1_13;
return Reflect.apply(from, Array, [binding.values()]).filter(_fun67058);
function _fun67058(a0) { // fn#67058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:2226, offset: 0x01c14ee7, size: 86 bytes, params: 2, frame: 12
const userId = a0.userId;
return userId === env0_0 && a0.skuId === require && (importDefault == null || a0.subscriptionPlanId === importDefault) && !a0.isExpired();
}
function GIFT_CODE_REDEEM_FAILURE({code, error}) { // fn#67076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:3733, offset: 0x01c151db, size: 182 bytes, params: 2, frame: 17
var code2;
let binding = env0_15;
env0_15 = binding.filter(function(a0) {
return a0 !== code;
});
const value2 = env0_13.get(code);
env0_19[code] = error;
if (value2 != null) {
code2 = error.code;
if (AbortCodes.UNKNOWN_GIFT_CODE === code2) {
binding = env0_13;
binding.set(code, value2.set('revoked', true));
} else if (AbortCodes.INVALID_GIFT_REDEMPTION_EXHAUSTED === code2) {
binding = env0_13;
binding.set(code, value2.set('uses', value2.maxUses));
}
function value_67059(a0) { // fn#67059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:2340, offset: 0x01c14f3d, size: 22 bytes, params: 2, frame: 11
return env1_14.includes(a0);
}
function value_67060(a0) { // fn#67060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:2402, offset: 0x01c14f53, size: 22 bytes, params: 2, frame: 11
return env1_16.includes(a0);
}
function value_67061(a0) { // fn#67061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:2465, offset: 0x01c14f69, size: 22 bytes, params: 2, frame: 11
return env1_15.includes(a0);
}
function value_67062(a0, a1) { // fn#67062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:2551, offset: 0x01c14f7f, size: 59 bytes, params: 3, frame: 15
let value = environment.__proto__;
const binding = env1_17;
const has = binding.has;
value = require(4129) /* metro dependency 4129: GiftCodeUtils */;
return Reflect.apply(has, binding, [value.makeComboId(a0, a1)]);
}
function value_67063(a0, a1) { // fn#67063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:2657, offset: 0x01c14fba, size: 53 bytes, params: 3, frame: 14
let value = environment.__proto__;
const binding = env1_18;
value = require(4129) /* metro dependency 4129: GiftCodeUtils */;
return binding[value.makeComboId(a0, a1)];
}
function value_67064() { // fn#67064, offset: 0x00df0f5a, size: 9 bytes, params: 1, frame: 1
return env1_14;
}
function value_67065() { // fn#67065, offset: 0x00df0e94, size: 9 bytes, params: 1, frame: 1
return env1_16;
}
function value_67066() { // fn#67066, offset: 0x00df0e8b, size: 9 bytes, params: 1, frame: 1
return env1_15;
}
}
function CONNECTION_OPEN_67067() { // fn#67067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:2953, offset: 0x01c14fef, size: 21 bytes, params: 1, frame: 9
env0_20.clear();
return false;
}
function CHANNEL_SELECT_67068({channelId}) { // fn#67068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:3021, offset: 0x01c15004, size: 35 bytes, params: 2, frame: 11
if (channelId != null) {
env0_20.add(channelId);
}
return false;
}
function GIFT_CODE_RESOLVE_SUCCESS_67069({giftCode}) { // fn#67069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:3160, offset: 0x01c15027, size: 116 bytes, params: 2, frame: 15
var binding2;
var items2;
var value2;
let binding = env0_14;
env0_14 = binding.filter(function(a0) {
return a0 !== giftCode.code;
});
binding = env0_16;
if (!binding.includes(giftCode.code)) {
binding2 = env0_16;
items2 = [];
value2 = arraySpread(items2, binding2, 0, binding);
items2[value2] = giftCode.code;
value2 + 1;
}
updateGiftCode(giftCode);
}
function GIFT_CODE_RESOLVE_FAILURE({code, error}) { // fn#67071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:3330, offset: 0x01c150b0, size: 115 bytes, params: 2, frame: 16
var binding3;
var items2;
var value2;
const binding = env0_14;
env0_14 = binding.filter(function(a0) {
return a0 !== code;
});
const binding2 = env0_16;
if (!binding2.includes(code)) {
binding3 = env0_16;
items2 = [];
value2 = arraySpread(items2, binding3, 0, binding);
items2[value2] = code;
value2 + 1;
}
if (error != null) {
env0_19[code] = error;
}
}
}
function GIFT_CODE_REVOKE_SUCCESS({code}) { // fn#67078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:4020, offset: 0x01c15291, size: 111 bytes, params: 2, frame: 15
var items2;
var value2;
let binding = env0_13;
binding.delete(code);
const property = env0_12[code];
if (property != null) {
property.stop();
delete env0_12[code];
function GIFT_CODE_REDEEM_67073({code}) { // fn#67073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:3473, offset: 0x01c15123, size: 65 bytes, params: 2, frame: 15
var items2;
var value2;
let binding = env0_15;
if (!binding.includes(code)) {
binding = env0_15;
items2 = [];
value2 = arraySpread(items2, binding, 0, undefined);
items2[value2] = code;
value2 + 1;
}
}
if (!Reflect.apply(env0_16.includes, binding, [code])) {
binding = env0_16;
items2 = [];
value2 = arraySpread(items2, binding, 0, undefined);
items2[value2] = code;
value2 + 1;
function GIFT_CODE_REDEEM_SUCCESS({code}) { // fn#67074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:3567, offset: 0x01c15164, size: 119 bytes, params: 2, frame: 17
let binding = env0_15;
env0_15 = binding.filter(function(a0) {
return a0 !== code;
});
const value2 = env0_13.get(code);
if (value2 != null) {
binding = env0_13;
binding.set(code, value2.merge({redeemed: true, uses: value2.uses + 1}));
}
}
}
function GIFT_CODES_FETCH({skuId, subscriptionPlanId}) { // fn#67080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:4249, offset: 0x01c15319, size: 67 bytes, params: 2, frame: 16
const binding = env0_17;
const add = binding.add;
const giftCodeUtilsModule = require(4129) /* metro dependency 4129: GiftCodeUtils */;
Reflect.apply(add, binding, [giftCodeUtilsModule.makeComboId(skuId, subscriptionPlanId)]);
}
function GIFT_CODES_FETCH_SUCCESS({giftCodes, skuId, subscriptionPlanId}) { // fn#67081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:4369, offset: 0x01c1535c, size: 112 bytes, params: 2, frame: 15
giftCodes.forEach(updateGiftCode);
const comboId = (require(4129) /* metro dependency 4129: GiftCodeUtils */).makeComboId(skuId, subscriptionPlanId);
const binding = env0_18;
const Date = global.Date;
binding[comboId] = Date.now();
env0_17.delete(comboId);
}
function GIFT_CODES_FETCH_FAILURE({skuId, subscriptionPlanId}) { // fn#67082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:4561, offset: 0x01c153cc, size: 67 bytes, params: 2, frame: 16
const binding = env0_17;
const giftCodeUtilsModule = require(4129) /* metro dependency 4129: GiftCodeUtils */;
binding.delete(giftCodeUtilsModule.makeComboId(skuId, subscriptionPlanId));
}
function LOAD_RECENT_MENTIONS_SUCCESS_67083({messages}) { // fn#67083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:4880, offset: 0x01c1540f, size: 32 bytes, params: 2, frame: 11
messages.forEach(function(a0) {
resolveMessageGiftCodes(a0);
return false;
});
}
function LOAD_PINNED_MESSAGES_SUCCESS_67085({pins}) { // fn#67085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:5001, offset: 0x01c1542f, size: 32 bytes, params: 2, frame: 11
pins.forEach(function({message}) {
resolveMessageGiftCodes(message);
return false;
});
}
function SEARCH_MESSAGES_SUCCESS_67087({data}) { // fn#67087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:5125, offset: 0x01c15469, size: 31 bytes, params: 2, frame: 11
data.forEach(function({messages}) {
messages.forEach(_fun67089);
});
}
function GIFT_CODE_UPDATE({uses, code}) { // fn#67091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:5282, offset: 0x01c154d7, size: 96 bytes, params: 2, frame: 18
var set;
var set2;
var Math;
let binding = env0_13;
const value2 = binding.get(code);
if (value2 != null) {
binding = env0_13;
set = binding.set;
set2 = value2.set;
Math = global.Math;
Reflect.apply(set, binding, [code, Reflect.apply(set2, value2, ['uses', Math.max(value2.uses, uses)])]);
function GIFT_CODE_REDEEM_FAILURE({code, error}) { // fn#67076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:3733, offset: 0x01c151db, size: 182 bytes, params: 2, frame: 17
var code2;
let binding = env0_15;
env0_15 = binding.filter(function(a0) {
return a0 !== code;
});
const value2 = env0_13.get(code);
env0_19[code] = error;
if (value2 != null) {
code2 = error.code;
if (AbortCodes.UNKNOWN_GIFT_CODE === code2) {
binding = env0_13;
binding.set(code, value2.set('revoked', true));
} else if (AbortCodes.INVALID_GIFT_REDEMPTION_EXHAUSTED === code2) {
binding = env0_13;
binding.set(code, value2.set('uses', value2.maxUses));
}
}
}
}
function LOAD_FORUM_POSTS_67092({threads}) { // fn#67092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:5514, offset: 0x01c15537, size: 50 bytes, params: 2, frame: 11
const Object = global.Object;
Object.values(threads).map(_fun67093);
}
function _fun67043() { // fn#67043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:902, offset: 0x01c14a78, size: 23 bytes, params: 1, frame: 11
checkGiftCodeExpiry(env0_0);
}
function _fun67045(a0) { // fn#67045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:1201, offset: 0x01c14b63, size: 105 bytes, params: 2, frame: 14
var environment;
const env0_0 = a0;
const value = environment.__proto__;
if (!(env1_14.includes(a0) || env1_16.includes(a0))) {
GIFT_CODE_RESOLVE_67047({code: a0});
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun67046);
function GIFT_CODE_REVOKE_SUCCESS({code}) { // fn#67078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:4020, offset: 0x01c15291, size: 111 bytes, params: 2, frame: 15
var items2;
var value2;
let binding = env0_13;
binding.delete(code);
const property = env0_12[code];
if (property != null) {
property.stop();
delete env0_12[code];
}
if (!Reflect.apply(env0_16.includes, binding, [code])) {
binding = env0_16;
items2 = [];
value2 = arraySpread(items2, binding, 0, undefined);
items2[value2] = code;
value2 + 1;
}
}
}
function value_67055(a0) { // fn#67055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:2009, offset: 0x01c14e4f, size: 51 bytes, params: 2, frame: 12
let value = environment.__proto__;
value = env1_13.get(a0);
const value2 = null;
return value2 == value || value.isExpired() ? value2 : value;
}
function value_67056(a0) { // fn#67056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:2097, offset: 0x01c14e82, size: 25 bytes, params: 2, frame: 3
const value = null;
return value != a0 ? env1_19[a0] : value;
}
function value_67057(a0, a1, a2) { // fn#67057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:2172, offset: 0x01c14e9b, size: 76 bytes, params: 4, frame: 13
var environment;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const Array = global.Array;
const from = Array.from;
const value = environment.__proto__;
const binding = env1_13;
return Reflect.apply(from, Array, [binding.values()]).filter(_fun67058);
}
function value_67059(a0) { // fn#67059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:2340, offset: 0x01c14f3d, size: 22 bytes, params: 2, frame: 11
return env1_14.includes(a0);
}
function value_67060(a0) { // fn#67060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:2402, offset: 0x01c14f53, size: 22 bytes, params: 2, frame: 11
return env1_16.includes(a0);
}
function value_67061(a0) { // fn#67061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:2465, offset: 0x01c14f69, size: 22 bytes, params: 2, frame: 11
return env1_15.includes(a0);
}
function value_67062(a0, a1) { // fn#67062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:2551, offset: 0x01c14f7f, size: 59 bytes, params: 3, frame: 15
let value = environment.__proto__;
const binding = env1_17;
const has = binding.has;
value = require(4129) /* metro dependency 4129: GiftCodeUtils */;
return Reflect.apply(has, binding, [value.makeComboId(a0, a1)]);
}
function value_67063(a0, a1) { // fn#67063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:2657, offset: 0x01c14fba, size: 53 bytes, params: 3, frame: 14
let value = environment.__proto__;
const binding = env1_18;
value = require(4129) /* metro dependency 4129: GiftCodeUtils */;
return binding[value.makeComboId(a0, a1)];
}
function _fun67088({messages}) { // fn#67088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:5183, offset: 0x01c15488, size: 32 bytes, params: 2, frame: 11
messages.forEach(function(a0) {
a0.forEach(_fun67090);
});
}
function _fun67093({first_message}) { // fn#67093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:5579, offset: 0x01c15569, size: 36 bytes, params: 2, frame: 12
var r0;
let value = first_message != null;
if (value) {
value = environment.__proto__;
resolveMessageGiftCodes(first_message);
value = false;
r0 = value;
} else {
r0 = value;
function GIFT_CODES_FETCH({skuId, subscriptionPlanId}) { // fn#67080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:4249, offset: 0x01c15319, size: 67 bytes, params: 2, frame: 16
const binding = env0_17;
const add = binding.add;
Reflect.apply(add, binding, [GiftCodeUtilsModule.makeComboId(skuId, subscriptionPlanId)]);
}
return r0;
}
function _fun67046() { // fn#67046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:1283, offset: 0x01c14bcc, size: 66 bytes, params: 1, frame: 16
return (importDefault(8451) /* metro dependency 8451: GiftCodeActionCreators */).resolveGiftCode(env0_0, false,
true).catch(NOOP_NULL);
}
function _fun67058(a0) { // fn#67058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:2226, offset: 0x01c14ee7, size: 86 bytes, params: 2, frame: 12
const userId = a0.userId;
return userId === env0_0 && a0.skuId === require && (importDefault == null || a0.subscriptionPlanId === importDefault) && !a0.isExpired();
}
function _fun67089(a0) { // fn#67089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:5211, offset: 0x01c154a8, size: 26 bytes, params: 2, frame: 11
a0.forEach(function(a0) {
resolveMessageGiftCodes(a0);
return false;
});
function GIFT_CODES_FETCH_SUCCESS({giftCodes, skuId, subscriptionPlanId}) { // fn#67081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:4369, offset: 0x01c1535c, size: 112 bytes, params: 2, frame: 15
giftCodes.forEach(updateGiftCode);
const comboId = (GiftCodeUtilsModule).makeComboId(skuId, subscriptionPlanId);
const binding = env0_18;
const Date = global.Date;
binding[comboId] = Date.now();
env0_17.delete(comboId);
}
function GIFT_CODES_FETCH_FAILURE({skuId, subscriptionPlanId}) { // fn#67082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:4561, offset: 0x01c153cc, size: 67 bytes, params: 2, frame: 16
const binding = env0_17;
binding.delete(GiftCodeUtilsModule.makeComboId(skuId, subscriptionPlanId));
}
function LOAD_RECENT_MENTIONS_SUCCESS_67083({messages}) { // fn#67083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:4880, offset: 0x01c1540f, size: 32 bytes, params: 2, frame: 11
messages.forEach(function(a0) {
resolveMessageGiftCodes(a0);
return false;
});
function _fun67084(a0) { // fn#67084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:4939, offset: 0x01c14ce8, size: 21 bytes, params: 2, frame: 11
resolveMessageGiftCodes(a0);
return false;
}
}
function LOAD_PINNED_MESSAGES_SUCCESS_67085({pins}) { // fn#67085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:5001, offset: 0x01c1542f, size: 32 bytes, params: 2, frame: 11
pins.forEach(function({message}) {
resolveMessageGiftCodes(message);
return false;
});
function _fun67086({message}) { // fn#67086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:5056, offset: 0x01c1544f, size: 26 bytes, params: 2, frame: 11
resolveMessageGiftCodes(message);
return false;
}
}
function SEARCH_MESSAGES_SUCCESS_67087({data}) { // fn#67087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:5125, offset: 0x01c15469, size: 31 bytes, params: 2, frame: 11
data.forEach(function({messages}) {
messages.forEach(_fun67089);
});
function _fun67088({messages}) { // fn#67088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:5183, offset: 0x01c15488, size: 32 bytes, params: 2, frame: 11
messages.forEach(function(a0) {
a0.forEach(_fun67090);
});
function _fun67089(a0) { // fn#67089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:5211, offset: 0x01c154a8, size: 26 bytes, params: 2, frame: 11
a0.forEach(function(a0) {
resolveMessageGiftCodes(a0);
return false;
});
function _fun67090(a0) { // fn#67090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:5226, offset: 0x01c154c2, size: 21 bytes, params: 2, frame: 11
resolveMessageGiftCodes(a0);
return false;
}
}
}
}
function GIFT_CODE_UPDATE({uses, code}) { // fn#67091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:5282, offset: 0x01c154d7, size: 96 bytes, params: 2, frame: 18
var set;
var set2;
var Math;
let binding = env0_13;
const value2 = binding.get(code);
if (value2 != null) {
binding = env0_13;
set = binding.set;
set2 = value2.set;
Math = global.Math;
Reflect.apply(set, binding, [code, Reflect.apply(set2, value2, ['uses', Math.max(value2.uses, uses)])]);
}
}
function LOAD_FORUM_POSTS_67092({threads}) { // fn#67092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:5514, offset: 0x01c15537, size: 50 bytes, params: 2, frame: 11
const Object = global.Object;
Object.values(threads).map(_fun67093);
function _fun67093({first_message}) { // fn#67093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8635:5579, offset: 0x01c15569, size: 36 bytes, params: 2, frame: 12
var r0;
let value = first_message != null;
if (value) {
value = environment.__proto__;
resolveMessageGiftCodes(first_message);
value = false;
r0 = value;
} else {
r0 = value;
}
return r0;
}
}
}
global.__d(_fun67037, 8450, [6, 7, 15, 17, 18, 7671, 661, 4041, 3738, 4129, 694, 8451, 566,
2]) /* metro module 8450, dependencies: [6, 7, 15, 17, 18, 7671, 661, 4041, 3738, 4129, 694, 8451, 566, 2] */;
+99 -82
View File
@@ -1,19 +1,22 @@
/* Metro module 9575; source: stores/GuildAffinitiesStore.tsx; dependencies: [6, 7, 15, 17, 18, 1867, 9576, 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 GuildStore from './GuildStore.tsx'; /* Metro dependency 1867 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun74915(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9761:6, offset: 0x01d9dbf2, size: 342 bytes, params: 8, frame: 19
const env0_0 = require;
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 guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
let env0_8 = {};
(function() {
env0_8 = {guildAffinitiesByGuildId: {}, guildAffinities: [], lastFetched: 0};
})();
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
let value = _fun74920(PersistedStore);
value.displayName = 'GuildAffinitiesStore';
value.persistKey = 'GuildAffinitiesStore';
@@ -22,90 +25,104 @@ function _fun74915(global, require, importDefault, importAll, module, exports, d
LOGOUT: function() {
setDefaultState();
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/GuildAffinitiesStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/GuildAffinitiesStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_74916() { // fn#74916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9761:158, offset: 0x01d9dd48, 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) {
function _isNativeReflectConstruct_74916() { // fn#74916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9761:158, offset: 0x01d9dd48, 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_74916_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_74916_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun74920(a0) { // fn#74920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9761:471, offset: 0x01d9ddce, size: 174 bytes, params: 2, frame: 16
const closure = GuildAffinitiesStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: value_74922}, {key: 'getState', value: value_74923},
{key: 'getGuildAffinity', value: value_74924}, {key: 'affinities', get: get_74925}, {key: 'hasRequestResolved',
get: get_74926}]);
}
function _fun74920(a0) { // fn#74920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9761:471, offset: 0x01d9ddce, size: 174 bytes, params: 2, frame: 16
const GuildAffinitiesStore2 = GuildAffinitiesStore;
Inherits(GuildAffinitiesStore2, a0);
return CreateClass(GuildAffinitiesStore2, [{key: 'initialize', value: value_74922}, {key: 'getState',
value: value_74923}, {key: 'getGuildAffinity', value: value_74924}, {key: 'affinities', get: get_74925},
{key: 'hasRequestResolved', get: get_74926}]);
function GuildAffinitiesStore() { // fn#74921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9761:483, offset: 0x00ec62ac, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, GuildAffinitiesStore);
const value3 = env1_5(GuildAffinitiesStore);
return env1_4(this, _isNativeReflectConstruct_74916() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_74922(a0) { // fn#74922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9761:801, offset: 0x01d9de7c, size: 41 bytes, params: 2, frame: 11
var value;
if (a0 != null) {
value = environment.__proto__;
env1_8 = a0;
}
this.waitFor(GuildStore);
}
function value_74923() { // fn#74923, offset: 0x00fbd9d4, size: 9 bytes, params: 1, frame: 1
return env1_8;
}
function value_74924(a0) { // fn#74924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9761:920, offset: 0x01d9dea5, size: 22 bytes, params: 2, frame: 2
return env1_8.guildAffinitiesByGuildId[a0];
}
function get_74925() { // fn#74925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9761:993, offset: 0x01d9debb, size: 15 bytes, params: 1, frame: 1
return env1_8.guildAffinities;
}
function get_74926() { // fn#74926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9761:1061, offset: 0x01d9deca, size: 21 bytes, params: 1, frame: 2
return env1_8.lastFetched !== 0;
}
function CONNECTION_OPEN_74927() { // fn#74927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9761:1236, offset: 0x01d9dedf, size: 80 bytes, params: 1, frame: 11
const Date = global.Date;
if (Date.now() - env0_8.lastFetched > 86400000) {
(require(9576) /* metro dependency 9576: GuildAffinitiesActionCreators */).fetchGuildAffinities();
}
return false;
}
function LOAD_GUILD_AFFINITIES_SUCCESS({guildAffinities}) { // fn#74928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9761:1372, offset: 0x01d9df2f, size: 88 bytes, params: 2, frame: 12
let binding = env0_8;
binding.guildAffinities = [];
env0_8.guildAffinitiesByGuildId = {};
binding = env0_8;
const Date = global.Date;
binding.lastFetched = Date.now();
guildAffinities.forEach(_fun74929);
}
function value_74922(a0) { // fn#74922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9761:801, offset: 0x01d9de7c, size: 41 bytes, params: 2, frame: 11
var value;
if (a0 != null) {
value = environment.__proto__;
env1_8 = a0;
function CONNECTION_OPEN_74927() { // fn#74927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9761:1236, offset: 0x01d9dedf, size: 80 bytes, params: 1, frame: 11
const Date = global.Date;
if (Date.now() - env0_8.lastFetched > 86400000) {
(require(9576) /* metro dependency 9576: GuildAffinitiesActionCreators */).fetchGuildAffinities();
}
return false;
}
this.waitFor(GuildStore);
}
function value_74924(a0) { // fn#74924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9761:920, offset: 0x01d9dea5, size: 22 bytes, params: 2, frame: 2
return env1_8.guildAffinitiesByGuildId[a0];
}
function LOAD_GUILD_AFFINITIES_SUCCESS({guildAffinities}) { // fn#74928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9761:1372, offset: 0x01d9df2f, size: 88 bytes, params: 2, frame: 12
let binding = env0_8;
binding.guildAffinities = [];
env0_8.guildAffinitiesByGuildId = {};
binding = env0_8;
const Date = global.Date;
binding.lastFetched = Date.now();
guildAffinities.forEach(_fun74929);
function _fun74929({affinity, guild_id}, a1) { // fn#74929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9761:1522, offset: 0x01d9df87, size: 73 bytes, params: 3, frame: 12
const object = {score: affinity, guildId: guild_id, index: a1};
env1_8.guildAffinitiesByGuildId[guild_id] = object;
env1_8.guildAffinities.push(object);
}
function get_74925() { // fn#74925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9761:993, offset: 0x01d9debb, size: 15 bytes, params: 1, frame: 1
return env1_8.guildAffinities;
}
}
function get_74926() { // fn#74926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9761:1061, offset: 0x01d9deca, size: 21 bytes, params: 1, frame: 2
return env1_8.lastFetched !== 0;
}
function _fun74929({affinity, guild_id}, a1) { // fn#74929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9761:1522, offset: 0x01d9df87, size: 73 bytes, params: 3, frame: 12
const object2 = {score: affinity, guildId: guild_id, index: a1};
env1_8.guildAffinitiesByGuildId[guild_id] = object2;
env1_8.guildAffinities.push(object2);
}
global.__d(_fun74915, 9575, [6, 7, 15, 17, 18, 1867, 9576, 566, 694,
2]) /* metro module 9575, dependencies: [6, 7, 15, 17, 18, 1867, 9576, 566, 694, 2] */;
+148 -120
View File
@@ -1,144 +1,172 @@
/* Metro module 4646; source: stores/GuildAvailabilityStore.tsx; dependencies: [6, 7, 15, 17, 18, 1867, 3, 566, 694, 2] */
import Logger from '../modules/debug/Logger.tsx'; /* Metro dependency 3 */
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 GuildStore from './GuildStore.tsx'; /* Metro dependency 1867 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun40005(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:6, offset: 0x010f25f6, size: 394 bytes, params: 8, frame: 21
const closure = CONNECTION_OPEN_40009;
const closure2 = GUILD_CREATE_40010;
const CONNECTION_OPEN_400092 = CONNECTION_OPEN_40009;
const GUILD_CREATE_400102 = GUILD_CREATE_40010;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('GuildAvailabilityStore');
const Set = global.Set;
let set = new Set();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun40011(Store).displayName = 'GuildAvailabilityStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: closure,
OVERLAY_INITIALIZE: closure, GUILD_UNAVAILABLE: GUILD_UNAVAILABLE, GUILD_DELETE: GUILD_DELETE_40019,
GUILD_CREATE: closure2, GUILD_UPDATE: closure2, GUILD_GEO_RESTRICTED: GUILD_GEO_RESTRICTED});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/GuildAvailabilityStore.tsx');
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: CONNECTION_OPEN_400092,
OVERLAY_INITIALIZE: CONNECTION_OPEN_400092, GUILD_UNAVAILABLE: GUILD_UNAVAILABLE,
GUILD_DELETE: GUILD_DELETE_40019, GUILD_CREATE: GUILD_CREATE_400102, GUILD_UPDATE: GUILD_CREATE_400102,
GUILD_GEO_RESTRICTED: GUILD_GEO_RESTRICTED});
(FileImportTrackerModule).fileFinishedImporting('stores/GuildAvailabilityStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_40006() { // fn#40006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:158, offset: 0x010f2780, 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) {
function _isNativeReflectConstruct_40006() { // fn#40006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:158, offset: 0x010f2780, 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_40006_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_40006_isNativeReflectConstruct = function() {
return !!result;
})();
}
function CONNECTION_OPEN_40009(a0) { // fn#40009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:406, offset: 0x010f27de, size: 124 bytes, params: 2, frame: 17
var binding;
var warn;
const Set = global.Set;
let unavailableGuilds = a0.unavailableGuilds;
const set = new Set(unavailableGuilds);
let length = a0.unavailableGuilds.length;
if (length > 0) {
binding = env0_6;
warn = binding.warn;
unavailableGuilds = a0.unavailableGuilds;
length = unavailableGuilds.length;
unavailableGuilds = a0.unavailableGuilds;
Reflect.apply(warn, binding,
['' + length + ' guilds are unavailable on connection open: ' + unavailableGuilds]);
function CONNECTION_OPEN_40009(a0) { // fn#40009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:406, offset: 0x010f27de, size: 124 bytes, params: 2, frame: 17
var binding;
var warn;
const Set = global.Set;
let unavailableGuilds = a0.unavailableGuilds;
const set = new Set(unavailableGuilds);
let length = a0.unavailableGuilds.length;
if (length > 0) {
binding = env0_6;
warn = binding.warn;
unavailableGuilds = a0.unavailableGuilds;
length = unavailableGuilds.length;
unavailableGuilds = a0.unavailableGuilds;
Reflect.apply(warn, binding,
['' + length + ' guilds are unavailable on connection open: ' + unavailableGuilds]);
}
}
}
function GUILD_CREATE_40010(a0) { // fn#40010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:606, offset: 0x010f285a, size: 114 bytes, params: 2, frame: 13
var info;
let binding = env0_7;
const has = binding.has;
let guild = a0.guild;
let id = guild.id;
if (Reflect.apply(has, binding, [id])) {
binding = env0_7;
guild = a0.guild;
id = guild.id;
binding.delete(id);
binding = env0_6;
info = binding.info;
guild = a0.guild;
id = guild.id;
Reflect.apply(info, binding, ['Guild has become available: ' + id]);
return undefined;
}
return false;
}
function _fun40011(a0) { // fn#40011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:740, offset: 0x010f28cc, size: 162 bytes, params: 2, frame: 16
const closure = GuildAvailabilityStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: function() {
this.waitFor(GuildStore);
}}, {key: 'isUnavailable', value: value_40014}, {key: 'totalGuilds', get: get_40015},
{key: 'totalUnavailableGuilds', get: get_40016}, {key: 'unavailableGuilds', get: get_40017}]);
}
function GUILD_UNAVAILABLE(a0) { // fn#40018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:1540, offset: 0x010f29d6, size: 167 bytes, params: 2, frame: 21
let binding = env0_7;
if (binding.has(a0.guildId)) {
function GUILD_CREATE_40010(a0) { // fn#40010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:606, offset: 0x010f285a, size: 114 bytes, params: 2, frame: 13
var info;
let binding = env0_7;
const has = binding.has;
let guild = a0.guild;
let id = guild.id;
if (Reflect.apply(has, binding, [id])) {
binding = env0_7;
guild = a0.guild;
id = guild.id;
binding.delete(id);
binding = env0_6;
info = binding.info;
guild = a0.guild;
id = guild.id;
Reflect.apply(info, binding, ['Guild has become available: ' + id]);
return undefined;
}
return false;
}
const guild = GuildStore.getGuild(a0.guildId);
const name = guild != null && guild.name != null ? guild.name : '???';
binding = env0_6;
binding.warn('Guild has gone unavailable: ' + a0.guildId + ' (' + name + ')');
binding = env0_7;
binding.add(a0.guildId);
}
function GUILD_DELETE_40019(a0) { // fn#40019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:1763, offset: 0x010f2a7d, size: 51 bytes, params: 2, frame: 11
if (a0.guild.unavailable !== true) {
env0_7.delete(a0.guild.id);
function _fun40011(a0) { // fn#40011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:740, offset: 0x010f28cc, size: 162 bytes, params: 2, frame: 16
const GuildAvailabilityStore2 = GuildAvailabilityStore;
Inherits(GuildAvailabilityStore2, a0);
return CreateClass(GuildAvailabilityStore2, [{key: 'initialize', value: function() {
this.waitFor(GuildStore);
}}, {key: 'isUnavailable', value: value_40014}, {key: 'totalGuilds', get: get_40015},
{key: 'totalUnavailableGuilds', get: get_40016}, {key: 'unavailableGuilds', get: get_40017}]);
function GuildAvailabilityStore() { // fn#40012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:752, offset: 0x00e4046a, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, GuildAvailabilityStore);
const value3 = env1_3(GuildAvailabilityStore);
return env1_2(this, _isNativeReflectConstruct_40006() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_40014(a0) { // fn#40014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:1136, offset: 0x010f296e, size: 31 bytes, params: 2, frame: 12
var r0;
let value = a0 != null;
if (value) {
value = environment.__proto__;
value = env1_7.has(a0);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function get_40015() { // fn#40015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:1198, offset: 0x010f298d, size: 32 bytes, params: 1, frame: 10
return GuildStore.getGuildCount() + env1_7.size;
}
function get_40016() { // fn#40016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:1277, offset: 0x010f29ad, size: 14 bytes, params: 1, frame: 1
return env1_7.size;
}
function get_40017() { // fn#40017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:1333, offset: 0x010f29bb, size: 27 bytes, params: 1, frame: 11
const Array = global.Array;
return Array.from(env1_7);
}
}
}
function GUILD_GEO_RESTRICTED(a0) { // fn#40020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:1912, offset: 0x010f2ab0, size: 55 bytes, params: 2, frame: 13
const binding = env0_7;
if (binding.has(a0.guildId)) {
env0_7.delete(a0.guildId);
return undefined;
function GUILD_UNAVAILABLE(a0) { // fn#40018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:1540, offset: 0x010f29d6, size: 167 bytes, params: 2, frame: 21
let binding = env0_7;
if (binding.has(a0.guildId)) {
return false;
}
const guild = GuildStore.getGuild(a0.guildId);
const name = guild != null && guild.name != null ? guild.name : '???';
binding = env0_6;
binding.warn('Guild has gone unavailable: ' + a0.guildId + ' (' + name + ')');
binding = env0_7;
binding.add(a0.guildId);
}
return false;
}
function get_40015() { // fn#40015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:1198, offset: 0x010f298d, size: 32 bytes, params: 1, frame: 10
return GuildStore.getGuildCount() + env1_7.size;
}
function GUILD_DELETE_40019(a0) { // fn#40019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:1763, offset: 0x010f2a7d, size: 51 bytes, params: 2, frame: 11
if (a0.guild.unavailable !== true) {
env0_7.delete(a0.guild.id);
}
}
function get_40016() { // fn#40016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:1277, offset: 0x010f29ad, size: 14 bytes, params: 1, frame: 1
return env1_7.size;
}
function GUILD_GEO_RESTRICTED(a0) { // fn#40020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:1912, offset: 0x010f2ab0, size: 55 bytes, params: 2, frame: 13
const binding = env0_7;
if (binding.has(a0.guildId)) {
env0_7.delete(a0.guildId);
return undefined;
}
return false;
}
function get_40017() { // fn#40017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:1333, offset: 0x010f29bb, size: 27 bytes, params: 1, frame: 11
const Array = global.Array;
return Array.from(env1_7);
}
global.__d(_fun40005, 4646, [6, 7, 15, 17, 18, 1867, 3, 566, 694,
2]) /* metro module 4646, dependencies: [6, 7, 15, 17, 18, 1867, 3, 566, 694, 2] */;
+328 -292
View File
@@ -1,4 +1,19 @@
/* Metro module 5098; source: stores/GuildCategoryStore.tsx; dependencies: [6, 7, 15, 17, 18, 1382, 1226, 1379, 1935, 1867, 661, 5099, 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 './AuthenticationStore.tsx'; /* Metro dependency 1226 */
import ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */
import FavoriteStore from '../modules/favorites/FavoriteStore.tsx'; /* Metro dependency 1382 */
import GuildStore from './GuildStore.tsx'; /* Metro dependency 1867 */
import GuildChannelStore from './GuildChannelStore.tsx'; /* Metro dependency 1935 */
import GetFlattedChannelList from '../modules/channel/getFlattedChannelList.tsx'; /* Metro dependency 5099 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as GuildChannelStoreModule from './GuildChannelStore.tsx'; /* Metro dependency 1935 */
function _fun44492(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:6, offset: 0x011722a2, size: 642 bytes, params: 8, frame: 23
const _arrayLikeToArray_44498 = function(a0, a1) {
var r0;
@@ -46,360 +61,381 @@ function _fun44492(global, require, importDefault, importAll, module, exports, d
const setIndex = function(a0, a1) {
a0.index = a1;
};
const closure = CONNECTION_OPEN_44503;
const closure2 = GUILD_CREATE_44504;
const closure3 = CHANNEL_CREATE_44505;
const closure4 = GUILD_ROLE_CREATE_44506;
const CONNECTION_OPEN_445032 = CONNECTION_OPEN_44503;
const GUILD_CREATE_445042 = GUILD_CREATE_44504;
const CHANNEL_CREATE_445052 = CHANNEL_CREATE_44505;
const GUILD_ROLE_CREATE_445062 = GUILD_ROLE_CREATE_44506;
const handleFavoritesUpdate_44508 = function() {
rebuildGuild_44500(FAVORITES);
};
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 favoriteStore = importDefault(1382) /* metro dependency 1382: FavoriteStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
let value = require(1935) /* metro dependency 1935: GuildChannelStore */;
let value = GuildChannelStoreModule;
const env0_10 = value.GUILD_SELECTABLE_CHANNELS_KEY;
const env0_11 = value.GUILD_VOCAL_CHANNELS_KEY;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
value = require(661) /* metro dependency 661: Constants */;
const env0_14 = value.ChannelTypes;
const env0_15 = value.FAVORITES;
const env0_17 = {};
object = {_categories: [], null: []};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun44509(Store).displayName = 'GuildCategoryStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CHANNEL_SELECT: CHANNEL_SELECT_44513,
CONNECTION_OPEN: closure, OVERLAY_INITIALIZE: closure, CACHE_LOADED_LAZY: closure, GUILD_CREATE: closure2,
GUILD_UPDATE: closure2, GUILD_DELETE: GUILD_DELETE_44514, CHANNEL_CREATE: closure3, CHANNEL_DELETE: closure3,
CONNECTION_OPEN: CONNECTION_OPEN_445032, OVERLAY_INITIALIZE: CONNECTION_OPEN_445032,
CACHE_LOADED_LAZY: CONNECTION_OPEN_445032, GUILD_CREATE: GUILD_CREATE_445042, GUILD_UPDATE: GUILD_CREATE_445042,
GUILD_DELETE: GUILD_DELETE_44514, CHANNEL_CREATE: CHANNEL_CREATE_445052, CHANNEL_DELETE: CHANNEL_CREATE_445052,
CHANNEL_UPDATES: CHANNEL_UPDATES_44515, GUILD_MEMBER_UPDATE: GUILD_MEMBER_UPDATE_44516,
CURRENT_USER_UPDATE: CURRENT_USER_UPDATE_44517, GUILD_ROLE_CREATE: closure4, GUILD_ROLE_UPDATE: closure4,
GUILD_ROLE_DELETE: closure4, IMPERSONATE_UPDATE: closure4, IMPERSONATE_STOP: closure4,
CURRENT_USER_UPDATE: CURRENT_USER_UPDATE_44517, GUILD_ROLE_CREATE: GUILD_ROLE_CREATE_445062,
GUILD_ROLE_UPDATE: GUILD_ROLE_CREATE_445062, GUILD_ROLE_DELETE: GUILD_ROLE_CREATE_445062,
IMPERSONATE_UPDATE: GUILD_ROLE_CREATE_445062, IMPERSONATE_STOP: GUILD_ROLE_CREATE_445062,
VOICE_CHANNEL_SELECT: VOICE_CHANNEL_SELECT_44518, VOICE_STATE_UPDATES: function({voiceStates}) {
return voiceStates.reduce(_fun44520, false);
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/GuildCategoryStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/GuildCategoryStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_44493() { // fn#44493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:317, offset: 0x01172524, 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_44493_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_44496(a0, a1) { // fn#44496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:510, offset: 0x01172582, 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) {
function _isNativeReflectConstruct_44493() { // fn#44493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:317, offset: 0x01172524, 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 _fun44497;
return (_isNativeReflectConstruct_44493_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_44498(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') {
function _createForOfIteratorHelperLoose_44496(a0, a1) { // fn#44496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:510, offset: 0x01172582, 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 _fun44497;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_44498(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_44498(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_44498(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun44497;
}
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 _fun44497() { // fn#44497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:1081, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
return _fun44497;
}
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 rebuildGuild_44500(a0) { // fn#44500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:1507, offset: 0x01172704, size: 175 bytes, params: 2, frame: 17
const channels = GuildChannelStore.getChannels(a0);
const object2 = {_categories: [], null: []};
const closure = rebuildGuild_44500UpdateChannel;
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
const property = channels[GUILD_CATEGORY];
property.forEach(_fun44502);
channels[GUILD_SELECTABLE_CHANNELS_KEY].forEach(closure);
channels[GUILD_VOCAL_CHANNELS_KEY].forEach(closure);
const value3 = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(object2._categories,
object2);
value3.forEach(setIndex);
env0_17[a0] = object2;
return object2;
}
}
function CACHE_LOADED_LAZY_44503() { // fn#44503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:1923, offset: 0x0117284b, size: 38 bytes, params: 1, frame: 11
env0_17 = {};
if (env0_16 != null) {
rebuildGuild_44500(env0_16);
}
}
function rebuildGuild_44500(a0) { // fn#44500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:1507, offset: 0x01172704, size: 175 bytes, params: 2, frame: 17
const channels = GuildChannelStore.getChannels(a0);
const object = {_categories: [], null: []};
const rebuildGuild_44500UpdateChannel2 = rebuildGuild_44500UpdateChannel;
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
const property = channels[GUILD_CATEGORY];
property.forEach(_fun44502);
channels[GUILD_SELECTABLE_CHANNELS_KEY].forEach(rebuildGuild_44500UpdateChannel2);
channels[GUILD_VOCAL_CHANNELS_KEY].forEach(rebuildGuild_44500UpdateChannel2);
const value3 = (GetFlattedChannelList)(object._categories, object);
value3.forEach(setIndex);
env0_17[a0] = object;
return object;
function rebuildGuild_44500UpdateChannel({channel}) { // fn#44501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:1596, owner: rebuildGuild_44500.updateChannel, offset: 0x011727b3, size: 88 bytes, params: 2, frame: 14
const binding = env0_0;
let parent_id = channel.parent_id;
parent_id = parent_id != null ? channel.parent_id : 'null';
const r2 = binding[parent_id] ?? env0_0.null;
r2.push({channel: channel, index: -1});
}
function GUILD_CREATE_44504({guild}) { // fn#44504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:1985, offset: 0x01172871, size: 45 bytes, params: 2, frame: 12
const id = guild.id;
env0_17[id] = undefined;
if (env0_16 === id) {
rebuildGuild_44500(id);
}
}
function _fun44502({channel}) { // fn#44502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:1743, offset: 0x0117280b, size: 64 bytes, params: 2, frame: 14
const binding = env0_0;
const _categories = binding._categories;
_categories.push({channel: channel, index: -1});
binding[channel.id] = [];
}
function CHANNEL_CREATE_44505({channel}) { // fn#44505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:2064, offset: 0x0117289e, size: 55 bytes, params: 2, frame: 12
const guild_id = channel.guild_id;
if (guild_id == null) {
return false;
}
env0_17[guild_id] = undefined;
if (env0_16 === guild_id) {
rebuildGuild_44500(guild_id);
}
}
function GUILD_ROLE_CREATE_44506({guildId}) { // fn#44506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:2172, offset: 0x011728d5, size: 40 bytes, params: 2, frame: 12
env0_17[guildId] = undefined;
if (guildId === env0_16) {
rebuildGuild_44500(guildId);
function CACHE_LOADED_LAZY_44503() { // fn#44503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:1923, offset: 0x0117284b, size: 38 bytes, params: 1, frame: 11
env0_17 = {};
if (env0_16 != null) {
rebuildGuild_44500(env0_16);
}
}
}
function updateSelectedVoiceChannel_44507(a0, a1) { // fn#44507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:2251, offset: 0x011728fd, size: 87 bytes, params: 3, frame: 14
var r0;
var value4;
env0_18 = a1;
if (a0 == null) {
return false;
function GUILD_CREATE_44504({guild}) { // fn#44504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:1985, offset: 0x01172871, size: 45 bytes, params: 2, frame: 12
const id = guild.id;
env0_17[id] = undefined;
if (env0_16 === id) {
rebuildGuild_44500(id);
}
}
const getGuildId = a0.getGuildId;
if (Reflect.apply(getGuildId, a0, []) == null) {
return false;
function CHANNEL_CREATE_44505({channel}) { // fn#44505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:2064, offset: 0x0117289e, size: 55 bytes, params: 2, frame: 12
const guild_id = channel.guild_id;
if (guild_id == null) {
return false;
}
env0_17[guild_id] = undefined;
if (env0_16 === guild_id) {
rebuildGuild_44500(guild_id);
}
}
const guildId = a0.getGuildId();
const value3 = guildId != null;
if (value3) {
function GUILD_ROLE_CREATE_44506({guildId}) { // fn#44506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:2172, offset: 0x011728d5, size: 40 bytes, params: 2, frame: 12
env0_17[guildId] = undefined;
value4 = true;
if (guildId !== env0_16) {
r0 = value4;
} else {
if (guildId === env0_16) {
rebuildGuild_44500(guildId);
r0 = value4;
}
} else {
r0 = value3;
}
return r0;
}
function _fun44509(a0) { // fn#44509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:2470, offset: 0x01172968, size: 91 bytes, params: 2, frame: 16
const closure = GuildCategoryStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(GuildChannelStore, GuildStore, AuthenticationStore, ChannelStore, FavoriteStore);
this.syncWith([FavoriteStore], handleFavoritesUpdate_44508);
}}, {key: 'getCategories', value: value_44512}]);
}
function CHANNEL_SELECT_44513({guildId}) { // fn#44513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:3090, offset: 0x01172a3a, size: 69 bytes, params: 2, frame: 13
var r1;
var rebuildGuild_44500Binding;
let value = null;
let r0 = value != guildId ? guildId : value;
const value3 = value != guildId;
if (value3) {
value = value == env0_17[guildId];
if (value) {
rebuildGuild_44500Binding = rebuildGuild_44500;
value = undefined;
rebuildGuild_44500Binding(guildId);
r1 = value;
function updateSelectedVoiceChannel_44507(a0, a1) { // fn#44507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:2251, offset: 0x011728fd, size: 87 bytes, params: 3, frame: 14
var r0;
var value4;
env0_18 = a1;
if (a0 == null) {
return false;
}
const getGuildId = a0.getGuildId;
if (Reflect.apply(getGuildId, a0, []) == null) {
return false;
}
const guildId = a0.getGuildId();
const value3 = guildId != null;
if (value3) {
env0_17[guildId] = undefined;
value4 = true;
if (guildId !== env0_16) {
r0 = value4;
} else {
rebuildGuild_44500(guildId);
r0 = value4;
}
} else {
r1 = value;
r0 = value3;
}
r0 = r1;
} else {
r0 = value3;
return r0;
}
return r0;
}
function GUILD_DELETE_44514({guild}) { // fn#44514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:3394, offset: 0x01172a7f, size: 28 bytes, params: 2, frame: 2
delete env0_17[guild.id];
}
function _fun44509(a0) { // fn#44509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:2470, offset: 0x01172968, size: 91 bytes, params: 2, frame: 16
const GuildCategoryStore2 = GuildCategoryStore;
Inherits(GuildCategoryStore2, a0);
return CreateClass(GuildCategoryStore2, [{key: 'initialize', value: function() {
var guildChannelStoreBinding = GuildChannelStore;
var guildStoreBinding = GuildStore;
var authenticationStoreBinding = AuthenticationStore;
var channelStoreBinding = ChannelStore;
var favoriteStoreBinding = FavoriteStore;
this.waitFor(guildChannelStoreBinding, guildStoreBinding, authenticationStoreBinding, channelStoreBinding,
favoriteStoreBinding);
this.syncWith([favoriteStoreBinding], handleFavoritesUpdate_44508);
}}, {key: 'getCategories', value: value_44512}]);
function GuildCategoryStore() { // fn#44510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:2482, offset: 0x00f7eb2a, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, GuildCategoryStore);
const value3 = env1_5(GuildCategoryStore);
return env1_4(this, _isNativeReflectConstruct_44493() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function CHANNEL_UPDATES_44515({channels}) { // fn#44515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:3536, offset: 0x01172a9b, size: 107 bytes, params: 2, frame: 19
var r2;
var r3;
var r0;
var value5;
var guild_id;
var value6;
var value7;
const value2 = _createForOfIteratorHelperLoose_44496(channels);
const value3 = value2();
let done = value3.done;
if (done) {
r0 = false;
} else {
r2 = false;
r3 = value3;
while (true) {
value5 = r3.value;
guild_id = value5.guild_id;
if (guild_id != null) {
env0_17[guild_id] = undefined;
value6 = true;
if (env0_16 !== guild_id) {
function value_44512(a0) { // fn#44512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:2895, offset: 0x01172a09, size: 49 bytes, params: 2, frame: 13
return a0 != null ? env1_17[a0] ?? rebuildGuild_44500(a0) : env1_19;
}
}
function CHANNEL_SELECT_44513({guildId}) { // fn#44513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:3090, offset: 0x01172a3a, size: 69 bytes, params: 2, frame: 13
var r1;
var rebuildGuild_44500Binding;
let value = null;
let r0 = value != guildId ? guildId : value;
const value3 = value != guildId;
if (value3) {
value = value == env0_17[guildId];
if (value) {
rebuildGuild_44500Binding = rebuildGuild_44500;
value = undefined;
rebuildGuild_44500Binding(guildId);
r1 = value;
} else {
r1 = value;
}
r0 = r1;
} else {
r0 = value3;
}
return r0;
}
function GUILD_DELETE_44514({guild}) { // fn#44514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:3394, offset: 0x01172a7f, size: 28 bytes, params: 2, frame: 2
delete env0_17[guild.id];
}
function CHANNEL_UPDATES_44515({channels}) { // fn#44515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:3536, offset: 0x01172a9b, size: 107 bytes, params: 2, frame: 19
var r2;
var r3;
var r0;
var value5;
var guild_id;
var value6;
var value7;
const value2 = _createForOfIteratorHelperLoose_44496(channels);
const value3 = value2();
let done = value3.done;
if (done) {
r0 = false;
} else {
r2 = false;
r3 = value3;
while (true) {
value5 = r3.value;
guild_id = value5.guild_id;
if (guild_id != null) {
env0_17[guild_id] = undefined;
value6 = true;
if (env0_16 !== guild_id) {
r2 = value6;
break;
}
rebuildGuild_44500(guild_id);
r2 = value6;
break;
}
rebuildGuild_44500(guild_id);
r2 = value6;
break;
value7 = value2();
done = value7.done;
if (done) {
r0 = r2;
break;
}
r3 = value7;
continue;
}
value7 = value2();
done = value7.done;
if (done) {
r0 = r2;
break;
}
r3 = value7;
continue;
}
return r0;
}
function GUILD_MEMBER_UPDATE_44516({guildId, user}) { // fn#44516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:3752, offset: 0x01172b06, size: 72 bytes, params: 2, frame: 13
if (AuthenticationStore.getId() !== user.id) {
return false;
}
env0_17[guildId] = undefined;
if (guildId === env0_16) {
rebuildGuild_44500(guildId);
}
}
return r0;
}
function GUILD_MEMBER_UPDATE_44516({guildId, user}) { // fn#44516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:3752, offset: 0x01172b06, size: 72 bytes, params: 2, frame: 13
if (AuthenticationStore.getId() !== user.id) {
return false;
function CURRENT_USER_UPDATE_44517() { // fn#44517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:3890, offset: 0x01172b4e, size: 34 bytes, params: 1, frame: 11
if (env0_16 == null) {
return false;
}
rebuildGuild_44500(env0_16);
}
env0_17[guildId] = undefined;
if (guildId === env0_16) {
rebuildGuild_44500(guildId);
function VOICE_CHANNEL_SELECT_44518({channelId}) { // fn#44518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:4183, offset: 0x01172b70, size: 88 bytes, params: 2, frame: 15
var r0;
var value;
var updateSelectedVoiceChannel_44507Binding;
if (channelId != null) {
updateSelectedVoiceChannel_44507Binding = updateSelectedVoiceChannel_44507;
value = ChannelStore.getChannel(channelId);
value = updateSelectedVoiceChannel_44507Binding(value, channelId);
r0 = value;
} else if (env0_18 != null) {
updateSelectedVoiceChannel_44507Binding = updateSelectedVoiceChannel_44507;
value = ChannelStore.getChannel(env0_18);
value = updateSelectedVoiceChannel_44507Binding(value, null);
r0 = value;
} else {
updateSelectedVoiceChannel_44507Binding = updateSelectedVoiceChannel_44507;
value = ChannelStore.getChannel(channelId);
value = updateSelectedVoiceChannel_44507Binding(value, channelId);
r0 = value;
}
return r0;
}
}
function CURRENT_USER_UPDATE_44517() { // fn#44517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:3890, offset: 0x01172b4e, size: 34 bytes, params: 1, frame: 11
if (env0_16 == null) {
return false;
function VOICE_STATE_UPDATES_44519({voiceStates}) { // fn#44519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:4372, offset: 0x01172bc8, size: 32 bytes, params: 2, frame: 13
return voiceStates.reduce(function(a0, a1) {
var value = a0;
var channelId = a1.channelId;
return AuthenticationStore.getSessionId() !== a1.sessionId ? value : updateSelectedVoiceChannel_44507(ChannelStore.getChannel(channelId),
channelId) || value;
}, false);
function _fun44520(a0, {channelId, sessionId}) { // fn#44520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:4439, offset: 0x01172be8, size: 78 bytes, params: 3, frame: 15
const value = a0;
const authenticationStoreBinding = AuthenticationStore;
const getSessionId = authenticationStoreBinding.getSessionId;
return Reflect.apply(getSessionId, authenticationStoreBinding,
[]) !== sessionId ? value : updateSelectedVoiceChannel_44507(ChannelStore.getChannel(channelId),
channelId) || value;
}
}
rebuildGuild_44500(env0_16);
}
function VOICE_CHANNEL_SELECT_44518({channelId}) { // fn#44518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:4183, offset: 0x01172b70, size: 88 bytes, params: 2, frame: 15
var r0;
var value;
var updateSelectedVoiceChannel_44507Binding;
if (channelId != null) {
updateSelectedVoiceChannel_44507Binding = updateSelectedVoiceChannel_44507;
value = ChannelStore.getChannel(channelId);
value = updateSelectedVoiceChannel_44507Binding(value, channelId);
r0 = value;
} else if (env0_18 != null) {
updateSelectedVoiceChannel_44507Binding = updateSelectedVoiceChannel_44507;
value = ChannelStore.getChannel(env0_18);
value = updateSelectedVoiceChannel_44507Binding(value, null);
r0 = value;
} else {
updateSelectedVoiceChannel_44507Binding = updateSelectedVoiceChannel_44507;
value = ChannelStore.getChannel(channelId);
value = updateSelectedVoiceChannel_44507Binding(value, channelId);
r0 = value;
}
return r0;
}
function VOICE_STATE_UPDATES_44519({voiceStates}) { // fn#44519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:4372, offset: 0x01172bc8, size: 32 bytes, params: 2, frame: 13
return voiceStates.reduce(function(a0, a1) {
var value = a0;
var channelId = a1.channelId;
return AuthenticationStore.getSessionId() !== a1.sessionId ? value : updateSelectedVoiceChannel_44507(ChannelStore.getChannel(channelId),
channelId) || value;
}, false);
}
function rebuildGuild_44500UpdateChannel({channel}) { // fn#44501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:1596, owner: rebuildGuild_44500.updateChannel, offset: 0x011727b3, size: 88 bytes, params: 2, frame: 14
const binding = env0_0;
let parent_id = channel.parent_id;
parent_id = parent_id != null ? channel.parent_id : 'null';
const r2 = binding[parent_id] ?? env0_0.null;
r2.push({channel: channel, index: -1});
}
function _fun44502({channel}) { // fn#44502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:1743, offset: 0x0117280b, size: 64 bytes, params: 2, frame: 14
const binding = env0_0;
const _categories = binding._categories;
_categories.push({channel: channel, index: -1});
binding[channel.id] = [];
}
function value_44512(a0) { // fn#44512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5276:2895, offset: 0x01172a09, size: 49 bytes, params: 2, frame: 13
return a0 != null ? env1_17[a0] ?? rebuildGuild_44500(a0) : env1_19;
}
global.__d(_fun44492, 5098, [6, 7, 15, 17, 18, 1382, 1226, 1379, 1935, 1867, 661, 5099, 566, 694,
2]) /* metro module 5098, dependencies: [6, 7, 15, 17, 18, 1382, 1226, 1379, 1935, 1867, 661, 5099, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
+145 -122
View File
@@ -1,16 +1,19 @@
/* Metro module 4111; source: stores/GuildMemberCountStore.tsx; dependencies: [6, 7, 15, 17, 18, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun33747(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:6, offset: 0x0103abe9, size: 336 bytes, params: 8, frame: 19
const closure = INVITE_ACCEPT_SUCCESS_33751;
const INVITE_ACCEPT_SUCCESS_337512 = INVITE_ACCEPT_SUCCESS_33751;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let env0_5 = {};
const env0_6 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun33752(Store);
value.displayName = 'GuildMemberCountStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function({guilds}) {
@@ -21,126 +24,146 @@ function _fun33747(global, require, importDefault, importAll, module, exports, d
copyDataProperties(object, a0.guildMemberCounts, object);
env0_5 = object;
}, GUILD_CREATE: GUILD_CREATE_33760, GUILD_DELETE: GUILD_DELETE_33761,
GUILD_MEMBER_LIST_UPDATE: GUILD_MEMBER_LIST_UPDATE, INVITE_ACCEPT_SUCCESS: closure,
INVITE_RESOLVE_SUCCESS: closure, ONLINE_GUILD_MEMBER_COUNT_UPDATE: ONLINE_GUILD_MEMBER_COUNT_UPDATE});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/GuildMemberCountStore.tsx');
GUILD_MEMBER_LIST_UPDATE: GUILD_MEMBER_LIST_UPDATE, INVITE_ACCEPT_SUCCESS: INVITE_ACCEPT_SUCCESS_337512,
INVITE_RESOLVE_SUCCESS: INVITE_ACCEPT_SUCCESS_337512,
ONLINE_GUILD_MEMBER_COUNT_UPDATE: ONLINE_GUILD_MEMBER_COUNT_UPDATE});
(FileImportTrackerModule).fileFinishedImporting('stores/GuildMemberCountStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_33748() { // fn#33748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:148, offset: 0x0103ad39, 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) {
function _isNativeReflectConstruct_33748() { // fn#33748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:148, offset: 0x0103ad39, 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_33748_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_33748_isNativeReflectConstruct = function() {
return !!result;
})();
}
function INVITE_ACCEPT_SUCCESS_33751({invite}) { // fn#33751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:355, offset: 0x0103ad97, size: 68 bytes, params: 2, frame: 6
const guild = invite.guild;
const approximate_presence_count = invite.approximate_presence_count;
if (guild?.id == null) {
return false;
}
if (approximate_presence_count == null) {
return false;
}
env0_6[guild.id] = approximate_presence_count;
}
function _fun33752(a0) { // fn#33752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:503, offset: 0x0103addb, size: 116 bytes, params: 2, frame: 16
const closure = GuildMemberCountStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getMemberCounts', value: value_33754}, {key: 'getMemberCount', value: value_33755},
{key: 'getOnlineCount', value: value_33756}]);
}
function CONNECTION_OPEN_33757({guilds}) { // fn#33757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:1092, offset: 0x0103ae81, size: 39 bytes, params: 2, frame: 11
env0_5 = {};
guilds.forEach(_fun33758);
}
function GUILD_CREATE_33760({guild}) { // fn#33760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:1277, offset: 0x0103aee4, size: 34 bytes, params: 2, frame: 3
env0_5[guild.id] = guild.member_count;
}
function GUILD_DELETE_33761({guild}) { // fn#33761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:1352, offset: 0x0103af06, size: 81 bytes, params: 2, frame: 5
let binding = env0_5;
let id = guild.id;
if (binding[id] != null) {
binding = env0_5;
id = guild.id;
delete binding[id];
binding = env0_6;
id = guild.id;
delete binding[id];
} else {
binding = env0_6;
id = guild.id;
if (binding[id] == null) {
function INVITE_ACCEPT_SUCCESS_33751({invite}) { // fn#33751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:355, offset: 0x0103ad97, size: 68 bytes, params: 2, frame: 6
const guild = invite.guild;
const approximate_presence_count = invite.approximate_presence_count;
if (guild?.id == null) {
return false;
}
binding = env0_5;
id = guild.id;
delete binding[id];
binding = env0_6;
id = guild.id;
delete binding[id];
if (approximate_presence_count == null) {
return false;
}
env0_6[guild.id] = approximate_presence_count;
}
function _fun33752(a0) { // fn#33752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:503, offset: 0x0103addb, size: 116 bytes, params: 2, frame: 16
const GuildMemberCountStore2 = GuildMemberCountStore;
Inherits(GuildMemberCountStore2, a0);
return CreateClass(GuildMemberCountStore2, [{key: 'getMemberCounts', value: value_33754}, {key: 'getMemberCount',
value: value_33755}, {key: 'getOnlineCount', value: value_33756}]);
function GuildMemberCountStore() { // fn#33753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:515, offset: 0x00e3db8d, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, GuildMemberCountStore);
const value3 = env1_3(GuildMemberCountStore);
return env1_2(this, _isNativeReflectConstruct_33748() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_33754() { // fn#33754, offset: 0x00e40571, size: 9 bytes, params: 1, frame: 1
return env1_5;
}
function value_33755(a0) { // fn#33755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:893, offset: 0x0103ae4f, size: 25 bytes, params: 2, frame: 3
const value = null;
return value != a0 ? env1_5[a0] : value;
}
function value_33756(a0) { // fn#33756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:960, offset: 0x0103ae68, size: 25 bytes, params: 2, frame: 3
const value = null;
return value != a0 ? env1_6[a0] : value;
}
}
function CONNECTION_OPEN_33757({guilds}) { // fn#33757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:1092, offset: 0x0103ae81, size: 39 bytes, params: 2, frame: 11
env0_5 = {};
guilds.forEach(_fun33758);
function _fun33758({id, member_count}) { // fn#33758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:1150, offset: 0x0103aea8, size: 29 bytes, params: 2, frame: 3
env1_5[id] = member_count;
}
}
function GUILD_CREATE_33760({guild}) { // fn#33760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:1277, offset: 0x0103aee4, size: 34 bytes, params: 2, frame: 3
env0_5[guild.id] = guild.member_count;
}
function GUILD_DELETE_33761({guild}) { // fn#33761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:1352, offset: 0x0103af06, size: 81 bytes, params: 2, frame: 5
let binding = env0_5;
let id = guild.id;
if (binding[id] != null) {
binding = env0_5;
id = guild.id;
delete binding[id];
binding = env0_6;
id = guild.id;
delete binding[id];
} else {
binding = env0_6;
id = guild.id;
if (binding[id] == null) {
return false;
}
binding = env0_5;
id = guild.id;
delete binding[id];
binding = env0_6;
id = guild.id;
delete binding[id];
}
}
function GUILD_MEMBER_LIST_UPDATE({guildId, memberCount, onlineCount}) { // fn#33762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:1487, offset: 0x0103af57, size: 71 bytes, params: 2, frame: 6
var r0;
if (env0_5[guildId] === memberCount) {
r0 = false;
} else {
env0_5[guildId] = memberCount;
r0 = true;
}
if (env0_6[guildId] !== onlineCount) {
env0_6[guildId] = onlineCount;
r0 = true;
}
return r0;
}
function ONLINE_GUILD_MEMBER_COUNT_UPDATE({guildId, count}) { // fn#33763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:1744, offset: 0x0103af9e, size: 42 bytes, params: 2, frame: 4
if (guildId == null) {
return false;
}
if (count == null) {
return false;
}
env0_6[guildId] = count;
}
}
function GUILD_MEMBER_LIST_UPDATE({guildId, memberCount, onlineCount}) { // fn#33762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:1487, offset: 0x0103af57, size: 71 bytes, params: 2, frame: 6
var r0;
if (env0_5[guildId] === memberCount) {
r0 = false;
} else {
env0_5[guildId] = memberCount;
r0 = true;
}
if (env0_6[guildId] !== onlineCount) {
env0_6[guildId] = onlineCount;
r0 = true;
}
return r0;
}
function ONLINE_GUILD_MEMBER_COUNT_UPDATE({guildId, count}) { // fn#33763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:1744, offset: 0x0103af9e, size: 42 bytes, params: 2, frame: 4
if (guildId == null) {
return false;
}
if (count == null) {
return false;
}
env0_6[guildId] = count;
}
function value_33756(a0) { // fn#33756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:960, offset: 0x0103ae68, size: 25 bytes, params: 2, frame: 3
const value = null;
return value != a0 ? env1_6[a0] : value;
}
function _fun33758({id, member_count}) { // fn#33758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4276:1150, offset: 0x0103aea8, size: 29 bytes, params: 2, frame: 3
env1_5[id] = member_count;
}
global.__d(_fun33747, 4111, [6, 7, 15, 17, 18, 566, 694,
2]) /* metro module 4111, dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */;
+277 -236
View File
@@ -1,4 +1,16 @@
/* Metro module 6269; source: stores/GuildMemberRequesterStore.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 1945, 6270, 694, 566, 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 Dispatcher from '../Dispatcher.tsx'; /* Metro dependency 694 */
import ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildMemberStore from './GuildMemberStore.tsx'; /* Metro dependency 1945 */
import GuildMemberRequester from '../lib/guild/GuildMemberRequester.tsx'; /* Metro dependency 6270 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun49494(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#49494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:6, offset: 0x011fb985, size: 467 bytes, params: 8, frame: 22
const _arrayLikeToArray_49500 = function(a0, a1) {
var r0;
@@ -43,13 +55,13 @@ function _fun49494(global, require, importDefault, importAll, module, exports, d
}
return value;
};
const closure = CONNECTION_CLOSED_49501;
const CONNECTION_CLOSED_495012 = CONNECTION_CLOSED_49501;
const requestFromMessages = function(a0, a1) {
var env0_0 = a0;
a1.forEach(_fun49504);
return false;
};
const closure2 = LOCAL_MESSAGES_LOADED_49506;
const LOCAL_MESSAGES_LOADED_495062 = LOCAL_MESSAGES_LOADED_49506;
const closure3 = function({guildId, data}) {
var env0_0 = undefined;
if (guildId != null) {
@@ -62,261 +74,290 @@ function _fun49494(global, require, importDefault, importAll, module, exports, d
};
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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
let value3 = new (importDefault(6270) /* metro dependency 6270: GuildMemberRequester */)((importDefault(1945) /* metro dependency 1945: GuildMemberStore */).isMember,
let value3 = new (GuildMemberRequester)((GuildMemberStore).isMember,
_fun49511);
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun49512(Store).displayName = 'GuildMemberRequesterStore';
value3 = new value3(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_CLOSED: closure,
CONNECTION_OPEN: closure, CONNECTION_RESUMED: CONNECTION_RESUMED_49517,
GUILD_MEMBERS_CHUNK_BATCH: GUILD_MEMBERS_CHUNK_BATCH_49518, SEARCH_MESSAGES_SUCCESS: closure3,
MOD_VIEW_SEARCH_MESSAGES_SUCCESS: closure3, LOCAL_MESSAGES_LOADED: closure2, LOAD_MESSAGES_SUCCESS: closure2,
LOAD_MESSAGES_AROUND_SUCCESS: closure2, LOAD_RECENT_MENTIONS_SUCCESS: closure2,
value3 = new value3(importDefault(694) /* metro dependency 694: Dispatcher */,
{CONNECTION_CLOSED: CONNECTION_CLOSED_495012, CONNECTION_OPEN: CONNECTION_CLOSED_495012,
CONNECTION_RESUMED: CONNECTION_RESUMED_49517, GUILD_MEMBERS_CHUNK_BATCH: GUILD_MEMBERS_CHUNK_BATCH_49518,
SEARCH_MESSAGES_SUCCESS: closure3, MOD_VIEW_SEARCH_MESSAGES_SUCCESS: closure3,
LOCAL_MESSAGES_LOADED: LOCAL_MESSAGES_LOADED_495062, LOAD_MESSAGES_SUCCESS: LOCAL_MESSAGES_LOADED_495062,
LOAD_MESSAGES_AROUND_SUCCESS: LOCAL_MESSAGES_LOADED_495062,
LOAD_RECENT_MENTIONS_SUCCESS: LOCAL_MESSAGES_LOADED_495062,
LOAD_PINNED_MESSAGES_SUCCESS: LOAD_PINNED_MESSAGES_SUCCESS_49522,
CONVERSATION_FETCH_SUCCESS: CONVERSATION_FETCH_SUCCESS_49524});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/GuildMemberRequesterStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/GuildMemberRequesterStore.tsx');
exports.default = value3;
}
function _isNativeReflectConstruct_49495() { // fn#49495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:170, offset: 0x011fbb58, 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_49495_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_49498(a0, a1) { // fn#49498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:363, offset: 0x011fbbb6, 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) {
function _isNativeReflectConstruct_49495() { // fn#49495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:170, offset: 0x011fbb58, 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 _fun49499;
return (_isNativeReflectConstruct_49495_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_49500(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') {
function _createForOfIteratorHelperLoose_49498(a0, a1) { // fn#49498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:363, offset: 0x011fbbb6, 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 _fun49499;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_49500(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_49500(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_49500(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun49499;
}
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 _fun49499() { // fn#49499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:934, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
function CONNECTION_CLOSED_49501() { // fn#49501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1387, offset: 0x00dea138, size: 21 bytes, params: 1, frame: 9
env0_9.reset();
}
function _requestMember(a0, a1) { // fn#49502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1430, offset: 0x011fbd28, size: 29 bytes, params: 3, frame: 13
env0_9.request(a0, a1);
return false;
}
function requestFromMessages(a0, a1) { // fn#49503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1484, offset: 0x011fbd45, size: 31 bytes, params: 3, frame: 11
const env0_0 = a0;
a1.forEach(_fun49504);
return false;
function _fun49504({author, mentions}) { // fn#49504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1536, offset: 0x011fbd64, size: 73 bytes, params: 2, frame: 15
var environment;
var value;
if (author != null) {
value = environment.__proto__;
_requestMember(env0_0, author.id);
}
if (mentions != null) {
mentions.forEach(_fun49505);
}
function _fun49505({id}) { // fn#49505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1614, offset: 0x011fbdad, size: 34 bytes, params: 2, frame: 13
_requestMember(env1_0, id);
return false;
}
}
}
function LOAD_MESSAGES_AROUND_SUCCESS_49506({channelId, messages}) { // fn#49506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1648, offset: 0x011fbdcf, size: 73 bytes, params: 2, frame: 15
const channel = ChannelStore.getChannel(channelId);
let r0 = channel != null && channel.guild_id != null;
if (r0) {
requestFromMessages(channel.guild_id, messages);
r0 = false;
}
return r0;
}
function MOD_VIEW_SEARCH_MESSAGES_SUCCESS_49507({guildId, data}) { // fn#49507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1792, offset: 0x011fbe18, size: 71 bytes, params: 2, frame: 15
if (guildId != null) {
data.forEach(function({messages}) {
messages.forEach(_fun49509);
});
requestFromMessages(guildId, []);
}
return false;
function _fun49508({messages}) { // fn#49508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1892, offset: 0x011fbe5f, size: 30 bytes, params: 2, frame: 11
messages.forEach(function(a0) {
a0.forEach(_fun49510);
});
function _fun49509(a0) { // fn#49509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1920, offset: 0x011fbe7d, size: 24 bytes, params: 2, frame: 11
a0.forEach(_fun49510);
function _fun49510(a0) { // fn#49510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1935, offset: 0x00ef6117, size: 24 bytes, params: 2, frame: 11
env2_0.push(a0);
}
}
}
}
function _fun49511(a0, a1) { // fn#49511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1304, offset: 0x011fbe95, size: 71 bytes, params: 3, frame: 14
(Dispatcher).dispatch({type: 'GUILD_MEMBERS_REQUEST', guildIds: [a0],
userIds: a1});
}
function _fun49512(a0) { // fn#49512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1989, offset: 0x011fbedc, size: 116 bytes, params: 2, frame: 16
const GuildMemberRequesterStore2 = GuildMemberRequesterStore;
Inherits(GuildMemberRequesterStore2, a0);
return CreateClass(GuildMemberRequesterStore2, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, guildMemberStore);
}}, {key: 'requestMember', value: function(a0, a1) {
_requestMember(a0, a1);
}}, {key: 'getDebugState', value: value_49516}]);
function GuildMemberRequesterStore() { // fn#49513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:2001, offset: 0x00ec62ac, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, GuildMemberRequesterStore);
const value3 = env1_5(GuildMemberRequesterStore);
return env1_4(this, _isNativeReflectConstruct_49495() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_49516(a0) { // fn#49516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:2490, offset: 0x011fbf67, size: 25 bytes, params: 2, frame: 11
return env1_9.getDebugState(a0);
}
}
function CONNECTION_RESUMED_49517() { // fn#49517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:2722, offset: 0x011fbf80, size: 21 bytes, params: 1, frame: 9
env0_9.requestUnacknowledged();
return false;
}
function GUILD_MEMBERS_CHUNK_BATCH_49518({chunks}) { // fn#49518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:2820, offset: 0x011fbf95, size: 71 bytes, params: 2, frame: 14
var r1;
var value3;
var value4;
const closure = function(a0) {
var env0_0 = a0;
a0.members.forEach(_fun49520);
if (a0.notFound != null) {
a0.notFound.forEach(_fun49521);
}
};
const value = _createForOfIteratorHelperLoose_49498(chunks);
const value2 = value();
let done = value2.done;
if (!done) {
for (r1 = value2; true; r1 = value4) {
value3 = r1.value;
closure(value3);
value4 = value();
done = value4.done;
if (done) {
break;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun49499;
}
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 _requestMember(a0, a1) { // fn#49502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1430, offset: 0x011fbd28, size: 29 bytes, params: 3, frame: 13
env0_9.request(a0, a1);
return false;
}
function requestFromMessages(a0, a1) { // fn#49503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1484, offset: 0x011fbd45, size: 31 bytes, params: 3, frame: 11
const env0_0 = a0;
a1.forEach(_fun49504);
return false;
}
function LOAD_MESSAGES_AROUND_SUCCESS_49506({channelId, messages}) { // fn#49506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1648, offset: 0x011fbdcf, size: 73 bytes, params: 2, frame: 15
const channel = ChannelStore.getChannel(channelId);
let r0 = channel != null && channel.guild_id != null;
if (r0) {
requestFromMessages(channel.guild_id, messages);
r0 = false;
}
return r0;
}
function MOD_VIEW_SEARCH_MESSAGES_SUCCESS_49507({guildId, data}) { // fn#49507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1792, offset: 0x011fbe18, size: 71 bytes, params: 2, frame: 15
if (guildId != null) {
data.forEach(function({messages}) {
messages.forEach(_fun49509);
});
requestFromMessages(guildId, []);
}
return false;
}
function _fun49511(a0, a1) { // fn#49511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1304, offset: 0x011fbe95, size: 71 bytes, params: 3, frame: 14
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_MEMBERS_REQUEST', guildIds: [a0],
userIds: a1});
}
function _fun49512(a0) { // fn#49512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1989, offset: 0x011fbedc, size: 116 bytes, params: 2, frame: 16
const closure = GuildMemberRequesterStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, GuildMemberStore);
}}, {key: 'requestMember', value: function(a0, a1) {
_requestMember(a0, a1);
}}, {key: 'getDebugState', value: value_49516}]);
}
function CONNECTION_RESUMED_49517() { // fn#49517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:2722, offset: 0x011fbf80, size: 21 bytes, params: 1, frame: 9
env0_9.requestUnacknowledged();
return false;
}
function GUILD_MEMBERS_CHUNK_BATCH_49518({chunks}) { // fn#49518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:2820, offset: 0x011fbf95, size: 71 bytes, params: 2, frame: 14
var r1;
var value3;
var value4;
const closure = function(a0) {
var env0_0 = a0;
a0.members.forEach(_fun49520);
if (a0.notFound != null) {
a0.notFound.forEach(_fun49521);
}
};
const value = _createForOfIteratorHelperLoose_49498(chunks);
const value2 = value();
let done = value2.done;
if (!done) {
for (r1 = value2; true; r1 = value4) {
value3 = r1.value;
closure(value3);
value4 = value();
done = value4.done;
if (done) {
break;
return false;
function GUILD_MEMBERS_CHUNK_BATCH_49518_loop(a0) { // fn#49519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:2886, owner: GUILD_MEMBERS_CHUNK_BATCH_49518._loop, offset: 0x011fbfdc, size: 67 bytes, params: 2, frame: 13
const env0_0 = a0;
a0.members.forEach(_fun49520);
if (a0.notFound != null) {
a0.notFound.forEach(_fun49521);
}
function _fun49520({user}) { // fn#49520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:2917, offset: 0x011fc01f, size: 48 bytes, params: 2, frame: 13
const binding = env2_9;
binding.acknowledge(env0_0.guildId, user.id);
}
function _fun49521(a0) { // fn#49521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:2997, offset: 0x011fc04f, size: 36 bytes, params: 2, frame: 13
const binding = env2_9;
return binding.acknowledge(env0_0.guildId, a0);
}
}
}
return false;
}
function LOAD_PINNED_MESSAGES_SUCCESS_49522({pins, channelId}) { // fn#49522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:3420, offset: 0x011fc073, size: 90 bytes, params: 2, frame: 15
var guild_id;
var requestFromMessagesBinding;
var value;
const channel = ChannelStore.getChannel(channelId);
let r0 = channel != null && channel.guild_id != null;
if (r0) {
requestFromMessagesBinding = requestFromMessages;
guild_id = channel.guild_id;
value = pins.map(function(a0) {
return a0.message;
});
requestFromMessagesBinding(guild_id, value);
value = false;
r0 = value;
function LOAD_PINNED_MESSAGES_SUCCESS_49522({pins, channelId}) { // fn#49522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:3420, offset: 0x011fc073, size: 90 bytes, params: 2, frame: 15
var guild_id;
var requestFromMessagesBinding;
var value;
const channel = ChannelStore.getChannel(channelId);
let r0 = channel != null && channel.guild_id != null;
if (r0) {
requestFromMessagesBinding = requestFromMessages;
guild_id = channel.guild_id;
value = pins.map(function(a0) {
return a0.message;
});
requestFromMessagesBinding(guild_id, value);
value = false;
r0 = value;
}
return r0;
}
return r0;
}
function _fun49504({author, mentions}) { // fn#49504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1536, offset: 0x011fbd64, size: 73 bytes, params: 2, frame: 15
var environment;
var value;
if (author != null) {
value = environment.__proto__;
_requestMember(env0_0, author.id);
}
if (mentions != null) {
mentions.forEach(_fun49505);
function CONVERSATION_FETCH_SUCCESS_49524({channelId, messages}) { // fn#49524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:3618, offset: 0x011fbdcf, size: 73 bytes, params: 2, frame: 15
const channel = ChannelStore.getChannel(channelId);
let r0 = channel != null && channel.guild_id != null;
if (r0) {
requestFromMessages(channel.guild_id, messages);
r0 = false;
}
return r0;
}
}
function _fun49508({messages}) { // fn#49508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1892, offset: 0x011fbe5f, size: 30 bytes, params: 2, frame: 11
messages.forEach(function(a0) {
a0.forEach(_fun49510);
});
}
function value_49516(a0) { // fn#49516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:2490, offset: 0x011fbf67, size: 25 bytes, params: 2, frame: 11
return env1_9.getDebugState(a0);
}
function GUILD_MEMBERS_CHUNK_BATCH_49518_loop(a0) { // fn#49519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:2886, owner: GUILD_MEMBERS_CHUNK_BATCH_49518._loop, offset: 0x011fbfdc, size: 67 bytes, params: 2, frame: 13
const env0_0 = a0;
a0.members.forEach(_fun49520);
if (a0.notFound != null) {
a0.notFound.forEach(_fun49521);
}
}
function _fun49505({id}) { // fn#49505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1614, offset: 0x011fbdad, size: 34 bytes, params: 2, frame: 13
_requestMember(env1_0, id);
return false;
}
function _fun49509(a0) { // fn#49509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1920, offset: 0x011fbe7d, size: 24 bytes, params: 2, frame: 11
a0.forEach(_fun49510);
}
function _fun49520({user}) { // fn#49520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:2917, offset: 0x011fc01f, size: 48 bytes, params: 2, frame: 13
const binding = env2_9;
binding.acknowledge(env0_0.guildId, user.id);
}
function _fun49521(a0) { // fn#49521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:2997, offset: 0x011fc04f, size: 36 bytes, params: 2, frame: 13
const binding = env2_9;
return binding.acknowledge(env0_0.guildId, a0);
}
global.__d(_fun49494, 6269, [6, 7, 15, 17, 18, 1379, 1945, 6270, 694, 566,
2]) /* metro module 6269, dependencies: [6, 7, 15, 17, 18, 1379, 1945, 6270, 694, 566, 2] */;
File diff suppressed because it is too large. Load diff
+219 -183
View File
@@ -1,4 +1,14 @@
/* Metro module 1381; source: stores/GuildMembershipStore.tsx; dependencies: [6, 7, 15, 17, 18, 694, 566, 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 Dispatcher from '../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as DispatcherModule from '../Dispatcher.tsx'; /* Metro dependency 694 */
function _fun16082(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#16082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:6, offset: 0x00e46a40, size: 250 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_16085 = function(a0, a1) {
@@ -46,206 +56,232 @@ function _fun16082(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun16089(Store);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/GuildMembershipStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/GuildMembershipStore.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_16083(a0, a1) { // fn#16083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:150, offset: 0x00e46b3a, 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)) {
function _createForOfIteratorHelperLoose_16083(a0, a1) { // fn#16083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:150, offset: 0x00e46b3a, 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);
}
return _fun16084;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_16085(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun16084;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_16085(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_16085(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_16085(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun16084;
}
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 _fun16084() { // fn#16084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:721, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
function _isNativeReflectConstruct_16086() { // fn#16086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:1060, offset: 0x00e46cac, 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_16086_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun16089(a0) { // fn#16089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:1263, offset: 0x00e46d0a, size: 208 bytes, params: 2, frame: 16
const GuildMembershipStore2 = GuildMembershipStore;
Inherits(GuildMembershipStore2, a0);
return CreateClass(GuildMembershipStore2, [{key: 'allGuildIds', value: function() {
return this.guildIds;
}}, {key: 'isMember', value: function(a0) {
return this.guildIds.has(a0);
}}, {key: 'handleConnectionOpen', value: function(a0) {
var Set = global.Set;
var guilds = a0.guilds;
var value = guilds.map(_fun16099);
var items = [];
value = arraySpread(items, value, 0, guilds);
arraySpread(items, a0.unavailableGuilds, value, guilds);
this.guildIds = new Set(items);
}}, {key: 'handleCacheLoaded', value: function(a0) {
var Set = global.Set;
var value = a0.guilds.map(_fun16101);
value = new Set(value);
this.guildIds = value;
}}, {key: 'handleCacheLoadedLazy', value: value_16102}, {key: 'handleGuildCreate', value: function(a0) {
this.guildIds.add(a0.guild.id);
}}, {key: 'handleGuildDelete', value: function(a0) {
if (a0.guild.unavailable !== true) {
this.guildIds.delete(a0.guild.id);
}
}}]);
function GuildMembershipStore() { // fn#16090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:1275, offset: 0x00e46dda, size: 257 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
env1_3(this, GuildMembershipStore);
const items2 = [Dispatcher];
items2[1] = {CACHE_LOADED: CACHE_LOADED_16091, CACHE_LOADED_LAZY: CACHE_LOADED_LAZY_16092,
CONNECTION_OPEN: CONNECTION_OPEN_16093, GUILD_CREATE: GUILD_CREATE_16094, GUILD_DELETE: GUILD_DELETE_16095};
const DispatchBand = (DispatcherModule).DispatchBand;
const Early = DispatchBand.Early;
items2[2] = Early;
const value3 = env1_6(GuildMembershipStore);
value = env1_5(this, _isNativeReflectConstruct_16086() ? global.Reflect.construct(value3, items2,
env1_6(this).constructor) : value3.apply(this, items2));
const Set = global.Set;
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
value.guildIds = set instanceof Object ? set : value4;
return value;
function GuildMembershipStoreCACHE_LOADED(a0) { // fn#16091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:1533, owner: GuildMembershipStore.CACHE_LOADED, offset: 0x00e46edb, size: 23 bytes, params: 2, frame: 11
return env0_0.handleCacheLoaded(a0);
}
function GuildMembershipStoreCACHE_LOADED_LAZY(a0) { // fn#16092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:1577, owner: GuildMembershipStore.CACHE_LOADED_LAZY, offset: 0x00e4675c, size: 23 bytes, params: 2, frame: 11
return env0_0.handleCacheLoadedLazy(a0);
}
function GuildMembershipStoreCONNECTION_OPEN(a0) { // fn#16093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:1623, owner: GuildMembershipStore.CONNECTION_OPEN, offset: 0x00def9e8, size: 23 bytes, params: 2, frame: 11
return env0_0.handleConnectionOpen(a0);
}
function GuildMembershipStoreGUILD_CREATE(a0) { // fn#16094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:1665, owner: GuildMembershipStore.GUILD_CREATE, offset: 0x00defa1c, size: 23 bytes, params: 2, frame: 11
return env0_0.handleGuildCreate(a0);
}
function GuildMembershipStoreGUILD_DELETE(a0) { // fn#16095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:1704, owner: GuildMembershipStore.GUILD_DELETE, offset: 0x00e46ef2, size: 23 bytes, params: 2, frame: 11
return env0_0.handleGuildDelete(a0);
}
}
function value_16098({guilds, unavailableGuilds}) { // fn#16098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:1995, offset: 0x00e46f2c, size: 96 bytes, params: 2, frame: 15
const Set = global.Set;
let value = guilds.map(function(a0) {
return a0.id;
});
const items2 = [];
value = arraySpread(items2, value, 0, guilds);
arraySpread(items2, unavailableGuilds, value, guilds);
this.guildIds = new Set(items2);
}
function value_16100({guilds}) { // fn#16100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:2115, offset: 0x00e46f96, size: 67 bytes, params: 2, frame: 12
const Set = global.Set;
const value = guilds.map(function(a0) {
return a0.id;
});
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(value);
this.guildIds = set instanceof Object ? set : value2;
}
function value_16102({guilds}) { // fn#16102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:2211, offset: 0x00e46fd9, size: 81 bytes, params: 2, frame: 15
var r2;
var value3;
var guildIds;
var add;
var id;
var value4;
let value = environment.__proto__;
value = _createForOfIteratorHelperLoose_16083(guilds);
const value2 = value();
let done = value2.done;
if (!done) {
for (r2 = value2; true; r2 = value4) {
value3 = r2.value;
guildIds = this.guildIds;
add = guildIds.add;
id = value3.id;
Reflect.apply(add, guildIds, [id]);
value4 = value();
done = value4.done;
if (done) {
break;
}
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun16084;
}
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 _isNativeReflectConstruct_16086() { // fn#16086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:1060, offset: 0x00e46cac, 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_16086_isNativeReflectConstruct = function() {
return !!result;
})();
function _fun16099(a0) { // fn#16099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:2047, offset: 0x00e46f8c, size: 10 bytes, params: 2, frame: 1
return a0.id;
}
function _fun16089(a0) { // fn#16089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:1263, offset: 0x00e46d0a, size: 208 bytes, params: 2, frame: 16
const closure = GuildMembershipStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'allGuildIds', value: function() {
return this.guildIds;
}}, {key: 'isMember', value: function(a0) {
return this.guildIds.has(a0);
}}, {key: 'handleConnectionOpen', value: function(a0) {
var Set = global.Set;
var guilds = a0.guilds;
var value = guilds.map(_fun16099);
var items = [];
value = arraySpread(items, value, 0, guilds);
arraySpread(items, a0.unavailableGuilds, value, guilds);
this.guildIds = new Set(items);
}}, {key: 'handleCacheLoaded', value: function(a0) {
var Set = global.Set;
var value = a0.guilds.map(_fun16101);
value = new Set(value);
this.guildIds = value;
}}, {key: 'handleCacheLoadedLazy', value: value_16102}, {key: 'handleGuildCreate', value: function(a0) {
this.guildIds.add(a0.guild.id);
}}, {key: 'handleGuildDelete', value: function(a0) {
if (a0.guild.unavailable !== true) {
this.guildIds.delete(a0.guild.id);
}
}}]);
}
function GuildMembershipStore() { // fn#16090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:1275, offset: 0x00e46dda, size: 257 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
env1_3(this, GuildMembershipStore);
const items2 = [importDefault(694) /* metro dependency 694: Dispatcher */];
items2[1] = {CACHE_LOADED: CACHE_LOADED_16091, CACHE_LOADED_LAZY: CACHE_LOADED_LAZY_16092,
CONNECTION_OPEN: CONNECTION_OPEN_16093, GUILD_CREATE: GUILD_CREATE_16094, GUILD_DELETE: GUILD_DELETE_16095};
const DispatchBand = (require(694) /* metro dependency 694: Dispatcher */).DispatchBand;
const Early = DispatchBand.Early;
items2[2] = Early;
const value3 = env1_6(GuildMembershipStore);
value = env1_5(this, _isNativeReflectConstruct_16086() ? global.Reflect.construct(value3, items2,
env1_6(this).constructor) : value3.apply(this, items2));
const Set = global.Set;
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
value.guildIds = set instanceof Object ? set : value4;
return value;
}
function value_16098({guilds, unavailableGuilds}) { // fn#16098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:1995, offset: 0x00e46f2c, size: 96 bytes, params: 2, frame: 15
const Set = global.Set;
let value = guilds.map(function(a0) {
return a0.id;
});
const items2 = [];
value = arraySpread(items2, value, 0, guilds);
arraySpread(items2, unavailableGuilds, value, guilds);
this.guildIds = new Set(items2);
}
function value_16100({guilds}) { // fn#16100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:2115, offset: 0x00e46f96, size: 67 bytes, params: 2, frame: 12
const Set = global.Set;
const value = guilds.map(function(a0) {
return a0.id;
});
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(value);
this.guildIds = set instanceof Object ? set : value2;
}
function value_16102({guilds}) { // fn#16102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:2211, offset: 0x00e46fd9, size: 81 bytes, params: 2, frame: 15
var r2;
var value3;
var guildIds;
var add;
var id;
var value4;
let value = environment.__proto__;
value = _createForOfIteratorHelperLoose_16083(guilds);
const value2 = value();
let done = value2.done;
if (!done) {
for (r2 = value2; true; r2 = value4) {
value3 = r2.value;
guildIds = this.guildIds;
add = guildIds.add;
id = value3.id;
Reflect.apply(add, guildIds, [id]);
value4 = value();
done = value4.done;
if (done) {
break;
}
}
}
}
function GuildMembershipStoreCACHE_LOADED(a0) { // fn#16091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:1533, owner: GuildMembershipStore.CACHE_LOADED, offset: 0x00e46edb, size: 23 bytes, params: 2, frame: 11
return env0_0.handleCacheLoaded(a0);
function _fun16101(a0) { // fn#16101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1508:2163, offset: 0x00e46f8c, size: 10 bytes, params: 2, frame: 1
return a0.id;
}
global.__d(_fun16082, 1381, [6, 7, 15, 17, 18, 694, 566,
2]) /* metro module 1381, dependencies: [6, 7, 15, 17, 18, 694, 566, 2] */;
+68 -53
View File
@@ -1,70 +1,85 @@
/* Metro module 5073; source: stores/GuildNSFWAgreeStore.tsx; dependencies: [6, 7, 15, 17, 18, 587, 5072, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as StorageModule from '../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */
function _fun43996(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5251:6, offset: 0x01165274, size: 275 bytes, params: 8, frame: 19
const env0_0 = require;
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 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun44000(Store);
value.displayName = 'GuildNSFWAgreeStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {GUILD_NSFW_AGREE: GUILD_NSFW_AGREE});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/GuildNSFWAgreeStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/GuildNSFWAgreeStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_43997() { // fn#43997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5251:148, offset: 0x01165387, 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) {
function _isNativeReflectConstruct_43997() { // fn#43997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5251:148, offset: 0x01165387, 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_43997_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_43997_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun44000(a0) { // fn#44000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5251:380, offset: 0x011653e5, size: 91 bytes, params: 2, frame: 16
const closure = GuildNSFWAgreeStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: value_44002}, {key: 'didAgree', value: value_44003}]);
}
function _fun44000(a0) { // fn#44000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5251:380, offset: 0x011653e5, size: 91 bytes, params: 2, frame: 16
const GuildNSFWAgreeStore2 = GuildNSFWAgreeStore;
Inherits(GuildNSFWAgreeStore2, a0);
return CreateClass(GuildNSFWAgreeStore2, [{key: 'initialize', value: value_44002}, {key: 'didAgree',
value: value_44003}]);
function GuildNSFWAgreeStore() { // fn#44001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5251:392, offset: 0x00c6223c, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, GuildNSFWAgreeStore);
const value3 = env1_5(GuildNSFWAgreeStore);
return env1_4(this, _isNativeReflectConstruct_43997() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function GUILD_NSFW_AGREE({guildId}) { // fn#44004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5251:958, offset: 0x011654c9, size: 72 bytes, params: 2, frame: 14
env0_7[guildId] = true;
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
Storage.set('GuildNSFWAgreeStore', env0_7);
}
function value_44002() { // fn#44002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5251:705, offset: 0x01165440, size: 63 bytes, params: 1, frame: 13
const Storage = (StorageModule).Storage;
env1_7 = Storage.get('GuildNSFWAgreeStore') ?? env1_7;
}
function value_44002() { // fn#44002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5251:705, offset: 0x01165440, size: 63 bytes, params: 1, frame: 13
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
env1_7 = Storage.get('GuildNSFWAgreeStore') ?? env1_7;
}
function value_44003(a0) { // fn#44003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5251:785, offset: 0x0116547f, size: 74 bytes, params: 2, frame: 14
return a0 != null && (!(require(5072) /* metro dependency 5072: AgeGateUtils */).shouldAgeVerifyForAgeGate() && (env1_7[a0] || false));
}
}
function GUILD_NSFW_AGREE({guildId}) { // fn#44004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5251:958, offset: 0x011654c9, size: 72 bytes, params: 2, frame: 14
env0_7[guildId] = true;
const Storage = (StorageModule).Storage;
Storage.set('GuildNSFWAgreeStore', env0_7);
}
function value_44003(a0) { // fn#44003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5251:785, offset: 0x0116547f, size: 74 bytes, params: 2, frame: 14
return a0 != null && (!(require(5072) /* metro dependency 5072: AgeGateUtils */).shouldAgeVerifyForAgeGate() && (env1_7[a0] || false));
}
global.__d(_fun43996, 5073, [6, 7, 15, 17, 18, 587, 5072, 566, 694,
2]) /* metro module 5073, dependencies: [6, 7, 15, 17, 18, 587, 5072, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
+427 -411
View File
@@ -1,6 +1,18 @@
/* Metro module 1938; source: stores/GuildRoleStore.tsx; dependencies: [6, 7, 15, 17, 18, 1419, 1868, 1422, 1939, 483, 1940, 1942, 1870, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PlainRecordModule from '../lib/PlainRecord.tsx'; /* Metro dependency 1419 */
import * as GuildRecordModule from '../records/GuildRecord.tsx'; /* Metro dependency 1422 */
import * as LibdiscoreStoreModule from '../modules/libdiscore/stores/LibdiscoreStore.tsx'; /* Metro dependency 1868 */
import * as LibdiscoreExperimentsModule from '../modules/libdiscore/libdiscoreExperiments.tsx'; /* Metro dependency 1870 */
import * as GuildRoleRecordModule from '../records/GuildRoleRecord.tsx'; /* Metro dependency 1939 */
import * as GuildRoleRecordUtilsModule from '../utils/GuildRoleRecordUtils.tsx'; /* Metro dependency 1942 */
function _fun21515(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#21515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:6, offset: 0x00ef296c, size: 517 bytes, params: 8, frame: 19
var object2;
const _arrayLikeToArray_21518 = function(a0, a1) {
var r0;
var r1;
@@ -56,18 +68,10 @@ function _fun21515(global, require, importDefault, importAll, module, exports, d
};
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 = (require(1419) /* metro dependency 1419: PlainRecord */).constructInPlace;
const LibdiscoreStore = (require(1868) /* metro dependency 1868: LibdiscoreStore */).LibdiscoreStore;
const env0_8 = (require(1422) /* metro dependency 1422: GuildRecord */).getGuildEveryoneRoleId;
const env0_9 = (require(1939) /* metro dependency 1939: GuildRoleRecord */).GuildRoleRecordTypeTag;
const LibdiscoreStore = (LibdiscoreStoreModule).LibdiscoreStore;
let value = _fun21525(LibdiscoreStore);
value.displayName = 'GuildRoleStore';
object2 = {BACKGROUND_SYNC: BACKGROUND_SYNC_21537, OVERLAY_INITIALIZE: function(a0, a1) {
object = {BACKGROUND_SYNC: BACKGROUND_SYNC_21537, OVERLAY_INITIALIZE: function(a0, a1) {
var r2;
var property;
var partitionKey;
@@ -107,437 +111,449 @@ function _fun21515(global, require, importDefault, importAll, module, exports, d
GUILD_ROLE_DELETE: function({guildId, roleId}, a1) {
a1.removeRecord(guildId, roleId);
}};
const LibdiscoreBatchStoreRefactorExperiment = (require(1870) /* metro dependency 1870: libdiscoreExperiments */).LibdiscoreBatchStoreRefactorExperiment;
value = new value(object2, LibdiscoreBatchStoreRefactorExperiment.getCachedBridgedStoreMode());
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/GuildRoleStore.tsx');
const LibdiscoreBatchStoreRefactorExperiment = (LibdiscoreExperimentsModule).LibdiscoreBatchStoreRefactorExperiment;
value = new value(object, LibdiscoreBatchStoreRefactorExperiment.getCachedBridgedStoreMode());
(FileImportTrackerModule).fileFinishedImporting('stores/GuildRoleStore.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_21516(a0, a1) { // fn#21516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:274, offset: 0x00ef2b71, 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)) {
function _createForOfIteratorHelperLoose_21516(a0, a1) { // fn#21516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:274, offset: 0x00ef2b71, 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);
}
return _fun21517;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_21518(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun21517;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_21518(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_21518(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_21518(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun21517;
}
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 _isNativeReflectConstruct_21519() { // fn#21519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:1184, offset: 0x00ef2ce3, 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_21519_isNativeReflectConstruct = function() {
return !!result;
})();
}
function createGuildRoleRecordFromRust(a0) { // fn#21522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:1377, offset: 0x00ef2d41, size: 82 bytes, params: 2, frame: 16
var value;
const constructInPlaceBinding = constructInPlace;
const object2 = {};
copyDataProperties(object2, a0, undefined);
value = Reflect.apply((importAll(483) /* metro dependency 483: BigFlagUtils */).deserialize, value,
[a0.permissions]);
object2['permissions'] = value;
return constructInPlaceBinding(GuildRoleRecordTypeTag, object2);
}
function syncRoles(a0, a1, a2) { // fn#21523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:2786, offset: 0x00ef2d93, size: 130 bytes, params: 4, frame: 17
var setPartition;
let value = a1.op === 'update';
if (!(value && a1.writes.length === 0 && a1.deletes.length === 0)) {
setPartition = a2.setPartition;
value = importAll(1942) /* metro dependency 1942: GuildRoleRecordUtils */;
Reflect.apply(setPartition, a2, [a0, value.fromSyncOperation(a0, a1, a2.getPartition(a0))]);
}
}
function _fun21525(a0) { // fn#21525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:1500, offset: 0x00ef2e75, size: 235 bytes, params: 2, frame: 16
const closure = GuildRoleStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'stateWrapper', value: function() {
return this.database;
}}, {key: 'serializeAllGuildRoles', value: function() {
return this.database.mapPartitions(importAll(dependencyMap[11]).toSerializedPartition);
}}, {key: 'getUnsafeMutableRoles', value: function(a0) {
return this.database.getPartition(a0);
}}, {key: 'getManyRoles', value: function(a0, a1) {
return this.database.getManyRecords(a0, a1);
}}, {key: 'getRole', value: function(a0, a1) {
return this.database.getRecord(a0, a1);
}}, {key: 'getNumRoles', value: function(a0) {
return this.database.partitionLength(a0);
}}, {key: 'getEveryoneRole', value: value_21535}, {key: 'partitionVersion', value: function(a0) {
return this.database.partitionVersion(a0);
}}]);
}
function BACKGROUND_SYNC_21537({guilds}, a1) { // fn#21537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:3164, offset: 0x00ef3192, size: 252 bytes, params: 3, frame: 30
var r2;
var r1;
var value4;
var getNullablePartition;
var id;
var value5;
var value6;
var data_mode;
var value7;
var setPartition;
var moduleValue;
var fromServerArray;
var id2;
var roles;
var value8;
var moduleValue2;
var filterRoleDeletes;
var id3;
var partial_updates;
var deleted_role_ids;
var value9;
var value10;
const value2 = _createForOfIteratorHelperLoose_21516(guilds);
const value3 = value2();
let done = value3.done;
if (!done) {
r2 = value3;
while (true) {
value4 = r2.value;
getNullablePartition = a1.getNullablePartition;
id = value4.id;
value5 = Reflect.apply(getNullablePartition, a1, [id]);
value6 = value5 != null;
if (value6) {
value7 = value4.data_mode !== 'unavailable';
r1 = value7;
} else {
r1 = value6;
if (r5) {
}
if (!r1) {
return _fun21517;
}
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 _fun21517() { // fn#21517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:845, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
function _isNativeReflectConstruct_21519() { // fn#21519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:1184, offset: 0x00ef2ce3, 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_21519_isNativeReflectConstruct = function() {
return !!result;
})();
}
function createGuildRoleRecordFromRust(a0) { // fn#21522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:1377, offset: 0x00ef2d41, size: 82 bytes, params: 2, frame: 16
var value;
const constructInPlaceBinding = constructInPlace;
const object = {};
copyDataProperties(object, a0, undefined);
value = Reflect.apply((importAll(483) /* metro dependency 483: BigFlagUtils */).deserialize, value,
[a0.permissions]);
object['permissions'] = value;
return constructInPlaceBinding(GuildRoleRecordTypeTag, object);
}
function syncRoles(a0, a1, a2) { // fn#21523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:2786, offset: 0x00ef2d93, size: 130 bytes, params: 4, frame: 17
var setPartition;
let value = a1.op === 'update';
if (!(value && a1.writes.length === 0 && a1.deletes.length === 0)) {
setPartition = a2.setPartition;
value = importAll(1942) /* metro dependency 1942: GuildRoleRecordUtils */;
Reflect.apply(setPartition, a2, [a0, value.fromSyncOperation(a0, a1, a2.getPartition(a0))]);
}
}
function _fun21525(a0) { // fn#21525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:1500, offset: 0x00ef2e75, size: 235 bytes, params: 2, frame: 16
const GuildRoleStore2 = GuildRoleStore;
Inherits(GuildRoleStore2, a0);
return CreateClass(GuildRoleStore2, [{key: 'stateWrapper', value: function() {
return this.database;
}}, {key: 'serializeAllGuildRoles', value: function() {
return this.database.mapPartitions(importAll(dependencyMap[11]).toSerializedPartition);
}}, {key: 'getUnsafeMutableRoles', value: function(a0) {
return this.database.getPartition(a0);
}}, {key: 'getManyRoles', value: function(a0, a1) {
return this.database.getManyRecords(a0, a1);
}}, {key: 'getRole', value: function(a0, a1) {
return this.database.getRecord(a0, a1);
}}, {key: 'getNumRoles', value: function(a0) {
return this.database.partitionLength(a0);
}}, {key: 'getEveryoneRole', value: value_21535}, {key: 'partitionVersion', value: function(a0) {
return this.database.partitionVersion(a0);
}}]);
function GuildRoleStore(a0) { // fn#21526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:1512, offset: 0x00ef2f60, size: 212 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, GuildRoleStore);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(GuildRoleStore);
binding = env1_4;
if (_isNativeReflectConstruct_21519()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.database = value.addKKVDatabase('guild_roles', createGuildRoleRecordFromRust);
value.getSortedRoles = value.database.memoizedPartition(_fun21527);
value.getRolesSnapshot = value.database.memoizedPartition(function(a0, a1) {
var r1;
var object = {};
copyDataProperties(object, a1, r1);
return object;
});
return value;
function _fun21527(a0, a1) { // fn#21527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:1860, offset: 0x00ef3034, size: 59 bytes, params: 3, frame: 13
let value = environment.__proto__.__proto__;
value = importAll(1940) /* metro dependency 1940: GuildRoleUtils */;
const sortGuildRoleRecords = value.sortGuildRoleRecords;
const Object = global.Object;
return Reflect.apply(sortGuildRoleRecords, value, [Object.values(a1)]);
}
}
function value_21535(a0) { // fn#21535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:2559, offset: 0x00ef3122, size: 87 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = getGuildEveryoneRoleId(a0);
value = this.database.getRecord(a0.id, value);
if (value == null) {
throw new global.Error('Guild does not have an @everyone role');
}
return value;
}
}
function BACKGROUND_SYNC_21537({guilds}, a1) { // fn#21537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:3164, offset: 0x00ef3192, size: 252 bytes, params: 3, frame: 30
var r2;
var r1;
var value4;
var getNullablePartition;
var id;
var value5;
var value6;
var data_mode;
var value7;
var setPartition;
var moduleValue;
var fromServerArray;
var id2;
var roles;
var value8;
var moduleValue2;
var filterRoleDeletes;
var id3;
var partial_updates;
var deleted_role_ids;
var value9;
var value10;
const value2 = _createForOfIteratorHelperLoose_21516(guilds);
const value3 = value2();
let done = value3.done;
if (!done) {
r2 = value3;
while (true) {
value4 = r2.value;
getNullablePartition = a1.getNullablePartition;
id = value4.id;
value5 = Reflect.apply(getNullablePartition, a1, [id]);
value6 = value5 != null;
if (value6) {
value7 = value4.data_mode !== 'unavailable';
r1 = value7;
} else {
r1 = value6;
}
if (!r1) {
continue;
}
setPartition = a1.setPartition;
id = value4.id;
data_mode = value4.data_mode;
if (data_mode === 'partial') {
moduleValue2 = importAll(1940) /* metro dependency 1940: GuildRoleUtils */;
filterRoleDeletes = moduleValue2.filterRoleDeletes;
id3 = value4.id;
partial_updates = value4.partial_updates;
roles = partial_updates.roles;
partial_updates = value4.partial_updates;
deleted_role_ids = partial_updates.deleted_role_ids;
value9 = Reflect.apply(filterRoleDeletes, moduleValue2, [id3, value5, roles, deleted_role_ids]);
r1 = value9;
} else {
moduleValue = importAll(1942) /* metro dependency 1942: GuildRoleRecordUtils */;
fromServerArray = moduleValue.fromServerArray;
id2 = value4.id;
roles = value4.roles;
value8 = Reflect.apply(fromServerArray, moduleValue, [id2, roles]);
r1 = value8;
}
Reflect.apply(setPartition, a1, [id, r1]);
value10 = value2();
done = value10.done;
if (done) {
break;
}
r2 = value10;
continue;
}
setPartition = a1.setPartition;
id = value4.id;
data_mode = value4.data_mode;
if (data_mode === 'partial') {
moduleValue2 = importAll(1940) /* metro dependency 1940: GuildRoleUtils */;
filterRoleDeletes = moduleValue2.filterRoleDeletes;
id3 = value4.id;
partial_updates = value4.partial_updates;
roles = partial_updates.roles;
partial_updates = value4.partial_updates;
deleted_role_ids = partial_updates.deleted_role_ids;
value9 = Reflect.apply(filterRoleDeletes, moduleValue2, [id3, value5, roles, deleted_role_ids]);
r1 = value9;
} else {
moduleValue = importAll(1942) /* metro dependency 1942: GuildRoleRecordUtils */;
fromServerArray = moduleValue.fromServerArray;
id2 = value4.id;
roles = value4.roles;
value8 = Reflect.apply(fromServerArray, moduleValue, [id2, roles]);
r1 = value8;
}
Reflect.apply(setPartition, a1, [id, r1]);
value10 = value2();
done = value10.done;
if (done) {
break;
}
r2 = value10;
continue;
}
}
}
function CONNECTION_OPEN_21541({guilds, unavailableGuilds}, a1) { // fn#21541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:3805, offset: 0x00ef330d, size: 276 bytes, params: 3, frame: 19
var r3;
var r2;
var value6;
var value7;
var value10;
var has;
var value11;
var value13;
var id;
var syncRolesBinding;
var roles;
var value14;
const Set = global.Set;
let set = new Set(guilds.map(function(a0) {
return a0.id;
}));
const value4 = _createForOfIteratorHelperLoose_21516(unavailableGuilds);
const value5 = value4();
let done = value5.done;
if (!done) {
for (r3 = value5; true; r3 = value7) {
value6 = r3.value;
set.add(value6);
value7 = value4();
done = value7.done;
if (done) {
break;
function CONNECTION_OPEN_21541({guilds, unavailableGuilds}, a1) { // fn#21541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:3805, offset: 0x00ef330d, size: 276 bytes, params: 3, frame: 19
var r3;
var r2;
var value6;
var value7;
var value10;
var has;
var value11;
var value13;
var id;
var syncRolesBinding;
var roles;
var value14;
const Set = global.Set;
let set = new Set(guilds.map(function(a0) {
return a0.id;
}));
const value4 = _createForOfIteratorHelperLoose_21516(unavailableGuilds);
const value5 = value4();
let done = value5.done;
if (!done) {
for (r3 = value5; true; r3 = value7) {
value6 = r3.value;
set.add(value6);
value7 = value4();
done = value7.done;
if (done) {
break;
}
}
}
}
_createForOfIteratorHelperLoose_21516Binding = _createForOfIteratorHelperLoose_21516;
const getPartitionKeys = a1.getPartitionKeys;
const value8 = _createForOfIteratorHelperLoose_21516Binding(Reflect.apply(getPartitionKeys, a1, []));
const value9 = value8();
done = value9.done;
if (!done) {
r3 = value9;
while (true) {
value10 = r3.value;
has = set.has;
if (!Reflect.apply(has, set, [value10])) {
a1.removePartition(value10);
}
value11 = value8();
done = value11.done;
if (done) {
break;
}
r3 = value11;
continue;
}
}
set = _createForOfIteratorHelperLoose_21516(guilds);
const value12 = set();
done = value12.done;
if (!done) {
for (r2 = value12; true; r2 = value14) {
value13 = r2.value;
id = value13.id;
syncRolesBinding = syncRoles;
roles = value13.roles;
syncRolesBinding(id, roles, a1);
checkGuildRolesExist('connection_open', id, a1);
value14 = set();
done = value14.done;
if (done) {
break;
}
}
}
}
function CACHE_LOADED_21543({guilds}, a1) { // fn#21543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:4249, offset: 0x00ef3421, size: 142 bytes, params: 3, frame: 22
var r2;
var value4;
var id;
var roles;
var setPartition;
var moduleValue;
var fromSerializedPartition;
var value5;
a1.clear();
const value2 = _createForOfIteratorHelperLoose_21516(guilds);
const value3 = value2();
let done = value3.done;
if (!done) {
for (r2 = value3; true; r2 = value5) {
value4 = r2.value;
id = value4.id;
roles = value4.roles;
setPartition = a1.setPartition;
moduleValue = importAll(1942) /* metro dependency 1942: GuildRoleRecordUtils */;
fromSerializedPartition = moduleValue.fromSerializedPartition;
Reflect.apply(setPartition, a1, [id, Reflect.apply(fromSerializedPartition, moduleValue, [id, roles])]);
checkGuildRolesExist('cache_loaded', id, a1);
value5 = value2();
done = value5.done;
if (done) {
break;
}
}
}
}
function CACHE_LOADED_LAZY_21544(a0, a1) { // fn#21544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:4488, offset: 0x00ef34af, size: 164 bytes, params: 3, frame: 22
var r1;
var clear;
var value;
var _createForOfIteratorHelperLoose_21516Binding;
var value2;
var value3;
var done;
var value4;
var id;
var roles;
var setPartition;
var moduleValue;
var fromSerializedPartition;
var value5;
let guilds = a0.guilds;
reducibleJoin3: while (true) {
if (guilds.length === 0) {
break reducibleJoin3;
}
clear = a1.clear;
Reflect.apply(clear, a1, []);
value = environment;
_createForOfIteratorHelperLoose_21516Binding = _createForOfIteratorHelperLoose_21516;
guilds = a0.guilds;
value2 = _createForOfIteratorHelperLoose_21516Binding(guilds);
value3 = value2();
done = value3.done;
if (done) {
break reducibleJoin3;
const getPartitionKeys = a1.getPartitionKeys;
const value8 = _createForOfIteratorHelperLoose_21516Binding(Reflect.apply(getPartitionKeys, a1, []));
const value9 = value8();
done = value9.done;
if (!done) {
r3 = value9;
while (true) {
value10 = r3.value;
has = set.has;
if (!Reflect.apply(has, set, [value10])) {
a1.removePartition(value10);
}
value11 = value8();
done = value11.done;
if (done) {
break;
}
r3 = value11;
continue;
}
}
r1 = value3;
reducibleLoop2: while (true) {
value4 = r1.value;
id = value4.id;
roles = value4.roles;
setPartition = a1.setPartition;
moduleValue = importAll(1942) /* metro dependency 1942: GuildRoleRecordUtils */;
fromSerializedPartition = moduleValue.fromSerializedPartition;
Reflect.apply(setPartition, a1, [id, Reflect.apply(fromSerializedPartition, moduleValue, [id, roles])]);
checkGuildRolesExist('cache_loaded_lazy', id, a1);
value5 = value2();
done = value5.done;
set = _createForOfIteratorHelperLoose_21516(guilds);
const value12 = set();
done = value12.done;
if (!done) {
for (r2 = value12; true; r2 = value14) {
value13 = r2.value;
id = value13.id;
syncRolesBinding = syncRoles;
roles = value13.roles;
syncRolesBinding(id, roles, a1);
checkGuildRolesExist('connection_open', id, a1);
value14 = set();
done = value14.done;
if (done) {
break;
}
}
}
}
function CACHE_LOADED_21543({guilds}, a1) { // fn#21543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:4249, offset: 0x00ef3421, size: 142 bytes, params: 3, frame: 22
var r2;
var value4;
var id;
var roles;
var setPartition;
var moduleValue;
var fromSerializedPartition;
var value5;
a1.clear();
const value2 = _createForOfIteratorHelperLoose_21516(guilds);
const value3 = value2();
let done = value3.done;
if (!done) {
for (r2 = value3; true; r2 = value5) {
value4 = r2.value;
id = value4.id;
roles = value4.roles;
setPartition = a1.setPartition;
moduleValue = importAll(1942) /* metro dependency 1942: GuildRoleRecordUtils */;
fromSerializedPartition = moduleValue.fromSerializedPartition;
Reflect.apply(setPartition, a1, [id, Reflect.apply(fromSerializedPartition, moduleValue, [id, roles])]);
checkGuildRolesExist('cache_loaded', id, a1);
value5 = value2();
done = value5.done;
if (done) {
break;
}
}
}
}
function CACHE_LOADED_LAZY_21544(a0, a1) { // fn#21544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:4488, offset: 0x00ef34af, size: 164 bytes, params: 3, frame: 22
var r1;
var clear;
var value;
var _createForOfIteratorHelperLoose_21516Binding;
var value2;
var value3;
var done;
var value4;
var id;
var roles;
var setPartition;
var moduleValue;
var fromSerializedPartition;
var value5;
let guilds = a0.guilds;
reducibleJoin3: while (true) {
if (guilds.length === 0) {
break reducibleJoin3;
}
clear = a1.clear;
Reflect.apply(clear, a1, []);
value = environment;
_createForOfIteratorHelperLoose_21516Binding = _createForOfIteratorHelperLoose_21516;
guilds = a0.guilds;
value2 = _createForOfIteratorHelperLoose_21516Binding(guilds);
value3 = value2();
done = value3.done;
if (done) {
break reducibleJoin3;
}
r1 = value5;
continue reducibleLoop2;
r1 = value3;
reducibleLoop2: while (true) {
value4 = r1.value;
id = value4.id;
roles = value4.roles;
setPartition = a1.setPartition;
moduleValue = importAll(1942) /* metro dependency 1942: GuildRoleRecordUtils */;
fromSerializedPartition = moduleValue.fromSerializedPartition;
Reflect.apply(setPartition, a1, [id, Reflect.apply(fromSerializedPartition, moduleValue, [id, roles])]);
checkGuildRolesExist('cache_loaded_lazy', id, a1);
value5 = value2();
done = value5.done;
if (done) {
break reducibleJoin3;
}
r1 = value5;
continue reducibleLoop2;
}
}
}
}
function GUILD_UPDATE_21546({guild}, a1) { // fn#21546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:4851, offset: 0x00ef358c, size: 73 bytes, params: 3, frame: 16
const id = guild.id;
const roles = guild.roles;
const setPartition = a1.setPartition;
const guildRoleRecordUtilsModule = importAll(1942) /* metro dependency 1942: GuildRoleRecordUtils */;
Reflect.apply(setPartition, a1, [id, guildRoleRecordUtilsModule.fromServerArray(id, roles)]);
}
function GUILD_ROLE_CREATE_21548(a0, a1) { // fn#21548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:5021, offset: 0x00ef35fd, size: 85 bytes, params: 3, frame: 19
const setRecord = a1.setRecord;
const guildId = a0.guildId;
const id = a0.role.id;
const value = importAll(1942) /* metro dependency 1942: GuildRoleRecordUtils */;
Reflect.apply(setRecord, a1, [guildId, id, value.fromServer(a0.guildId, a0.role)]);
}
function GuildRoleStore(a0) { // fn#21526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:1512, offset: 0x00ef2f60, size: 212 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, GuildRoleStore);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(GuildRoleStore);
binding = env1_4;
if (_isNativeReflectConstruct_21519()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
function GUILD_UPDATE_21546({guild}, a1) { // fn#21546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:4851, offset: 0x00ef358c, size: 73 bytes, params: 3, frame: 16
const id = guild.id;
const roles = guild.roles;
const setPartition = a1.setPartition;
Reflect.apply(setPartition, a1, [id, GuildRoleRecordUtilsModule.fromServerArray(id, roles)]);
}
value = binding(this, r0);
value.database = value.addKKVDatabase('guild_roles', createGuildRoleRecordFromRust);
value.getSortedRoles = value.database.memoizedPartition(_fun21527);
value.getRolesSnapshot = value.database.memoizedPartition(function(a0, a1) {
var r1;
var object = {};
copyDataProperties(object, a1, r1);
return object;
});
return value;
}
function value_21535(a0) { // fn#21535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:2559, offset: 0x00ef3122, size: 87 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = getGuildEveryoneRoleId(a0);
value = this.database.getRecord(a0.id, value);
if (value == null) {
throw new global.Error('Guild does not have an @everyone role');
function GUILD_ROLE_CREATE_21548(a0, a1) { // fn#21548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:5021, offset: 0x00ef35fd, size: 85 bytes, params: 3, frame: 19
const setRecord = a1.setRecord;
const guildId = a0.guildId;
const id = a0.role.id;
Reflect.apply(setRecord, a1, [guildId, id, GuildRoleRecordUtilsModule.fromServer(a0.guildId, a0.role)]);
}
function GUILD_ROLE_UPDATE(a0, a1) { // fn#21549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:5120, offset: 0x00ef35fd, size: 85 bytes, params: 3, frame: 19
const setRecord = a1.setRecord;
const guildId = a0.guildId;
const id = a0.role.id;
Reflect.apply(setRecord, a1, [guildId, id, GuildRoleRecordUtilsModule.fromServer(a0.guildId, a0.role)]);
}
return value;
}
function _fun21527(a0, a1) { // fn#21527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2065:1860, offset: 0x00ef3034, size: 59 bytes, params: 3, frame: 13
let value = environment.__proto__.__proto__;
value = importAll(1940) /* metro dependency 1940: GuildRoleUtils */;
const sortGuildRoleRecords = value.sortGuildRoleRecords;
const Object = global.Object;
return Reflect.apply(sortGuildRoleRecords, value, [Object.values(a1)]);
}
global.__d(_fun21515, 1938, [6, 7, 15, 17, 18, 1419, 1868, 1422, 1939, 483, 1940, 1942, 1870,
2]) /* metro module 1938, dependencies: [6, 7, 15, 17, 18, 1419, 1868, 1422, 1939, 483, 1940, 1942, 1870, 2] */;
+463 -451
View File
@@ -1,6 +1,19 @@
/* Metro module 1867; source: stores/GuildStore.tsx; dependencies: [6, 7, 15, 17, 18, 1419, 1868, 1422, 1226, 661, 1417, 1421, 21, 1418, 1870, 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 SnowflakeUtils from '../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import AuthenticationStore from './AuthenticationStore.tsx'; /* Metro dependency 1226 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as FavoritesConstantsModule from '../modules/favorites/FavoritesConstants.tsx'; /* Metro dependency 1417 */
import * as PlainRecordModule from '../lib/PlainRecord.tsx'; /* Metro dependency 1419 */
import * as LibdiscoreStoreModule from '../modules/libdiscore/stores/LibdiscoreStore.tsx'; /* Metro dependency 1868 */
import * as LibdiscoreExperimentsModule from '../modules/libdiscore/libdiscoreExperiments.tsx'; /* Metro dependency 1870 */
function _fun20067(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:6, offset: 0x00ebdd1d, size: 593 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const _arrayLikeToArray_20070 = function(a0, a1) {
var r0;
@@ -47,24 +60,16 @@ function _fun20067(global, require, importDefault, importAll, module, exports, d
};
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 */;
let value = require(1419) /* metro dependency 1419: PlainRecord */;
let value = PlainRecordModule;
const env0_9 = value.constructInPlace;
const env0_10 = value.set;
const LibdiscoreStore = (require(1868) /* metro dependency 1868: LibdiscoreStore */).LibdiscoreStore;
const LibdiscoreStore = (LibdiscoreStoreModule).LibdiscoreStore;
value = require(1422) /* metro dependency 1422: GuildRecord */;
const env0_11 = value.GuildRecordTypeTag;
const env0_12 = value.updateJoinedAt;
const env0_13 = value.updateGameApplications;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const env0_15 = (require(661) /* metro dependency 661: Constants */).FAVORITES;
const env0_16 = (require(1417) /* metro dependency 1417: FavoritesConstants */).FAVORITES_GUILD_RECORD;
_fun20076(LibdiscoreStore).displayName = 'GuildStore';
object2 = {BACKGROUND_SYNC: BACKGROUND_SYNC_20084, LOGOUT: function(a0, a1) {
object = {BACKGROUND_SYNC: BACKGROUND_SYNC_20084, LOGOUT: function(a0, a1) {
a1.clear();
}, RESET_SOCKET: function(a0, a1) {
a1.clear();
@@ -102,484 +107,491 @@ function _fun20067(global, require, importDefault, importAll, module, exports, d
}
}, GUILD_MEMBER_ADD: GUILD_MEMBER_ADD,
GUILD_OFFICIAL_GAME_APPLICATIONS_UPDATE: GUILD_OFFICIAL_GAME_APPLICATIONS_UPDATE};
const LibdiscoreBatchStoreRefactorExperiment = (require(1870) /* metro dependency 1870: libdiscoreExperiments */).LibdiscoreBatchStoreRefactorExperiment;
value = new value(object2, LibdiscoreBatchStoreRefactorExperiment.getCachedBridgedStoreMode());
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/GuildStore.tsx');
const LibdiscoreBatchStoreRefactorExperiment = (LibdiscoreExperimentsModule).LibdiscoreBatchStoreRefactorExperiment;
value = new value(object, LibdiscoreBatchStoreRefactorExperiment.getCachedBridgedStoreMode());
(FileImportTrackerModule).fileFinishedImporting('stores/GuildStore.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_20068(a0, a1) { // fn#20068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:363, offset: 0x00ebdf6e, 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)) {
function _createForOfIteratorHelperLoose_20068(a0, a1) { // fn#20068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:363, offset: 0x00ebdf6e, 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);
}
return _fun20069;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_20070(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun20069;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_20070(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_20070(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun20069;
}
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 _isNativeReflectConstruct_20071() { // fn#20071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:1273, offset: 0x00ebe0e0, 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_20071_isNativeReflectConstruct = function() {
return !!result;
})();
}
function createGuildRecordFromRust(a0) { // fn#20074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:1466, offset: 0x00ebe13e, size: 200 bytes, params: 2, frame: 19
var r7;
var date;
var value;
const constructInPlaceBinding = constructInPlace;
const object2 = {};
copyDataProperties(object2, a0, undefined);
value = Reflect.apply((require(1421) /* metro dependency 1421: SetUtils */).toSetInplace, value, [a0.features]);
object2['features'] = value;
const joinedAt = a0.joinedAt;
value = null;
if (value != joinedAt) {
date = new global.Date(a0.joinedAt);
} else {
r7 = value;
}
object2['joinedAt'] = r7;
object2['premiumProgressBarEnabledUserUpdatedAt'] = value != a0.premiumProgressBarEnabledUserUpdatedAt ? new global.Date(a0.premiumProgressBarEnabledUserUpdatedAt) : value;
return constructInPlaceBinding(GuildRecordTypeTag, object2);
}
function updateGuildTheme(a0, a1, a2) { // fn#20075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:1769, offset: 0x00ebe206, size: 60 bytes, params: 4, frame: 18
const value = a0.get(a1);
if (value != null) {
a0.set(a1, set(value, 'guildTheme', a2));
}
}
function _fun20076(a0) { // fn#20076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:1861, offset: 0x00ebe242, size: 93 bytes, params: 2, frame: 16
const closure = GuildStore;
env0_8(closure, a0);
return env0_5(closure, [{key: 'stateWrapper', value: function() {
return this.database;
}}, {key: 'getGuildCount', value: function() {
return this.database.length();
}}]);
}
function BACKGROUND_SYNC_20084({guilds}, a1) { // fn#20084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:2607, offset: 0x00ebe431, size: 149 bytes, params: 3, frame: 23
var r2;
var r1;
var value4;
var get;
var id;
var value5;
var value6;
var data_mode;
var value7;
var set;
var moduleValue;
var fromBackgroundSync;
var value8;
const value2 = _createForOfIteratorHelperLoose_20068(guilds);
const value3 = value2();
let done = value3.done;
if (!done) {
r2 = value3;
while (true) {
value4 = r2.value;
get = a1.get;
id = value4.id;
value5 = Reflect.apply(get, a1, [id]);
value6 = value5 != null;
if (value6) {
data_mode = value4.data_mode;
value7 = data_mode !== 'unavailable';
r1 = value7;
} else {
r1 = value6;
}
if (!r1) {
continue;
}
set = a1.set;
id = value4.id;
moduleValue = importAll(1418) /* metro dependency 1418: GuildRecordUtils */;
fromBackgroundSync = moduleValue.fromBackgroundSync;
Reflect.apply(set, a1, [id, Reflect.apply(fromBackgroundSync, moduleValue, [value4, value5])]);
value8 = value2();
done = value8.done;
if (done) {
break;
}
r2 = value8;
continue;
}
}
}
function CONNECTION_OPEN_20087({guilds, unavailableGuilds}, a1) { // fn#20087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:2875, offset: 0x00ebe4d7, size: 361 bytes, params: 3, frame: 26
var r7;
var r5;
var r2;
var value8;
var id;
var properties;
var moduleValue;
var fromServer;
var id2;
var value9;
var value11;
var value12;
var value14;
var remove;
var value15;
let value = a1.getAllRecords();
const Set = global.Set;
const Object = global.Object;
let set = new Set(Object.keys(value));
const value6 = _createForOfIteratorHelperLoose_20068(guilds);
const value7 = value6();
let done = value7.done;
if (!done) {
r7 = value7;
reducibleLoop1: while (true) {
value8 = r7.value;
id = value8.id;
set.delete(id);
properties = value8.properties;
if (properties == null) {
reducibleJoin3: while (true) {
if (value[value8.id] == null) {
throw new global.Error('Guild data was missing from store, but hash was still available.');
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_20070(a0, value);
r6 = value;
} else {
r6 = value;
}
break reducibleJoin3;
}
r5 = r6;
}
set = a1.set;
id = value8.id;
moduleValue = importAll(1418) /* metro dependency 1418: GuildRecordUtils */;
fromServer = moduleValue.fromServer;
id2 = value8.id;
Reflect.apply(set, a1, [id, Reflect.apply(fromServer, moduleValue, [value8, value[id2]])]);
value9 = value6();
done = value9.done;
if (done) {
break reducibleLoop1;
}
r7 = value9;
continue reducibleLoop1;
} else {
r5 = value;
}
}
value = _createForOfIteratorHelperLoose_20068(unavailableGuilds);
const value10 = value();
done = value10.done;
if (!done) {
r5 = value10;
reducibleLoop6: while (true) {
value11 = r5.value;
set.delete(value11);
value12 = value();
done = value12.done;
if (done) {
break reducibleLoop6;
if (r5) {
if (r5) {
}
r5 = value12;
continue reducibleLoop6;
return _fun20069;
}
}
value = _createForOfIteratorHelperLoose_20068(set);
const value13 = value();
done = value13.done;
if (!done) {
r2 = value13;
reducibleLoop8: while (true) {
value14 = r2.value;
remove = a1.remove;
Reflect.apply(remove, a1, [value14]);
value15 = value();
done = value15.done;
if (done) {
break reducibleLoop8;
}
r2 = value15;
continue reducibleLoop8;
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 _fun20069() { // fn#20069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:934, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
}
function OVERLAY_INITIALIZE_20088({guilds}, a1) { // fn#20088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:3414, offset: 0x00ebe640, size: 216 bytes, params: 3, frame: 28
var r1;
var r15;
var value3;
var value4;
var done;
var value5;
var properties;
var additionalFields;
var set;
var id;
var moduleValue;
var fromGuildPropertiesWithAdditionalFields;
var joinedAt;
var Date;
var prototype;
var value6;
var date;
var value7;
var premiumSubscriberCount;
var value8;
a1.clear();
if (guilds != null) {
value3 = _createForOfIteratorHelperLoose_20068(guilds);
value4 = value3();
done = value4.done;
if (!done) {
r1 = value4;
while (true) {
value5 = r1.value;
properties = value5.properties;
additionalFields = value5.additionalFields;
set = a1.set;
id = properties.id;
moduleValue = importAll(1418) /* metro dependency 1418: GuildRecordUtils */;
fromGuildPropertiesWithAdditionalFields = moduleValue.fromGuildPropertiesWithAdditionalFields;
joinedAt = additionalFields.joinedAt;
if (joinedAt != null) {
Date = global.Date;
joinedAt = additionalFields.joinedAt;
prototype = Date.prototype;
value6 = Object.create(prototype, {constructor: {value: Date}});
date = new Date();
value7 = date instanceof Object ? date : value6;
r15 = value7;
} else {
r15 = null;
}
function _isNativeReflectConstruct_20071() { // fn#20071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:1273, offset: 0x00ebe0e0, 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_20071_isNativeReflectConstruct = function() {
return !!result;
})();
}
function createGuildRecordFromRust(a0) { // fn#20074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:1466, offset: 0x00ebe13e, size: 200 bytes, params: 2, frame: 19
var r7;
var date;
var value;
const constructInPlaceBinding = constructInPlace;
const object = {};
copyDataProperties(object, a0, undefined);
value = Reflect.apply((require(1421) /* metro dependency 1421: SetUtils */).toSetInplace, value, [a0.features]);
object['features'] = value;
const joinedAt = a0.joinedAt;
value = null;
if (value != joinedAt) {
date = new global.Date(a0.joinedAt);
} else {
r7 = value;
}
object['joinedAt'] = r7;
object['premiumProgressBarEnabledUserUpdatedAt'] = value != a0.premiumProgressBarEnabledUserUpdatedAt ? new global.Date(a0.premiumProgressBarEnabledUserUpdatedAt) : value;
return constructInPlaceBinding(GuildRecordTypeTag, object);
}
function updateGuildTheme(a0, a1, a2) { // fn#20075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:1769, offset: 0x00ebe206, size: 60 bytes, params: 4, frame: 18
const value = a0.get(a1);
if (value != null) {
a0.set(a1, set(value, 'guildTheme', a2));
}
}
function _fun20076(a0) { // fn#20076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:1861, offset: 0x00ebe242, size: 93 bytes, params: 2, frame: 16
const GuildStore2 = GuildStore;
Inherits(GuildStore2, a0);
return CreateClass(GuildStore2, [{key: 'stateWrapper', value: function() {
return this.database;
}}, {key: 'getGuildCount', value: function() {
return this.database.length();
}}]);
function GuildStore(a0) { // fn#20077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:1873, offset: 0x00ebe29f, size: 253 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, GuildStore);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(GuildStore);
binding = env1_6;
if (_isNativeReflectConstruct_20071()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.database = value.addKVDatabase('guilds', createGuildRecordFromRust);
value.getGuild = getGuild;
value.getGuilds = value.database.memoized(function(a0) {
var r1;
var object = {};
copyDataProperties(object, a0, r1);
return object;
});
value.getGuildsArray = value.database.memoized(function(a0) {
var Object = global.Object;
return Object.values(a0);
});
value.getGuildIds = value.database.memoized(_fun20081);
return value;
function getGuild(a0) { // fn#20078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:2163, owner: GuildStore.getGuild, offset: 0x00ebe39c, size: 55 bytes, params: 2, frame: 12
var value;
if (a0 != null) {
value = environment.__proto__.__proto__;
return a0 === FAVORITES ? FAVORITES_GUILD_RECORD : env0_0.database.get(a0);
}
premiumSubscriberCount = additionalFields.premiumSubscriberCount;
Reflect.apply(set, a1, [id, Reflect.apply(fromGuildPropertiesWithAdditionalFields, moduleValue,
[properties,
{joinedAt: r15, premiumSubscriberCount: premiumSubscriberCount}])]);
value8 = value3();
}
function _fun20081(a0) { // fn#20081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:2354, offset: 0x00ebe3ea, size: 40 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return (SnowflakeUtils).keys(a0);
}
}
}
function BACKGROUND_SYNC_20084({guilds}, a1) { // fn#20084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:2607, offset: 0x00ebe431, size: 149 bytes, params: 3, frame: 23
var r2;
var r1;
var value4;
var get;
var id;
var value5;
var value6;
var data_mode;
var value7;
var set;
var moduleValue;
var fromBackgroundSync;
var value8;
const value2 = _createForOfIteratorHelperLoose_20068(guilds);
const value3 = value2();
let done = value3.done;
if (!done) {
r2 = value3;
while (true) {
value4 = r2.value;
get = a1.get;
id = value4.id;
value5 = Reflect.apply(get, a1, [id]);
value6 = value5 != null;
if (value6) {
data_mode = value4.data_mode;
value7 = data_mode !== 'unavailable';
r1 = value7;
} else {
r1 = value6;
}
if (!r1) {
continue;
}
set = a1.set;
id = value4.id;
moduleValue = importAll(1418) /* metro dependency 1418: GuildRecordUtils */;
fromBackgroundSync = moduleValue.fromBackgroundSync;
Reflect.apply(set, a1, [id, Reflect.apply(fromBackgroundSync, moduleValue, [value4, value5])]);
value8 = value2();
done = value8.done;
if (done) {
break;
}
r1 = value8;
r2 = value8;
continue;
}
}
}
}
function CACHE_LOADED_LAZY_20090({guilds}, a1) { // fn#20090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:3922, offset: 0x00ebe78d, size: 130 bytes, params: 3, frame: 20
var r1;
var clear;
var value;
var value2;
var value3;
var done;
var value4;
var set;
var id;
var moduleValue;
var fromSerializedGuildRecord;
var value5;
reducibleJoin3: while (true) {
if (guilds.length === 0) {
break reducibleJoin3;
function CONNECTION_OPEN_20087({guilds, unavailableGuilds}, a1) { // fn#20087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:2875, offset: 0x00ebe4d7, size: 361 bytes, params: 3, frame: 26
var r7;
var r5;
var r2;
var value8;
var id;
var properties;
var moduleValue;
var fromServer;
var id2;
var value9;
var value11;
var value12;
var value14;
var remove;
var value15;
let value = a1.getAllRecords();
const Set = global.Set;
const Object = global.Object;
let set = new Set(Object.keys(value));
const value6 = _createForOfIteratorHelperLoose_20068(guilds);
const value7 = value6();
let done = value7.done;
if (!done) {
r7 = value7;
reducibleLoop1: while (true) {
value8 = r7.value;
id = value8.id;
set.delete(id);
properties = value8.properties;
if (properties == null) {
reducibleJoin3: while (true) {
if (value[value8.id] == null) {
throw new global.Error('Guild data was missing from store, but hash was still available.');
}
break reducibleJoin3;
}
}
set = a1.set;
id = value8.id;
moduleValue = importAll(1418) /* metro dependency 1418: GuildRecordUtils */;
fromServer = moduleValue.fromServer;
id2 = value8.id;
Reflect.apply(set, a1, [id, Reflect.apply(fromServer, moduleValue, [value8, value[id2]])]);
value9 = value6();
done = value9.done;
if (done) {
break reducibleLoop1;
}
r7 = value9;
continue reducibleLoop1;
}
}
clear = a1.clear;
Reflect.apply(clear, a1, []);
value = environment;
value2 = _createForOfIteratorHelperLoose_20068(guilds);
value3 = value2();
done = value3.done;
if (done) {
break reducibleJoin3;
value = _createForOfIteratorHelperLoose_20068(unavailableGuilds);
const value10 = value();
done = value10.done;
if (!done) {
r5 = value10;
reducibleLoop6: while (true) {
value11 = r5.value;
set.delete(value11);
value12 = value();
done = value12.done;
if (done) {
break reducibleLoop6;
}
r5 = value12;
continue reducibleLoop6;
}
}
r1 = value3;
reducibleLoop2: while (true) {
value4 = r1.value;
set = a1.set;
id = value4.id;
moduleValue = importAll(1418) /* metro dependency 1418: GuildRecordUtils */;
fromSerializedGuildRecord = moduleValue.fromSerializedGuildRecord;
Reflect.apply(set, a1, [id, Reflect.apply(fromSerializedGuildRecord, moduleValue, [value4])]);
value5 = value2();
done = value5.done;
value = _createForOfIteratorHelperLoose_20068(set);
const value13 = value();
done = value13.done;
if (!done) {
r2 = value13;
reducibleLoop8: while (true) {
value14 = r2.value;
remove = a1.remove;
Reflect.apply(remove, a1, [value14]);
value15 = value();
done = value15.done;
if (done) {
break reducibleLoop8;
}
r2 = value15;
continue reducibleLoop8;
}
}
}
function OVERLAY_INITIALIZE_20088({guilds}, a1) { // fn#20088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:3414, offset: 0x00ebe640, size: 216 bytes, params: 3, frame: 28
var r1;
var r15;
var value3;
var value4;
var done;
var value5;
var properties;
var additionalFields;
var set;
var id;
var moduleValue;
var fromGuildPropertiesWithAdditionalFields;
var joinedAt;
var Date;
var prototype;
var value6;
var date;
var value7;
var premiumSubscriberCount;
var value8;
a1.clear();
if (guilds != null) {
value3 = _createForOfIteratorHelperLoose_20068(guilds);
value4 = value3();
done = value4.done;
if (!done) {
r1 = value4;
while (true) {
value5 = r1.value;
properties = value5.properties;
additionalFields = value5.additionalFields;
set = a1.set;
id = properties.id;
moduleValue = importAll(1418) /* metro dependency 1418: GuildRecordUtils */;
fromGuildPropertiesWithAdditionalFields = moduleValue.fromGuildPropertiesWithAdditionalFields;
joinedAt = additionalFields.joinedAt;
if (joinedAt != null) {
Date = global.Date;
joinedAt = additionalFields.joinedAt;
prototype = Date.prototype;
value6 = Object.create(prototype, {constructor: {value: Date}});
date = new Date();
value7 = date instanceof Object ? date : value6;
r15 = value7;
} else {
r15 = null;
}
premiumSubscriberCount = additionalFields.premiumSubscriberCount;
Reflect.apply(set, a1, [id, Reflect.apply(fromGuildPropertiesWithAdditionalFields, moduleValue,
[properties,
{joinedAt: r15, premiumSubscriberCount: premiumSubscriberCount}])]);
value8 = value3();
done = value8.done;
if (done) {
break;
}
r1 = value8;
continue;
}
}
}
}
function CACHE_LOADED_LAZY_20090({guilds}, a1) { // fn#20090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:3922, offset: 0x00ebe78d, size: 130 bytes, params: 3, frame: 20
var r1;
var clear;
var value;
var value2;
var value3;
var done;
var value4;
var set;
var id;
var moduleValue;
var fromSerializedGuildRecord;
var value5;
reducibleJoin3: while (true) {
if (guilds.length === 0) {
break reducibleJoin3;
}
clear = a1.clear;
Reflect.apply(clear, a1, []);
value = environment;
value2 = _createForOfIteratorHelperLoose_20068(guilds);
value3 = value2();
done = value3.done;
if (done) {
break reducibleJoin3;
}
r1 = value5;
continue reducibleLoop2;
}
}
}
function GUILD_CREATE_20091({guild}, a1) { // fn#20091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:4110, offset: 0x00ebe80f, size: 133 bytes, params: 3, frame: 17
var set;
var moduleValue;
const get = a1.get;
let id = guild.id;
const value = Reflect.apply(get, a1, [id]);
if (guild.properties != null) {
set = a1.set;
id = guild.id;
moduleValue = importAll(1418) /* metro dependency 1418: GuildRecordUtils */;
Reflect.apply(set, a1, [id, moduleValue.fromServer(guild, value)]);
} else {
if (value == null) {
throw new global.Error('Guild data was missing from store, but hash was still available.');
}
set = a1.set;
id = guild.id;
moduleValue = importAll(1418) /* metro dependency 1418: GuildRecordUtils */;
Reflect.apply(set, a1, [id, moduleValue.fromServer(guild, value)]);
}
}
function GUILD_MEMBER_ADD({guildId, joinedAt, user}, a1) { // fn#20096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:4645, offset: 0x00ebe930, size: 156 bytes, params: 3, frame: 18
var r5;
var date;
const id = AuthenticationStore.getId();
const value3 = a1.get(guildId);
if (id === user.id) {
if (value3 != null) {
if (typeof joinedAt !== 'string') {
r5 = joinedAt;
} else {
date = new global.Date(joinedAt);
}
joinedAt = value3.joinedAt;
if (r5 !== joinedAt && r5 != null) {
a1.set(guildId, updateJoinedAt(value3, r5));
r1 = value3;
reducibleLoop2: while (true) {
value4 = r1.value;
set = a1.set;
id = value4.id;
moduleValue = importAll(1418) /* metro dependency 1418: GuildRecordUtils */;
fromSerializedGuildRecord = moduleValue.fromSerializedGuildRecord;
Reflect.apply(set, a1, [id, Reflect.apply(fromSerializedGuildRecord, moduleValue, [value4])]);
value5 = value2();
done = value5.done;
if (done) {
break reducibleJoin3;
}
r1 = value5;
continue reducibleLoop2;
}
}
}
}
function GUILD_OFFICIAL_GAME_APPLICATIONS_UPDATE({guildId, gameApplicationIds}, a1) { // fn#20097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:4852, offset: 0x00ebe9cc, size: 63 bytes, params: 3, frame: 16
const value = a1.get(guildId);
if (value != null) {
a1.set(guildId, updateGameApplications(value, gameApplicationIds));
function GUILD_CREATE_20091({guild}, a1) { // fn#20091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:4110, offset: 0x00ebe80f, size: 133 bytes, params: 3, frame: 17
var set;
var moduleValue;
const get = a1.get;
let id = guild.id;
const value = Reflect.apply(get, a1, [id]);
if (guild.properties != null) {
set = a1.set;
id = guild.id;
moduleValue = importAll(1418) /* metro dependency 1418: GuildRecordUtils */;
Reflect.apply(set, a1, [id, moduleValue.fromServer(guild, value)]);
} else {
if (value == null) {
throw new global.Error('Guild data was missing from store, but hash was still available.');
}
set = a1.set;
id = guild.id;
moduleValue = importAll(1418) /* metro dependency 1418: GuildRecordUtils */;
Reflect.apply(set, a1, [id, moduleValue.fromServer(guild, value)]);
}
}
}
function GuildStore(a0) { // fn#20077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:1873, offset: 0x00ebe29f, size: 253 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, GuildStore);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(GuildStore);
binding = env1_6;
if (_isNativeReflectConstruct_20071()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
function GUILD_MEMBER_ADD({guildId, joinedAt, user}, a1) { // fn#20096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:4645, offset: 0x00ebe930, size: 156 bytes, params: 3, frame: 18
var r5;
var date;
const id = AuthenticationStore.getId();
const value3 = a1.get(guildId);
if (id === user.id) {
if (value3 != null) {
if (typeof joinedAt !== 'string') {
r5 = joinedAt;
} else {
date = new global.Date(joinedAt);
}
joinedAt = value3.joinedAt;
if (r5 !== joinedAt && r5 != null) {
a1.set(guildId, updateJoinedAt(value3, r5));
}
}
}
}
value = binding(this, r0);
value.database = value.addKVDatabase('guilds', createGuildRecordFromRust);
value.getGuild = getGuild_20078;
value.getGuilds = value.database.memoized(function(a0) {
var r1;
var object = {};
copyDataProperties(object, a0, r1);
return object;
});
value.getGuildsArray = value.database.memoized(function(a0) {
var Object = global.Object;
return Object.values(a0);
});
value.getGuildIds = value.database.memoized(_fun20081);
return value;
}
function GuildStoreGetGuild(a0) { // fn#20078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:2163, owner: GuildStore.getGuild, offset: 0x00ebe39c, size: 55 bytes, params: 2, frame: 12
var value;
if (a0 != null) {
value = environment.__proto__.__proto__;
return a0 === FAVORITES ? FAVORITES_GUILD_RECORD : env0_0.database.get(a0);
function GUILD_OFFICIAL_GAME_APPLICATIONS_UPDATE({guildId, gameApplicationIds}, a1) { // fn#20097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:4852, offset: 0x00ebe9cc, size: 63 bytes, params: 3, frame: 16
const value = a1.get(guildId);
if (value != null) {
a1.set(guildId, updateGameApplications(value, gameApplicationIds));
}
}
}
function _fun20081(a0) { // fn#20081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1994:2354, offset: 0x00ebe3ea, size: 40 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return (importDefault(21) /* metro dependency 21: SnowflakeUtils */).keys(a0);
}
global.__d(_fun20067, 1867, [6, 7, 15, 17, 18, 1419, 1868, 1422, 1226, 661, 1417, 1421, 21, 1418, 1870,
2]) /* metro module 1867, dependencies: [6, 7, 15, 17, 18, 1419, 1868, 1422, 1226, 661, 1417, 1421, 21, 1418, 1870, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+69 -52
View File
@@ -1,15 +1,18 @@
/* Metro module 4400; source: stores/HookErrorStore.tsx; dependencies: [6, 7, 15, 17, 18, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun37386(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#37386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4572:6, offset: 0x010a418c, size: 309 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).MediaEngineHookTypes;
let env0_6 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun37390(Store);
value.displayName = 'HookErrorStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
@@ -17,55 +20,69 @@ function _fun37386(global, require, importDefault, importAll, module, exports, d
env0_6 = {};
}, MEDIA_ENGINE_SOUNDSHARE_TRANSMITTING: MEDIA_ENGINE_SOUNDSHARE_TRANSMITTING,
MEDIA_ENGINE_SOUNDSHARE_FAILED: MEDIA_ENGINE_SOUNDSHARE_FAILED});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/HookErrorStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/HookErrorStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_37387() { // fn#37387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4572:179, offset: 0x010a42c1, 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) {
function _isNativeReflectConstruct_37387() { // fn#37387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4572:179, offset: 0x010a42c1, 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_37387_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_37387_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun37390(a0) { // fn#37390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4572:387, offset: 0x010a431f, size: 68 bytes, params: 2, frame: 15
const closure = HookErrorStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getHookError', value: value_37392}]);
}
function _fun37390(a0) { // fn#37390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4572:387, offset: 0x010a431f, size: 68 bytes, params: 2, frame: 15
const HookErrorStore2 = HookErrorStore;
Inherits(HookErrorStore2, a0);
return CreateClass(HookErrorStore2, [{key: 'getHookError', value: value_37392}]);
function HookErrorStore() { // fn#37391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4572:399, offset: 0x00e3db8d, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, HookErrorStore);
const value3 = env1_3(HookErrorStore);
return env1_2(this, _isNativeReflectConstruct_37387() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function MEDIA_ENGINE_SOUNDSHARE_TRANSMITTING() { // fn#37394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4572:893, offset: 0x010a4370, size: 25 bytes, params: 1, frame: 2
const binding = env0_6;
const SOUND = MediaEngineHookTypes.SOUND;
delete binding[SOUND];
}
function value_37392(a0) { // fn#37392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4572:689, offset: 0x00fbe09c, size: 16 bytes, params: 2, frame: 2
return env1_6[a0];
}
}
function MEDIA_ENGINE_SOUNDSHARE_TRANSMITTING() { // fn#37394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4572:893, offset: 0x010a4370, size: 25 bytes, params: 1, frame: 2
const binding = env0_6;
const SOUND = MediaEngineHookTypes.SOUND;
delete binding[SOUND];
}
function MEDIA_ENGINE_SOUNDSHARE_FAILED({errorMessage, errorCode}) { // fn#37395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4572:983, offset: 0x010a4389, size: 52 bytes, params: 2, frame: 5
const binding = env0_6;
const SOUND = MediaEngineHookTypes.SOUND;
binding[SOUND] = {errorMessage: errorMessage, errorCode: errorCode};
}
function MEDIA_ENGINE_SOUNDSHARE_FAILED({errorMessage, errorCode}) { // fn#37395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4572:983, offset: 0x010a4389, size: 52 bytes, params: 2, frame: 5
const binding = env0_6;
const SOUND = MediaEngineHookTypes.SOUND;
binding[SOUND] = {errorMessage: errorMessage, errorCode: errorCode};
}
global.__d(_fun37386, 4400, [6, 7, 15, 17, 18, 661, 566, 694,
2]) /* metro module 4400, dependencies: [6, 7, 15, 17, 18, 661, 566, 694, 2] */;
+203 -170
View File
@@ -1,22 +1,26 @@
/* Metro module 4795; source: stores/IdleStore.tsx; dependencies: [6, 7, 15, 17, 18, 1226, 661, 4291, 477, 3829, 672, 694, 3767, 4796, 6949, 566, 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 Durations from '../utils/Durations.tsx'; /* Metro dependency 672 */
import AuthenticationStore from './AuthenticationStore.tsx'; /* Metro dependency 1226 */
import SelectedChannelActionCreators from '../actions/SelectedChannelActionCreators.tsx'; /* Metro dependency 4796 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as UserSettingsModule from '../modules/user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as ConstantsModule2 from '../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */
function _fun41515(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:6, offset: 0x011201a3, size: 783 bytes, params: 8, frame: 23
var powerMonitor;
const env0_0 = require;
const closure = checkIdleAFK;
const closure2 = OVERLAY_SET_NOT_IDLE;
const checkIdleAFK2 = checkIdleAFK;
const OVERLAY_SET_NOT_IDLE2 = OVERLAY_SET_NOT_IDLE;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = undefined;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_9 = constantsModule.IDLE_DURATION;
const env0_10 = constantsModule.AppStates;
const env0_11 = (require(4291) /* metro dependency 4291: Constants */).SpeakingFlags;
const Date = global.Date;
let env0_13 = Date.now();
if ((require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded) {
@@ -35,15 +39,17 @@ function _fun41515(global, require, importDefault, importAll, module, exports, d
powerMonitor = (importDefault(3767) /* metro dependency 3767: DiscordNative */).powerMonitor;
powerMonitor.on('unlock-screen', _fun41528);
} else {
global.setInterval(closure, 30 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND);
global.setInterval(checkIdleAFK2,
30 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND);
}
} else {
global.setInterval(closure, 30 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND);
global.setInterval(checkIdleAFK2,
30 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND);
}
(importDefault(6949) /* metro dependency 6949 */)(function() {
OVERLAY_SET_NOT_IDLE({});
}, 500);
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
const value5 = _fun41530(Store);
value5.displayName = 'IdleStore';
const value8 = new value5(importDefault(694) /* metro dependency 694: Dispatcher */, {IDLE: function(a0) {
@@ -61,182 +67,209 @@ function _fun41515(global, require, importDefault, importAll, module, exports, d
env0_13 = global.Date.now();
checkIdleAFK();
return false;
}, OVERLAY_SET_NOT_IDLE: closure2, CHANNEL_SELECT: closure2, VOICE_CHANNEL_SELECT: closure2, WINDOW_FOCUS: closure2,
OVERLAY_INITIALIZE: closure2, OVERLAY_SET_INPUT_LOCKED: closure2});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/IdleStore.tsx');
}, OVERLAY_SET_NOT_IDLE: OVERLAY_SET_NOT_IDLE2, CHANNEL_SELECT: OVERLAY_SET_NOT_IDLE2,
VOICE_CHANNEL_SELECT: OVERLAY_SET_NOT_IDLE2, WINDOW_FOCUS: OVERLAY_SET_NOT_IDLE2,
OVERLAY_INITIALIZE: OVERLAY_SET_NOT_IDLE2, OVERLAY_SET_INPUT_LOCKED: OVERLAY_SET_NOT_IDLE2});
(FileImportTrackerModule).fileFinishedImporting('stores/IdleStore.tsx');
exports.default = value8;
return value;
}
function _isNativeReflectConstruct_41516() { // fn#41516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:224, offset: 0x011204b2, 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) {
function _isNativeReflectConstruct_41516() { // fn#41516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:224, offset: 0x011204b2, 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_41516_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_41516_isNativeReflectConstruct = function() {
return !!result;
})();
}
function isSystemIdle() { // fn#41519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:461, offset: 0x01120510, size: 61 bytes, params: 1, frame: 13
let r0 = env0_16 || env0_17;
r0 = !r0 ? (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && env0_18 : r0;
return r0;
}
function checkIdleAFK() { // fn#41520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:521, offset: 0x0112054d, size: 427 bytes, params: 1, frame: 18
var value4;
var Math;
var min;
const Date = global.Date;
let value = Date.now();
value -= env0_13;
if (value > IDLE_DURATION) {
if (!env0_14) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'IDLE', 'idle': true,
idleSince: env0_13});
}
} else if (isSystemIdle()) {
if (!env0_14) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'IDLE', 'idle': true,
idleSince: env0_13});
}
} else if (env0_14) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'IDLE', 'idle': false});
function isSystemIdle() { // fn#41519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:461, offset: 0x01120510, size: 61 bytes, params: 1, frame: 13
let r0 = env0_16 || env0_17;
r0 = !r0 ? (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && env0_18 : r0;
return r0;
}
const AfkTimeout = (require(3829) /* metro dependency 3829: UserSettings */).AfkTimeout;
value = AfkTimeout.getSetting();
if (value === 0) {
if (!env0_15) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'AFK', 'afk': true});
}
} else if (env0_12 != null) {
if (!env0_15) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'AFK', 'afk': true});
}
} else {
value4 = global.Date.now() - env0_13;
Math = global.Math;
min = Math.min;
value *= (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND;
if (value4 > Reflect.apply(min, Math, [value, IDLE_DURATION])) {
if (!env0_15) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'AFK', 'afk': true});
function checkIdleAFK() { // fn#41520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:521, offset: 0x0112054d, size: 427 bytes, params: 1, frame: 18
var value4;
var Math;
var min;
const Date = global.Date;
let value = Date.now();
value -= env0_13;
if (value > IDLE_DURATION) {
if (!env0_14) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'IDLE', 'idle': true,
idleSince: env0_13});
}
} else if (isSystemIdle()) {
if (!env0_14) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'IDLE', 'idle': true,
idleSince: env0_13});
}
} else if (env0_14) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'IDLE', 'idle': false});
}
const AfkTimeout = (UserSettingsModule).AfkTimeout;
value = AfkTimeout.getSetting();
if (value === 0) {
if (!env0_15) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'AFK', 'afk': true});
}
} else if (env0_15) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'AFK', 'afk': false});
} else if (env0_12 != null) {
if (!env0_15) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'AFK', 'afk': true});
}
} else {
value4 = global.Date.now() - env0_13;
Math = global.Math;
min = Math.min;
value *= (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND;
if (value4 > Reflect.apply(min, Math, [value, IDLE_DURATION])) {
if (!env0_15) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'AFK', 'afk': true});
}
} else if (isSystemIdle()) {
if (!env0_15) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'AFK', 'afk': true});
}
} else if (env0_15) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'AFK', 'afk': false});
}
}
}
}
function handlePowerEvent(a0) { // fn#41521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:928, offset: 0x011206f8, size: 45 bytes, params: 2, frame: 9
var value;
if (a0) {
value = global.Date.now();
}
checkIdleAFK();
}
function CHANNEL_SELECT_41522({timestamp, type, bypassIdleUpdate}) { // fn#41522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:1869, offset: 0x01120725, size: 112 bytes, params: 2, frame: 12
var value2;
const r2 = type === 'OVERLAY_SET_NOT_IDLE' && timestamp != null;
let r0 = r2 && timestamp <= env0_13;
r0 = !r0 ? bypassIdleUpdate : r0;
if (!r0) {
if (!r2) {
value2 = global.Date.now();
function handlePowerEvent(a0) { // fn#41521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:928, offset: 0x011206f8, size: 45 bytes, params: 2, frame: 9
var value;
if (a0) {
value = global.Date.now();
}
checkIdleAFK();
}
return false;
}
function checkNativeIdle() { // fn#41523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:1072, offset: 0x01120795, size: 152 bytes, params: 1, frame: 16
var getSystemIdleTimeMs;
var powerMonitor;
const closure = handleIdleTime;
var systemIdleTimeMs;
const value2 = undefined;
if ((importDefault(3767) /* metro dependency 3767: DiscordNative */) == null) {
getSystemIdleTimeMs = value2;
} else {
powerMonitor = (importDefault(3767) /* metro dependency 3767: DiscordNative */).powerMonitor;
getSystemIdleTimeMs = powerMonitor == null ? value2 : powerMonitor.getSystemIdleTimeMs;
}
if (getSystemIdleTimeMs != null) {
systemIdleTimeMs = (importDefault(3767) /* metro dependency 3767: DiscordNative */).powerMonitor.getSystemIdleTimeMs();
if (systemIdleTimeMs instanceof global.Promise) {
systemIdleTimeMs.then(closure);
} else {
closure(systemIdleTimeMs);
function CHANNEL_SELECT_41522({timestamp, type, bypassIdleUpdate}) { // fn#41522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:1869, offset: 0x01120725, size: 112 bytes, params: 2, frame: 12
var value2;
const r2 = type === 'OVERLAY_SET_NOT_IDLE' && timestamp != null;
let r0 = r2 && timestamp <= env0_13;
r0 = !r0 ? bypassIdleUpdate : r0;
if (!r0) {
if (!r2) {
value2 = global.Date.now();
}
checkIdleAFK();
}
return false;
}
return value2;
}
function _fun41526() { // fn#41526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:1564, offset: 0x011208d3, size: 52 bytes, params: 1, frame: 12
handlePowerEvent(true);
(importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */).disconnect();
}
function checkNativeIdle() { // fn#41523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:1072, offset: 0x01120795, size: 152 bytes, params: 1, frame: 16
var getSystemIdleTimeMs;
var powerMonitor;
const handleIdleTime2 = handleIdleTime;
var systemIdleTimeMs;
const value2 = undefined;
if ((importDefault(3767) /* metro dependency 3767: DiscordNative */) == null) {
getSystemIdleTimeMs = value2;
} else {
powerMonitor = (importDefault(3767) /* metro dependency 3767: DiscordNative */).powerMonitor;
getSystemIdleTimeMs = powerMonitor == null ? value2 : powerMonitor.getSystemIdleTimeMs;
}
if (getSystemIdleTimeMs != null) {
systemIdleTimeMs = (importDefault(3767) /* metro dependency 3767: DiscordNative */).powerMonitor.getSystemIdleTimeMs();
if (systemIdleTimeMs instanceof global.Promise) {
systemIdleTimeMs.then(handleIdleTime2);
} else {
handleIdleTime2(systemIdleTimeMs);
}
}
return value2;
function handleIdleTime(a0) { // fn#41524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:1120, owner: checkNativeIdle.handleIdleTime, offset: 0x0112082d, size: 144 bytes, params: 2, frame: 16
const Date = global.Date;
let value = Date.now();
value -= a0;
if (env1_12 == null || value > env1_12) {
env1_13 = global.Math.max(value, env1_13);
}
checkIdleAFK();
const setTimeout = global.setTimeout;
const checkNativeIdleBinding = checkNativeIdle;
const Millis = (Durations).Millis;
const SECOND = Millis.SECOND;
setTimeout(checkNativeIdleBinding, 10 * SECOND);
}
function _fun41527() { // fn#41527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:1660, offset: 0x01120907, size: 22 bytes, params: 1, frame: 11
handlePowerEvent(true);
}
function _fun41528() { // fn#41528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:1736, offset: 0x0112091d, size: 22 bytes, params: 1, frame: 11
handlePowerEvent(false);
}
function _fun41530(a0) { // fn#41530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:2050, offset: 0x01120945, size: 187 bytes, params: 2, frame: 16
const closure = IdleStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(AuthenticationStore);
}}, {key: 'isIdle', value: value_41533}, {key: 'isAFK', value: value_41534}, {key: 'getIdleSince',
value: value_41535}, {key: 'getSystemSuspended', value: value_41536}, {key: 'getSystemLocked',
value: value_41537}]);
}
function handleIdleTime(a0) { // fn#41524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:1120, owner: checkNativeIdle.handleIdleTime, offset: 0x0112082d, size: 144 bytes, params: 2, frame: 16
const Date = global.Date;
let value = Date.now();
value -= a0;
if (env1_12 == null || value > env1_12) {
env1_13 = global.Math.max(value, env1_13);
}
checkIdleAFK();
const setTimeout = global.setTimeout;
const checkNativeIdleBinding = checkNativeIdle;
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const SECOND = Millis.SECOND;
setTimeout(checkNativeIdleBinding, 10 * SECOND);
}
function value_41535() { // fn#41535, offset: 0x01120a00, size: 18 bytes, params: 1, frame: 3
return env1_14 ? env1_13 : null;
function _fun41526() { // fn#41526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:1564, offset: 0x011208d3, size: 52 bytes, params: 1, frame: 12
handlePowerEvent(true);
(SelectedChannelActionCreators).disconnect();
}
function _fun41527() { // fn#41527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:1660, offset: 0x01120907, size: 22 bytes, params: 1, frame: 11
handlePowerEvent(true);
}
function _fun41528() { // fn#41528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:1736, offset: 0x0112091d, size: 22 bytes, params: 1, frame: 11
handlePowerEvent(false);
}
function _fun41530(a0) { // fn#41530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:2050, offset: 0x01120945, size: 187 bytes, params: 2, frame: 16
const IdleStore2 = IdleStore;
Inherits(IdleStore2, a0);
return CreateClass(IdleStore2, [{key: 'initialize', value: function() {
this.waitFor(AuthenticationStore);
}}, {key: 'isIdle', value: value_41533}, {key: 'isAFK', value: value_41534}, {key: 'getIdleSince',
value: value_41535}, {key: 'getSystemSuspended', value: value_41536}, {key: 'getSystemLocked',
value: value_41537}]);
function IdleStore() { // fn#41531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4973:2062, offset: 0x00e07435, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, IdleStore);
const value3 = env1_6(IdleStore);
return env1_5(this, _isNativeReflectConstruct_41516() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_41533() { // fn#41533, offset: 0x00df0f5a, size: 9 bytes, params: 1, frame: 1
return env1_14;
}
function value_41534() { // fn#41534, offset: 0x00df0e8b, size: 9 bytes, params: 1, frame: 1
return env1_15;
}
function value_41535() { // fn#41535, offset: 0x01120a00, size: 18 bytes, params: 1, frame: 3
return env1_14 ? env1_13 : null;
}
function value_41536() { // fn#41536, offset: 0x00df0e94, size: 9 bytes, params: 1, frame: 1
return env1_16;
}
function value_41537() { // fn#41537, offset: 0x00e07553, size: 9 bytes, params: 1, frame: 1
return env1_17;
}
}
}
global.__d(_fun41515, 4795, [6, 7, 15, 17, 18, 1226, 661, 4291, 477, 3829, 672, 694, 3767, 4796, 6949, 566,
2]) /* metro module 4795, dependencies: [6, 7, 15, 17, 18, 1226, 661, 4291, 477, 3829, 672, 694, 3767, 4796, 6949, 566, 2] */;
+200 -172
View File
@@ -1,25 +1,31 @@
/* Metro module 8880; source: stores/InstantInviteStore.tsx; dependencies: [6, 7, 15, 17, 18, 8150, 4118, 8881, 8883, 8884, 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 InviteRecord from '../records/InviteRecord.tsx'; /* Metro dependency 8150 */
import Module08881 from '../by-id/module-08881.js'; /* Metro dependency 8881 */
import defaultImport2 from '../by-id/module-08883.js'; /* Metro dependency 8883 */
import defaultImport3 from '../by-id/module-08884.js'; /* Metro dependency 8884 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../modules/instant_invite/Constants.tsx'; /* Metro dependency 4118 */
function _fun69296(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:6, offset: 0x01c707c0, size: 606 bytes, params: 8, frame: 21
const normalizeInviteCodeForInstallationId = function(a0) {
return a0.toLowerCase();
};
const closure = INSTANT_INVITE_RECEIVED_INSTALLATION_ID_CLEAR;
const INSTANT_INVITE_RECEIVED_INSTALLATION_ID_CLEAR2 = INSTANT_INVITE_RECEIVED_INSTALLATION_ID_CLEAR;
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 inviteRecord = importDefault(8150) /* metro dependency 8150: InviteRecord */;
const env0_8 = (require(4118) /* metro dependency 4118: Constants */).InviteTargetTypes;
let env0_10 = {};
let env0_11 = {};
let env0_12 = {};
let env0_13 = {};
const Map = global.Map;
let map = new Map();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun69302(Store).displayName = 'InstantInviteStore';
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
env0_10 = {};
@@ -44,104 +50,156 @@ function _fun69296(global, require, importDefault, importAll, module, exports, d
env0_14 = true;
}, FRIEND_INVITES_FETCH_RESPONSE: FRIEND_INVITES_FETCH_RESPONSE, INSTANT_INVITE_CLEAR: INSTANT_INVITE_CLEAR,
INSTANT_INVITE_RECEIVED_INSTALLATION_ID_SET: INSTANT_INVITE_RECEIVED_INSTALLATION_ID_SET,
INSTANT_INVITE_RECEIVED_INSTALLATION_ID_CLEAR: closure, INVITE_MODAL_CLOSE: INVITE_MODAL_CLOSE,
LOGOUT: LOGOUT_69326});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/InstantInviteStore.tsx');
INSTANT_INVITE_RECEIVED_INSTALLATION_ID_CLEAR: INSTANT_INVITE_RECEIVED_INSTALLATION_ID_CLEAR2,
INVITE_MODAL_CLOSE: INVITE_MODAL_CLOSE, LOGOUT: LOGOUT_69326});
(FileImportTrackerModule).fileFinishedImporting('stores/InstantInviteStore.tsx');
exports.default = map;
}
function _isNativeReflectConstruct_69297() { // fn#69297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:186, offset: 0x01c70a1e, 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) {
function _isNativeReflectConstruct_69297() { // fn#69297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:186, offset: 0x01c70a1e, 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_69297_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_69297_isNativeReflectConstruct = function() {
return !!result;
})();
}
function INSTANT_INVITE_RECEIVED_INSTALLATION_ID_CLEAR({inviteCode}) { // fn#69301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:502, offset: 0x01c70a80, size: 92 bytes, params: 2, frame: 14
var Map;
var value3;
var map;
const value2 = normalizeInviteCodeForInstallationId(inviteCode);
let binding = env0_17;
if (binding.has(value2)) {
Map = global.Map;
binding = env0_17;
value3 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map(binding);
(map instanceof Object ? map : value3).delete(value2);
return undefined;
function INSTANT_INVITE_RECEIVED_INSTALLATION_ID_CLEAR({inviteCode}) { // fn#69301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:502, offset: 0x01c70a80, size: 92 bytes, params: 2, frame: 14
var Map;
var value3;
var map;
const value2 = normalizeInviteCodeForInstallationId(inviteCode);
let binding = env0_17;
if (binding.has(value2)) {
Map = global.Map;
binding = env0_17;
value3 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map(binding);
(map instanceof Object ? map : value3).delete(value2);
return undefined;
}
return false;
}
return false;
}
function _fun69302(a0) { // fn#69302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:660, offset: 0x01c70adc, size: 180 bytes, params: 2, frame: 16
const closure = InstantInviteStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'getInvite', value: value_69304}, {key: 'getFriendInvite', value: value_69305},
{key: 'getFriendInvitesFetching', value: value_69306}, {key: 'canRevokeFriendInvite', value: value_69307},
{key: 'getReceivedInstallationIdForInviteCode', value: value_69308}]);
}
function _fun69302(a0) { // fn#69302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:660, offset: 0x01c70adc, size: 180 bytes, params: 2, frame: 16
const InstantInviteStore2 = InstantInviteStore;
Inherits(InstantInviteStore2, a0);
return CreateClass(InstantInviteStore2, [{key: 'getInvite', value: value_69304}, {key: 'getFriendInvite',
value: value_69305}, {key: 'getFriendInvitesFetching', value: value_69306}, {key: 'canRevokeFriendInvite',
value: value_69307}, {key: 'getReceivedInstallationIdForInviteCode', value: value_69308}]);
function InstantInviteStore() { // fn#69303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:672, offset: 0x01176269, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, InstantInviteStore);
const value3 = env1_5(InstantInviteStore);
return env1_4(this, _isNativeReflectConstruct_69297() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function CHANNEL_DELETE_69310({channel}) { // fn#69310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:1664, offset: 0x01c70c90, size: 54 bytes, params: 2, frame: 4
delete env0_10[channel.id];
delete env0_11[channel.id];
delete env0_12[channel.id];
}
function value_69304(a0) { // fn#69304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:979, offset: 0x01c70b90, size: 137 bytes, params: 2, frame: 10
let value = a1;
const value2 = undefined;
const {targetType, targetUserId, targetApplicationId} = value !== value2 ? value : {};
value = environment.__proto__;
const STREAM = InviteTargetTypes.STREAM;
return targetType !== STREAM ? targetType !== InviteTargetTypes.EMBEDDED_APPLICATION ? env1_10[a0] : targetApplicationId != null ? env1_12[a0] == null ? value2 : env1_12[a0][targetApplicationId] : env1_10[a0] : targetUserId != null ? env1_11[a0] == null ? value2 : env1_11[a0][targetUserId] : targetType !== InviteTargetTypes.EMBEDDED_APPLICATION ? env1_10[a0] : targetApplicationId != null ? env1_12[a0] == null ? value2 : env1_12[a0][targetApplicationId] : env1_10[a0];
}
function FRIEND_INVITE_CREATE_SUCCESS_69311(a0) { // fn#69311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:1781, offset: 0x01c70cc6, size: 158 bytes, params: 2, frame: 17
env0_13[a0.invite.code] = InviteRecord.createFromServer(a0.invite);
const defaultImport = importDefault(8881) /* metro dependency 8881 */;
const defaultImport2 = importDefault(8883) /* metro dependency 8883 */;
const defaultImport3 = importDefault(8884) /* metro dependency 8884 */;
const Object = global.Object;
const value3 = defaultImport(defaultImport2(defaultImport3(Object.values(env0_13), 'createdAt')));
const value4 = null;
env0_9 = value4 != value3 ? value3 : value4;
}
function value_69305() { // fn#69305, offset: 0x00e07a77, size: 9 bytes, params: 1, frame: 1
return env1_9;
}
function value_69306() { // fn#69306, offset: 0x00df0f5a, size: 9 bytes, params: 1, frame: 1
return env1_14;
}
function value_69307() { // fn#69307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:1326, offset: 0x01c70c19, size: 35 bytes, params: 1, frame: 3
const value = environment.__proto__;
return env1_9 != null && !env1_15 && !env1_16;
}
function value_69308(a0) { // fn#69308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:1414, offset: 0x01c70c3c, size: 33 bytes, params: 2, frame: 13
return env1_17.get(normalizeInviteCodeForInstallationId(a0));
}
function FRIEND_INVITE_REVOKE_SUCCESS_69313(a0) { // fn#69313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:2065, offset: 0x01c70d64, size: 155 bytes, params: 2, frame: 18
const invites = a0.invites;
const value = null;
if (value != invites) {
a0.invites.forEach(_fun69314);
}
const defaultImport = importDefault(8881) /* metro dependency 8881 */;
const defaultImport2 = importDefault(8883) /* metro dependency 8883 */;
const defaultImport3 = importDefault(8884) /* metro dependency 8884 */;
const Object = global.Object;
const value4 = defaultImport(defaultImport2(defaultImport3(Object.values(env0_13), 'createdAt')));
env0_9 = value != value4 ? value4 : value;
}
function INSTANT_INVITE_CREATE_SUCCESS_69315({channelId, invite}) { // fn#69315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:2303, offset: 0x01c70e29, size: 217 bytes, params: 2, frame: 14
const fromServer = InviteRecord.createFromServer(invite);
const targetType = fromServer.targetType;
const STREAM = InviteTargetTypes.STREAM;
if (targetType !== STREAM) {
if (fromServer.targetType !== InviteTargetTypes.EMBEDDED_APPLICATION) {
function CHANNEL_DELETE_69310({channel}) { // fn#69310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:1664, offset: 0x01c70c90, size: 54 bytes, params: 2, frame: 4
delete env0_10[channel.id];
delete env0_11[channel.id];
delete env0_12[channel.id];
}
function FRIEND_INVITE_CREATE_SUCCESS_69311(a0) { // fn#69311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:1781, offset: 0x01c70cc6, size: 158 bytes, params: 2, frame: 17
const binding = env0_13;
const code = a0.invite.code;
const inviteRecordBinding = InviteRecord;
binding[code] = inviteRecordBinding.createFromServer(a0.invite);
const defaultImport = Module08881;
const Object = global.Object;
const value3 = defaultImport(defaultImport2(defaultImport3(Object.values(env0_13), 'createdAt')));
const value4 = null;
env0_9 = value4 != value3 ? value3 : value4;
}
function FRIEND_INVITE_REVOKE_SUCCESS_69313(a0) { // fn#69313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:2065, offset: 0x01c70d64, size: 155 bytes, params: 2, frame: 18
const invites = a0.invites;
const value = null;
if (value != invites) {
a0.invites.forEach(_fun69314);
}
const defaultImport = Module08881;
const Object = global.Object;
const value4 = defaultImport(defaultImport2(defaultImport3(Object.values(env0_13), 'createdAt')));
env0_9 = value != value4 ? value4 : value;
function _fun69314(a0) { // fn#69314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:2151, offset: 0x01c70dff, size: 42 bytes, params: 2, frame: 4
if (env1_13[a0.code] != null) {
delete env1_13[a0.code];
}
}
}
function INSTANT_INVITE_CREATE_SUCCESS_69315({channelId, invite}) { // fn#69315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:2303, offset: 0x01c70e29, size: 217 bytes, params: 2, frame: 14
const fromServer = InviteRecord.createFromServer(invite);
const targetType = fromServer.targetType;
const STREAM = InviteTargetTypes.STREAM;
if (targetType !== STREAM) {
if (fromServer.targetType !== InviteTargetTypes.EMBEDDED_APPLICATION) {
env0_10[channelId] = fromServer;
} else if (fromServer.targetApplication != null) {
if (env0_12[channelId] == null) {
env0_12[channelId] = {};
}
env0_12[channelId][fromServer.targetApplication.id] = fromServer;
} else {
env0_10[channelId] = fromServer;
}
} else if (fromServer.targetUser != null) {
if (env0_11[channelId] == null) {
env0_11[channelId] = {};
}
env0_11[channelId][global.String(fromServer.targetUser.id)] = fromServer;
} else if (fromServer.targetType !== InviteTargetTypes.EMBEDDED_APPLICATION) {
env0_10[channelId] = fromServer;
} else if (fromServer.targetApplication != null) {
if (env0_12[channelId] == null) {
@@ -151,83 +209,53 @@ function INSTANT_INVITE_CREATE_SUCCESS_69315({channelId, invite}) { // fn#69315,
} else {
env0_10[channelId] = fromServer;
}
} else if (fromServer.targetUser != null) {
if (env0_11[channelId] == null) {
env0_11[channelId] = {};
}
function INSTANT_INVITE_CREATE_FAILURE({channelId}) { // fn#69316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:2655, offset: 0x01c70f02, size: 25 bytes, params: 2, frame: 3
env0_10[channelId] = null;
}
function INSTANT_INVITE_REVOKE_SUCCESS_69317({channelId}) { // fn#69317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:2753, offset: 0x01c70f02, size: 25 bytes, params: 2, frame: 3
env0_10[channelId] = null;
}
function FRIEND_INVITES_FETCH_RESPONSE({invites}) { // fn#69321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:3084, offset: 0x01c70f1b, size: 149 bytes, params: 2, frame: 17
invites.forEach(_fun69322);
const defaultImport = Module08881;
const Object = global.Object;
env0_9 = defaultImport(defaultImport2(defaultImport3(Object.values({}), 'createdAt'))) ?? null;
function _fun69322(a0) { // fn#69322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:3158, offset: 0x01c70fb0, size: 38 bytes, params: 2, frame: 13
const binding = env1_13;
const code = a0.code;
const inviteRecordBinding = InviteRecord;
binding[code] = inviteRecordBinding.createFromServer(a0);
}
env0_11[channelId][global.String(fromServer.targetUser.id)] = fromServer;
} else if (fromServer.targetType !== InviteTargetTypes.EMBEDDED_APPLICATION) {
env0_10[channelId] = fromServer;
} else if (fromServer.targetApplication != null) {
if (env0_12[channelId] == null) {
env0_12[channelId] = {};
}
function INSTANT_INVITE_CLEAR({channelId}) { // fn#69323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:3299, offset: 0x01c70fd6, size: 23 bytes, params: 2, frame: 2
delete env0_10[channelId];
}
function INSTANT_INVITE_RECEIVED_INSTALLATION_ID_SET({inviteCode, receivedInstallationId}) { // fn#69324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:3403, offset: 0x01c70fed, size: 78 bytes, params: 2, frame: 15
const Map = global.Map;
const map = new Map(env0_17);
map.set(normalizeInviteCodeForInstallationId(inviteCode), receivedInstallationId);
}
function INVITE_MODAL_CLOSE({inviteCode}) { // fn#69325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:3643, offset: 0x01c7103b, size: 41 bytes, params: 2, frame: 12
return inviteCode != null && INSTANT_INVITE_RECEIVED_INSTALLATION_ID_CLEAR({inviteCode: inviteCode});
}
function LOGOUT_69326() { // fn#69326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:3765, offset: 0x01c71064, size: 58 bytes, params: 1, frame: 10
if (env0_17.size === 0) {
return false;
}
env0_12[channelId][fromServer.targetApplication.id] = fromServer;
} else {
env0_10[channelId] = fromServer;
const Map = global.Map;
const map = new Map();
}
}
function INSTANT_INVITE_CREATE_FAILURE({channelId}) { // fn#69316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:2655, offset: 0x01c70f02, size: 25 bytes, params: 2, frame: 3
env0_10[channelId] = null;
}
function FRIEND_INVITES_FETCH_RESPONSE({invites}) { // fn#69321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:3084, offset: 0x01c70f1b, size: 149 bytes, params: 2, frame: 17
invites.forEach(_fun69322);
const defaultImport = importDefault(8881) /* metro dependency 8881 */;
const defaultImport2 = importDefault(8883) /* metro dependency 8883 */;
const defaultImport3 = importDefault(8884) /* metro dependency 8884 */;
const Object = global.Object;
env0_9 = defaultImport(defaultImport2(defaultImport3(Object.values({}), 'createdAt'))) ?? null;
}
function INSTANT_INVITE_CLEAR({channelId}) { // fn#69323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:3299, offset: 0x01c70fd6, size: 23 bytes, params: 2, frame: 2
delete env0_10[channelId];
}
function INSTANT_INVITE_RECEIVED_INSTALLATION_ID_SET({inviteCode, receivedInstallationId}) { // fn#69324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:3403, offset: 0x01c70fed, size: 78 bytes, params: 2, frame: 15
const Map = global.Map;
const map = new Map(env0_17);
map.set(normalizeInviteCodeForInstallationId(inviteCode), receivedInstallationId);
}
function INVITE_MODAL_CLOSE({inviteCode}) { // fn#69325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:3643, offset: 0x01c7103b, size: 41 bytes, params: 2, frame: 12
return inviteCode != null && INSTANT_INVITE_RECEIVED_INSTALLATION_ID_CLEAR({inviteCode: inviteCode});
}
function LOGOUT_69326() { // fn#69326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:3765, offset: 0x01c71064, size: 58 bytes, params: 1, frame: 10
if (env0_17.size === 0) {
return false;
}
const Map = global.Map;
const map = new Map();
}
function value_69304(a0) { // fn#69304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:979, offset: 0x01c70b90, size: 137 bytes, params: 2, frame: 10
let value = a1;
const value2 = undefined;
const {targetType, targetUserId, targetApplicationId} = value !== value2 ? value : {};
value = environment.__proto__;
const STREAM = InviteTargetTypes.STREAM;
return targetType !== STREAM ? targetType !== InviteTargetTypes.EMBEDDED_APPLICATION ? env1_10[a0] : targetApplicationId != null ? env1_12[a0] == null ? value2 : env1_12[a0][targetApplicationId] : env1_10[a0] : targetUserId != null ? env1_11[a0] == null ? value2 : env1_11[a0][targetUserId] : targetType !== InviteTargetTypes.EMBEDDED_APPLICATION ? env1_10[a0] : targetApplicationId != null ? env1_12[a0] == null ? value2 : env1_12[a0][targetApplicationId] : env1_10[a0];
}
function value_69307() { // fn#69307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:1326, offset: 0x01c70c19, size: 35 bytes, params: 1, frame: 3
const value = environment.__proto__;
return env1_9 != null && !env1_15 && !env1_16;
}
function value_69308(a0) { // fn#69308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:1414, offset: 0x01c70c3c, size: 33 bytes, params: 2, frame: 13
return env1_17.get(normalizeInviteCodeForInstallationId(a0));
}
function _fun69314(a0) { // fn#69314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:2151, offset: 0x01c70dff, size: 42 bytes, params: 2, frame: 4
if (env1_13[a0.code] != null) {
delete env1_13[a0.code];
}
}
function _fun69322(a0) { // fn#69322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9065:3158, offset: 0x01c70fb0, size: 38 bytes, params: 2, frame: 13
env1_13[a0.code] = InviteRecord.createFromServer(a0);
}
global.__d(_fun69296, 8880, [6, 7, 15, 17, 18, 8150, 4118, 8881, 8883, 8884, 566, 694,
2]) /* metro module 8880, dependencies: [6, 7, 15, 17, 18, 8150, 4118, 8881, 8883, 8884, 566, 694, 2] */;
+301 -242
View File
@@ -1,4 +1,14 @@
/* Metro module 4097; source: stores/InviteStore.tsx; dependencies: [6, 7, 15, 17, 18, 661, 4098, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as InviteCodeUtilsModule from '../modules/instant_invite/InviteCodeUtils.tsx'; /* Metro dependency 4098 */
function _fun33568(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:6, offset: 0x01034f4a, size: 541 bytes, params: 8, frame: 21
let env0_0 = require;
const closure = function(a0) {
@@ -7,12 +17,6 @@ function _fun33568(global, require, importDefault, importAll, module, exports, d
};
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 = (require(661) /* metro dependency 661: Constants */).InviteStates;
let Map = global.Map;
let map = new Map();
Map = global.Map;
@@ -20,7 +24,7 @@ function _fun33568(global, require, importDefault, importAll, module, exports, d
const env0_10 = {};
Map = global.Map;
map = new Map();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun33575(Store).displayName = 'InviteStore';
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */, {INVITE_RESOLVE: INVITE_RESOLVE,
INVITE_RESOLVE_SUCCESS: function(a0) {
@@ -48,253 +52,308 @@ function _fun33568(global, require, importDefault, importAll, module, exports, d
updateInvite(a0.code, _fun33603);
}, INVITE_FRIEND_MEMBERS_FETCH_SUCCESS: INVITE_FRIEND_MEMBERS_FETCH_SUCCESS,
INVITE_FRIEND_MEMBERS_FETCH_FAILURE: INVITE_FRIEND_MEMBERS_FETCH_FAILURE});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/InviteStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/InviteStore.tsx');
exports.default = map;
}
function _isNativeReflectConstruct_33569() { // fn#33569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:171, offset: 0x01035167, 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) {
function _isNativeReflectConstruct_33569() { // fn#33569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:171, offset: 0x01035167, 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_33569_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_33569_isNativeReflectConstruct = function() {
return !!result;
})();
}
function updateInvite(a0, a1) { // fn#33572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:403, offset: 0x010351c5, size: 248 bytes, params: 3, frame: 17
var r12;
var object2;
var RESOLVING;
const r1 = a0 ?? '';
const value3 = undefined;
const extraDataFromInviteKey = (require(4098) /* metro dependency 4098: InviteCodeUtils */).parseExtraDataFromInviteKey(r1);
let binding = env0_8;
const value4 = binding.get(r1);
if (value4 != null) {
object2 = {};
RESOLVING = InviteStates.RESOLVING;
object2.state = RESOLVING;
copyDataProperties(object2, value4, RESOLVING);
r12 = object2;
} else {
r12 = {state: InviteStates.RESOLVING, code: extraDataFromInviteKey.baseCode};
function updateInvite(a0, a1) { // fn#33572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:403, offset: 0x010351c5, size: 248 bytes, params: 3, frame: 17
var r12;
var object;
var RESOLVING;
const r1 = a0 ?? '';
const value3 = undefined;
const extraDataFromInviteKey = (InviteCodeUtilsModule).parseExtraDataFromInviteKey(r1);
let binding = env0_8;
const value4 = binding.get(r1);
if (value4 != null) {
object = {};
RESOLVING = InviteStates.RESOLVING;
object.state = RESOLVING;
copyDataProperties(object, value4, RESOLVING);
r12 = object;
} else {
r12 = {state: InviteStates.RESOLVING, code: extraDataFromInviteKey.baseCode};
}
a1(r12);
const Map = global.Map;
binding = env0_8;
const value5 = Object.create(Map.prototype, {constructor: {value: Map}});
const map = new Map(binding);
(map instanceof Object ? map : value5).set(r1, r12);
const guild = r12.guild;
const value7 = guild == null;
if ((value7 ? value3 : guild.id) != null) {
object = {};
copyDataProperties(object, env0_10, value7);
object[r12.guild.id] = r1;
}
return value3;
}
a1(r12);
const Map = global.Map;
binding = env0_8;
const value5 = Object.create(Map.prototype, {constructor: {value: Map}});
const map = new Map(binding);
(map instanceof Object ? map : value5).set(r1, r12);
const guild = r12.guild;
const value7 = guild == null;
if ((value7 ? value3 : guild.id) != null) {
object2 = {};
copyDataProperties(object2, env0_10, value7);
object2[r12.guild.id] = r1;
function INSTANT_INVITE_REVOKE_SUCCESS(a0) { // fn#33573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:672, offset: 0x010352bd, size: 36 bytes, params: 2, frame: 13
const env0_0 = a0;
updateInvite(a0.code, _fun33574);
function _fun33574(a0) { // fn#33574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:739, offset: 0x010352e1, size: 72 bytes, params: 2, frame: 3
a0.state = 'banned' in env0_0 && env0_0.banned ? InviteStates.BANNED : InviteStates.EXPIRED;
}
}
return value3;
}
function INSTANT_INVITE_REVOKE_SUCCESS(a0) { // fn#33573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:672, offset: 0x010352bd, size: 36 bytes, params: 2, frame: 13
const env0_0 = a0;
updateInvite(a0.code, _fun33574);
}
function _fun33575(a0) { // fn#33575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:802, offset: 0x01035329, size: 162 bytes, params: 2, frame: 16
const InviteStore2 = InviteStore;
Inherits(InviteStore2, a0);
return CreateClass(InviteStore2, [{key: 'getInvite', value: value_33577}, {key: 'getInviteError', value: value_33578},
{key: 'getInvites', value: value_33579}, {key: 'getInviteKeyForGuildId', value: value_33580},
{key: 'getFriendMemberIds', value: value_33581}]);
function InviteStore() { // fn#33576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:814, offset: 0x00de700a, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, InviteStore);
const value3 = env1_5(InviteStore);
return env1_4(this, _isNativeReflectConstruct_33569() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function _fun33575(a0) { // fn#33575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:802, offset: 0x01035329, size: 162 bytes, params: 2, frame: 16
const closure = InviteStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'getInvite', value: value_33577}, {key: 'getInviteError', value: value_33578},
{key: 'getInvites', value: value_33579}, {key: 'getInviteKeyForGuildId', value: value_33580},
{key: 'getFriendMemberIds', value: value_33581}]);
}
function value_33577(a0) { // fn#33577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:1086, offset: 0x010353cb, size: 22 bytes, params: 2, frame: 11
return env1_8.get(a0);
}
function INVITE_RESOLVE({code}) { // fn#33582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:1426, offset: 0x01035407, size: 119 bytes, params: 2, frame: 16
const extraDataFromInviteKey = (require(4098) /* metro dependency 4098: InviteCodeUtils */).parseExtraDataFromInviteKey(code);
const Map = global.Map;
const map = new Map(env0_8);
const set = map.set;
const RESOLVING = InviteStates.RESOLVING;
Reflect.apply(set, map, [code, {code: extraDataFromInviteKey.baseCode, state: RESOLVING}]);
}
function value_33578(a0) { // fn#33578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:1144, offset: 0x00f7ebd1, size: 22 bytes, params: 2, frame: 11
return env1_9.get(a0);
}
function INVITE_RESOLVE_SUCCESS(a0) { // fn#33583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:1592, offset: 0x0103547e, size: 36 bytes, params: 2, frame: 13
const env0_0 = a0;
updateInvite(a0.code, _fun33584);
}
function value_33579() { // fn#33579, offset: 0x00fbd9d4, size: 9 bytes, params: 1, frame: 1
return env1_8;
}
function FRIEND_INVITE_CREATE_SUCCESS(a0) { // fn#33585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:2497, offset: 0x01035613, size: 42 bytes, params: 2, frame: 13
const env0_0 = a0;
updateInvite(a0.invite.code, _fun33586);
}
function value_33580(a0) { // fn#33580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:1256, offset: 0x010353e1, size: 16 bytes, params: 2, frame: 2
return env1_10[a0];
}
function FRIEND_INVITE_REVOKE_SUCCESS({invites}) { // fn#33587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:2652, offset: 0x01035670, size: 30 bytes, params: 2, frame: 11
invites.forEach(function(a0) {
updateInvite(a0.code, _fun33589);
});
}
function value_33581(a0) { // fn#33581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:1314, offset: 0x010353f1, size: 22 bytes, params: 2, frame: 11
return env1_11.get(a0);
}
function INSTANT_INVITE_CREATE_SUCCESS(a0) { // fn#33590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:2797, offset: 0x010356c8, size: 42 bytes, params: 2, frame: 13
const env0_0 = a0;
updateInvite(a0.invite.code, _fun33591);
}
function INVITE_ACCEPT({code}) { // fn#33592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:3458, offset: 0x0103581c, size: 32 bytes, params: 2, frame: 13
updateInvite(code, function(a0) {
a0.state = InviteStates.ACCEPTING;
});
}
function INVITE_ACCEPT_SUCCESS_33594(a0) { // fn#33594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:3567, offset: 0x01035856, size: 36 bytes, params: 2, frame: 13
const env0_0 = a0;
updateInvite(a0.code, _fun33595);
}
function INVITE_ACCEPT_FAILURE(a0) { // fn#33596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:3783, offset: 0x010358e4, size: 57 bytes, params: 2, frame: 15
const binding = env0_9;
binding.set(a0.code, a0.error);
updateInvite(a0.code, function(a0) {
a0.state = InviteStates.ERROR;
});
}
function INVITE_APP_OPENING({code}) { // fn#33598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:3914, offset: 0x01035937, size: 32 bytes, params: 2, frame: 13
updateInvite(code, function(a0) {
a0.state = InviteStates.APP_OPENING;
});
}
function INVITE_APP_OPENED({code}) { // fn#33600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:4025, offset: 0x01035971, size: 32 bytes, params: 2, frame: 13
updateInvite(code, function(a0) {
a0.state = InviteStates.APP_OPENED;
});
}
function INVITE_APP_NOT_OPENED({code}) { // fn#33602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:4138, offset: 0x010359ab, size: 32 bytes, params: 2, frame: 13
updateInvite(code, function(a0) {
a0.state = InviteStates.APP_NOT_OPENED;
});
}
function INVITE_FRIEND_MEMBERS_FETCH_SUCCESS({code, friendMemberIds}) { // fn#33604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:4272, offset: 0x010359e5, size: 68 bytes, params: 2, frame: 14
const Map = global.Map;
const binding = env0_11;
const value2 = Object.create(Map.prototype, {constructor: {value: Map}});
const map = new Map(binding);
(map instanceof Object ? map : value2).set(code, friendMemberIds);
}
function INVITE_FRIEND_MEMBERS_FETCH_FAILURE(a0) { // fn#33605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:4404, offset: 0x01035a29, size: 87 bytes, params: 2, frame: 13
var Map;
var value2;
var map;
let binding = env0_11;
if (binding.has(a0.code)) {
Map = global.Map;
binding = env0_11;
value2 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map(binding);
(map instanceof Object ? map : value2).delete(a0.code);
return undefined;
}
return false;
}
function _fun33574(a0) { // fn#33574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:739, offset: 0x010352e1, size: 72 bytes, params: 2, frame: 3
a0.state = 'banned' in env0_0 && env0_0.banned ? InviteStates.BANNED : InviteStates.EXPIRED;
}
function _fun33584(a0) { // fn#33584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:1659, offset: 0x010354a2, size: 369 bytes, params: 2, frame: 6
const RESOLVED = InviteStates.RESOLVED;
a0.state = RESOLVED;
let binding = env0_0;
a0.guild = binding.invite.guild;
a0.channel = binding.invite.channel;
a0.inviter = binding.invite.inviter;
const approximate_member_count = binding.invite.approximate_member_count;
const value2 = null;
a0.approximate_member_count = value2 != approximate_member_count ? approximate_member_count : value2;
const approximate_presence_count = env0_0.invite.approximate_presence_count;
a0.approximate_presence_count = value2 != approximate_presence_count ? approximate_presence_count : value2;
binding = env0_0;
a0.target_type = binding.invite.target_type;
a0.target_user = binding.invite.target_user;
a0.target_application = binding.invite.target_application;
a0.expires_at = binding.invite.expires_at;
a0.friends_count = binding.invite.friends_count;
a0.is_contact = binding.invite.is_contact;
a0.guild_scheduled_event = binding.invite.guild_scheduled_event;
a0.type = binding.invite.type;
a0.flags = binding.invite.flags;
a0.is_nickname_changeable = binding.invite.is_nickname_changeable;
a0.profile = binding.invite.profile;
a0.roles = binding.invite.roles;
}
function _fun33586(a0) { // fn#33586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:2569, offset: 0x0103563d, size: 51 bytes, params: 2, frame: 2
const RESOLVED = InviteStates.RESOLVED;
a0.state = RESOLVED;
a0.inviter = env0_0.invite.inviter;
}
function _fun33588({code}) { // fn#33588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:2715, offset: 0x0103568e, size: 32 bytes, params: 2, frame: 13
updateInvite(code, function(a0) {
a0.state = InviteStates.EXPIRED;
});
}
function _fun33591(a0) { // fn#33591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:2870, offset: 0x010356f2, size: 298 bytes, params: 2, frame: 6
const RESOLVED = InviteStates.RESOLVED;
a0.state = RESOLVED;
let binding = env0_0;
a0.guild = binding.invite.guild;
a0.channel = binding.invite.channel;
a0.inviter = binding.invite.inviter;
const approximate_member_count = binding.invite.approximate_member_count;
const value2 = null;
a0.approximate_member_count = value2 != approximate_member_count ? approximate_member_count : value2;
const approximate_presence_count = env0_0.invite.approximate_presence_count;
a0.approximate_presence_count = value2 != approximate_presence_count ? approximate_presence_count : value2;
binding = env0_0;
a0.target_type = binding.invite.target_type;
a0.target_user = binding.invite.target_user;
a0.target_application = binding.invite.target_application;
a0.guild_scheduled_event = binding.invite.guild_scheduled_event;
a0.type = binding.invite.type;
a0.is_nickname_changeable = binding.invite.is_nickname_changeable;
a0.profile = binding.invite.profile;
a0.roles = binding.invite.roles;
}
function _fun33595(a0) { // fn#33595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:3633, offset: 0x0103587a, size: 106 bytes, params: 2, frame: 13
const value = environment.__proto__;
const ACCEPTED = InviteStates.ACCEPTED;
a0.state = ACCEPTED;
const binding = env0_0;
a0.guild = binding.invite.guild;
a0.new_member = binding.invite.new_member;
const object2 = {};
copyDataProperties(object2, binding.invite.channel, copyDataProperties(object2, a0.channel, undefined));
a0.channel = object2;
function INVITE_RESOLVE({code}) { // fn#33582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:1426, offset: 0x01035407, size: 119 bytes, params: 2, frame: 16
const extraDataFromInviteKey = (InviteCodeUtilsModule).parseExtraDataFromInviteKey(code);
const Map = global.Map;
const map = new Map(env0_8);
const set = map.set;
const RESOLVING = InviteStates.RESOLVING;
Reflect.apply(set, map, [code, {code: extraDataFromInviteKey.baseCode, state: RESOLVING}]);
}
function INVITE_RESOLVE_SUCCESS(a0) { // fn#33583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:1592, offset: 0x0103547e, size: 36 bytes, params: 2, frame: 13
const env0_0 = a0;
updateInvite(a0.code, _fun33584);
function _fun33584(a0) { // fn#33584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:1659, offset: 0x010354a2, size: 369 bytes, params: 2, frame: 6
const RESOLVED = InviteStates.RESOLVED;
a0.state = RESOLVED;
let binding = env0_0;
a0.guild = binding.invite.guild;
a0.channel = binding.invite.channel;
a0.inviter = binding.invite.inviter;
const approximate_member_count = binding.invite.approximate_member_count;
const value2 = null;
a0.approximate_member_count = value2 != approximate_member_count ? approximate_member_count : value2;
const approximate_presence_count = env0_0.invite.approximate_presence_count;
a0.approximate_presence_count = value2 != approximate_presence_count ? approximate_presence_count : value2;
binding = env0_0;
a0.target_type = binding.invite.target_type;
a0.target_user = binding.invite.target_user;
a0.target_application = binding.invite.target_application;
a0.expires_at = binding.invite.expires_at;
a0.friends_count = binding.invite.friends_count;
a0.is_contact = binding.invite.is_contact;
a0.guild_scheduled_event = binding.invite.guild_scheduled_event;
a0.type = binding.invite.type;
a0.flags = binding.invite.flags;
a0.is_nickname_changeable = binding.invite.is_nickname_changeable;
a0.profile = binding.invite.profile;
a0.roles = binding.invite.roles;
}
}
function FRIEND_INVITE_CREATE_SUCCESS(a0) { // fn#33585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:2497, offset: 0x01035613, size: 42 bytes, params: 2, frame: 13
const env0_0 = a0;
updateInvite(a0.invite.code, _fun33586);
function _fun33586(a0) { // fn#33586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:2569, offset: 0x0103563d, size: 51 bytes, params: 2, frame: 2
const RESOLVED = InviteStates.RESOLVED;
a0.state = RESOLVED;
a0.inviter = env0_0.invite.inviter;
}
}
function FRIEND_INVITE_REVOKE_SUCCESS({invites}) { // fn#33587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:2652, offset: 0x01035670, size: 30 bytes, params: 2, frame: 11
invites.forEach(function(a0) {
updateInvite(a0.code, _fun33589);
});
function _fun33588({code}) { // fn#33588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:2715, offset: 0x0103568e, size: 32 bytes, params: 2, frame: 13
updateInvite(code, function(a0) {
a0.state = InviteStates.EXPIRED;
});
function _fun33589(a0) { // fn#33589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:2739, offset: 0x010356ae, size: 26 bytes, params: 2, frame: 2
const EXPIRED = InviteStates.EXPIRED;
a0.state = EXPIRED;
}
}
}
function INSTANT_INVITE_CREATE_SUCCESS(a0) { // fn#33590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:2797, offset: 0x010356c8, size: 42 bytes, params: 2, frame: 13
const env0_0 = a0;
updateInvite(a0.invite.code, _fun33591);
function _fun33591(a0) { // fn#33591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:2870, offset: 0x010356f2, size: 298 bytes, params: 2, frame: 6
const RESOLVED = InviteStates.RESOLVED;
a0.state = RESOLVED;
let binding = env0_0;
a0.guild = binding.invite.guild;
a0.channel = binding.invite.channel;
a0.inviter = binding.invite.inviter;
const approximate_member_count = binding.invite.approximate_member_count;
const value2 = null;
a0.approximate_member_count = value2 != approximate_member_count ? approximate_member_count : value2;
const approximate_presence_count = env0_0.invite.approximate_presence_count;
a0.approximate_presence_count = value2 != approximate_presence_count ? approximate_presence_count : value2;
binding = env0_0;
a0.target_type = binding.invite.target_type;
a0.target_user = binding.invite.target_user;
a0.target_application = binding.invite.target_application;
a0.guild_scheduled_event = binding.invite.guild_scheduled_event;
a0.type = binding.invite.type;
a0.is_nickname_changeable = binding.invite.is_nickname_changeable;
a0.profile = binding.invite.profile;
a0.roles = binding.invite.roles;
}
}
function INVITE_ACCEPT({code}) { // fn#33592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:3458, offset: 0x0103581c, size: 32 bytes, params: 2, frame: 13
updateInvite(code, function(a0) {
a0.state = InviteStates.ACCEPTING;
});
function _fun33593(a0) { // fn#33593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:3517, offset: 0x0103583c, size: 26 bytes, params: 2, frame: 2
const ACCEPTING = InviteStates.ACCEPTING;
a0.state = ACCEPTING;
}
}
function INVITE_ACCEPT_SUCCESS_33594(a0) { // fn#33594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:3567, offset: 0x01035856, size: 36 bytes, params: 2, frame: 13
const env0_0 = a0;
updateInvite(a0.code, _fun33595);
function _fun33595(a0) { // fn#33595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:3633, offset: 0x0103587a, size: 106 bytes, params: 2, frame: 13
const value = environment.__proto__;
const ACCEPTED = InviteStates.ACCEPTED;
a0.state = ACCEPTED;
const binding = env0_0;
a0.guild = binding.invite.guild;
a0.new_member = binding.invite.new_member;
const object = {};
copyDataProperties(object, binding.invite.channel, copyDataProperties(object, a0.channel, undefined));
a0.channel = object;
}
}
function INVITE_ACCEPT_FAILURE(a0) { // fn#33596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:3783, offset: 0x010358e4, size: 57 bytes, params: 2, frame: 15
const binding = env0_9;
binding.set(a0.code, a0.error);
updateInvite(a0.code, function(a0) {
a0.state = InviteStates.ERROR;
});
}
function INVITE_APP_OPENING({code}) { // fn#33598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:3914, offset: 0x01035937, size: 32 bytes, params: 2, frame: 13
updateInvite(code, function(a0) {
a0.state = InviteStates.APP_OPENING;
});
function _fun33599(a0) { // fn#33599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:3977, offset: 0x01035957, size: 26 bytes, params: 2, frame: 2
const APP_OPENING = InviteStates.APP_OPENING;
a0.state = APP_OPENING;
}
}
function INVITE_APP_OPENED({code}) { // fn#33600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:4025, offset: 0x01035971, size: 32 bytes, params: 2, frame: 13
updateInvite(code, function(a0) {
a0.state = InviteStates.APP_OPENED;
});
function _fun33601(a0) { // fn#33601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:4087, offset: 0x01035991, size: 26 bytes, params: 2, frame: 2
const APP_OPENED = InviteStates.APP_OPENED;
a0.state = APP_OPENED;
}
}
function INVITE_APP_NOT_OPENED({code}) { // fn#33602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:4138, offset: 0x010359ab, size: 32 bytes, params: 2, frame: 13
updateInvite(code, function(a0) {
a0.state = InviteStates.APP_NOT_OPENED;
});
function _fun33603(a0) { // fn#33603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:4203, offset: 0x010359cb, size: 26 bytes, params: 2, frame: 2
const APP_NOT_OPENED = InviteStates.APP_NOT_OPENED;
a0.state = APP_NOT_OPENED;
}
}
function INVITE_FRIEND_MEMBERS_FETCH_SUCCESS({code, friendMemberIds}) { // fn#33604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:4272, offset: 0x010359e5, size: 68 bytes, params: 2, frame: 14
const Map = global.Map;
const binding = env0_11;
const value2 = Object.create(Map.prototype, {constructor: {value: Map}});
const map = new Map(binding);
(map instanceof Object ? map : value2).set(code, friendMemberIds);
}
function INVITE_FRIEND_MEMBERS_FETCH_FAILURE(a0) { // fn#33605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4255:4404, offset: 0x01035a29, size: 87 bytes, params: 2, frame: 13
var Map;
var value2;
var map;
let binding = env0_11;
if (binding.has(a0.code)) {
Map = global.Map;
binding = env0_11;
value2 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map(binding);
(map instanceof Object ? map : value2).delete(a0.code);
return undefined;
}
return false;
}
}
global.__d(_fun33568, 4097, [6, 7, 15, 17, 18, 661, 4098, 566, 694,
2]) /* metro module 4097, dependencies: [6, 7, 15, 17, 18, 661, 4098, 566, 694, 2] */;
+334 -293
View File
@@ -1,4 +1,20 @@
/* Metro module 9163; source: stores/InviteSuggestionsStore.tsx; dependencies: [6, 7, 15, 17, 18, 7233, 5221, 1379, 3784, 3793, 661, 4118, 9153, 1360, 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 ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */
import PermissionStore from './PermissionStore.tsx'; /* Metro dependency 3784 */
import RelationshipStore from './RelationshipStore.tsx'; /* Metro dependency 3793 */
import UserAffinitiesV2Store from '../modules/user_affinities/UserAffinitiesV2Store.tsx'; /* Metro dependency 5221 */
import QuickSwitcherStore from '../modules/quickswitcher/QuickSwitcherStore.tsx'; /* Metro dependency 7233 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as ConstantsModule2 from '../modules/instant_invite/Constants.tsx'; /* Metro dependency 4118 */
import * as InstantInviteUtilsModule from '../utils/InstantInviteUtils.tsx'; /* Metro dependency 9153 */
function _fun71847(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:6, offset: 0x01d2f6df, size: 553 bytes, params: 8, frame: 20
const env0_0 = require;
const _arrayLikeToArray_71853 = function(a0, a1) {
@@ -52,27 +68,13 @@ function _fun71847(global, require, importDefault, importAll, module, exports, d
};
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 quickSwitcherStore = importDefault(7233) /* metro dependency 7233: QuickSwitcherStore */;
const userAffinitiesV2Store = importDefault(5221) /* metro dependency 5221: UserAffinitiesV2Store */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_12 = constantsModule.ChannelTypes;
const env0_13 = constantsModule.Permissions;
const env0_14 = (require(4118) /* metro dependency 4118: Constants */).InviteTargetTypes;
const Set = global.Set;
const set = new Set();
let env0_22 = [];
let Map = global.Map;
let map = new Map();
const env0_24 = {'numFriends': 0, 'numDms': 0, 'numGroupDms': 0, 'numChannels': 0};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun71861(Store).displayName = 'InviteSuggestionsStore';
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */,
{LOAD_INVITE_SUGGESTIONS: LOAD_INVITE_SUGGESTIONS, INVITE_SUGGESTIONS_SEARCH: function({query}) {
@@ -81,315 +83,354 @@ function _fun71847(global, require, importDefault, importAll, module, exports, d
query.sort(_fun71871);
_updateInviteSuggestions(query);
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/InviteSuggestionsStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/InviteSuggestionsStore.tsx');
exports.default = map;
}
function _isNativeReflectConstruct_71848() { // fn#71848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:275, offset: 0x01d2f908, 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_71848_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_71851(a0, a1) { // fn#71851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:468, offset: 0x01d2f96a, 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) {
function _isNativeReflectConstruct_71848() { // fn#71848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:275, offset: 0x01d2f908, 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 _fun71852;
return (_isNativeReflectConstruct_71848_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_71853(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') {
function _createForOfIteratorHelperLoose_71851(a0, a1) { // fn#71851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:468, offset: 0x01d2f96a, 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 _fun71852;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_71853(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_71853(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_71853(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun71852;
}
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 _fun71852() { // fn#71852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:1039, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
return _fun71852;
}
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 _computeRows(a0) { // fn#71854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:1473, offset: 0x01d2fade, size: 536 bytes, params: 2, frame: 21
var type;
var r4;
var id;
var r8;
var EMBEDDED_APPLICATION;
var value7;
var isBlockedOrIgnored;
var id2;
var isBlockedOrIgnored2;
var add;
var id3;
var value12;
var otherUserId;
var value13;
var getChannelHistory;
var value16;
var map;
var value17;
var filter;
var isNotNullish;
var value18;
var value19;
var value20;
var slice;
var value21;
var forEach;
let Set = global.Set;
let set = new Set();
let binding = env0_18;
const value3 = null;
reducibleJoin2: while (true) {
if (value3 == binding) {
type = undefined;
}
function _computeRows(a0) { // fn#71854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:1473, offset: 0x01d2fade, size: 536 bytes, params: 2, frame: 21
var type;
var r4;
var id;
var r8;
var EMBEDDED_APPLICATION;
var value7;
var relationshipStoreBinding;
var isBlockedOrIgnored;
var id2;
var isBlockedOrIgnored2;
var add;
var id3;
var value12;
var otherUserId;
var value13;
var quickSwitcherStoreBinding;
var getChannelHistory;
var value16;
var map;
var value17;
var filter;
var isNotNullish;
var value18;
var value19;
var value20;
var slice;
var value21;
var forEach;
let Set = global.Set;
let set = new Set();
let binding = env0_18;
const value3 = null;
reducibleJoin2: while (true) {
if (value3 == binding) {
type = undefined;
break reducibleJoin2;
}
type = binding.type;
break reducibleJoin2;
}
type = binding.type;
break reducibleJoin2;
}
const GUILD_VOICE = ChannelTypes.GUILD_VOICE;
const value5 = type === GUILD_VOICE;
const value6 = value3 == env0_17;
reducibleJoin4: while (true) {
if (value6) {
r4 = value6;
const GUILD_VOICE = ChannelTypes.GUILD_VOICE;
const value5 = type === GUILD_VOICE;
const value6 = value3 == env0_17;
reducibleJoin4: while (true) {
if (value6) {
r4 = value6;
break reducibleJoin4;
}
binding = env0_20;
EMBEDDED_APPLICATION = InviteTargetTypes.EMBEDDED_APPLICATION;
value7 = binding === EMBEDDED_APPLICATION;
r4 = value7;
break reducibleJoin4;
}
binding = env0_20;
EMBEDDED_APPLICATION = InviteTargetTypes.EMBEDDED_APPLICATION;
value7 = binding === EMBEDDED_APPLICATION;
r4 = value7;
break reducibleJoin4;
}
r4 = !r4 ? value5 : r4;
reducibleJoin7: while (true) {
if (r4) {
id = value3;
r4 = !r4 ? value5 : r4;
reducibleJoin7: while (true) {
if (r4) {
id = value3;
break reducibleJoin7;
}
id = env0_17.id;
break reducibleJoin7;
}
id = env0_17.id;
break reducibleJoin7;
}
const mostRecentDMedUser = (require(9153) /* metro dependency 9153: InstantInviteUtils */).getMostRecentDMedUser(env0_21,
id);
const value9 = value3 == mostRecentDMedUser;
reducibleJoin9: while (true) {
if (value9) {
r8 = value9;
const mostRecentDMedUser = (InstantInviteUtilsModule).getMostRecentDMedUser(env0_21,
id);
const value9 = value3 == mostRecentDMedUser;
reducibleJoin9: while (true) {
if (value9) {
r8 = value9;
break reducibleJoin9;
}
relationshipStoreBinding = RelationshipStore;
isBlockedOrIgnored = relationshipStoreBinding.isBlockedOrIgnored;
id2 = mostRecentDMedUser.id;
isBlockedOrIgnored2 = Reflect.apply(isBlockedOrIgnored, relationshipStoreBinding, [id2]);
r8 = isBlockedOrIgnored2;
break reducibleJoin9;
}
isBlockedOrIgnored = RelationshipStore.isBlockedOrIgnored;
id2 = mostRecentDMedUser.id;
isBlockedOrIgnored2 = Reflect.apply(isBlockedOrIgnored, RelationshipStore, [id2]);
r8 = isBlockedOrIgnored2;
break reducibleJoin9;
}
reducibleJoin11: while (true) {
if (r8) {
reducibleJoin11: while (true) {
if (r8) {
break reducibleJoin11;
}
add = set.add;
id3 = mostRecentDMedUser.id;
Reflect.apply(add, set, [id3]);
break reducibleJoin11;
}
add = set.add;
id3 = mostRecentDMedUser.id;
Reflect.apply(add, set, [id3]);
break reducibleJoin11;
}
const _createForOfIteratorHelperLoose_71851Binding = _createForOfIteratorHelperLoose_71851;
const getUserAffinities = UserAffinitiesV2Store.getUserAffinities;
const value10 = _createForOfIteratorHelperLoose_71851Binding(Reflect.apply(getUserAffinities, UserAffinitiesV2Store,
[]));
const value11 = value10();
let done = value11.done;
if (!done) {
r8 = value11;
reducibleLoop12: while (true) {
value12 = r8.value;
add = set.add;
otherUserId = value12.otherUserId;
Reflect.apply(add, set, [otherUserId]);
value13 = value10();
done = value13.done;
if (done) {
break reducibleLoop12;
const _createForOfIteratorHelperLoose_71851Binding = _createForOfIteratorHelperLoose_71851;
const userAffinitiesV2StoreBinding = UserAffinitiesV2Store;
const getUserAffinities = userAffinitiesV2StoreBinding.getUserAffinities;
const value10 = _createForOfIteratorHelperLoose_71851Binding(Reflect.apply(getUserAffinities,
userAffinitiesV2StoreBinding, []));
const value11 = value10();
let done = value11.done;
if (!done) {
r8 = value11;
reducibleLoop12: while (true) {
value12 = r8.value;
add = set.add;
otherUserId = value12.otherUserId;
Reflect.apply(add, set, [otherUserId]);
value13 = value10();
done = value13.done;
if (done) {
break reducibleLoop12;
}
r8 = value13;
continue reducibleLoop12;
}
r8 = value13;
continue reducibleLoop12;
}
}
Set = global.Set;
set = new Set();
binding = env0_20;
EMBEDDED_APPLICATION = InviteTargetTypes.EMBEDDED_APPLICATION;
reducibleJoin15: while (true) {
if (binding !== EMBEDDED_APPLICATION) {
Set = global.Set;
set = new Set();
binding = env0_20;
EMBEDDED_APPLICATION = InviteTargetTypes.EMBEDDED_APPLICATION;
reducibleJoin15: while (true) {
if (binding !== EMBEDDED_APPLICATION) {
break reducibleJoin15;
}
quickSwitcherStoreBinding = QuickSwitcherStore;
getChannelHistory = quickSwitcherStoreBinding.getChannelHistory;
value16 = Reflect.apply(getChannelHistory, quickSwitcherStoreBinding, []);
map = value16.map;
value17 = Reflect.apply(map, value16, [function(a0) {
return ChannelStore.getChannel(a0);
}]);
filter = value17.filter;
isNotNullish = (require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish;
value18 = Reflect.apply(filter, value17, [isNotNullish]);
filter = value18.filter;
value19 = Reflect.apply(filter, value18, [_fun71856]);
filter = value19.filter;
value20 = Reflect.apply(filter, value19, [_fun71857]);
slice = value20.slice;
value21 = Reflect.apply(slice, value20, [0, 3]);
forEach = value21.forEach;
Reflect.apply(forEach, value21, [_fun71858]);
break reducibleJoin15;
}
getChannelHistory = QuickSwitcherStore.getChannelHistory;
value16 = Reflect.apply(getChannelHistory, QuickSwitcherStore, []);
map = value16.map;
value17 = Reflect.apply(map, value16, [function(a0) {
return ChannelStore.getChannel(a0);
}]);
filter = value17.filter;
isNotNullish = (require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish;
value18 = Reflect.apply(filter, value17, [isNotNullish]);
filter = value18.filter;
value19 = Reflect.apply(filter, value18, [_fun71856]);
filter = value19.filter;
value20 = Reflect.apply(filter, value19, [_fun71857]);
slice = value20.slice;
value21 = Reflect.apply(slice, value20, [0, 3]);
forEach = value21.forEach;
Reflect.apply(forEach, value21, [_fun71858]);
break reducibleJoin15;
return InstantInviteUtilsModule.generateRowsForQuery({query: a0, omitUserIds: env0_21, suggestedUserIds: set,
maxRowsWithoutQuery: 100, omitGuildId: id, suggestedChannelIds: set, inviteTargetType: env0_20});
function _fun71856({type}) { // fn#71856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:1955, offset: 0x01d2fd0c, size: 27 bytes, params: 2, frame: 2
const GUILD_TEXT = ChannelTypes.GUILD_TEXT;
return type === GUILD_TEXT;
}
function _fun71857(a0) { // fn#71857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:1990, offset: 0x01d2fd27, size: 34 bytes, params: 2, frame: 13
const permissionStoreBinding = PermissionStore;
const can = permissionStoreBinding.can;
const SEND_MESSAGES = Permissions.SEND_MESSAGES;
return Reflect.apply(can, permissionStoreBinding, [SEND_MESSAGES, a0]);
}
function _fun71858({id}) { // fn#71858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:2040, offset: 0x0112d4f2, size: 27 bytes, params: 2, frame: 11
return env0_0.add(id);
}
}
const instantInviteUtilsModule = require(9153) /* metro dependency 9153: InstantInviteUtils */;
return instantInviteUtilsModule.generateRowsForQuery({query: a0, omitUserIds: env0_21, suggestedUserIds: set,
maxRowsWithoutQuery: 100, omitGuildId: id, suggestedChannelIds: set, inviteTargetType: env0_20});
}
function _updateInviteSuggestions(a0) { // fn#71859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:2218, offset: 0x01d2fd49, size: 65 bytes, params: 2, frame: 12
env0_22 = a0;
const Map = global.Map;
const map = new Map();
a0.forEach(_fun71860);
}
function _updateInviteSuggestions(a0) { // fn#71859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:2218, offset: 0x01d2fd49, size: 65 bytes, params: 2, frame: 12
env0_22 = a0;
const Map = global.Map;
const map = new Map();
a0.forEach(_fun71860);
function _fun71860(a0, a1) { // fn#71860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:2280, offset: 0x01d2fd8a, size: 34 bytes, params: 3, frame: 13
env1_23.set(a0, {index: a1});
}
function _fun71861(a0) { // fn#71861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:2316, offset: 0x01d2fdac, size: 176 bytes, params: 2, frame: 16
const closure = InviteSuggestionsStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, PermissionStore, QuickSwitcherStore, RelationshipStore, UserAffinitiesV2Store);
}}, {key: 'getInviteSuggestionRows', value: value_71864}, {key: 'getTotalSuggestionsCount', value: value_71865},
{key: 'getInitialCounts', value: value_71866}, {key: 'getSelectedInviteMetadata', value: value_71867}]);
}
function LOAD_INVITE_SUGGESTIONS({omitUserIds, guild, channel, applicationId, inviteTargetType}) { // fn#71869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:3216, offset: 0x01d2ff0b, size: 261 bytes, params: 2, frame: 19
const r3 = channel != null ? guild : null;
env0_18 = channel;
env0_19 = applicationId;
const blockedOrIgnoredIDs = RelationshipStore.getBlockedOrIgnoredIDs();
const instantInviteUtilsModule = require(9153) /* metro dependency 9153: InstantInviteUtils */;
const getUsersAlreadyJoined = instantInviteUtilsModule.getUsersAlreadyJoined;
const binding = env0_19;
const value3 = Reflect.apply(getUsersAlreadyJoined, instantInviteUtilsModule, [{channel: env0_18,
applicationId: binding, inviteTargetType: inviteTargetType}]);
const Set = global.Set;
items = [];
arraySpread(items, value3, arraySpread(items, blockedOrIgnoredIDs, arraySpread(items, omitUserIds, 0, binding),
binding), binding);
const set = new Set(items);
const {rows, counts} = _computeRows('');
_updateInviteSuggestions(rows);
env0_15 = env0_22.length;
}
function INVITE_SUGGESTIONS_SEARCH({query}) { // fn#71870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:3610, offset: 0x01d30010, size: 72 bytes, params: 2, frame: 13
result = query !== '';
const rows = _computeRows(query).rows;
rows.sort(function(a0, a1) {
return a0.score != null && a1.score != null ? a0.score - a1.score : 0;
});
_updateInviteSuggestions(rows);
}
function _fun71856({type}) { // fn#71856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:1955, offset: 0x01d2fd0c, size: 27 bytes, params: 2, frame: 2
const GUILD_TEXT = ChannelTypes.GUILD_TEXT;
return type === GUILD_TEXT;
}
function _fun71857(a0) { // fn#71857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:1990, offset: 0x01d2fd27, size: 34 bytes, params: 2, frame: 13
const can = PermissionStore.can;
const SEND_MESSAGES = Permissions.SEND_MESSAGES;
return Reflect.apply(can, PermissionStore, [SEND_MESSAGES, a0]);
}
function _fun71860(a0, a1) { // fn#71860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:2280, offset: 0x01d2fd8a, size: 34 bytes, params: 3, frame: 13
env1_23.set(a0, {index: a1});
}
function value_71867(a0) { // fn#71867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:2903, offset: 0x01d2fe87, size: 121 bytes, params: 2, frame: 14
var object2;
var length;
const value2 = env1_23.get(a0);
if (value2 != null) {
object2 = {};
object2.rowNum = value2.index;
object2.isAffinitySuggestion = a0.isSuggested;
length = env1_22.length;
object2.numTotal = length;
length = UserAffinitiesV2Store.getUserAffinities().map(function(a0) {
return a0.otherUserId;
}).length;
object2.numAffinityConnections = length;
object2.isFiltered = env1_16;
return object2;
}
function _fun71861(a0) { // fn#71861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:2316, offset: 0x01d2fdac, size: 176 bytes, params: 2, frame: 16
const InviteSuggestionsStore2 = InviteSuggestionsStore;
Inherits(InviteSuggestionsStore2, a0);
return CreateClass(InviteSuggestionsStore2, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, PermissionStore, QuickSwitcherStore, RelationshipStore, UserAffinitiesV2Store);
}}, {key: 'getInviteSuggestionRows', value: value_71864}, {key: 'getTotalSuggestionsCount', value: value_71865},
{key: 'getInitialCounts', value: value_71866}, {key: 'getSelectedInviteMetadata', value: value_71867}]);
function InviteSuggestionsStore() { // fn#71862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:2328, offset: 0x0117dc78, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, InviteSuggestionsStore);
const value3 = env1_5(InviteSuggestionsStore);
return env1_4(this, _isNativeReflectConstruct_71848() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_71864() { // fn#71864, offset: 0x00e425c8, size: 9 bytes, params: 1, frame: 1
return env1_22;
}
function value_71865() { // fn#71865, offset: 0x00df0e8b, size: 9 bytes, params: 1, frame: 1
return env1_15;
}
function value_71866() { // fn#71866, offset: 0x00df3acd, size: 9 bytes, params: 1, frame: 1
return env1_24;
}
function value_71867(a0) { // fn#71867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:2903, offset: 0x01d2fe87, size: 121 bytes, params: 2, frame: 14
var object;
var length;
const value2 = env1_23.get(a0);
if (value2 != null) {
object = {};
object.rowNum = value2.index;
object.isAffinitySuggestion = a0.isSuggested;
length = env1_22.length;
object.numTotal = length;
length = UserAffinitiesV2Store.getUserAffinities().map(function(a0) {
return a0.otherUserId;
}).length;
object.numAffinityConnections = length;
object.isFiltered = env1_16;
return object;
}
}
}
function LOAD_INVITE_SUGGESTIONS({omitUserIds, guild, channel, applicationId, inviteTargetType}) { // fn#71869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:3216, offset: 0x01d2ff0b, size: 261 bytes, params: 2, frame: 19
const r3 = channel != null ? guild : null;
channel2 = channel;
applicationId2 = applicationId;
const blockedOrIgnoredIDs = RelationshipStore.getBlockedOrIgnoredIDs();
const getUsersAlreadyJoined = InstantInviteUtilsModule.getUsersAlreadyJoined;
const binding = applicationId2;
const value3 = Reflect.apply(getUsersAlreadyJoined, InstantInviteUtilsModule, [{channel: channel2,
applicationId: binding, inviteTargetType: inviteTargetType}]);
const Set = global.Set;
items2 = [];
arraySpread(items2, value3, arraySpread(items2, blockedOrIgnoredIDs, arraySpread(items2, omitUserIds, 0, binding),
binding), binding);
const set = new Set(items2);
const {rows, counts} = _computeRows('');
_updateInviteSuggestions(rows);
env0_15 = env0_22.length;
}
function INVITE_SUGGESTIONS_SEARCH({query}) { // fn#71870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:3610, offset: 0x01d30010, size: 72 bytes, params: 2, frame: 13
result = query !== '';
const rows = _computeRows(query).rows;
rows.sort(function(a0, a1) {
return a0.score != null && a1.score != null ? a0.score - a1.score : 0;
});
_updateInviteSuggestions(rows);
}
}
function _fun71871(a0, a1) { // fn#71871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9348:3687, offset: 0x01d30058, size: 56 bytes, params: 3, frame: 6
return a0.score != null && a1.score != null ? a0.score - a1.score : 0;
}
global.__d(_fun71847, 9163, [6, 7, 15, 17, 18, 7233, 5221, 1379, 3784, 3793, 661, 4118, 9153, 1360, 566, 694,
2]) /* metro module 9163, dependencies: [6, 7, 15, 17, 18, 7233, 5221, 1379, 3784, 3793, 661, 4118, 9153, 1360, 566, 694, 2] */;
+76 -59
View File
@@ -1,81 +1,98 @@
/* Metro module 11931; source: stores/LayerStore.tsx; dependencies: [6, 7, 15, 17, 18, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun91553(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12117:6, offset: 0x02069dfc, size: 313 bytes, params: 8, frame: 19
const closure = function() {
env0_5 = [];
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let env0_5 = [];
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun91558(Store);
value.displayName = 'LayerStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LAYER_PUSH: LAYER_PUSH,
LAYER_POP: LAYER_POP, LAYER_POP_ALL: closure, LOGOUT: closure, NOTIFICATION_CLICK: closure});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/LayerStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/LayerStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_91554() { // fn#91554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12117:148, offset: 0x02069f35, 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) {
function _isNativeReflectConstruct_91554() { // fn#91554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12117:148, offset: 0x02069f35, 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_91554_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_91554_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun91558(a0) { // fn#91558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12117:391, offset: 0x02069f97, size: 101 bytes, params: 2, frame: 16
const closure = LayerStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'hasLayers', value: value_91560}, {key: 'getLayers', value: value_91561}]);
}
function _fun91558(a0) { // fn#91558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12117:391, offset: 0x02069f97, size: 101 bytes, params: 2, frame: 16
const LayerStore2 = LayerStore;
Inherits(LayerStore2, a0);
return CreateClass(LayerStore2, [{key: 'hasLayers', value: value_91560}, {key: 'getLayers', value: value_91561}]);
function LayerStore() { // fn#91559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12117:403, offset: 0x00c7a0d6, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, LayerStore);
const value3 = env1_3(LayerStore);
return env1_2(this, _isNativeReflectConstruct_91554() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_91560() { // fn#91560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12117:670, offset: 0x02069ffc, size: 20 bytes, params: 1, frame: 2
return env1_5.length > 0;
}
function value_91561() { // fn#91561, offset: 0x00e40571, size: 9 bytes, params: 1, frame: 1
return env1_5;
}
function LAYER_PUSH({component}) { // fn#91562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12117:823, offset: 0x0206a010, size: 74 bytes, params: 2, frame: 15
let binding = env0_5;
if (binding.indexOf(component) >= 0) {
return false;
}
binding = env0_5;
const items2 = [];
const value3 = arraySpread(items2, binding, 0, 0);
items2[value3] = component;
value3 + 1;
}
function LAYER_POP() { // fn#91563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12117:912, offset: 0x0206a05a, size: 51 bytes, params: 1, frame: 14
if (env0_5.length === 0) {
return false;
function LAYER_PUSH({component}) { // fn#91562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12117:823, offset: 0x0206a010, size: 74 bytes, params: 2, frame: 15
let binding = env0_5;
if (binding.indexOf(component) >= 0) {
return false;
}
binding = env0_5;
const items2 = [];
const value3 = arraySpread(items2, binding, 0, 0);
items2[value3] = component;
value3 + 1;
}
function LAYER_POP() { // fn#91563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12117:912, offset: 0x0206a05a, size: 51 bytes, params: 1, frame: 14
if (env0_5.length === 0) {
return false;
}
env0_5 = env0_5.slice(0, -1);
}
env0_5 = env0_5.slice(0, -1);
}
function value_91560() { // fn#91560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12117:670, offset: 0x02069ffc, size: 20 bytes, params: 1, frame: 2
return env1_5.length > 0;
}
global.__d(_fun91553, 11931, [6, 7, 15, 17, 18, 566, 694,
2]) /* metro module 11931, dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+85 -51
View File
@@ -1,15 +1,19 @@
/* Metro module 12593; source: stores/MFAStore.tsx; dependencies: [6, 7, 15, 17, 18, 692, 22, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as TokenManagerModule from '../external/discord_common/js/shared/lib/TokenManager.tsx'; /* Metro dependency 692 */
function _fun96507(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12783:6, offset: 0x0215fc05, size: 434 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let env0_9 = [];
let env0_12 = {'viewNonce': '', 'regenerateNonce': ''};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun96511(Store);
value.displayName = 'MFAStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
@@ -28,55 +32,85 @@ function _fun96507(global, require, importDefault, importAll, module, exports, d
env0_11 = true;
}, CONNECTION_OPEN: function() {
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/MFAStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/MFAStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_96508() { // fn#96508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12783:148, offset: 0x0215fdb7, 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) {
function _isNativeReflectConstruct_96508() { // fn#96508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12783:148, offset: 0x0215fdb7, 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_96508_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_96508_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun96511(a0) { // fn#96511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12783:407, offset: 0x0215fe19, size: 182 bytes, params: 2, frame: 16
const closure = MFAStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'getVerificationKey', value: value_96513}, {key: 'getBackupCodes',
value: value_96514}, {key: 'togglingSMS', get: get_96515}, {key: 'getNonces', value: value_96516},
{key: 'hasSeenBackupPrompt', get: get_96517}]);
}
function _fun96511(a0) { // fn#96511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12783:407, offset: 0x0215fe19, size: 182 bytes, params: 2, frame: 16
const MFAStore2 = MFAStore;
Inherits(MFAStore2, a0);
return CreateClass(MFAStore2, [{key: 'getVerificationKey', value: value_96513}, {key: 'getBackupCodes',
value: value_96514}, {key: 'togglingSMS', get: get_96515}, {key: 'getNonces', value: value_96516},
{key: 'hasSeenBackupPrompt', get: get_96517}]);
function MFAStore() { // fn#96512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12783:419, offset: 0x00ef83e3, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, MFAStore);
const value3 = env1_6(MFAStore);
return env1_5(this, _isNativeReflectConstruct_96508() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_96513() { // fn#96513, offset: 0x00fbd9ec, size: 9 bytes, params: 1, frame: 1
return env1_10;
}
function value_96514() { // fn#96514, offset: 0x00e07a77, size: 9 bytes, params: 1, frame: 1
return env1_9;
}
function get_96515() { // fn#96515, offset: 0x00fbd9d4, size: 9 bytes, params: 1, frame: 1
return env1_8;
}
function value_96516() { // fn#96516, offset: 0x00e2f9de, size: 9 bytes, params: 1, frame: 1
return env1_12;
}
function get_96517() { // fn#96517, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
function MFA_ENABLE_SUCCESS({token, codes}) { // fn#96518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12783:983, offset: 0x0215fecf, size: 64 bytes, params: 2, frame: 14
if (token !== undefined) {
(importAll(692) /* metro dependency 692: TokenManager */).setToken(token);
}
function MFA_ENABLE_SUCCESS({token, codes}) { // fn#96518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12783:983, offset: 0x0215fecf, size: 64 bytes, params: 2, frame: 14
if (token !== undefined) {
(importAll(692) /* metro dependency 692: TokenManager */).setToken(token);
}
}
function MFA_DISABLE_SUCCESS({token}) { // fn#96519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12783:1088, offset: 0x0215ff0f, size: 47 bytes, params: 2, frame: 12
(TokenManagerModule).setToken(token);
}
}
function MFA_DISABLE_SUCCESS({token}) { // fn#96519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12783:1088, offset: 0x0215ff0f, size: 47 bytes, params: 2, frame: 12
(importAll(692) /* metro dependency 692: TokenManager */).setToken(token);
}
global.__d(_fun96507, 12593, [6, 7, 15, 17, 18, 692, 22, 566, 694,
2]) /* metro module 12593, dependencies: [6, 7, 15, 17, 18, 692, 22, 566, 694, 2] */;
+173 -158
View File
@@ -1,16 +1,22 @@
/* Metro module 8874; source: stores/MaskedLinkStore.tsx; dependencies: [6, 7, 15, 17, 18, 6868, 8875, 1471, 587, 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 Dispatcher from '../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as StorageModule from '../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */
import * as SpotifyConstantsModule from '../modules/spotify/SpotifyConstants.tsx'; /* Metro dependency 6868 */
import * as MaskedLinkStoreMethodsAdditionalNativeModule from './MaskedLinkStoreMethodsAdditional.native.tsx'; /* Metro dependency 8875 */
function _fun69166(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9059:6, offset: 0x01c6be61, size: 451 bytes, params: 8, frame: 21
var value6;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = undefined;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const env0_8 = (require(6868) /* metro dependency 6868: SpotifyConstants */).SPOTIFY_HOSTNAMES;
let Set = global.Set;
let set = new Set();
Set = global.Set;
@@ -20,163 +26,172 @@ function _fun69166(global, require, importDefault, importAll, module, exports, d
if (MEDIA_PROXY_ENDPOINT != null) {
value6 = MEDIA_PROXY_ENDPOINT.replace('//', '');
}
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
const value7 = _fun69172(Store);
value7.displayName = 'MaskedLinkStore';
const value10 = new value7(importDefault(694) /* metro dependency 694: Dispatcher */,
const value10 = new value7(Dispatcher,
{MASKED_LINK_ADD_TRUSTED_DOMAIN: MASKED_LINK_ADD_TRUSTED_DOMAIN,
MASKED_LINK_ADD_TRUSTED_PROTOCOL: MASKED_LINK_ADD_TRUSTED_PROTOCOL});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/MaskedLinkStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/MaskedLinkStore.tsx');
exports.default = value10;
return value;
function _isNativeReflectConstruct_69167() { // fn#69167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9059:182, offset: 0x01c6c024, 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_69167_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _isTrustedDomain(a0) { // fn#69170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9059:496, offset: 0x01c6c086, size: 205 bytes, params: 2, frame: 15
const hostname = (MaskedLinkStoreMethodsAdditionalNativeModule).getHostname(a0);
let GLOBAL_ENV = global.window.GLOBAL_ENV;
const INVITE_HOST = GLOBAL_ENV.INVITE_HOST;
if (INVITE_HOST === hostname) {
return true;
}
GLOBAL_ENV = global.window.GLOBAL_ENV;
const GIFT_CODE_HOST = GLOBAL_ENV.GIFT_CODE_HOST;
if (GIFT_CODE_HOST === hostname) {
return true;
}
GLOBAL_ENV = global.window.GLOBAL_ENV;
const GUILD_TEMPLATE_HOST = GLOBAL_ENV.GUILD_TEMPLATE_HOST;
if (GUILD_TEMPLATE_HOST === hostname) {
return true;
}
if (env0_11 === hostname) {
return true;
}
if (global.location.hostname === hostname) {
return true;
}
let r0 = SPOTIFY_HOSTNAMES.includes(hostname) || (importDefault(1471) /* metro dependency 1471: URLUtils */).isDiscordHostname(hostname);
r0 = !r0 ? env0_9.has(hostname) : r0;
return r0;
}
function _isTrustedProtocol(a0) { // fn#69171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9059:789, offset: 0x01c6c153, size: 55 bytes, params: 2, frame: 12
return env0_10.has((MaskedLinkStoreMethodsAdditionalNativeModule).getProtocol(a0));
}
function _fun69172(a0) { // fn#69172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9059:871, offset: 0x01c6c18a, size: 126 bytes, params: 2, frame: 16
const MaskedLinkStore2 = MaskedLinkStore;
Inherits(MaskedLinkStore2, a0);
return CreateClass(MaskedLinkStore2, [{key: 'initialize', value: value_69174}, {key: 'isTrustedDomain',
value: function(a0) {
return _isTrustedDomain(a0);
}}, {key: 'isTrustedProtocol', value: function(a0) {
return _isTrustedProtocol(a0);
}}]);
function MaskedLinkStore() { // fn#69173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9059:883, offset: 0x0108afcb, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, MaskedLinkStore);
const value3 = env1_6(MaskedLinkStore);
return env1_5(this, _isNativeReflectConstruct_69167() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_69174() { // fn#69174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9059:1176, offset: 0x01c6c208, size: 302 bytes, params: 1, frame: 19
var r3;
var r5;
var trustedDomains;
var trustedProtocols;
var Set;
var prototype;
var value5;
var set;
var value6;
var value8;
var value9;
var value11;
var value12;
var value13;
var value14;
const Storage = (StorageModule).Storage;
const value2 = Storage.get('MaskedLinkStore');
const value3 = null;
const r4 = value3 != value2 ? value2 : {};
const Array = global.Array;
if (Array.isArray(r4)) {
Set = global.Set;
r5 = value3 != r4 ? global.Array.from(r4) : value3;
prototype = Set.prototype;
value11 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value12 = set instanceof Object ? set : value11;
Set = global.Set;
prototype = Set.prototype;
value13 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value14 = set instanceof Object ? set : value13;
} else {
trustedDomains = r4.trustedDomains;
trustedProtocols = r4.trustedProtocols;
Set = global.Set;
r3 = value3 != trustedDomains ? global.Array.from(trustedDomains) : value3;
prototype = Set.prototype;
value5 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value6 = set instanceof Object ? set : value5;
Set = global.Set;
r3 = value3 != trustedProtocols ? global.Array.from(trustedProtocols) : value3;
prototype = Set.prototype;
value8 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value9 = set instanceof Object ? set : value8;
}
}
}
function MASKED_LINK_ADD_TRUSTED_DOMAIN({url}) { // fn#69177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9059:1676, offset: 0x01c6c349, size: 131 bytes, params: 2, frame: 18
if (_isTrustedDomain(url)) {
return false;
}
const binding = env0_9;
const add = binding.add;
const getHostname = MaskedLinkStoreMethodsAdditionalNativeModule.getHostname;
Reflect.apply(add, binding, [Reflect.apply(getHostname, MaskedLinkStoreMethodsAdditionalNativeModule, [url])]);
const Storage = (StorageModule).Storage;
Storage.set('MaskedLinkStore', {trustedDomains: env0_9, trustedProtocols: env0_10});
}
function MASKED_LINK_ADD_TRUSTED_PROTOCOL({url}) { // fn#69178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9059:1874, offset: 0x01c6c3cc, size: 131 bytes, params: 2, frame: 18
if (_isTrustedProtocol(url)) {
return false;
}
const binding = env0_10;
const add = binding.add;
const getProtocol = MaskedLinkStoreMethodsAdditionalNativeModule.getProtocol;
Reflect.apply(add, binding, [Reflect.apply(getProtocol, MaskedLinkStoreMethodsAdditionalNativeModule, [url])]);
const Storage = (StorageModule).Storage;
Storage.set('MaskedLinkStore', {trustedDomains: env0_9, trustedProtocols: env0_10});
}
}
function _isNativeReflectConstruct_69167() { // fn#69167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9059:182, offset: 0x01c6c024, 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_69167_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _isTrustedDomain(a0) { // fn#69170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9059:496, offset: 0x01c6c086, size: 205 bytes, params: 2, frame: 15
const hostname = (require(8875) /* metro dependency 8875: MaskedLinkStoreMethodsAdditionalNative */).getHostname(a0);
let GLOBAL_ENV = global.window.GLOBAL_ENV;
const INVITE_HOST = GLOBAL_ENV.INVITE_HOST;
if (INVITE_HOST === hostname) {
return true;
}
GLOBAL_ENV = global.window.GLOBAL_ENV;
const GIFT_CODE_HOST = GLOBAL_ENV.GIFT_CODE_HOST;
if (GIFT_CODE_HOST === hostname) {
return true;
}
GLOBAL_ENV = global.window.GLOBAL_ENV;
const GUILD_TEMPLATE_HOST = GLOBAL_ENV.GUILD_TEMPLATE_HOST;
if (GUILD_TEMPLATE_HOST === hostname) {
return true;
}
if (env0_11 === hostname) {
return true;
}
if (global.location.hostname === hostname) {
return true;
}
let r0 = SPOTIFY_HOSTNAMES.includes(hostname) || (importDefault(1471) /* metro dependency 1471: URLUtils */).isDiscordHostname(hostname);
r0 = !r0 ? env0_9.has(hostname) : r0;
return r0;
}
function _isTrustedProtocol(a0) { // fn#69171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9059:789, offset: 0x01c6c153, size: 55 bytes, params: 2, frame: 12
return env0_10.has((require(8875) /* metro dependency 8875: MaskedLinkStoreMethodsAdditionalNative */).getProtocol(a0));
}
function _fun69172(a0) { // fn#69172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9059:871, offset: 0x01c6c18a, size: 126 bytes, params: 2, frame: 16
const closure = MaskedLinkStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: value_69174}, {key: 'isTrustedDomain', value: function(a0) {
return _isTrustedDomain(a0);
}}, {key: 'isTrustedProtocol', value: function(a0) {
return _isTrustedProtocol(a0);
}}]);
}
function MASKED_LINK_ADD_TRUSTED_DOMAIN({url}) { // fn#69177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9059:1676, offset: 0x01c6c349, size: 131 bytes, params: 2, frame: 18
if (_isTrustedDomain(url)) {
return false;
}
const binding = env0_9;
const add = binding.add;
const maskedLinkStoreMethodsAdditionalNativeModule = require(8875) /* metro dependency 8875: MaskedLinkStoreMethodsAdditionalNative */;
const getHostname = maskedLinkStoreMethodsAdditionalNativeModule.getHostname;
Reflect.apply(add, binding, [Reflect.apply(getHostname, maskedLinkStoreMethodsAdditionalNativeModule, [url])]);
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
Storage.set('MaskedLinkStore', {trustedDomains: env0_9, trustedProtocols: env0_10});
}
function MASKED_LINK_ADD_TRUSTED_PROTOCOL({url}) { // fn#69178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9059:1874, offset: 0x01c6c3cc, size: 131 bytes, params: 2, frame: 18
if (_isTrustedProtocol(url)) {
return false;
}
const binding = env0_10;
const add = binding.add;
const maskedLinkStoreMethodsAdditionalNativeModule = require(8875) /* metro dependency 8875: MaskedLinkStoreMethodsAdditionalNative */;
const getProtocol = maskedLinkStoreMethodsAdditionalNativeModule.getProtocol;
Reflect.apply(add, binding, [Reflect.apply(getProtocol, maskedLinkStoreMethodsAdditionalNativeModule, [url])]);
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
Storage.set('MaskedLinkStore', {trustedDomains: env0_9, trustedProtocols: env0_10});
}
function value_69174() { // fn#69174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9059:1176, offset: 0x01c6c208, size: 302 bytes, params: 1, frame: 19
var r3;
var r5;
var trustedDomains;
var trustedProtocols;
var Set;
var prototype;
var value5;
var set;
var value6;
var value8;
var value9;
var value11;
var value12;
var value13;
var value14;
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
const value2 = Storage.get('MaskedLinkStore');
const value3 = null;
const r4 = value3 != value2 ? value2 : {};
const Array = global.Array;
if (Array.isArray(r4)) {
Set = global.Set;
r5 = value3 != r4 ? global.Array.from(r4) : value3;
prototype = Set.prototype;
value11 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value12 = set instanceof Object ? set : value11;
Set = global.Set;
prototype = Set.prototype;
value13 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value14 = set instanceof Object ? set : value13;
} else {
trustedDomains = r4.trustedDomains;
trustedProtocols = r4.trustedProtocols;
Set = global.Set;
r3 = value3 != trustedDomains ? global.Array.from(trustedDomains) : value3;
prototype = Set.prototype;
value5 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value6 = set instanceof Object ? set : value5;
Set = global.Set;
r3 = value3 != trustedProtocols ? global.Array.from(trustedProtocols) : value3;
prototype = Set.prototype;
value8 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value9 = set instanceof Object ? set : value8;
}
}
global.__d(_fun69166, 8874, [6, 7, 15, 17, 18, 6868, 8875, 1471, 587, 566, 694,
2]) /* metro module 8874, dependencies: [6, 7, 15, 17, 18, 6868, 8875, 1471, 587, 566, 694, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 8875; source: stores/MaskedLinkStoreMethodsAdditional.native.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun69179(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9060:6, offset: 0x01c6c44f, size: 100 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/MaskedLinkStoreMethodsAdditional.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/MaskedLinkStoreMethodsAdditional.native.tsx');
exports.getHostname = function(a0) {
var property;
var prototype;
@@ -41,3 +43,4 @@ function _fun69179(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun69179, 8875, [2]) /* metro module 8875, dependencies: [2] */;
File diff suppressed because it is too large. Load diff
+135 -121
View File
@@ -1,145 +1,159 @@
/* Metro module 7150; source: stores/MessageReactionsStore.tsx; dependencies: [15, 17, 18, 6, 7, 3785, 1885, 1379, 1878, 7151, 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 ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from './UserStore.tsx'; /* Metro dependency 1878 */
import UserRecord from '../records/UserRecord.tsx'; /* Metro dependency 1885 */
import LurkingStore from '../modules/lurker_mode/LurkingStore.tsx'; /* Metro dependency 3785 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun57209(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7328:6, offset: 0x013df719, size: 380 bytes, params: 8, frame: 19
const closure = MESSAGE_REACTION_ADD_57213;
const MESSAGE_REACTION_ADD_572132 = MESSAGE_REACTION_ADD_57213;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_5 = importDefault(6) /* metro dependency 6 */;
const env0_6 = importDefault(7) /* metro dependency 7 */;
const lurkingStore = importDefault(3785) /* metro dependency 3785: LurkingStore */;
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let env0_11 = {};
const env0_12 = _fun57214();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun57217(Store);
value.displayName = 'MessageReactionsStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
env0_11 = {};
}, MESSAGE_REACTION_ADD: closure, MESSAGE_REACTION_REMOVE: closure,
}, MESSAGE_REACTION_ADD: MESSAGE_REACTION_ADD_572132, MESSAGE_REACTION_REMOVE: MESSAGE_REACTION_ADD_572132,
MESSAGE_REACTION_ADD_USERS: MESSAGE_REACTION_ADD_USERS});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/MessageReactionsStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/MessageReactionsStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_57210() { // fn#57210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7328:188, offset: 0x013df895, 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_57210_isNativeReflectConstruct = function() {
return !!result;
})();
}
function MESSAGE_REACTION_ADD_57213({type, messageId, userId, emoji, reactionType}) { // fn#57213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7328:639, offset: 0x013df8f3, size: 118 bytes, params: 2, frame: 18
var user;
const value2 = env0_12.ensure(messageId, emoji, reactionType);
if (type === 'MESSAGE_REACTION_ADD') {
user = UserStore.getUser(userId);
if (user != null) {
value2.users.set(userId, user);
function _isNativeReflectConstruct_57210() { // fn#57210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7328:188, offset: 0x013df895, 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) {
}
} else {
value2.users.delete(userId);
return (_isNativeReflectConstruct_57210_isNativeReflectConstruct = function() {
return !!result;
})();
}
}
function _fun57214() { // fn#57214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7328:392, offset: 0x013df969, size: 58 bytes, params: 1, frame: 15
return env0_6(Reaction, null, [{key: 'ensure', value: value_57216}]);
}
function _fun57217(a0) { // fn#57217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7328:844, offset: 0x013dfa65, size: 91 bytes, params: 2, frame: 16
const closure = MessageReactionsStore;
env0_4(closure, a0);
return env0_6(closure, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, LurkingStore, UserStore);
}}, {key: 'getReactions', value: value_57220}]);
}
function MESSAGE_REACTION_ADD_USERS({messageId, users, emoji, reactionType}) { // fn#57222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7328:1716, offset: 0x013dfba6, size: 71 bytes, params: 2, frame: 17
const env0_0 = env0_12.ensure(messageId, emoji, reactionType);
users.forEach(_fun57223);
}
function Reaction() { // fn#57215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7328:403, offset: 0x013df9a3, size: 69 bytes, params: 1, frame: 13
const value = environment.__proto__;
env1_5(this, Reaction);
this.fetched = false;
const Map = global.Map;
this.users = new Map();
}
function value_57216(a0, {name, id}, a2) { // fn#57216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7328:519, offset: 0x013df9e8, size: 125 bytes, params: 4, frame: 22
var r0;
var reaction;
let value = '';
value = value + a0 + ':' + name + ':' + (id ?? value) + ':' + a2;
const binding = env1_11;
const property = binding[value];
if (property != null) {
r0 = property;
} else {
reaction = new Reaction();
function MESSAGE_REACTION_ADD_57213({type, messageId, userId, emoji, reactionType}) { // fn#57213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7328:639, offset: 0x013df8f3, size: 118 bytes, params: 2, frame: 18
var user;
const value2 = env0_12.ensure(messageId, emoji, reactionType);
if (type === 'MESSAGE_REACTION_ADD') {
user = UserStore.getUser(userId);
if (user != null) {
value2.users.set(userId, user);
}
} else {
value2.users.delete(userId);
}
}
binding[value] = r0;
return r0;
}
function value_57220(a0, a1, a2, a3, a4) { // fn#57220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7328:1238, offset: 0x013dfae3, size: 182 bytes, params: 6, frame: 20
var r8;
const value = environment.__proto__;
const value2 = env1_12.ensure(a1, a2, a4);
if (!value2.fetched) {
var channel = ChannelStore.getChannel(a0);
var value4 = null;
r8 = value4 != channel ? channel.getGuildId() : value4;
if (value4 == r8) {
(importAll(7151) /* metro dependency 7151: ReactionActionCreators */).getReactors({channelId: a0,
messageId: a1,
emoji: a2, limit: a3, type: a4});
value2.fetched = true;
function _fun57214() { // fn#57214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7328:392, offset: 0x013df969, size: 58 bytes, params: 1, frame: 15
return CreateClass(Reaction, null, [{key: 'ensure', value: value_57216}]);
function Reaction() { // fn#57215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7328:403, offset: 0x013df9a3, size: 69 bytes, params: 1, frame: 13
const value = environment.__proto__;
env1_5(this, Reaction);
this.fetched = false;
const Map = global.Map;
this.users = new Map();
}
function value_57216(a0, {name, id}, a2) { // fn#57216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7328:519, offset: 0x013df9e8, size: 125 bytes, params: 4, frame: 22
var r0;
var reaction;
let value = '';
value = value + a0 + ':' + name + ':' + (id ?? value) + ':' + a2;
const binding = env1_11;
const property = binding[value];
if (property != null) {
r0 = property;
} else {
reaction = new Reaction();
}
binding[value] = r0;
return r0;
}
}
function _fun57217(a0) { // fn#57217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7328:844, offset: 0x013dfa65, size: 91 bytes, params: 2, frame: 16
const MessageReactionsStore2 = MessageReactionsStore;
Inherits(MessageReactionsStore2, a0);
return CreateClass(MessageReactionsStore2, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, LurkingStore, UserStore);
}}, {key: 'getReactions', value: value_57220}]);
function MessageReactionsStore() { // fn#57218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7328:856, offset: 0x0111f655, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_5(this, MessageReactionsStore);
const value3 = env1_3(MessageReactionsStore);
return env1_2(this, _isNativeReflectConstruct_57210() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_57220(a0, a1, a2, a3, a4) { // fn#57220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7328:1238, offset: 0x013dfae3, size: 182 bytes, params: 6, frame: 20
var r8;
const value = environment.__proto__;
const value2 = env1_12.ensure(a1, a2, a4);
if (!value2.fetched) {
var channel = ChannelStore.getChannel(a0);
var value4 = null;
r8 = value4 != channel ? channel.getGuildId() : value4;
if (value4 == r8) {
(importAll(7151) /* metro dependency 7151: ReactionActionCreators */).getReactors({channelId: a0,
messageId: a1,
emoji: a2, limit: a3, type: a4});
value2.fetched = true;
return value2.users;
}
var lurkingStoreBinding = LurkingStore;
if (lurkingStoreBinding.isLurking(r8)) {
return undefined;
}
(importAll(7151) /* metro dependency 7151: ReactionActionCreators */).getReactors({channelId: a0, messageId: a1,
emoji: a2, limit: a3, type: a4});
value2.fetched = true;
}
return value2.users;
}
if (LurkingStore.isLurking(r8)) {
return undefined;
}
function MESSAGE_REACTION_ADD_USERS({messageId, users, emoji, reactionType}) { // fn#57222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7328:1716, offset: 0x013dfba6, size: 71 bytes, params: 2, frame: 17
const env0_0 = env0_12.ensure(messageId, emoji, reactionType);
users.forEach(_fun57223);
function _fun57223(a0) { // fn#57223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7328:1827, offset: 0x013dfbed, size: 64 bytes, params: 2, frame: 15
const users = env0_0.users;
const set = users.set;
const id = a0.id;
const value = environment.__proto__;
const userRecord2 = new UserRecord(a0);
return Reflect.apply(set, users, [id, userRecord2]);
}
(importAll(7151) /* metro dependency 7151: ReactionActionCreators */).getReactors({channelId: a0, messageId: a1,
emoji: a2, limit: a3, type: a4});
value2.fetched = true;
}
return value2.users;
}
function _fun57223(a0) { // fn#57223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7328:1827, offset: 0x013dfbed, size: 64 bytes, params: 2, frame: 15
const users = env0_0.users;
const set = users.set;
const id = a0.id;
const value = environment.__proto__;
const userRecord = new UserRecord(a0);
return Reflect.apply(set, users, [id, userRecord]);
}
global.__d(_fun57209, 7150, [15, 17, 18, 6, 7, 3785, 1885, 1379, 1878, 7151, 566, 694,
2]) /* metro module 7150, dependencies: [15, 17, 18, 6, 7, 3785, 1885, 1379, 1878, 7151, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
+110 -99
View File
@@ -1,112 +1,123 @@
/* Metro module 1228; source: stores/MobileCacheSnapshotStore.tsx; dependencies: [6, 7, 15, 17, 18, 694, 44, 587, 566, 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 defaultImport2 from '../by-id/module-00044.js'; /* Metro dependency 44 */
import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import Dispatcher from '../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as StorageModule from '../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */
function _fun13772(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#13772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:6, offset: 0x00df4835, size: 222 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
const value = _fun13776(Store);
value.allStores = [];
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/MobileCacheSnapshotStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/MobileCacheSnapshotStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_13773() { // fn#13773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:148, offset: 0x00df4913, 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) {
function _isNativeReflectConstruct_13773() { // fn#13773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:148, offset: 0x00df4913, 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_13773_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_13773_isNativeReflectConstruct = function() {
return !!result;
})();
function _fun13776(a0) { // fn#13776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:347, offset: 0x00df4971, size: 188 bytes, params: 2, frame: 17
const MobileCacheSnapshotStore2 = MobileCacheSnapshotStore;
Inherits(MobileCacheSnapshotStore2, a0);
return CreateClass(MobileCacheSnapshotStore2, [{key: 'persistKey', get: function() {
return '' + this.getClass().displayName + '-snapshot';
}}, {key: 'clear', value: function() {
var Storage = require(dependencyMap[7]).Storage;
Storage.remove(this.persistKey);
}}, {key: 'save', value: function() {
var Storage = require(dependencyMap[7]).Storage;
Storage.set(this.persistKey, this.takeSnapshot());
}}, {key: 'readSnapshot', value: value_13783}, {key: 'getClass', value: function() {
return this.constructor;
}}], [{key: 'clearAll', value: function() {
MobileCacheSnapshotStore.allStores.forEach(_fun13786);
}}]);
function MobileCacheSnapshotStore(a0, a1) { // fn#13777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:359, offset: 0x00df4a2d, size: 309 bytes, params: 3, frame: 26
var environment;
let value = environment.__proto__;
env1_3(this, MobileCacheSnapshotStore);
const items2 = [Dispatcher];
const object = {};
copyDataProperties(object, a0, undefined);
object['CLEAR_CACHES'] = CLEAR_CACHES;
object['WRITE_CACHES'] = WRITE_CACHES;
items2[1] = object;
items2[2] = a1;
const value3 = env1_6(MobileCacheSnapshotStore);
value = env1_5(this, _isNativeReflectConstruct_13773() ? global.Reflect.construct(value3, items2,
env1_6(this).constructor) : value3.apply(this, items2));
const getClass = value.getClass;
defaultImport2(Reflect.apply(getClass, value, []).displayName != null, 'Snapshot stores need a display name');
defaultImport2(!('CLEAR_CACHES' in a0), "MobileCacheSnapshotStores cannot use the 'CLEAR_CACHES' action");
defaultImport2(!('WRITE_CACHES' in a0), "MobileCacheSnapshotStores cannot use the 'WRITE_CACHES' action");
MobileCacheSnapshotStore.allStores.push(value);
return value;
function CLEAR_CACHES() { // fn#13778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:636, owner: MobileCacheSnapshotStore.CLEAR_CACHES, offset: 0x00df4b62, size: 21 bytes, params: 1, frame: 9
env0_0.clear();
return false;
}
function WRITE_CACHES() { // fn#13779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:668, owner: MobileCacheSnapshotStore.WRITE_CACHES, offset: 0x00df4b77, size: 21 bytes, params: 1, frame: 9
env0_0.save();
return false;
}
}
function value_13783(a0) { // fn#13783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:1340, offset: 0x00df4c31, size: 83 bytes, params: 2, frame: 13
let value = environment.__proto__;
const Storage = (StorageModule).Storage;
value = Storage.get(this.persistKey);
const value2 = null;
return value2 == value || value.version !== a0 ? value2 : value.data;
}
function value_13785() { // fn#13785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:1522, offset: 0x00df4c84, size: 34 bytes, params: 1, frame: 11
MobileCacheSnapshotStore.allStores.forEach(function(a0) {
return a0.clear();
});
}
}
}
function _fun13776(a0) { // fn#13776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:347, offset: 0x00df4971, size: 188 bytes, params: 2, frame: 17
const closure = MobileCacheSnapshotStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'persistKey', get: function() {
return '' + this.getClass().displayName + '-snapshot';
}}, {key: 'clear', value: function() {
var Storage = require(dependencyMap[7]).Storage;
Storage.remove(this.persistKey);
}}, {key: 'save', value: function() {
var Storage = require(dependencyMap[7]).Storage;
Storage.set(this.persistKey, this.takeSnapshot());
}}, {key: 'readSnapshot', value: value_13783}, {key: 'getClass', value: function() {
return this.constructor;
}}], [{key: 'clearAll', value: function() {
MobileCacheSnapshotStore.allStores.forEach(_fun13786);
}}]);
}
function MobileCacheSnapshotStore(a0, a1) { // fn#13777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:359, offset: 0x00df4a2d, size: 309 bytes, params: 3, frame: 26
var environment;
let value = environment.__proto__;
env1_3(this, MobileCacheSnapshotStore);
const items2 = [importDefault(694) /* metro dependency 694: Dispatcher */];
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['CLEAR_CACHES'] = MobileCacheSnapshotStoreCLEAR_CACHES;
object2['WRITE_CACHES'] = MobileCacheSnapshotStoreWRITE_CACHES;
items2[1] = object2;
items2[2] = a1;
const value3 = env1_6(MobileCacheSnapshotStore);
value = env1_5(this, _isNativeReflectConstruct_13773() ? global.Reflect.construct(value3, items2,
env1_6(this).constructor) : value3.apply(this, items2));
const defaultImport2 = importDefault(44) /* metro dependency 44 */;
const getClass = value.getClass;
defaultImport2(Reflect.apply(getClass, value, []).displayName != null, 'Snapshot stores need a display name');
defaultImport2(!('CLEAR_CACHES' in a0), "MobileCacheSnapshotStores cannot use the 'CLEAR_CACHES' action");
defaultImport2(!('WRITE_CACHES' in a0), "MobileCacheSnapshotStores cannot use the 'WRITE_CACHES' action");
MobileCacheSnapshotStore.allStores.push(value);
return value;
}
function value_13783(a0) { // fn#13783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:1340, offset: 0x00df4c31, size: 83 bytes, params: 2, frame: 13
let value = environment.__proto__;
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
value = Storage.get(this.persistKey);
const value2 = null;
return value2 == value || value.version !== a0 ? value2 : value.data;
}
function value_13785() { // fn#13785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:1522, offset: 0x00df4c84, size: 34 bytes, params: 1, frame: 11
MobileCacheSnapshotStore.allStores.forEach(function(a0) {
return a0.clear();
});
}
function MobileCacheSnapshotStoreCLEAR_CACHES() { // fn#13778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:636, owner: MobileCacheSnapshotStore.CLEAR_CACHES, offset: 0x00df4b62, size: 21 bytes, params: 1, frame: 9
env0_0.clear();
return false;
}
function MobileCacheSnapshotStoreWRITE_CACHES() { // fn#13779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:668, owner: MobileCacheSnapshotStore.WRITE_CACHES, offset: 0x00df4b77, size: 21 bytes, params: 1, frame: 9
env0_0.save();
return false;
function _fun13786(a0) { // fn#13786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:1577, offset: 0x00df4ca6, size: 15 bytes, params: 2, frame: 9
return a0.clear();
}
global.__d(_fun13772, 1228, [6, 7, 15, 17, 18, 694, 44, 587, 566,
2]) /* metro module 1228, dependencies: [6, 7, 15, 17, 18, 694, 44, 587, 566, 2] */;
+79 -60
View File
@@ -1,77 +1,96 @@
/* Metro module 4401; source: stores/NetworkStore.tsx; dependencies: [6, 7, 15, 17, 18, 661, 1458, 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 NetworkUtils from '../utils/NetworkUtils.tsx'; /* Metro dependency 1458 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun37396(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#37396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4573:6, offset: 0x010a43bd, size: 325 bytes, params: 8, frame: 19
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 */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const NetworkConnectionTypes = value.NetworkConnectionTypes;
const NetworkConnectionSpeeds = value.NetworkConnectionSpeeds;
let UNKNOWN = NetworkConnectionTypes.UNKNOWN;
UNKNOWN = NetworkConnectionSpeeds.UNKNOWN;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun37401(Store).displayName = 'NetworkStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/NetworkStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/NetworkStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_37397() { // fn#37397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4573:213, offset: 0x010a4502, 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) {
function _isNativeReflectConstruct_37397() { // fn#37397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4573:213, offset: 0x010a4502, 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_37397_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_37397_isNativeReflectConstruct = function() {
return !!result;
})();
}
function handleConnectionInfoChange(a0) { // fn#37400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4573:441, offset: 0x010a4560, size: 93 bytes, params: 2, frame: 11
let r2 = a0.type ?? NetworkConnectionTypes.UNKNOWN;
r2 = a0.effectiveSpeed ?? NetworkConnectionSpeeds.UNKNOWN;
env0_11 = a0.serviceProvider;
env0_12.emitChange();
}
function handleConnectionInfoChange(a0) { // fn#37400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4573:441, offset: 0x010a4560, size: 93 bytes, params: 2, frame: 11
let r2 = a0.type ?? NetworkConnectionTypes.UNKNOWN;
r2 = a0.effectiveSpeed ?? NetworkConnectionSpeeds.UNKNOWN;
env0_11 = a0.serviceProvider;
env0_12.emitChange();
}
function _fun37401(a0) { // fn#37401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4573:600, offset: 0x010a45bd, size: 137 bytes, params: 2, frame: 16
const closure = NetworkStoreClass;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: value_37403}, {key: 'getType', value: function() {
return UNKNOWN;
}}, {key: 'getEffectiveConnectionSpeed', value: function() {
return UNKNOWN;
}}, {key: 'getServiceProvider', value: value_37406}]);
}
function _fun37401(a0) { // fn#37401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4573:600, offset: 0x010a45bd, size: 137 bytes, params: 2, frame: 16
const NetworkStoreClass2 = NetworkStoreClass;
Inherits(NetworkStoreClass2, a0);
return CreateClass(NetworkStoreClass2, [{key: 'initialize', value: value_37403}, {key: 'getType', value: function() {
return UNKNOWN;
}}, {key: 'getEffectiveConnectionSpeed', value: function() {
return UNKNOWN;
}}, {key: 'getServiceProvider', value: value_37406}]);
function NetworkStoreClass() { // fn#37402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4573:612, offset: 0x00ea76ec, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, NetworkStoreClass);
const value3 = env1_5(NetworkStoreClass);
return env1_4(this, _isNativeReflectConstruct_37397() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_37403() { // fn#37403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4573:915, offset: 0x010a4646, size: 71 bytes, params: 1, frame: 15
const value = environment.__proto__;
const networkInformation = (NetworkUtils).getNetworkInformation();
const then = networkInformation.then;
const handleConnectionInfoChangeBinding = handleConnectionInfoChange;
Reflect.apply(then, networkInformation, [handleConnectionInfoChangeBinding]);
(NetworkUtils).addChangeCallback(handleConnectionInfoChangeBinding);
}
function value_37406() { // fn#37406, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
}
function value_37403() { // fn#37403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4573:915, offset: 0x010a4646, size: 71 bytes, params: 1, frame: 15
const value = environment.__proto__;
const networkInformation = (importDefault(1458) /* metro dependency 1458: NetworkUtils */).getNetworkInformation();
const then = networkInformation.then;
const handleConnectionInfoChangeBinding = handleConnectionInfoChange;
Reflect.apply(then, networkInformation, [handleConnectionInfoChangeBinding]);
(importDefault(1458) /* metro dependency 1458: NetworkUtils */).addChangeCallback(handleConnectionInfoChangeBinding);
}
global.__d(_fun37396, 4401, [6, 7, 15, 17, 18, 661, 1458, 566, 694,
2]) /* metro module 4401, dependencies: [6, 7, 15, 17, 18, 661, 1458, 566, 694, 2] */;
+113 -84
View File
@@ -1,23 +1,27 @@
/* Metro module 15846; source: stores/NotificationSettingsModalStore.tsx; dependencies: [6, 7, 15, 17, 18, 1383, 5098, 1935, 4111, 1867, 4864, 661, 5099, 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 GuildStore from './GuildStore.tsx'; /* Metro dependency 1867 */
import GuildChannelStore from './GuildChannelStore.tsx'; /* Metro dependency 1935 */
import GuildMemberCountStore from './GuildMemberCountStore.tsx'; /* Metro dependency 4111 */
import UserGuildSettingsStore from './UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
import GuildCategoryStore from './GuildCategoryStore.tsx'; /* Metro dependency 5098 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as ChannelRecordModule from '../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
function _fun121858(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16054:6, offset: 0x02552e7a, size: 429 bytes, params: 8, frame: 19
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 = (require(1383) /* metro dependency 1383: ChannelRecord */).isGuildSelectableChannelType;
const guildCategoryStore = importDefault(5098) /* metro dependency 5098: GuildCategoryStore */;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const guildMemberCountStore = importDefault(4111) /* metro dependency 4111: GuildMemberCountStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const FormStates = value.FormStates;
const env0_14 = value.ChannelTypes;
let env0_16 = FormStates.CLOSED;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun121862(Store).displayName = 'NotificationSettingsModalStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{NOTIFICATION_SETTINGS_MODAL_OPEN: function({guildId}) {
@@ -27,83 +31,108 @@ function _fun121858(global, require, importDefault, importAll, module, exports,
env0_16 = FormStates.CLOSED;
env0_15 = null;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/NotificationSettingsModalStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/NotificationSettingsModalStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_121859() { // fn#121859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16054:281, offset: 0x02553027, 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) {
function _isNativeReflectConstruct_121859() { // fn#121859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16054:281, offset: 0x02553027, 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_121859_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_121859_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun121862(a0) { // fn#121862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16054:497, offset: 0x02553089, size: 122 bytes, params: 2, frame: 16
const closure = NotificationSettingsModalStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
var env0_0 = this;
this.waitFor(GuildCategoryStore, GuildChannelStore, GuildMemberCountStore, GuildStore, UserGuildSettingsStore);
this.syncWith([UserGuildSettingsStore, GuildChannelStore, GuildStore], _fun121865);
}}, {key: 'isOpen', value: function() {
return CLOSED !== FormStates.CLOSED;
}}, {key: 'getProps', value: value_121867}]);
}
function _fun121862(a0) { // fn#121862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16054:497, offset: 0x02553089, size: 122 bytes, params: 2, frame: 16
const NotificationSettingsModalStore2 = NotificationSettingsModalStore;
Inherits(NotificationSettingsModalStore2, a0);
return CreateClass(NotificationSettingsModalStore2, [{key: 'initialize', value: function() {
var env0_0 = this;
var guildCategoryStoreBinding = GuildCategoryStore;
var guildChannelStoreBinding = GuildChannelStore;
var guildMemberCountStoreBinding = GuildMemberCountStore;
var guildStoreBinding = GuildStore;
var userGuildSettingsStoreBinding = UserGuildSettingsStore;
this.waitFor(guildCategoryStoreBinding, guildChannelStoreBinding, guildMemberCountStoreBinding,
guildStoreBinding,
userGuildSettingsStoreBinding);
this.syncWith([userGuildSettingsStoreBinding, guildChannelStoreBinding, guildStoreBinding], _fun121865);
}}, {key: 'isOpen', value: function() {
return CLOSED !== FormStates.CLOSED;
}}, {key: 'getProps', value: value_121867}]);
function NotificationSettingsModalStore() { // fn#121863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16054:509, offset: 0x010992b7, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, NotificationSettingsModalStore);
const value3 = env1_5(NotificationSettingsModalStore);
return env1_4(this, _isNativeReflectConstruct_121859() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_121864() { // fn#121864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16054:877, offset: 0x02553103, size: 93 bytes, params: 1, frame: 20
this.waitFor(GuildCategoryStore, GuildChannelStore, GuildMemberCountStore, GuildStore, UserGuildSettingsStore);
this.syncWith([UserGuildSettingsStore, GuildChannelStore, GuildStore], _fun121865);
}
function value_121864() { // fn#121864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16054:877, offset: 0x02553103, size: 93 bytes, params: 1, frame: 20
const waitFor = this.waitFor;
const guildCategoryStoreBinding = GuildCategoryStore;
const guildChannelStoreBinding = GuildChannelStore;
const guildMemberCountStoreBinding = GuildMemberCountStore;
const guildStoreBinding = GuildStore;
const userGuildSettingsStoreBinding = UserGuildSettingsStore;
Reflect.apply(waitFor, this, [guildCategoryStoreBinding, guildChannelStoreBinding, guildMemberCountStoreBinding,
guildStoreBinding, userGuildSettingsStoreBinding]);
this.syncWith([userGuildSettingsStoreBinding, guildChannelStoreBinding, guildStoreBinding], _fun121865);
function _fun121865() { // fn#121865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16054:935, offset: 0x02553160, size: 19 bytes, params: 1, frame: 9
return env0_0.isOpen();
}
function value_121867() { // fn#121867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16054:1032, offset: 0x0255318a, size: 279 bytes, params: 1, frame: 16
var environment;
const value = environment.__proto__;
const categories = GuildCategoryStore.getCategories(env1_15);
const object2 = {guildId: env1_15, categories: categories};
object2.guild = GuildStore.getGuild(env1_15);
object2.memberCount = GuildMemberCountStore.getMemberCount(env1_15);
object2.suppressEveryone = UserGuildSettingsStore.isSuppressEveryoneEnabled(env1_15);
object2.suppressRoles = UserGuildSettingsStore.isSuppressRolesEnabled(env1_15);
object2.mobilePush = UserGuildSettingsStore.isMobilePushEnabled(env1_15);
object2.muted = UserGuildSettingsStore.isMuted(env1_15);
object2.muteConfig = UserGuildSettingsStore.getMuteConfig(env1_15);
object2.messageNotifications = UserGuildSettingsStore.getMessageNotifications(env1_15);
object2.channelOverrides = UserGuildSettingsStore.getChannelOverrides(env1_15);
object2.channels = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(categories._categories,
categories, _fun121868);
return object2;
}
}
function _fun121865() { // fn#121865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16054:935, offset: 0x02553160, size: 19 bytes, params: 1, frame: 9
return env0_0.isOpen();
}
function value_121867() { // fn#121867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16054:1032, offset: 0x0255318a, size: 279 bytes, params: 1, frame: 16
var environment;
const value = environment.__proto__;
const categories = GuildCategoryStore.getCategories(env1_15);
const object = {guildId: env1_15, categories: categories};
object.guild = GuildStore.getGuild(env1_15);
object.memberCount = GuildMemberCountStore.getMemberCount(env1_15);
const userGuildSettingsStoreBinding = UserGuildSettingsStore;
object.suppressEveryone = userGuildSettingsStoreBinding.isSuppressEveryoneEnabled(env1_15);
object.suppressRoles = userGuildSettingsStoreBinding.isSuppressRolesEnabled(env1_15);
object.mobilePush = userGuildSettingsStoreBinding.isMobilePushEnabled(env1_15);
object.muted = userGuildSettingsStoreBinding.isMuted(env1_15);
object.muteConfig = userGuildSettingsStoreBinding.getMuteConfig(env1_15);
object.messageNotifications = userGuildSettingsStoreBinding.getMessageNotifications(env1_15);
object.channelOverrides = userGuildSettingsStoreBinding.getChannelOverrides(env1_15);
object.channels = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(categories._categories,
categories, _fun121868);
return object;
function _fun121868({channel}) { // fn#121868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16054:1452, offset: 0x025532a1, size: 46 bytes, params: 2, frame: 12
const type = channel.type;
const value = environment.__proto__.__proto__;
return isGuildSelectableChannelType(type) || type === ChannelTypes.GUILD_CATEGORY;
}
}
}
function _fun121868({channel}) { // fn#121868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16054:1452, offset: 0x025532a1, size: 46 bytes, params: 2, frame: 12
const type = channel.type;
const value = environment.__proto__.__proto__;
return isGuildSelectableChannelType(type) || type === ChannelTypes.GUILD_CATEGORY;
}
global.__d(_fun121858, 15846, [6, 7, 15, 17, 18, 1383, 5098, 1935, 4111, 1867, 4864, 661, 5099, 566, 694,
2]) /* metro module 15846, dependencies: [6, 7, 15, 17, 18, 1383, 5098, 1935, 4111, 1867, 4864, 661, 5099, 566, 694, 2] */;
+156 -137
View File
@@ -1,33 +1,37 @@
/* Metro module 10907; source: stores/NotificationSettingsStore.tsx; dependencies: [6, 7, 15, 17, 18, 661, 477, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun83546(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:6, offset: 0x01f1e4fb, size: 545 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const closure = NOTIFICATIONS_SET_DESKTOP_TYPE;
const NOTIFICATIONS_SET_DESKTOP_TYPE2 = NOTIFICATIONS_SET_DESKTOP_TYPE;
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 */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const DesktopNotificationTypes = value.DesktopNotificationTypes;
const env0_8 = value.NotificationPermissionTypes;
const TTSNotificationTypes = value.TTSNotificationTypes;
object2 = {'desktopType': null, 'disableAllSounds': false, 'disabledSounds': null, 'ttsType': null,
object = {'desktopType': null, 'disableAllSounds': false, 'disabledSounds': null, 'ttsType': null,
'disableUnreadBadge': false, 'taskbarFlash': true, 'notifyMessagesInSelectedChannel': false,
'screenDowntimeReminder': true};
object2.desktopType = (require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded ? DesktopNotificationTypes.ALL : DesktopNotificationTypes.NEVER;
object2.disabledSounds = [];
object.desktopType = (require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded ? DesktopNotificationTypes.ALL : DesktopNotificationTypes.NEVER;
object.disabledSounds = [];
const NEVER = TTSNotificationTypes.NEVER;
object2.ttsType = NEVER;
const DeviceSettingsStore = (importDefault(566) /* metro dependency 566: flux */).DeviceSettingsStore;
object.ttsType = NEVER;
const DeviceSettingsStore = (Flux).DeviceSettingsStore;
value = _fun83551(DeviceSettingsStore);
value.displayName = 'NotificationSettingsStore';
value.persistKey = 'notifications';
value.migrations = [_fun83564];
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{NOTIFICATIONS_SET_DESKTOP_TYPE: closure, NOTIFICATIONS_SET_TTS_TYPE: NOTIFICATIONS_SET_TTS_TYPE,
{NOTIFICATIONS_SET_DESKTOP_TYPE: NOTIFICATIONS_SET_DESKTOP_TYPE2,
NOTIFICATIONS_SET_TTS_TYPE: NOTIFICATIONS_SET_TTS_TYPE,
NOTIFICATIONS_SET_DISABLED_SOUNDS: NOTIFICATIONS_SET_DISABLED_SOUNDS,
NOTIFICATIONS_TOGGLE_ALL_DISABLED: NOTIFICATIONS_TOGGLE_ALL_DISABLED,
NOTIFICATIONS_SET_PERMISSION_STATE: function({enabled}) {
@@ -40,146 +44,161 @@ function _fun83546(global, require, importDefault, importAll, module, exports, d
NOTIFICATIONS_SET_TASKBAR_FLASH: NOTIFICATIONS_SET_TASKBAR_FLASH,
NOTIFICATIONS_SET_NOTIFY_MESSAGES_IN_SELECTED_CHANNEL: NOTIFICATIONS_SET_NOTIFY_MESSAGES_IN_SELECTED_CHANNEL,
NOTIFICATIONS_SET_SCREEN_DOWNTIME_REMINDER: NOTIFICATIONS_SET_SCREEN_DOWNTIME_REMINDER});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/NotificationSettingsStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/NotificationSettingsStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_83547() { // fn#83547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:244, offset: 0x01f1e71c, 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) {
function _isNativeReflectConstruct_83547() { // fn#83547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:244, offset: 0x01f1e71c, 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_83547_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_83547_isNativeReflectConstruct = function() {
return !!result;
})();
}
function NOTIFICATIONS_SET_DESKTOP_TYPE({desktopType}) { // fn#83550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:655, offset: 0x01f1e77e, size: 26 bytes, params: 2, frame: 2
env0_11.desktopType = desktopType;
}
function _fun83551(a0) { // fn#83551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:724, offset: 0x01f1e798, size: 334 bytes, params: 2, frame: 16
const closure = NotificationSettingsStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: value_83553}, {key: 'getUserAgnosticState', value: value_83554},
{key: 'getDesktopType', value: value_83555}, {key: 'getTTSType', value: value_83556}, {key: 'getDisabledSounds',
value: value_83557}, {key: 'getDisableAllSounds', value: value_83558}, {key: 'getDisableUnreadBadge',
value: value_83559}, {key: 'getNotifyMessagesInSelectedChannel', value: value_83560}, {key: 'taskbarFlash',
get: get_83561}, {key: 'screenDowntimeReminder', get: get_83562}, {key: 'isSoundDisabled', value: value_83563}]);
}
function _fun83564(a0) { // fn#83564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1955, offset: 0x01f1e9b4, size: 173 bytes, params: 2, frame: 14
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2.disabledSounds = object2.disabledSounds || [];
let disableUnreadBadge = object2.disableUnreadBadge;
disableUnreadBadge = !!disableUnreadBadge && disableUnreadBadge;
object2.disableUnreadBadge = disableUnreadBadge;
object2.taskbarFlash = object2.taskbarFlash == null || object2.taskbarFlash;
object2.ttsType = object2.ttsType || TTSNotificationTypes.NEVER;
if (object2.desktopType == null) {
object2.desktopType = (require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded ? DesktopNotificationTypes.ALL : DesktopNotificationTypes.NEVER;
function NOTIFICATIONS_SET_DESKTOP_TYPE({desktopType}) { // fn#83550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:655, offset: 0x01f1e77e, size: 26 bytes, params: 2, frame: 2
env0_11.desktopType = desktopType;
}
return object2;
}
function NOTIFICATIONS_SET_TTS_TYPE({ttsType}) { // fn#83565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:2326, offset: 0x01f1ea61, size: 26 bytes, params: 2, frame: 2
env0_11.ttsType = ttsType;
}
function _fun83551(a0) { // fn#83551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:724, offset: 0x01f1e798, size: 334 bytes, params: 2, frame: 16
const NotificationSettingsStore2 = NotificationSettingsStore;
Inherits(NotificationSettingsStore2, a0);
return CreateClass(NotificationSettingsStore2, [{key: 'initialize', value: value_83553}, {key: 'getUserAgnosticState',
value: value_83554}, {key: 'getDesktopType', value: value_83555}, {key: 'getTTSType', value: value_83556},
{key: 'getDisabledSounds', value: value_83557}, {key: 'getDisableAllSounds', value: value_83558},
{key: 'getDisableUnreadBadge', value: value_83559}, {key: 'getNotifyMessagesInSelectedChannel',
value: value_83560}, {key: 'taskbarFlash', get: get_83561}, {key: 'screenDowntimeReminder', get: get_83562},
{key: 'isSoundDisabled', value: value_83563}]);
function NotificationSettingsStore() { // fn#83552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:736, offset: 0x00de700a, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, NotificationSettingsStore);
const value3 = env1_5(NotificationSettingsStore);
return env1_4(this, _isNativeReflectConstruct_83547() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function NOTIFICATIONS_SET_DISABLED_SOUNDS({sounds}) { // fn#83566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:2412, offset: 0x01f1ea7b, size: 26 bytes, params: 2, frame: 2
env0_11.disabledSounds = sounds;
}
function value_83553(a0) { // fn#83553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1079, offset: 0x01f1e8e6, size: 34 bytes, params: 2, frame: 12
const object = {};
copyDataProperties(object, a0, copyDataProperties(object, env1_10, undefined));
}
function NOTIFICATIONS_TOGGLE_ALL_DISABLED() { // fn#83567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:2511, offset: 0x01f1ea95, size: 26 bytes, params: 1, frame: 2
const binding = env0_11;
binding.disableAllSounds = !binding.disableAllSounds;
}
function value_83554() { // fn#83554, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
function NOTIFICATIONS_SET_DISABLE_UNREAD_BADGE({disableUnreadBadge}) { // fn#83569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:2822, offset: 0x01f1eb14, size: 26 bytes, params: 2, frame: 2
env0_11.disableUnreadBadge = disableUnreadBadge;
}
function value_83555() { // fn#83555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1191, offset: 0x01f1e908, size: 15 bytes, params: 1, frame: 1
return env1_11.desktopType;
}
function NOTIFICATIONS_SET_TASKBAR_FLASH({taskbarFlash}) { // fn#83570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:2939, offset: 0x01f1eb2e, size: 26 bytes, params: 2, frame: 2
env0_11.taskbarFlash = taskbarFlash;
}
function value_83556() { // fn#83556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1249, offset: 0x01f1e917, size: 15 bytes, params: 1, frame: 1
return env1_11.ttsType;
}
function NOTIFICATIONS_SET_NOTIFY_MESSAGES_IN_SELECTED_CHANNEL({notify}) { // fn#83571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:3060, offset: 0x01f1eb48, size: 26 bytes, params: 2, frame: 2
env0_11.notifyMessagesInSelectedChannel = notify;
}
function value_83557() { // fn#83557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1310, offset: 0x01f1e926, size: 15 bytes, params: 1, frame: 1
return env1_11.disabledSounds;
}
function NOTIFICATIONS_SET_SCREEN_DOWNTIME_REMINDER({screenDowntimeReminder}) { // fn#83572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:3202, offset: 0x01f1eb62, size: 26 bytes, params: 2, frame: 2
env0_11.screenDowntimeReminder = screenDowntimeReminder;
}
function value_83558() { // fn#83558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1380, offset: 0x01f1e935, size: 15 bytes, params: 1, frame: 1
return env1_11.disableAllSounds;
}
function value_83553(a0) { // fn#83553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1079, offset: 0x01f1e8e6, size: 34 bytes, params: 2, frame: 12
const object2 = {};
copyDataProperties(object2, a0, copyDataProperties(object2, env1_10, undefined));
}
function value_83559() { // fn#83559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1454, offset: 0x01f1e944, size: 15 bytes, params: 1, frame: 1
return env1_11.disableUnreadBadge;
}
function value_83555() { // fn#83555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1191, offset: 0x01f1e908, size: 15 bytes, params: 1, frame: 1
return env1_11.desktopType;
}
function value_83560() { // fn#83560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1543, offset: 0x01f1e953, size: 15 bytes, params: 1, frame: 1
return env1_11.notifyMessagesInSelectedChannel;
}
function value_83556() { // fn#83556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1249, offset: 0x01f1e917, size: 15 bytes, params: 1, frame: 1
return env1_11.ttsType;
}
function get_83561() { // fn#83561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1621, offset: 0x01f1e962, size: 15 bytes, params: 1, frame: 1
return env1_11.taskbarFlash;
}
function value_83557() { // fn#83557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1310, offset: 0x01f1e926, size: 15 bytes, params: 1, frame: 1
return env1_11.disabledSounds;
}
function get_83562() { // fn#83562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1690, offset: 0x01f1e971, size: 15 bytes, params: 1, frame: 1
return env1_11.screenDowntimeReminder;
}
function value_83558() { // fn#83558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1380, offset: 0x01f1e935, size: 15 bytes, params: 1, frame: 1
return env1_11.disableAllSounds;
}
function value_83563(a0) { // fn#83563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1764, offset: 0x01f1e980, size: 52 bytes, params: 2, frame: 12
var r0;
let value = environment.__proto__;
const disableAllSounds = env1_11.disableAllSounds;
if (disableAllSounds) {
r0 = disableAllSounds;
} else {
value = env1_11.disabledSounds.indexOf(a0);
value = value !== -1;
r0 = value;
}
return r0;
}
function value_83559() { // fn#83559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1454, offset: 0x01f1e944, size: 15 bytes, params: 1, frame: 1
return env1_11.disableUnreadBadge;
}
function value_83560() { // fn#83560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1543, offset: 0x01f1e953, size: 15 bytes, params: 1, frame: 1
return env1_11.notifyMessagesInSelectedChannel;
}
function get_83561() { // fn#83561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1621, offset: 0x01f1e962, size: 15 bytes, params: 1, frame: 1
return env1_11.taskbarFlash;
}
function get_83562() { // fn#83562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1690, offset: 0x01f1e971, size: 15 bytes, params: 1, frame: 1
return env1_11.screenDowntimeReminder;
}
function value_83563(a0) { // fn#83563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1764, offset: 0x01f1e980, size: 52 bytes, params: 2, frame: 12
var r0;
let value = environment.__proto__;
const disableAllSounds = env1_11.disableAllSounds;
if (disableAllSounds) {
r0 = disableAllSounds;
} else {
value = env1_11.disabledSounds.indexOf(a0);
value = value !== -1;
r0 = value;
}
return r0;
function _fun83564(a0) { // fn#83564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:1955, offset: 0x01f1e9b4, size: 173 bytes, params: 2, frame: 14
const object = {};
copyDataProperties(object, a0, undefined);
object.disabledSounds = object.disabledSounds || [];
let disableUnreadBadge = object.disableUnreadBadge;
disableUnreadBadge = !!disableUnreadBadge && disableUnreadBadge;
object.disableUnreadBadge = disableUnreadBadge;
object.taskbarFlash = object.taskbarFlash == null || object.taskbarFlash;
object.ttsType = object.ttsType || TTSNotificationTypes.NEVER;
if (object.desktopType == null) {
object.desktopType = (require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded ? DesktopNotificationTypes.ALL : DesktopNotificationTypes.NEVER;
}
return object;
}
function NOTIFICATIONS_SET_TTS_TYPE({ttsType}) { // fn#83565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:2326, offset: 0x01f1ea61, size: 26 bytes, params: 2, frame: 2
env0_11.ttsType = ttsType;
}
function NOTIFICATIONS_SET_DISABLED_SOUNDS({sounds}) { // fn#83566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:2412, offset: 0x01f1ea7b, size: 26 bytes, params: 2, frame: 2
env0_11.disabledSounds = sounds;
}
function NOTIFICATIONS_TOGGLE_ALL_DISABLED() { // fn#83567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:2511, offset: 0x01f1ea95, size: 26 bytes, params: 1, frame: 2
const binding = env0_11;
binding.disableAllSounds = !binding.disableAllSounds;
}
function NOTIFICATIONS_SET_DISABLE_UNREAD_BADGE({disableUnreadBadge}) { // fn#83569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:2822, offset: 0x01f1eb14, size: 26 bytes, params: 2, frame: 2
env0_11.disableUnreadBadge = disableUnreadBadge;
}
function NOTIFICATIONS_SET_TASKBAR_FLASH({taskbarFlash}) { // fn#83570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:2939, offset: 0x01f1eb2e, size: 26 bytes, params: 2, frame: 2
env0_11.taskbarFlash = taskbarFlash;
}
function NOTIFICATIONS_SET_NOTIFY_MESSAGES_IN_SELECTED_CHANNEL({notify}) { // fn#83571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:3060, offset: 0x01f1eb48, size: 26 bytes, params: 2, frame: 2
env0_11.notifyMessagesInSelectedChannel = notify;
}
function NOTIFICATIONS_SET_SCREEN_DOWNTIME_REMINDER({screenDowntimeReminder}) { // fn#83572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11093:3202, offset: 0x01f1eb62, size: 26 bytes, params: 2, frame: 2
env0_11.screenDowntimeReminder = screenDowntimeReminder;
}
}
global.__d(_fun83546, 10907, [6, 7, 15, 17, 18, 661, 477, 566, 694,
2]) /* metro module 10907, dependencies: [6, 7, 15, 17, 18, 661, 477, 566, 694, 2] */;
+235 -194
View File
@@ -1,19 +1,23 @@
/* Metro module 12594; source: stores/NowPlayingStore.tsx; dependencies: [6, 7, 15, 17, 18, 5221, 4396, 1878, 661, 12595, 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 UserStore from './UserStore.tsx'; /* Metro dependency 1878 */
import PresenceStore from './PresenceStore.tsx'; /* Metro dependency 4396 */
import UserAffinitiesV2Store from '../modules/user_affinities/UserAffinitiesV2Store.tsx'; /* Metro dependency 5221 */
import GetApplicationIdForActivity from '../modules/now_playing/getApplicationIdForActivity.tsx'; /* Metro dependency 12595 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun96527(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:6, offset: 0x0215ffa2, size: 453 bytes, params: 8, frame: 19
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 userAffinitiesV2Store = importDefault(5221) /* metro dependency 5221: UserAffinitiesV2Store */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_10 = (require(661) /* metro dependency 661: Constants */).ActivityTypes;
let env0_12 = {};
let env0_13 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun96541(Store);
value.displayName = 'NowPlayingStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
@@ -27,199 +31,236 @@ function _fun96527(global, require, importDefault, importAll, module, exports, d
}, PRESENCES_REPLACE: function({presences}) {
return handleMultipleUpdates(presences);
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/NowPlayingStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/NowPlayingStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_96528() { // fn#96528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:202, offset: 0x02160167, 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_96528_isNativeReflectConstruct = function() {
return !!result;
})();
}
function handleMultipleUpdates(a0) { // fn#96531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:414, offset: 0x021601c9, size: 34 bytes, params: 2, frame: 12
const env0_0 = false;
a0.forEach(_fun96532);
return env0_0;
}
function removeUserIfNeeded(a0) { // fn#96533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:519, offset: 0x02160215, size: 137 bytes, params: 2, frame: 15
var r5;
var object2;
var Object;
const property = env0_13[a0];
if (property == null) {
return false;
}
const gameId = property.gameId;
if (env0_12[gameId] != null) {
object2 = {};
copyDataProperties(object2, env0_12, r5);
env0_12 = object2;
delete object2[gameId][a0];
Object = global.Object;
if (Object.values(object2[gameId]).length !== 0) {
r5 = Object;
} else {
delete env0_12[gameId];
r5 = Object;
function _isNativeReflectConstruct_96528() { // fn#96528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:202, offset: 0x02160167, 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_96528_isNativeReflectConstruct = function() {
return !!result;
})();
}
object2 = {};
copyDataProperties(object2, env0_13, r5);
delete object2[a0];
return true;
}
function _handlePresenceUpdate({user, activities}) { // fn#96534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:707, offset: 0x0216029e, size: 112 bytes, params: 2, frame: 14
var environment;
if (user != null) {
var value = activities.filter(function({type}) {
return type !== ActivityTypes.CUSTOM_STATUS;
});
if (value.length === 0) {
value = environment;
return removeUserIfNeeded(user.id);
function handleMultipleUpdates(a0) { // fn#96531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:414, offset: 0x021601c9, size: 34 bytes, params: 2, frame: 12
const env0_0 = false;
a0.forEach(_fun96532);
return env0_0;
function _fun96532(a0) { // fn#96532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:475, offset: 0x021601eb, size: 42 bytes, params: 2, frame: 11
let value = environment.__proto__;
value = _handlePresenceUpdate(a0);
value = value !== false;
const r2 = value || env0_0;
}
value.forEach(function(a0) {
if (_fun96537(a0, user)) {
env0_1 = true;
}
function removeUserIfNeeded(a0) { // fn#96533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:519, offset: 0x02160215, size: 137 bytes, params: 2, frame: 15
var object3;
var r5;
var object;
var Object;
const property = env0_13[a0];
if (property == null) {
return false;
}
const gameId = property.gameId;
if (object3[gameId] != null) {
object = {};
copyDataProperties(object, object3, r5);
object3 = object;
delete object[gameId][a0];
Object = global.Object;
if (Object.values(object[gameId]).length !== 0) {
r5 = Object;
} else {
delete object3[gameId];
r5 = Object;
}
}
object = {};
copyDataProperties(object, env0_13, r5);
delete object[a0];
return true;
}
function _handlePresenceUpdate({user, activities}) { // fn#96534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:707, offset: 0x0216029e, size: 112 bytes, params: 2, frame: 14
var environment;
if (user != null) {
var value = activities.filter(function({type}) {
return type !== ActivityTypes.CUSTOM_STATUS;
});
if (value.length === 0) {
value = environment;
return removeUserIfNeeded(user.id);
}
value.forEach(function(a0) {
if (_fun96537(a0, user)) {
env0_1 = true;
}
});
}
return false;
function _fun96536(a0) { // fn#96536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:902, offset: 0x02160329, size: 38 bytes, params: 2, frame: 14
if (_handleActivityUpdate(a0, user)) {
}
function _handleActivityUpdate(a0, a1) { // fn#96537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:907, offset: 0x0216034f, size: 268 bytes, params: 3, frame: 18
const value2 = undefined;
const value3 = (GetApplicationIdForActivity)(a0);
if (value3 == null) {
return removeUserIfNeeded(a1.id);
}
const property = env2_13[a1.id];
let r3 = property != null && property.gameId !== value3;
if (r3) {
removeUserIfNeeded(a1.id);
}
const timestamps = a0.timestamps;
const value6 = timestamps == null;
r3 = (value6 ? value2 : timestamps.start) ?? global.Date.now();
const object = {};
object.userId = a1.id;
object.activity = a0;
object.startedPlaying = r3;
const object2 = {};
copyDataProperties(object2, env2_12, value6);
const object3 = {};
copyDataProperties(object3, env2_12[value3], value6);
let userId = object.userId;
object3[userId] = object;
object2[value3] = object3;
const object4 = {};
copyDataProperties(object4, env2_13, value6);
userId = object.userId;
object4[userId] = {gameId: value3, startedPlaying: object.startedPlaying};
return true;
}
}
}
function handleUserAffinitiesV2StoreUpdate() { // fn#96538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:1343, offset: 0x0216045b, size: 67 bytes, params: 1, frame: 11
let userAffinitiesV2StoreBinding = UserAffinitiesV2Store;
const r0 = !(userAffinitiesV2StoreBinding.shouldFetch() || result) && refreshStateFromPresence();
userAffinitiesV2StoreBinding = UserAffinitiesV2Store;
result = !userAffinitiesV2StoreBinding.shouldFetch();
return r0;
function refreshStateFromPresence() { // fn#96539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:1427, owner: handleUserAffinitiesV2StoreUpdate.refreshStateFromPresence, offset: 0x0216049e, size: 60 bytes, params: 1, frame: 12
var environment;
const value = environment.__proto__;
env1_12 = {};
env1_13 = {};
const env0_0 = false;
PresenceStore.getUserIds().forEach(_fun96540);
return env0_0;
function _fun96540(a0) { // fn#96540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:1513, offset: 0x021604da, size: 85 bytes, params: 2, frame: 13
var r1;
var _handlePresenceUpdateBinding;
var object;
const value = environment.__proto__.__proto__;
const user = UserStore.getUser(a0);
if (user != null) {
_handlePresenceUpdateBinding = _handlePresenceUpdate;
object = {user: user};
object.activities = PresenceStore.getActivities(a0);
r1 = _handlePresenceUpdateBinding(object) || env0_0;
}
}
}
}
function _fun96541(a0) { // fn#96541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:1650, offset: 0x0216052f, size: 203 bytes, params: 2, frame: 16
const NowPlayingStore2 = NowPlayingStore;
Inherits(NowPlayingStore2, a0);
return CreateClass(NowPlayingStore2, [{key: 'initialize', value: function() {
this.waitFor(PresenceStore, UserAffinitiesV2Store, UserStore);
this.syncWith([UserAffinitiesV2Store], handleUserAffinitiesV2StoreUpdate);
}}, {key: 'games', get: get_96544}, {key: 'usersPlaying', get: get_96545}, {key: 'gameIds', get: get_96546},
{key: 'getNowPlaying', value: value_96547}, {key: 'getUserGame', value: value_96548}]);
function NowPlayingStore() { // fn#96542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:1662, offset: 0x0118e06f, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, NowPlayingStore);
const value3 = env1_5(NowPlayingStore);
return env1_4(this, _isNativeReflectConstruct_96528() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function get_96544() { // fn#96544, offset: 0x00e2f9de, size: 9 bytes, params: 1, frame: 1
return env1_12;
}
function get_96545() { // fn#96545, offset: 0x00e2f9d5, size: 9 bytes, params: 1, frame: 1
return env1_13;
}
function get_96546() { // fn#96546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:2145, offset: 0x02160639, size: 27 bytes, params: 1, frame: 11
const Object = global.Object;
return Object.keys(env1_12);
}
function value_96547(a0) { // fn#96547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:2207, offset: 0x00f8559b, size: 16 bytes, params: 2, frame: 2
return env1_12[a0];
}
function value_96548(a0) { // fn#96548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:2258, offset: 0x00ef2251, size: 16 bytes, params: 2, frame: 2
return env1_13[a0];
}
}
function CONNECTION_OPEN_SUPPLEMENTAL_96550({guilds, presences}) { // fn#96550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:2445, offset: 0x02160654, size: 69 bytes, params: 2, frame: 13
let env0_0 = false;
guilds.forEach(_fun96551);
env0_0 = handleMultipleUpdates(presences) || env0_0;
return env0_0;
function _fun96551({presences}) { // fn#96551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:2538, offset: 0x02160699, size: 37 bytes, params: 2, frame: 11
if (handleMultipleUpdates(presences)) {
}
}
}
function PRESENCE_UPDATES_96553({updates}) { // fn#96553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:2683, offset: 0x021606be, size: 48 bytes, params: 2, frame: 12
return updates.map(function(a0) {
return _handlePresenceUpdate(a0);
}).some(function(a0) {
return a0;
});
function _fun96554(a0) { // fn#96554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:2741, offset: 0x021606ee, size: 19 bytes, params: 2, frame: 11
return _handlePresenceUpdate(a0);
}
}
return false;
}
function handleUserAffinitiesV2StoreUpdate() { // fn#96538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:1343, offset: 0x0216045b, size: 67 bytes, params: 1, frame: 11
const r0 = !(UserAffinitiesV2Store.shouldFetch() || result) && refreshStateFromPresence();
result = !UserAffinitiesV2Store.shouldFetch();
return r0;
}
function _fun96541(a0) { // fn#96541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:1650, offset: 0x0216052f, size: 203 bytes, params: 2, frame: 16
const closure = NowPlayingStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(PresenceStore, UserAffinitiesV2Store, UserStore);
this.syncWith([UserAffinitiesV2Store], handleUserAffinitiesV2StoreUpdate);
}}, {key: 'games', get: get_96544}, {key: 'usersPlaying', get: get_96545}, {key: 'gameIds', get: get_96546},
{key: 'getNowPlaying', value: value_96547}, {key: 'getUserGame', value: value_96548}]);
}
function CONNECTION_OPEN_SUPPLEMENTAL_96550({guilds, presences}) { // fn#96550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:2445, offset: 0x02160654, size: 69 bytes, params: 2, frame: 13
let env0_0 = false;
guilds.forEach(_fun96551);
env0_0 = handleMultipleUpdates(presences) || env0_0;
return env0_0;
}
function PRESENCE_UPDATES_96553({updates}) { // fn#96553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:2683, offset: 0x021606be, size: 48 bytes, params: 2, frame: 12
return updates.map(function(a0) {
return _handlePresenceUpdate(a0);
}).some(function(a0) {
return a0;
});
}
function _fun96532(a0) { // fn#96532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:475, offset: 0x021601eb, size: 42 bytes, params: 2, frame: 11
let value = environment.__proto__;
value = _handlePresenceUpdate(a0);
value = value !== false;
const r2 = value || env0_0;
}
function _fun96536(a0) { // fn#96536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:902, offset: 0x02160329, size: 38 bytes, params: 2, frame: 14
if (_handleActivityUpdate(a0, user)) {
}
}
function refreshStateFromPresence() { // fn#96539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:1427, owner: handleUserAffinitiesV2StoreUpdate.refreshStateFromPresence, offset: 0x0216049e, size: 60 bytes, params: 1, frame: 12
var environment;
const value = environment.__proto__;
env1_12 = {};
env1_13 = {};
const env0_0 = false;
PresenceStore.getUserIds().forEach(_fun96540);
return env0_0;
}
function get_96546() { // fn#96546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:2145, offset: 0x02160639, size: 27 bytes, params: 1, frame: 11
const Object = global.Object;
return Object.keys(env1_12);
}
function _fun96551({presences}) { // fn#96551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:2538, offset: 0x02160699, size: 37 bytes, params: 2, frame: 11
if (handleMultipleUpdates(presences)) {
}
}
function _handleActivityUpdate(a0, a1) { // fn#96537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:907, offset: 0x0216034f, size: 268 bytes, params: 3, frame: 18
const value2 = undefined;
const value3 = (importDefault(12595) /* metro dependency 12595: getApplicationIdForActivity */)(a0);
if (value3 == null) {
return removeUserIfNeeded(a1.id);
}
const property = env2_13[a1.id];
let r3 = property != null && property.gameId !== value3;
if (r3) {
removeUserIfNeeded(a1.id);
}
const timestamps = a0.timestamps;
const value6 = timestamps == null;
r3 = (value6 ? value2 : timestamps.start) ?? global.Date.now();
const object5 = {};
object5.userId = a1.id;
object5.activity = a0;
object5.startedPlaying = r3;
const object6 = {};
copyDataProperties(object6, env2_12, value6);
const object7 = {};
copyDataProperties(object7, env2_12[value3], value6);
let userId = object5.userId;
object7[userId] = object5;
object6[value3] = object7;
const object8 = {};
copyDataProperties(object8, env2_13, value6);
userId = object5.userId;
object8[userId] = {gameId: value3, startedPlaying: object5.startedPlaying};
return true;
}
function _fun96540(a0) { // fn#96540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12784:1513, offset: 0x021604da, size: 85 bytes, params: 2, frame: 13
var r1;
var _handlePresenceUpdateBinding;
var object2;
const value = environment.__proto__.__proto__;
const user = UserStore.getUser(a0);
if (user != null) {
_handlePresenceUpdateBinding = _handlePresenceUpdate;
object2 = {user: user};
object2.activities = PresenceStore.getActivities(a0);
r1 = _handlePresenceUpdateBinding(object2) || env0_0;
}
function _fun96555(a0) { // fn#96555, offset: 0x00c37049, size: 5 bytes, params: 2, frame: 1
return a0;
}
global.__d(_fun96527, 12594, [6, 7, 15, 17, 18, 5221, 4396, 1878, 661, 12595, 566, 694,
2]) /* metro module 12594, dependencies: [6, 7, 15, 17, 18, 5221, 4396, 1878, 661, 12595, 566, 694, 2] */;
+113 -98
View File
@@ -1,16 +1,20 @@
/* Metro module 12598; source: stores/PermissionSpeakStore.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 1867, 587, 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 ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from './GuildStore.tsx'; /* Metro dependency 1867 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as StorageModule from '../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */
function _fun96573(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:6, offset: 0x02160d9a, size: 357 bytes, params: 8, frame: 20
const env0_0 = require;
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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun96577(Store);
value.displayName = 'PermissionSpeakStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function(a0) {
@@ -28,98 +32,109 @@ function _fun96573(global, require, importDefault, importAll, module, exports, d
require(dependencyMap[7]).Storage.set('hideSuppressWarning', true);
}
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/PermissionSpeakStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/PermissionSpeakStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_96574() { // fn#96574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:168, offset: 0x02160eff, 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_96574_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun96577(a0) { // fn#96577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:414, offset: 0x02160f61, size: 124 bytes, params: 2, frame: 16
const closure = PermissionSpeakStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: value_96579}, {key: 'isAFKChannel', value: value_96580},
{key: 'shouldShowWarning', value: value_96581}]);
}
function VOICE_STATE_UPDATES_96584({voiceStates}) { // fn#96584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:1303, offset: 0x021610e5, size: 34 bytes, params: 2, frame: 13
return voiceStates.reduce(_fun96585, false);
}
function value_96579() { // fn#96579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:744, offset: 0x02160fdd, size: 83 bytes, params: 1, frame: 14
this.waitFor(ChannelStore, GuildStore);
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
env1_13 = Storage.get('hideSuppressWarning') || env1_13;
}
function value_96580() { // fn#96580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:829, offset: 0x02161030, size: 80 bytes, params: 1, frame: 13
let value = environment.__proto__;
const channel = ChannelStore.getChannel(env1_10);
if (channel == null) {
return false;
}
const getGuild = GuildStore.getGuild;
const getGuildId = channel.getGuildId;
value = Reflect.apply(getGuild, GuildStore, [Reflect.apply(getGuildId, channel, [])]);
return value != null && channel.id === value.afkChannelId;
}
function value_96581() { // fn#96581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:986, offset: 0x02161080, size: 52 bytes, params: 1, frame: 12
const channel = ChannelStore.getChannel(env1_10);
let r0 = channel != null && channel.isGuildStageVoice();
r0 = !r0 ? env1_12 : r0;
return !r0;
}
function _fun96585(a0, a1) { // fn#96585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:1370, offset: 0x02161107, size: 120 bytes, params: 3, frame: 5
var r3;
var r0;
var channelId;
let value = a0;
let binding = env1_9;
if (binding !== a1.sessionId) {
r0 = value;
} else {
binding = env1_11;
env1_11 = binding !== a1.suppress ? a1.suppress : env1_11;
binding = env1_10;
channelId = a1.channelId;
if (binding !== channelId) {
channelId = a1.channelId;
env1_12 = !env1_11;
function _isNativeReflectConstruct_96574() { // fn#96574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:168, offset: 0x02160eff, 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) {
}
binding = env1_13;
r3 = binding || a1.channelId == null;
value = true;
r0 = r3 ? value : value;
return (_isNativeReflectConstruct_96574_isNativeReflectConstruct = function() {
return !!result;
})();
}
return r0;
function _fun96577(a0) { // fn#96577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:414, offset: 0x02160f61, size: 124 bytes, params: 2, frame: 16
const PermissionSpeakStore2 = PermissionSpeakStore;
Inherits(PermissionSpeakStore2, a0);
return CreateClass(PermissionSpeakStore2, [{key: 'initialize', value: value_96579}, {key: 'isAFKChannel',
value: value_96580}, {key: 'shouldShowWarning', value: value_96581}]);
function PermissionSpeakStore() { // fn#96578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:426, offset: 0x0118e06f, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, PermissionSpeakStore);
const value3 = env1_5(PermissionSpeakStore);
return env1_4(this, _isNativeReflectConstruct_96574() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_96579() { // fn#96579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:744, offset: 0x02160fdd, size: 83 bytes, params: 1, frame: 14
this.waitFor(ChannelStore, GuildStore);
const Storage = (StorageModule).Storage;
env1_13 = Storage.get('hideSuppressWarning') || env1_13;
}
function value_96580() { // fn#96580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:829, offset: 0x02161030, size: 80 bytes, params: 1, frame: 13
let value = environment.__proto__;
const channel = ChannelStore.getChannel(env1_10);
if (channel == null) {
return false;
}
const guildStoreBinding = GuildStore;
const getGuild = guildStoreBinding.getGuild;
const getGuildId = channel.getGuildId;
value = Reflect.apply(getGuild, guildStoreBinding, [Reflect.apply(getGuildId, channel, [])]);
return value != null && channel.id === value.afkChannelId;
}
function value_96581() { // fn#96581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:986, offset: 0x02161080, size: 52 bytes, params: 1, frame: 12
const channel = ChannelStore.getChannel(env1_10);
let r0 = channel != null && channel.isGuildStageVoice();
r0 = !r0 ? env1_12 : r0;
return !r0;
}
}
function VOICE_STATE_UPDATES_96584({voiceStates}) { // fn#96584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:1303, offset: 0x021610e5, size: 34 bytes, params: 2, frame: 13
return voiceStates.reduce(_fun96585, false);
function _fun96585(a0, a1) { // fn#96585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:1370, offset: 0x02161107, size: 120 bytes, params: 3, frame: 5
var r3;
var r0;
var channelId;
let value = a0;
let binding = env1_9;
if (binding !== a1.sessionId) {
r0 = value;
} else {
binding = env1_11;
env1_11 = binding !== a1.suppress ? a1.suppress : env1_11;
binding = env1_10;
channelId = a1.channelId;
if (binding !== channelId) {
channelId = a1.channelId;
env1_12 = !env1_11;
}
binding = env1_13;
r3 = binding || a1.channelId == null;
value = true;
r0 = r3 ? value : value;
}
return r0;
}
}
}
global.__d(_fun96573, 12598, [6, 7, 15, 17, 18, 1379, 1867, 587, 566, 694,
2]) /* metro module 12598, dependencies: [6, 7, 15, 17, 18, 1379, 1867, 587, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
+137 -109
View File
@@ -1,126 +1,154 @@
/* Metro module 12951; source: stores/PermissionVADStore.tsx; dependencies: [6, 7, 15, 17, 18, 1226, 1379, 4259, 3784, 4294, 4297, 661, 694, 566, 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 './AuthenticationStore.tsx'; /* Metro dependency 1226 */
import ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */
import PermissionStore from './PermissionStore.tsx'; /* Metro dependency 3784 */
import MediaEngineStore from './MediaEngineStore.tsx'; /* Metro dependency 4259 */
import RTCConnectionStore from './RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import VoiceStateStore from './VoiceStateStore.tsx'; /* Metro dependency 4297 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun98658(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#98658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13141:6, offset: 0x021b1b28, size: 491 bytes, params: 8, frame: 21
const closure = RTC_CONNECTION_STATE_98662;
const RTC_CONNECTION_STATE_986622 = RTC_CONNECTION_STATE_98662;
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 authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_13 = value.InputModes;
const env0_14 = value.Permissions;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun98663(Store).displayName = 'PermissionVADStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {RTC_CONNECTION_STATE: closure,
MEDIA_ENGINE_SET_AUDIO_ENABLED: closure, AUDIO_SET_MODE: closure, CHANNEL_UPDATES: closure,
THREAD_UPDATE: closure, GUILD_ROLE_UPDATE: closure, GUILD_MEMBER_UPDATE: closure, IMPERSONATE_UPDATE: closure,
IMPERSONATE_STOP: closure, VOICE_STATE_UPDATES: function({voiceStates}) {
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{RTC_CONNECTION_STATE: RTC_CONNECTION_STATE_986622, MEDIA_ENGINE_SET_AUDIO_ENABLED: RTC_CONNECTION_STATE_986622,
AUDIO_SET_MODE: RTC_CONNECTION_STATE_986622, CHANNEL_UPDATES: RTC_CONNECTION_STATE_986622,
THREAD_UPDATE: RTC_CONNECTION_STATE_986622, GUILD_ROLE_UPDATE: RTC_CONNECTION_STATE_986622,
GUILD_MEMBER_UPDATE: RTC_CONNECTION_STATE_986622, IMPERSONATE_UPDATE: RTC_CONNECTION_STATE_986622,
IMPERSONATE_STOP: RTC_CONNECTION_STATE_986622, VOICE_STATE_UPDATES: function({voiceStates}) {
return voiceStates.some(_fun98669);
}, AUDIO_TOGGLE_SELF_MUTE: AUDIO_TOGGLE_SELF_MUTE_98670, PERMISSION_CLEAR_VAD_WARNING: function() {
env0_16 = true;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/PermissionVADStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/PermissionVADStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_98659() { // fn#98659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13141:251, offset: 0x021b1d13, 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_98659_isNativeReflectConstruct = function() {
return !!result;
})();
}
function AUDIO_SET_MODE_98662() { // fn#98662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13141:458, offset: 0x021b1d75, size: 301 bytes, params: 1, frame: 19
var r3;
var r0;
var r2;
var channel;
var getVoiceState;
var value7;
var defaultImport;
const channelId = RTCConnectionStore.getChannelId();
const value3 = true;
if (channelId == null) {
r2 = value3;
} else {
channel = ChannelStore.getChannel(channelId);
getVoiceState = VoiceStateStore.getVoiceState;
r3 = channel?.getGuildId();
value7 = Reflect.apply(getVoiceState, VoiceStateStore, [r3, AuthenticationStore.getId()]);
r0 = MediaEngineStore.getMode() !== InputModes.VOICE_ACTIVITY || channel == null;
r0 = !r0 ? channel.isPrivate() : r0;
r0 = !r0 ? channel.isGuildStageVoice() : r0;
r0 = !r0 ? PermissionStore.can(Permissions.USE_VAD, channel) : r0;
if (!r0) {
r3 = value7 == null || !!value7.suppress;
r3 = !r3 ? value7.requestToSpeakTimestamp != null : r3;
r0 = r3;
function _isNativeReflectConstruct_98659() { // fn#98659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13141:251, offset: 0x021b1d13, 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) {
}
r2 = r0;
return (_isNativeReflectConstruct_98659_isNativeReflectConstruct = function() {
return !!result;
})();
}
const value15 = env0_15 !== r2;
if (value15) {
env0_15 = r2;
defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
defaultImport.dispatch({type: 'SET_VAD_PERMISSION', hasPermission: env0_15});
r0 = value3;
} else {
r0 = value15;
function AUDIO_SET_MODE_98662() { // fn#98662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13141:458, offset: 0x021b1d75, size: 301 bytes, params: 1, frame: 19
var r3;
var r0;
var r2;
var channel;
var voiceStateStoreBinding;
var getVoiceState;
var authenticationStoreBinding;
var value7;
var defaultImport;
const channelId = RTCConnectionStore.getChannelId();
const value3 = true;
if (channelId == null) {
r2 = value3;
} else {
channel = ChannelStore.getChannel(channelId);
voiceStateStoreBinding = VoiceStateStore;
getVoiceState = voiceStateStoreBinding.getVoiceState;
r3 = channel?.getGuildId();
authenticationStoreBinding = AuthenticationStore;
value7 = Reflect.apply(getVoiceState, voiceStateStoreBinding, [r3, authenticationStoreBinding.getId()]);
r0 = MediaEngineStore.getMode() !== InputModes.VOICE_ACTIVITY || channel == null;
r0 = !r0 ? channel.isPrivate() : r0;
r0 = !r0 ? channel.isGuildStageVoice() : r0;
r0 = !r0 ? PermissionStore.can(Permissions.USE_VAD, channel) : r0;
if (!r0) {
r3 = value7 == null || !!value7.suppress;
r3 = !r3 ? value7.requestToSpeakTimestamp != null : r3;
r0 = r3;
}
r2 = r0;
}
const value15 = env0_15 !== r2;
if (value15) {
env0_15 = r2;
defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
defaultImport.dispatch({type: 'SET_VAD_PERMISSION', hasPermission: env0_15});
r0 = value3;
} else {
r0 = value15;
}
return r0;
}
return r0;
}
function _fun98663(a0) { // fn#98663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13141:917, offset: 0x021b1ea2, size: 124 bytes, params: 2, frame: 16
const closure = PermissionVADStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(AuthenticationStore, ChannelStore, MediaEngineStore, PermissionStore, RTCConnectionStore,
VoiceStateStore);
}}, {key: 'shouldShowWarning', value: value_98666}, {key: 'canUseVoiceActivity', value: value_98667}]);
}
function VOICE_STATE_UPDATES_98668({voiceStates}) { // fn#98668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13141:1885, offset: 0x021b1f59, size: 31 bytes, params: 2, frame: 11
return voiceStates.some(_fun98669);
}
function value_98666() { // fn#98666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13141:1307, offset: 0x021b1f4d, size: 12 bytes, params: 1, frame: 1
return !env1_16;
}
function _fun98669({userId}) { // fn#98669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13141:1950, offset: 0x021b1f78, size: 44 bytes, params: 2, frame: 11
const value = environment.__proto__;
const getId = AuthenticationStore.getId;
return userId === Reflect.apply(getId, AuthenticationStore, []) && RTC_CONNECTION_STATE_98662();
function _fun98663(a0) { // fn#98663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13141:917, offset: 0x021b1ea2, size: 124 bytes, params: 2, frame: 16
const PermissionVADStore2 = PermissionVADStore;
Inherits(PermissionVADStore2, a0);
return CreateClass(PermissionVADStore2, [{key: 'initialize', value: function() {
this.waitFor(AuthenticationStore, ChannelStore, MediaEngineStore, PermissionStore, RTCConnectionStore,
VoiceStateStore);
}}, {key: 'shouldShowWarning', value: value_98666}, {key: 'canUseVoiceActivity', value: value_98667}]);
function PermissionVADStore() { // fn#98664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13141:929, offset: 0x010992b7, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, PermissionVADStore);
const value3 = env1_5(PermissionVADStore);
return env1_4(this, _isNativeReflectConstruct_98659() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_98666() { // fn#98666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13141:1307, offset: 0x021b1f4d, size: 12 bytes, params: 1, frame: 1
return !env1_16;
}
function value_98667() { // fn#98667, offset: 0x00df0e8b, size: 9 bytes, params: 1, frame: 1
return env1_15;
}
}
function VOICE_STATE_UPDATES_98668({voiceStates}) { // fn#98668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13141:1885, offset: 0x021b1f59, size: 31 bytes, params: 2, frame: 11
return voiceStates.some(_fun98669);
function _fun98669({userId}) { // fn#98669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13141:1950, offset: 0x021b1f78, size: 44 bytes, params: 2, frame: 11
const value = environment.__proto__;
const authenticationStoreBinding = AuthenticationStore;
const getId = authenticationStoreBinding.getId;
return userId === Reflect.apply(getId, authenticationStoreBinding, []) && RTC_CONNECTION_STATE_98662();
}
}
function AUDIO_TOGGLE_SELF_MUTE_98670() { // fn#98670, offset: 0x01d2aab1, size: 15 bytes, params: 1, frame: 2
}
}
global.__d(_fun98658, 12951, [6, 7, 15, 17, 18, 1226, 1379, 4259, 3784, 4294, 4297, 661, 694, 566,
2]) /* metro module 12951, dependencies: [6, 7, 15, 17, 18, 1226, 1379, 4259, 3784, 4294, 4297, 661, 694, 566, 2] */;
+59 -42
View File
@@ -1,13 +1,16 @@
/* Metro module 15849; source: stores/PhoneVerificationStore.tsx; dependencies: [6, 7, 15, 17, 18, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun121909(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16057:6, offset: 0x025542a2, size: 287 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun121913(Store);
value.displayName = 'PhoneVerificationStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
@@ -16,43 +19,57 @@ function _fun121909(global, require, importDefault, importAll, module, exports,
}, VERIFICATION_CLOSE_COUNTRY_SELECTOR: function() {
env0_5 = false;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/PhoneVerificationStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/PhoneVerificationStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_121910() { // fn#121910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16057:148, offset: 0x025543c1, 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) {
function _isNativeReflectConstruct_121910() { // fn#121910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16057:148, offset: 0x025543c1, 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_121910_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_121910_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun121913(a0) { // fn#121913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16057:356, offset: 0x02554423, size: 74 bytes, params: 2, frame: 15
const closure = PhoneVerificationStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getCountrySelectorOpened', value: value_121915}]);
function _fun121913(a0) { // fn#121913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16057:356, offset: 0x02554423, size: 74 bytes, params: 2, frame: 15
const PhoneVerificationStore2 = PhoneVerificationStore;
Inherits(PhoneVerificationStore2, a0);
return CreateClass(PhoneVerificationStore2, [{key: 'getCountrySelectorOpened', value: value_121915}]);
function PhoneVerificationStore() { // fn#121914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16057:368, offset: 0x00c7a0d6, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, PhoneVerificationStore);
const value3 = env1_3(PhoneVerificationStore);
return env1_2(this, _isNativeReflectConstruct_121910() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_121915() { // fn#121915, offset: 0x00e40571, size: 9 bytes, params: 1, frame: 1
return env1_5;
}
}
}
global.__d(_fun121909, 15849, [6, 7, 15, 17, 18, 566, 694,
2]) /* metro module 15849, dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */;
+75 -57
View File
@@ -1,4 +1,12 @@
/* Metro module 4130; source: stores/PremiumPaymentModalStore.tsx; dependencies: [6, 7, 15, 17, 18, 4131, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun34301(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#34301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4301:6, offset: 0x010521c3, size: 393 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = function(a0) {
@@ -9,12 +17,7 @@ function _fun34301(global, require, importDefault, importAll, module, exports, d
};
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 Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun34307(Store);
value.displayName = 'PremiumPaymentModalStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
@@ -34,65 +37,80 @@ function _fun34301(global, require, importDefault, importAll, module, exports, d
}, SKU_PURCHASE_FAIL: function(a0) {
env0_7 = a0.error;
}, SKU_PURCHASE_AWAIT_CONFIRMATION: SKU_PURCHASE_AWAIT_CONFIRMATION, GIFT_CODE_CREATE: GIFT_CODE_CREATE});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/PremiumPaymentModalStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/PremiumPaymentModalStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_34302() { // fn#34302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4301:148, offset: 0x0105234c, 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) {
function _isNativeReflectConstruct_34302() { // fn#34302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4301:148, offset: 0x0105234c, 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_34302_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_34302_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun34307(a0) { // fn#34307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4301:454, offset: 0x010523ca, size: 95 bytes, params: 2, frame: 16
const closure = PremiumPaymentModalStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'paymentError', get: get_34309}, {key: 'getGiftCode', value: value_34310}]);
}
function _fun34307(a0) { // fn#34307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4301:454, offset: 0x010523ca, size: 95 bytes, params: 2, frame: 16
const PremiumPaymentModalStore2 = PremiumPaymentModalStore;
Inherits(PremiumPaymentModalStore2, a0);
return CreateClass(PremiumPaymentModalStore2, [{key: 'paymentError', get: get_34309}, {key: 'getGiftCode',
value: value_34310}]);
function PremiumPaymentModalStore() { // fn#34308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4301:466, offset: 0x00ec62ac, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, PremiumPaymentModalStore);
const value3 = env1_5(PremiumPaymentModalStore);
return env1_4(this, _isNativeReflectConstruct_34302() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function get_34309() { // fn#34309, offset: 0x00fbd9cb, size: 9 bytes, params: 1, frame: 1
return env1_7;
}
function value_34310(a0) { // fn#34310, offset: 0x01052429, size: 22 bytes, params: 2, frame: 4
return a0 !== env1_9 ? null : env1_8;
}
function SKU_PURCHASE_AWAIT_CONFIRMATION(a0) { // fn#34316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4301:1652, offset: 0x010524af, size: 28 bytes, params: 2, frame: 2
var skuId;
if (a0.isGift) {
skuId = a0.skuId;
}
}
function GIFT_CODE_CREATE({giftCode}) { // fn#34317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4301:1739, offset: 0x010524cb, size: 55 bytes, params: 2, frame: 4
const uses = giftCode.uses;
if (uses !== 0) {
return false;
function SKU_PURCHASE_AWAIT_CONFIRMATION(a0) { // fn#34316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4301:1652, offset: 0x010524af, size: 28 bytes, params: 2, frame: 2
var skuId;
if (a0.isGift) {
skuId = a0.skuId;
}
}
if (giftCode.sku_id !== env0_9) {
return false;
function GIFT_CODE_CREATE({giftCode}) { // fn#34317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4301:1739, offset: 0x010524cb, size: 55 bytes, params: 2, frame: 4
const uses = giftCode.uses;
if (uses !== 0) {
return false;
}
if (giftCode.sku_id !== env0_9) {
return false;
}
env0_8 = giftCode.code;
}
env0_8 = giftCode.code;
}
function value_34310(a0) { // fn#34310, offset: 0x01052429, size: 22 bytes, params: 2, frame: 4
return a0 !== env1_9 ? null : env1_8;
}
global.__d(_fun34301, 4130, [6, 7, 15, 17, 18, 4131, 566, 694,
2]) /* metro module 4130, dependencies: [6, 7, 15, 17, 18, 4131, 566, 694, 2] */;
+83 -59
View File
@@ -1,76 +1,100 @@
/* Metro module 12599; source: stores/PremiumPromoStore.tsx; dependencies: [6, 7, 15, 17, 18, 1226, 3793, 672, 21, 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 Durations from '../utils/Durations.tsx'; /* Metro dependency 672 */
import AuthenticationStore from './AuthenticationStore.tsx'; /* Metro dependency 1226 */
import RelationshipStore from './RelationshipStore.tsx'; /* Metro dependency 3793 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun96587(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12789:6, offset: 0x021611cd, size: 346 bytes, params: 8, frame: 18
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 authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const Millis = (Durations).Millis;
const DAY = Millis.DAY;
const env0_9 = 180 * DAY;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun96591(Store);
value.displayName = 'PremiumPromoStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{CONNECTION_OPEN: CONNECTION_OPEN_96595});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/PremiumPromoStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/PremiumPromoStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_96588() { // fn#96588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12789:168, offset: 0x02161327, 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) {
function _isNativeReflectConstruct_96588() { // fn#96588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12789:168, offset: 0x02161327, 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_96588_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_96588_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun96591(a0) { // fn#96591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12789:401, offset: 0x02161389, size: 97 bytes, params: 2, frame: 16
const closure = PremiumPromoStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(RelationshipStore, AuthenticationStore);
}}, {key: 'isEligible', value: value_96594}]);
}
function _fun96591(a0) { // fn#96591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12789:401, offset: 0x02161389, size: 97 bytes, params: 2, frame: 16
const PremiumPromoStore2 = PremiumPromoStore;
Inherits(PremiumPromoStore2, a0);
return CreateClass(PremiumPromoStore2, [{key: 'initialize', value: function() {
this.waitFor(RelationshipStore, AuthenticationStore);
}}, {key: 'isEligible', value: value_96594}]);
function PremiumPromoStore() { // fn#96592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12789:413, offset: 0x00ff71a7, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, PremiumPromoStore);
const value3 = env1_5(PremiumPromoStore);
return env1_4(this, _isNativeReflectConstruct_96588() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_96594() { // fn#96594, offset: 0x00fbd9ec, size: 9 bytes, params: 1, frame: 1
return env1_10;
}
function CONNECTION_OPEN_96595() { // fn#96595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12789:883, offset: 0x02161408, size: 122 bytes, params: 1, frame: 15
var r0;
var defaultImport;
const binding = env0_10;
const getFriendIDs = RelationshipStore.getFriendIDs;
const value2 = Reflect.apply(getFriendIDs, RelationshipStore, []).length >= 10;
if (value2) {
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
r0 = defaultImport.extractTimestamp(AuthenticationStore.getId()) < global.Date.now() - env0_9;
} else {
r0 = value2;
}
return binding !== r0;
function CONNECTION_OPEN_96595() { // fn#96595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12789:883, offset: 0x02161408, size: 122 bytes, params: 1, frame: 15
var r0;
var defaultImport;
var extractTimestamp;
var authenticationStoreBinding;
const binding = env0_10;
const relationshipStoreBinding = RelationshipStore;
const getFriendIDs = relationshipStoreBinding.getFriendIDs;
const value2 = Reflect.apply(getFriendIDs, relationshipStoreBinding, []).length >= 10;
if (value2) {
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
extractTimestamp = defaultImport.extractTimestamp;
authenticationStoreBinding = AuthenticationStore;
r0 = Reflect.apply(extractTimestamp, defaultImport,
[authenticationStoreBinding.getId()]) < global.Date.now() - env0_9;
} else {
r0 = value2;
}
return binding !== r0;
}
}
global.__d(_fun96587, 12599, [6, 7, 15, 17, 18, 1226, 3793, 672, 21, 566, 694,
2]) /* metro module 12599, dependencies: [6, 7, 15, 17, 18, 1226, 3793, 672, 21, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
+223 -192
View File
@@ -1,4 +1,18 @@
/* Metro module 12600; source: stores/PrivateChannelReadStateStore.tsx; dependencies: [6, 7, 15, 17, 18, 1383, 1379, 4605, 1934, 5219, 1944, 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 ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectedChannelStore from './SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import ReadStateStore from './ReadStateStore.tsx'; /* Metro dependency 4605 */
import PrivateChannelSortStore from './views/PrivateChannelSortStore.tsx'; /* Metro dependency 5219 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ChannelRecordModule from '../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
import * as FunctionUtilsModule from '../utils/FunctionUtils.tsx'; /* Metro dependency 1944 */
function _fun96596(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:6, offset: 0x02161482, size: 512 bytes, params: 8, frame: 22
const env0_0 = require;
const _arrayLikeToArray_96602 = function(a0, a1) {
@@ -47,224 +61,241 @@ function _fun96596(global, require, importDefault, importAll, module, exports, d
const closure = function() {
return rebuildUnreads();
};
const closure2 = MESSAGE_CREATE_96606;
const MESSAGE_CREATE_966062 = MESSAGE_CREATE_96606;
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 = (require(1383) /* metro dependency 1383: ChannelRecord */).isPrivate;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const privateChannelSortStore = importDefault(5219) /* metro dependency 5219: PrivateChannelSortStore */;
const env0_12 = [];
const Set = global.Set;
let set = new Set();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun96607(Store).displayName = 'PrivateChannelReadStateStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: closure,
OVERLAY_INITIALIZE: closure, MESSAGE_CREATE: closure2, MESSAGE_ACK: closure2,
OVERLAY_INITIALIZE: closure, MESSAGE_CREATE: MESSAGE_CREATE_966062, MESSAGE_ACK: MESSAGE_CREATE_966062,
CHANNEL_SELECT: CHANNEL_SELECT_96611, CHANNEL_DELETE: CHANNEL_DELETE_96612, WINDOW_FOCUS: WINDOW_FOCUS_96613,
CHANNEL_CREATE: CHANNEL_CREATE_96614, CHANNEL_UPDATES: CHANNEL_UPDATES_96615});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/PrivateChannelReadStateStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/PrivateChannelReadStateStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_96597() { // fn#96597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:211, offset: 0x02161682, 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_96597_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_96600(a0, a1) { // fn#96600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:404, offset: 0x021616e4, 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) {
function _isNativeReflectConstruct_96597() { // fn#96597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:211, offset: 0x02161682, 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 _fun96601;
return (_isNativeReflectConstruct_96597_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_96602(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') {
function _createForOfIteratorHelperLoose_96600(a0, a1) { // fn#96600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:404, offset: 0x021616e4, 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 _fun96601;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_96602(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_96602(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_96602(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun96601;
}
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 rebuildUnreads() { // fn#96603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:1333, offset: 0x02161858, size: 141 bytes, params: 1, frame: 14
var r0;
var set;
const value3 = PrivateChannelSortStore.getPrivateChannelIds().filter(_fun96604);
if (value3.length > 20) {
value3.length = 20;
}
const value4 = (require(1944) /* metro dependency 1944: FunctionUtils */).areArraysShallowlyEqual(value3, env0_12);
if (value4) {
r0 = !value4;
} else {
set = new global.Set(value3);
r0 = true;
}
return r0;
}
function MESSAGE_ACK_96606({channelId}) { // fn#96606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:1579, offset: 0x02161911, size: 71 bytes, params: 2, frame: 13
const channel = ChannelStore.getChannel(channelId);
return !(channel == null || !isPrivate(channel.type)) && rebuildUnreads();
}
function _fun96607(a0) { // fn#96607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:1698, offset: 0x02161958, size: 97 bytes, params: 2, frame: 16
const closure = PrivateChannelReadStateStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(PrivateChannelSortStore, ChannelStore, SelectedChannelStore, ReadStateStore);
}}, {key: 'getUnreadPrivateChannelIds', value: value_96610}]);
}
function CHANNEL_DELETE_96612({channel}) { // fn#96612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:2539, offset: 0x021619e0, size: 51 bytes, params: 2, frame: 12
const value2 = env0_13.has(channel.id);
return value2 ? rebuildUnreads() : !!value2;
}
function WINDOW_FOCUS_96613() { // fn#96613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:2635, offset: 0x02161a13, size: 77 bytes, params: 1, frame: 13
const getChannel = ChannelStore.getChannel;
const getChannelId = SelectedChannelStore.getChannelId;
const value2 = Reflect.apply(getChannel, ChannelStore, [Reflect.apply(getChannelId, SelectedChannelStore, [])]);
return !(value2 == null || !isPrivate(value2.type)) && rebuildUnreads();
}
function CHANNEL_CREATE_96614({channel}) { // fn#96614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:2764, offset: 0x02161a60, size: 76 bytes, params: 2, frame: 13
const channel2 = ChannelStore.getChannel(channel.id);
return !(channel2 == null || !isPrivate(channel2.type)) && rebuildUnreads();
}
function CHANNEL_UPDATES_96615({channels}) { // fn#96615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:2897, offset: 0x02161aac, size: 131 bytes, params: 2, frame: 19
var r4;
var r5;
var r0;
var r3;
var value5;
var id;
var channel;
var value7;
var isPrivateBinding;
var type;
var isPrivate2;
var value8;
var value9;
const value2 = _createForOfIteratorHelperLoose_96600(channels);
const value3 = value2();
let done = value3.done;
if (done) {
r3 = false;
} else {
r4 = false;
r5 = value3;
while (true) {
value5 = r5.value;
id = value5.id;
channel = ChannelStore.getChannel(id);
value7 = channel != null;
if (value7) {
isPrivateBinding = isPrivate;
type = channel.type;
isPrivate2 = isPrivateBinding(type);
r0 = isPrivate2;
} else {
r0 = value7;
if (r5) {
}
if (!r0) {
return _fun96601;
}
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 _fun96601() { // fn#96601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:975, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
function rebuildUnreads() { // fn#96603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:1333, offset: 0x02161858, size: 141 bytes, params: 1, frame: 14
var r0;
var set;
const value3 = PrivateChannelSortStore.getPrivateChannelIds().filter(_fun96604);
if (value3.length > 20) {
value3.length = 20;
}
const value4 = (FunctionUtilsModule).areArraysShallowlyEqual(value3, env0_12);
if (value4) {
r0 = !value4;
} else {
set = new global.Set(value3);
r0 = true;
}
return r0;
function _fun96604(a0) { // fn#96604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:1398, offset: 0x021618e5, size: 29 bytes, params: 2, frame: 11
const value = environment.__proto__;
return ReadStateStore.getMentionCount(a0) > 0;
}
}
function MESSAGE_ACK_96606({channelId}) { // fn#96606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:1579, offset: 0x02161911, size: 71 bytes, params: 2, frame: 13
const channel = ChannelStore.getChannel(channelId);
return !(channel == null || !isPrivate(channel.type)) && rebuildUnreads();
}
function _fun96607(a0) { // fn#96607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:1698, offset: 0x02161958, size: 97 bytes, params: 2, frame: 16
const PrivateChannelReadStateStore2 = PrivateChannelReadStateStore;
Inherits(PrivateChannelReadStateStore2, a0);
return CreateClass(PrivateChannelReadStateStore2, [{key: 'initialize', value: function() {
this.waitFor(PrivateChannelSortStore, ChannelStore, SelectedChannelStore, ReadStateStore);
}}, {key: 'getUnreadPrivateChannelIds', value: value_96610}]);
function PrivateChannelReadStateStore() { // fn#96608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:1710, offset: 0x0118e06f, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, PrivateChannelReadStateStore);
const value3 = env1_5(PrivateChannelReadStateStore);
return env1_4(this, _isNativeReflectConstruct_96597() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_96610() { // fn#96610, offset: 0x00e2f9de, size: 9 bytes, params: 1, frame: 1
return env1_12;
}
}
function CHANNEL_SELECT_96611({channelId}) { // fn#96611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:2410, offset: 0x02161911, size: 71 bytes, params: 2, frame: 13
const channel = ChannelStore.getChannel(channelId);
return !(channel == null || !isPrivate(channel.type)) && rebuildUnreads();
}
function CHANNEL_DELETE_96612({channel}) { // fn#96612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:2539, offset: 0x021619e0, size: 51 bytes, params: 2, frame: 12
const value2 = env0_13.has(channel.id);
return value2 ? rebuildUnreads() : !!value2;
}
function WINDOW_FOCUS_96613() { // fn#96613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:2635, offset: 0x02161a13, size: 77 bytes, params: 1, frame: 13
const channelStoreBinding = ChannelStore;
const getChannel = channelStoreBinding.getChannel;
const selectedChannelStoreBinding = SelectedChannelStore;
const getChannelId = selectedChannelStoreBinding.getChannelId;
const value2 = Reflect.apply(getChannel, channelStoreBinding, [Reflect.apply(getChannelId,
selectedChannelStoreBinding, [])]);
return !(value2 == null || !isPrivate(value2.type)) && rebuildUnreads();
}
function CHANNEL_CREATE_96614({channel}) { // fn#96614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:2764, offset: 0x02161a60, size: 76 bytes, params: 2, frame: 13
const channel2 = ChannelStore.getChannel(channel.id);
return !(channel2 == null || !isPrivate(channel2.type)) && rebuildUnreads();
}
function CHANNEL_UPDATES_96615({channels}) { // fn#96615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:2897, offset: 0x02161aac, size: 131 bytes, params: 2, frame: 19
var r4;
var r5;
var r0;
var r3;
var value5;
var id;
var channel;
var value7;
var isPrivateBinding;
var type;
var isPrivate2;
var value8;
var value9;
const value2 = _createForOfIteratorHelperLoose_96600(channels);
const value3 = value2();
let done = value3.done;
if (done) {
r3 = false;
} else {
r4 = false;
r5 = value3;
while (true) {
value5 = r5.value;
id = value5.id;
channel = ChannelStore.getChannel(id);
value7 = channel != null;
if (value7) {
isPrivateBinding = isPrivate;
type = channel.type;
isPrivate2 = isPrivateBinding(type);
r0 = isPrivate2;
} else {
r0 = value7;
}
if (!r0) {
continue;
}
value8 = true;
r4 = value8;
value9 = value2();
done = value9.done;
if (done) {
r3 = r4;
break;
}
r5 = value9;
continue;
}
value8 = true;
r4 = value8;
value9 = value2();
done = value9.done;
if (done) {
r3 = r4;
break;
}
r5 = value9;
continue;
}
return r3 ? rebuildUnreads() : !!r3;
}
return r3 ? rebuildUnreads() : !!r3;
}
function _fun96604(a0) { // fn#96604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12790:1398, offset: 0x021618e5, size: 29 bytes, params: 2, frame: 11
const value = environment.__proto__;
return ReadStateStore.getMentionCount(a0) > 0;
}
global.__d(_fun96596, 12600, [6, 7, 15, 17, 18, 1383, 1379, 4605, 1934, 5219, 1944, 566, 694,
2]) /* metro module 12600, dependencies: [6, 7, 15, 17, 18, 1383, 1379, 4605, 1934, 5219, 1944, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
+203 -187
View File
@@ -1,35 +1,40 @@
/* Metro module 12603; source: stores/RTCConnectionDesyncStore.tsx; dependencies: [6, 7, 15, 17, 18, 4298, 1379, 4294, 1878, 4297, 4300, 661, 4299, 4268, 4617, 4618, 4406, 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 ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from './UserStore.tsx'; /* Metro dependency 1878 */
import RTCConnectionStore from './RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import VoiceStateStore from './VoiceStateStore.tsx'; /* Metro dependency 4297 */
import VoiceStateRecord from '../records/VoiceStateRecord.tsx'; /* Metro dependency 4298 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as CallConstantsModule from '../modules/calls/CallConstants.tsx'; /* Metro dependency 4299 */
import * as SortedVoiceStateStoreModule from './views/SortedVoiceStateStore.tsx'; /* Metro dependency 4300 */
import * as MediaEngineModule from '../external/discord_common/js/packages/media-engine/index.tsx'; /* Metro dependency 4406 */
function _fun96668(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:6, offset: 0x02163050, size: 629 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = VOICE_CHANNEL_SELECT_96676;
const VOICE_CHANNEL_SELECT_966762 = VOICE_CHANNEL_SELECT_96676;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const voiceStateRecord = importDefault(4298) /* metro dependency 4298: VoiceStateRecord */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const env0_13 = (require(4300) /* metro dependency 4300: SortedVoiceStateStore */).makeSortedVoiceState;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_14 = value.ME;
const env0_15 = value.RTCConnectionStates;
const env0_16 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
value = importDefault(4268) /* metro dependency 4268: CachedEntriesMap */;
value = new value();
value = importDefault(4268) /* metro dependency 4268: CachedEntriesMap */;
value = new value();
const Set = global.Set;
let set = new Set();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun96677(Store).displayName = 'RTCConnectionDesyncStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
VOICE_CHANNEL_SELECT_96676();
}, VOICE_CHANNEL_SELECT: closure, RTC_CONNECTION_STATE: function({state, context}) {
}, VOICE_CHANNEL_SELECT: VOICE_CHANNEL_SELECT_966762, RTC_CONNECTION_STATE: function({state, context}) {
var r1;
var r0;
var value4;
@@ -51,182 +56,193 @@ function _fun96668(global, require, importDefault, importAll, module, exports, d
}, VOICE_STATE_UPDATES: VOICE_STATE_UPDATES_96686,
RTC_CONNECTION_CLIENT_CONNECT: RTC_CONNECTION_CLIENT_CONNECT_96688,
RTC_CONNECTION_CLIENT_DISCONNECT: RTC_CONNECTION_CLIENT_DISCONNECT});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/RTCConnectionDesyncStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/RTCConnectionDesyncStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_96669() { // fn#96669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:300, offset: 0x021632c5, 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_96669_isNativeReflectConstruct = function() {
return !!result;
})();
}
function upsert_96672(a0, a1, a2) { // fn#96672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:539, offset: 0x02163327, size: 276 bytes, params: 4, frame: 21
var object2;
const value = a1;
const voiceStateRecord = new VoiceStateRecord({userId: a0.id, channelId: a2});
const sortedVoiceState = makeSortedVoiceState(voiceStateRecord, value ?? ME, a0.id);
let binding = env0_17;
binding.set(a0.id, sortedVoiceState);
object2 = {};
const USER = ParticipantTypes.USER;
object2.type = USER;
object2.user = a0;
object2.id = a0.id;
object2.streamId = null;
object2.voiceState = voiceStateRecord;
object2.voicePlatform = null;
object2.speaking = false;
object2.lastSpoke = 0;
object2.soundsharing = false;
object2.ringing = false;
object2.userNick = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).getName(value, a2, a0);
object2.userAvatarDecoration = (require(4618) /* metro dependency 4618: useAvatarDecoration */).getAvatarDecoration(a0,
value);
object2.localVideoDisabled = false;
object2.isPoppedOut = false;
binding = env0_18;
binding.set(a0.id, object2);
}
function deleteUserDesyncData(a0) { // fn#96673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:910, offset: 0x0216343b, size: 62 bytes, params: 2, frame: 13
const value2 = env0_17.delete(a0);
const value3 = env0_18.delete(a0);
const value = env0_19.delete(a0);
let r0 = value2 || value3;
r0 = !r0 ? value : r0;
return r0;
}
function retryFailedUsers() { // fn#96674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:1004, offset: 0x02163479, size: 103 bytes, params: 1, frame: 14
var value5;
const channelId = RTCConnectionStore.getChannelId();
if (channelId == null) {
return false;
}
const channel = ChannelStore.getChannel(channelId);
if (channel != null) {
value5 = channel.getGuildId();
}
const env0_2 = false;
env0_19.forEach(_fun96675);
return env0_2;
}
function VOICE_CHANNEL_SELECT_96676() { // fn#96676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:1282, offset: 0x02163553, size: 49 bytes, params: 1, frame: 10
env0_17.clear();
env0_18.clear();
env0_19.clear();
}
function _fun96677(a0) { // fn#96677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:1341, offset: 0x02163584, size: 180 bytes, params: 2, frame: 16
const closure = RTCConnectionDesyncStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(VoiceStateStore, UserStore, ChannelStore, RTCConnectionStore);
this.syncWith([UserStore], retryFailedUsers);
}}, {key: 'desyncedVoiceStatesCount', get: get_96680}, {key: 'getDesyncedUserIds', value: value_96681},
{key: 'getDesyncedVoiceStates', value: value_96682}, {key: 'getDesyncedParticipants', value: value_96683}]);
}
function VOICE_STATE_UPDATES_96686({voiceStates}) { // fn#96686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:2392, offset: 0x0216372b, size: 64 bytes, params: 2, frame: 14
let value = RTCConnectionStore.getChannelId();
value = value != null;
return value && voiceStates.reduce(_fun96687, false);
}
function RTC_CONNECTION_CLIENT_CONNECT_96688({userIds, guildId, channelId, context}) { // fn#96688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:2591, offset: 0x021637a5, size: 101 bytes, params: 2, frame: 15
const MediaEngineContextTypes = (require(4406) /* metro dependency 4406: mediaEngine */).MediaEngineContextTypes;
const DEFAULT = MediaEngineContextTypes.DEFAULT;
return context === DEFAULT && userIds.reduce(_fun96689, false);
}
function RTC_CONNECTION_CLIENT_DISCONNECT({userId, context}) { // fn#96690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:2904, offset: 0x02163871, size: 68 bytes, params: 2, frame: 14
const MediaEngineContextTypes = (require(4406) /* metro dependency 4406: mediaEngine */).MediaEngineContextTypes;
const DEFAULT = MediaEngineContextTypes.DEFAULT;
return context === DEFAULT && deleteUserDesyncData(userId);
}
function _fun96675(a0) { // fn#96675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:1154, offset: 0x021634e0, size: 115 bytes, params: 2, frame: 16
var binding;
var user;
var upsert_96672Binding;
if (VoiceStateStore.getVoiceStateForChannel(env0_0, a0) == null) {
user = UserStore.getUser(a0);
if (user != null) {
binding = env1_19;
binding.delete(a0);
upsert_96672Binding = upsert_96672;
binding = env0_1;
upsert_96672Binding(user, binding, env0_0);
function _isNativeReflectConstruct_96669() { // fn#96669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:300, offset: 0x021632c5, 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) {
}
} else {
env1_19.delete(a0);
return (_isNativeReflectConstruct_96669_isNativeReflectConstruct = function() {
return !!result;
})();
}
}
function get_96680() { // fn#96680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:1798, offset: 0x0216367b, size: 18 bytes, params: 1, frame: 9
return env1_17.size();
}
function value_96681() { // fn#96681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:1859, offset: 0x0216368d, size: 18 bytes, params: 1, frame: 9
return env1_17.keys();
}
function value_96682() { // fn#96682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:1924, offset: 0x0216369f, size: 18 bytes, params: 1, frame: 9
return env1_17.values();
}
function value_96683() { // fn#96683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:1992, offset: 0x021636b1, size: 18 bytes, params: 1, frame: 9
return env1_18.values();
}
function _fun96687(a0, {userId, channelId}) { // fn#96687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:2491, offset: 0x0216376b, size: 58 bytes, params: 3, frame: 13
const value = a0;
let r0 = channelId === env0_0 && !!deleteUserDesyncData(userId);
r0 = !r0 ? value : r0;
return r0;
}
function _fun96689(a0, a1) { // fn#96689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:2741, offset: 0x0216380a, size: 103 bytes, params: 3, frame: 18
var r1;
const value = a0;
const getVoiceStateForChannel = VoiceStateStore.getVoiceStateForChannel;
if (Reflect.apply(getVoiceStateForChannel, VoiceStateStore, [channelId, a1]) != null) {
return value;
function upsert_96672(a0, a1, a2) { // fn#96672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:539, offset: 0x02163327, size: 276 bytes, params: 4, frame: 21
const value = a1;
const voiceStateRecord2 = new VoiceStateRecord({userId: a0.id, channelId: a2});
const sortedVoiceState = makeSortedVoiceState(voiceStateRecord2, value ?? ME, a0.id);
let binding = env0_17;
binding.set(a0.id, sortedVoiceState);
object = {};
const USER = ParticipantTypes.USER;
object.type = USER;
object.user = a0;
object.id = a0.id;
object.streamId = null;
object.voiceState = voiceStateRecord2;
object.voicePlatform = null;
object.speaking = false;
object.lastSpoke = 0;
object.soundsharing = false;
object.ringing = false;
object.userNick = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).getName(value, a2, a0);
object.userAvatarDecoration = (require(4618) /* metro dependency 4618: useAvatarDecoration */).getAvatarDecoration(a0,
value);
object.localVideoDisabled = false;
object.isPoppedOut = false;
binding = env0_18;
binding.set(a0.id, object);
}
const user = UserStore.getUser(a1);
if (user == null) {
env1_19.add(a1);
r1 = value;
} else {
upsert_96672(user, guildId, channelId);
r1 = true;
function deleteUserDesyncData(a0) { // fn#96673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:910, offset: 0x0216343b, size: 62 bytes, params: 2, frame: 13
const value2 = env0_17.delete(a0);
const value3 = env0_18.delete(a0);
const value = env0_19.delete(a0);
let r0 = value2 || value3;
r0 = !r0 ? value : r0;
return r0;
}
return r1;
function retryFailedUsers() { // fn#96674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:1004, offset: 0x02163479, size: 103 bytes, params: 1, frame: 14
var value5;
const channelId = RTCConnectionStore.getChannelId();
if (channelId == null) {
return false;
}
const channel = ChannelStore.getChannel(channelId);
if (channel != null) {
value5 = channel.getGuildId();
}
const env0_2 = false;
env0_19.forEach(_fun96675);
return env0_2;
function _fun96675(a0) { // fn#96675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:1154, offset: 0x021634e0, size: 115 bytes, params: 2, frame: 16
var binding;
var user;
var upsert_96672Binding;
if (VoiceStateStore.getVoiceStateForChannel(env0_0, a0) == null) {
user = UserStore.getUser(a0);
if (user != null) {
binding = env1_19;
binding.delete(a0);
upsert_96672Binding = upsert_96672;
binding = env0_1;
upsert_96672Binding(user, binding, env0_0);
}
} else {
env1_19.delete(a0);
}
}
}
function VOICE_CHANNEL_SELECT_96676() { // fn#96676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:1282, offset: 0x02163553, size: 49 bytes, params: 1, frame: 10
env0_17.clear();
env0_18.clear();
env0_19.clear();
}
function _fun96677(a0) { // fn#96677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:1341, offset: 0x02163584, size: 180 bytes, params: 2, frame: 16
const RTCConnectionDesyncStore2 = RTCConnectionDesyncStore;
Inherits(RTCConnectionDesyncStore2, a0);
return CreateClass(RTCConnectionDesyncStore2, [{key: 'initialize', value: function() {
this.waitFor(VoiceStateStore, UserStore, ChannelStore, RTCConnectionStore);
this.syncWith([UserStore], retryFailedUsers);
}}, {key: 'desyncedVoiceStatesCount', get: get_96680}, {key: 'getDesyncedUserIds', value: value_96681},
{key: 'getDesyncedVoiceStates', value: value_96682}, {key: 'getDesyncedParticipants', value: value_96683}]);
function RTCConnectionDesyncStore() { // fn#96678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:1353, offset: 0x01121ae9, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, RTCConnectionDesyncStore);
const value3 = env1_6(RTCConnectionDesyncStore);
return env1_5(this, _isNativeReflectConstruct_96669() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function get_96680() { // fn#96680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:1798, offset: 0x0216367b, size: 18 bytes, params: 1, frame: 9
return env1_17.size();
}
function value_96681() { // fn#96681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:1859, offset: 0x0216368d, size: 18 bytes, params: 1, frame: 9
return env1_17.keys();
}
function value_96682() { // fn#96682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:1924, offset: 0x0216369f, size: 18 bytes, params: 1, frame: 9
return env1_17.values();
}
function value_96683() { // fn#96683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:1992, offset: 0x021636b1, size: 18 bytes, params: 1, frame: 9
return env1_18.values();
}
}
function VOICE_STATE_UPDATES_96686({voiceStates}) { // fn#96686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:2392, offset: 0x0216372b, size: 64 bytes, params: 2, frame: 14
let value = RTCConnectionStore.getChannelId();
value = value != null;
return value && voiceStates.reduce(_fun96687, false);
function _fun96687(a0, {userId, channelId}) { // fn#96687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:2491, offset: 0x0216376b, size: 58 bytes, params: 3, frame: 13
const value = a0;
let r0 = channelId === env0_0 && !!deleteUserDesyncData(userId);
r0 = !r0 ? value : r0;
return r0;
}
}
function RTC_CONNECTION_CLIENT_CONNECT_96688({userIds, guildId, channelId, context}) { // fn#96688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:2591, offset: 0x021637a5, size: 101 bytes, params: 2, frame: 15
const MediaEngineContextTypes = (MediaEngineModule).MediaEngineContextTypes;
const DEFAULT = MediaEngineContextTypes.DEFAULT;
return context === DEFAULT && userIds.reduce(_fun96689, false);
function _fun96689(a0, a1) { // fn#96689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:2741, offset: 0x0216380a, size: 103 bytes, params: 3, frame: 18
var r1;
const value = a0;
const voiceStateStoreBinding = VoiceStateStore;
const getVoiceStateForChannel = voiceStateStoreBinding.getVoiceStateForChannel;
if (Reflect.apply(getVoiceStateForChannel, voiceStateStoreBinding, [channelId, a1]) != null) {
return value;
}
const user = UserStore.getUser(a1);
if (user == null) {
env1_19.add(a1);
r1 = value;
} else {
upsert_96672(user, guildId, channelId);
r1 = true;
}
return r1;
}
}
function RTC_CONNECTION_CLIENT_DISCONNECT({userId, context}) { // fn#96690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12793:2904, offset: 0x02163871, size: 68 bytes, params: 2, frame: 14
const MediaEngineContextTypes = (MediaEngineModule).MediaEngineContextTypes;
const DEFAULT = MediaEngineContextTypes.DEFAULT;
return context === DEFAULT && deleteUserDesyncData(userId);
}
}
global.__d(_fun96668, 12603, [6, 7, 15, 17, 18, 4298, 1379, 4294, 1878, 4297, 4300, 661, 4299, 4268, 4617, 4618,
4406, 566, 694,
2]) /* metro module 12603, dependencies: [6, 7, 15, 17, 18, 4298, 1379, 4294, 1878, 4297, 4300, 661, 4299, 4268, 4617, 4618, 4406, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+109 -91
View File
@@ -1,17 +1,21 @@
/* Metro module 4402; source: stores/RTCRegionStore.tsx; dependencies: [6, 7, 15, 17, 18, 672, 22, 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 Durations from '../utils/Durations.tsx'; /* Metro dependency 672 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun37407(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#37407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4574:6, offset: 0x010a468d, size: 344 bytes, params: 8, frame: 18
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 */;
object = {'preferredRegions': null, 'lastTestTimestamp': null, 'lastGeoRankedOrder': null};
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const Millis = (Durations).Millis;
const HOUR = Millis.HOUR;
const env0_9 = 1 * HOUR;
const DeviceSettingsStore = (importDefault(566) /* metro dependency 566: flux */).DeviceSettingsStore;
const DeviceSettingsStore = (Flux).DeviceSettingsStore;
let value = _fun37411(DeviceSettingsStore);
value.displayName = 'RTCRegionStore';
value.persistKey = 'RTCRegionStore';
@@ -26,98 +30,112 @@ function _fun37407(global, require, importDefault, importAll, module, exports, d
}];
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{RTC_LATENCY_TEST_COMPLETE: RTC_LATENCY_TEST_COMPLETE});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/RTCRegionStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/RTCRegionStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_37408() { // fn#37408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4574:148, offset: 0x010a47e5, 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_37408_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun37411(a0) { // fn#37411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4574:452, offset: 0x010a4843, size: 208 bytes, params: 2, frame: 16
const closure = RTCRegionStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: value_37413}, {key: 'shouldIncludePreferredRegion',
value: value_37414}, {key: 'getPreferredRegion', value: value_37415}, {key: 'getPreferredRegions',
value: value_37416}, {key: 'getRegion', value: function(a0) {
if (a0 != null) {
return a0.substr(0, a0.search(RegExp('\\d', '')));
function _isNativeReflectConstruct_37408() { // fn#37408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4574:148, offset: 0x010a47e5, 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) {
}
}}, {key: 'getUserAgnosticState', value: value_37418}, {key: 'shouldPerformLatencyTest', value: value_37419}]);
}
function RTC_LATENCY_TEST_COMPLETE(a0) { // fn#37421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4574:1664, offset: 0x010a4a6d, size: 89 bytes, params: 2, frame: 11
var binding;
if (a0.latencyRankedRegions.length > 0) {
binding = env0_8;
binding.lastGeoRankedOrder = a0.geoRankedRegions;
binding = env0_8;
binding.preferredRegions = a0.latencyRankedRegions;
return (_isNativeReflectConstruct_37408_isNativeReflectConstruct = function() {
return !!result;
})();
}
binding = env0_8;
const Date = global.Date;
binding.lastTestTimestamp = Date.now();
}
function value_37413(a0) { // fn#37413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4574:752, offset: 0x010a4913, size: 27 bytes, params: 2, frame: 2
const r1 = a0 ?? env1_7;
value = environment.__proto__;
}
function _fun37411(a0) { // fn#37411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4574:452, offset: 0x010a4843, size: 208 bytes, params: 2, frame: 16
const RTCRegionStore2 = RTCRegionStore;
Inherits(RTCRegionStore2, a0);
return CreateClass(RTCRegionStore2, [{key: 'initialize', value: value_37413}, {key: 'shouldIncludePreferredRegion',
value: value_37414}, {key: 'getPreferredRegion', value: value_37415}, {key: 'getPreferredRegions',
value: value_37416}, {key: 'getRegion', value: function(a0) {
if (a0 != null) {
return a0.substr(0, a0.search(RegExp('\\d', '')));
}
}}, {key: 'getUserAgnosticState', value: value_37418}, {key: 'shouldPerformLatencyTest', value: value_37419}]);
function RTCRegionStore() { // fn#37412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4574:464, offset: 0x00ec62ac, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, RTCRegionStore);
const value3 = env1_5(RTCRegionStore);
return env1_4(this, _isNativeReflectConstruct_37408() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_37414() { // fn#37414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4574:822, offset: 0x010a492e, size: 21 bytes, params: 1, frame: 2
return env1_8.preferredRegions != null;
}
function value_37413(a0) { // fn#37413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4574:752, offset: 0x010a4913, size: 27 bytes, params: 2, frame: 2
const r1 = a0 ?? env1_7;
value = environment.__proto__;
}
function value_37415() { // fn#37415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4574:899, offset: 0x010a4943, size: 44 bytes, params: 1, frame: 4
let value = environment.__proto__;
const preferredRegions = env1_8.preferredRegions;
value = null;
const r1 = value == preferredRegions ? undefined : preferredRegions[0];
return value != r1 ? r1 : value;
}
function value_37414() { // fn#37414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4574:822, offset: 0x010a492e, size: 21 bytes, params: 1, frame: 2
return env1_8.preferredRegions != null;
}
function value_37416() { // fn#37416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4574:1018, offset: 0x010a496f, size: 15 bytes, params: 1, frame: 1
return env1_8.preferredRegions;
}
function value_37415() { // fn#37415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4574:899, offset: 0x010a4943, size: 44 bytes, params: 1, frame: 4
let value = environment.__proto__;
const preferredRegions = env1_8.preferredRegions;
value = null;
const r1 = value == preferredRegions ? undefined : preferredRegions[0];
return value != r1 ? r1 : value;
}
function value_37416() { // fn#37416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4574:1018, offset: 0x010a496f, size: 15 bytes, params: 1, frame: 1
return env1_8.preferredRegions;
}
function value_37418() { // fn#37418, offset: 0x00fbd9d4, size: 9 bytes, params: 1, frame: 1
return env1_8;
}
function value_37419(a0) { // fn#37419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4574:1233, offset: 0x010a49b4, size: 136 bytes, params: 2, frame: 16
var r0;
var defaultImport;
const value = environment.__proto__;
const value2 = env1_8.preferredRegions === null;
if (value2) {
r0 = value2;
} else {
defaultImport = importDefault(22) /* metro dependency 22 */;
r0 = !defaultImport.isEqual(a0, env1_8.lastGeoRankedOrder ?? []);
}
r0 = !r0 ? global.Date.now() - (env1_8.lastTestTimestamp ?? 0) >= env1_9 : r0;
return r0;
}
function value_37419(a0) { // fn#37419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4574:1233, offset: 0x010a49b4, size: 136 bytes, params: 2, frame: 16
var r0;
var defaultImport;
const value = environment.__proto__;
const value2 = env1_8.preferredRegions === null;
if (value2) {
r0 = value2;
} else {
defaultImport = importDefault(22) /* metro dependency 22 */;
r0 = !defaultImport.isEqual(a0, env1_8.lastGeoRankedOrder ?? []);
}
r0 = !r0 ? global.Date.now() - (env1_8.lastTestTimestamp ?? 0) >= env1_9 : r0;
return r0;
function RTC_LATENCY_TEST_COMPLETE(a0) { // fn#37421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4574:1664, offset: 0x010a4a6d, size: 89 bytes, params: 2, frame: 11
var binding;
if (a0.latencyRankedRegions.length > 0) {
binding = env0_8;
binding.lastGeoRankedOrder = a0.geoRankedRegions;
binding = env0_8;
binding.preferredRegions = a0.latencyRankedRegions;
}
binding = env0_8;
const Date = global.Date;
binding.lastTestTimestamp = Date.now();
}
}
global.__d(_fun37407, 4402, [6, 7, 15, 17, 18, 672, 22, 566, 694,
2]) /* metro module 4402, dependencies: [6, 7, 15, 17, 18, 672, 22, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
+125 -111
View File
@@ -1,128 +1,142 @@
/* Metro module 15173; source: stores/RegionStore.tsx; dependencies: [6, 7, 15, 17, 18, 1867, 22, 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 Module00022 from '../by-id/module-00022.js'; /* Metro dependency 22 */
import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import GuildStore from './GuildStore.tsx'; /* Metro dependency 1867 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun115928(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:6, offset: 0x024751ad, size: 315 bytes, params: 8, frame: 18
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 guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const env0_9 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun115932(Store);
value.displayName = 'RegionStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LOAD_REGIONS: LOAD_REGIONS,
GUILD_DELETE: GUILD_DELETE_115943});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/RegionStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/RegionStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_115929() { // fn#115929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:159, offset: 0x024752e8, 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_115929_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun115932(a0) { // fn#115932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:374, offset: 0x0247534a, size: 205 bytes, params: 2, frame: 16
const closure = RegionStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(GuildStore);
}}, {key: 'getOptimalRegion', value: value_115935}, {key: 'getOptimalRegionId', value: function() {
var value = a0;
value = this.getOptimalRegion(value !== undefined ? value : null);
var value2 = null;
return value2 != value ? value.id : value2;
}}, {key: 'getRandomRegion', value: value_115938}, {key: 'getRandomRegionId', value: function() {
var value = a0;
value = this.getRandomRegion(value !== undefined ? value : null);
var value2 = null;
return value2 != value ? value.id : value2;
}}, {key: 'getRegions', value: value_115940}]);
}
function LOAD_REGIONS(a0) { // fn#115941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:1304, offset: 0x02475540, size: 87 bytes, params: 2, frame: 16
const defaultImport = importDefault(22) /* metro dependency 22 */;
if (a0.guildId != null) {
env0_9[a0.guildId] = defaultImport.sortBy(a0.regions, function(a0) {
return a0.name;
});
}
}
function GUILD_DELETE_115943({guild}) { // fn#115943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:1427, offset: 0x02475597, size: 28 bytes, params: 2, frame: 2
delete env0_9[guild.id];
}
function value_115935() { // fn#115935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:718, offset: 0x02475417, size: 99 bytes, params: 1, frame: 15
var environment;
var r1;
var r0;
var value3;
var value4;
let value = a0;
value = this.getRegions(value !== undefined ? value : null);
const value2 = null;
if (value2 != value) {
value3 = value.find(function(a0) {
return a0.optimal;
});
if (value2 != value3) {
r1 = value3;
} else {
value4 = environment.__proto__;
value = (importDefault(22) /* metro dependency 22 */).sample(value);
r1 = value;
function _isNativeReflectConstruct_115929() { // fn#115929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:159, offset: 0x024752e8, 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) {
}
r0 = r1;
} else {
r0 = value2;
return (_isNativeReflectConstruct_115929_isNativeReflectConstruct = function() {
return !!result;
})();
}
return r0;
}
function value_115938() { // fn#115938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:977, offset: 0x024754b0, size: 70 bytes, params: 1, frame: 14
var r0;
var value3;
let value = a0;
value = this.getRegions(value !== undefined ? value : null);
const value2 = null;
if (value2 != value) {
value3 = environment.__proto__;
value = (importDefault(22) /* metro dependency 22 */).sample(value);
r0 = value;
} else {
r0 = value2;
function _fun115932(a0) { // fn#115932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:374, offset: 0x0247534a, size: 205 bytes, params: 2, frame: 16
const RegionStore2 = RegionStore;
Inherits(RegionStore2, a0);
return CreateClass(RegionStore2, [{key: 'initialize', value: function() {
this.waitFor(GuildStore);
}}, {key: 'getOptimalRegion', value: value_115935}, {key: 'getOptimalRegionId', value: function() {
var value = a0;
value = this.getOptimalRegion(value !== undefined ? value : null);
var value2 = null;
return value2 != value ? value.id : value2;
}}, {key: 'getRandomRegion', value: value_115938}, {key: 'getRandomRegionId', value: function() {
var value = a0;
value = this.getRandomRegion(value !== undefined ? value : null);
var value2 = null;
return value2 != value ? value.id : value2;
}}, {key: 'getRegions', value: value_115940}]);
function RegionStore() { // fn#115933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:386, offset: 0x00ec62ac, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, RegionStore);
const value3 = env1_5(RegionStore);
return env1_4(this, _isNativeReflectConstruct_115929() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_115935() { // fn#115935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:718, offset: 0x02475417, size: 99 bytes, params: 1, frame: 15
var environment;
var r1;
var r0;
var value3;
var value4;
let value = a0;
value = this.getRegions(value !== undefined ? value : null);
const value2 = null;
if (value2 != value) {
value3 = value.find(function(a0) {
return a0.optimal;
});
if (value2 != value3) {
r1 = value3;
} else {
value4 = environment.__proto__;
value = (importDefault(22) /* metro dependency 22 */).sample(value);
r1 = value;
}
r0 = r1;
} else {
r0 = value2;
}
return r0;
}
function value_115938() { // fn#115938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:977, offset: 0x024754b0, size: 70 bytes, params: 1, frame: 14
var r0;
var value3;
let value = a0;
value = this.getRegions(value !== undefined ? value : null);
const value2 = null;
if (value2 != value) {
value3 = environment.__proto__;
value = (importDefault(22) /* metro dependency 22 */).sample(value);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function value_115940(a0) { // fn#115940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:1188, offset: 0x02475521, size: 31 bytes, params: 2, frame: 3
return a0 != null ? env1_9[a0] : env1_8;
}
}
function LOAD_REGIONS(a0) { // fn#115941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:1304, offset: 0x02475540, size: 87 bytes, params: 2, frame: 16
const defaultImport = Module00022;
if (a0.guildId != null) {
env0_9[a0.guildId] = defaultImport.sortBy(a0.regions, function(a0) {
return a0.name;
});
}
}
function GUILD_DELETE_115943({guild}) { // fn#115943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:1427, offset: 0x02475597, size: 28 bytes, params: 2, frame: 2
delete env0_9[guild.id];
}
return r0;
}
function value_115940(a0) { // fn#115940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:1188, offset: 0x02475521, size: 31 bytes, params: 2, frame: 3
return a0 != null ? env1_9[a0] : env1_8;
}
global.__d(_fun115928, 15173, [6, 7, 15, 17, 18, 1867, 22, 566, 694,
2]) /* metro module 15173, dependencies: [6, 7, 15, 17, 18, 1867, 22, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+256 -225
View File
@@ -1,28 +1,34 @@
/* Metro module 3969; source: stores/SelectedGuildStore.tsx; dependencies: [6, 7, 15, 17, 18, 3970, 1226, 3973, 1867, 661, 1230, 3974, 3987, 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 './AuthenticationStore.tsx'; /* Metro dependency 1226 */
import GuildStore from './GuildStore.tsx'; /* Metro dependency 1867 */
import UserGuildJoinRequestStore from '../modules/guild_member_verification/UserGuildJoinRequestStore.tsx'; /* Metro dependency 3970 */
import DefaultRouteStore from './DefaultRouteStore.tsx'; /* Metro dependency 3973 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as MatchPathCompatModule from '../modules/routing/matchPathCompat.tsx'; /* Metro dependency 3974 */
import * as RouteUtilsModule from '../modules/routing/RouteUtils.tsx'; /* Metro dependency 3987 */
function _fun32528(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#32528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:6, offset: 0x01018c1a, size: 471 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = CONNECTION_OPEN_32532;
const CONNECTION_OPEN_325322 = CONNECTION_OPEN_32532;
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 userGuildJoinRequestStore = importDefault(3970) /* metro dependency 3970: UserGuildJoinRequestStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const defaultRouteStore = importDefault(3973) /* metro dependency 3973: DefaultRouteStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_11 = value.ME;
const env0_12 = value.Routes;
const env0_15 = {};
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
value = _fun32537(PersistedStore);
value.displayName = 'SelectedGuildStore';
value.persistKey = 'SelectedGuildStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: closure,
OVERLAY_INITIALIZE: function(a0) {
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{CONNECTION_OPEN: CONNECTION_OPEN_325322, OVERLAY_INITIALIZE: function(a0) {
env0_13 = a0.selectedGuildId;
env0_14 = undefined;
CONNECTION_OPEN_32532();
@@ -31,242 +37,267 @@ function _fun32528(global, require, importDefault, importAll, module, exports, d
env0_13 = null;
env0_14 = null;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/SelectedGuildStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/SelectedGuildStore.tsx');
exports.default = value;
exports.SELECTED_GUILD_TIMESTAMP_NOW = -1;
}
function _isNativeReflectConstruct_32529() { // fn#32529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:216, offset: 0x01018df1, 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) {
function _isNativeReflectConstruct_32529() { // fn#32529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:216, offset: 0x01018df1, 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_32529_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_32529_isNativeReflectConstruct = function() {
return !!result;
})();
}
function CONNECTION_OPEN_32532() { // fn#32532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:432, offset: 0x01018e4f, size: 156 bytes, params: 1, frame: 14
env0_13 = env0_13 != null && GuildStore.getGuild(env0_13) == null && UserGuildJoinRequestStore.getRequest(env0_13) == null ? null : env0_13;
if (env0_14 != null && GuildStore.getGuild(env0_14) == null && UserGuildJoinRequestStore.getRequest(env0_14) == null) {
function CONNECTION_OPEN_32532() { // fn#32532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:432, offset: 0x01018e4f, size: 156 bytes, params: 1, frame: 14
env0_13 = env0_13 != null && GuildStore.getGuild(env0_13) == null && UserGuildJoinRequestStore.getRequest(env0_13) == null ? null : env0_13;
if (env0_14 != null && GuildStore.getGuild(env0_14) == null && UserGuildJoinRequestStore.getRequest(env0_14) == null) {
}
updateLastSelectedGuildMillis(env0_13);
}
updateLastSelectedGuildMillis(env0_13);
}
function updateLastSelectedGuildMillis(a0) { // fn#32533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:621, offset: 0x01018eeb, size: 41 bytes, params: 2, frame: 11
var binding;
var Date;
if (a0 != null) {
binding = env0_15;
Date = global.Date;
binding[a0] = Date.now();
function updateLastSelectedGuildMillis(a0) { // fn#32533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:621, offset: 0x01018eeb, size: 41 bytes, params: 2, frame: 11
var binding;
var Date;
if (a0 != null) {
binding = env0_15;
Date = global.Date;
binding[a0] = Date.now();
}
}
}
function handleGuildRemove(a0) { // fn#32534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:690, offset: 0x01018f14, size: 166 bytes, params: 2, frame: 15
var r0;
var value4;
var moduleValue;
var moduleValue2;
delete env0_15[a0];
if (env0_14 !== a0) {
r0 = false;
} else {
r0 = true;
}
if (env0_13 === a0) {
value4 = pickFallbackGuildId(a0);
if (value4 != null) {
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
moduleValue2.replaceWith(Routes.CHANNEL(value4));
r0 = true;
function handleGuildRemove(a0) { // fn#32534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:690, offset: 0x01018f14, size: 166 bytes, params: 2, frame: 15
var r0;
var value4;
var moduleValue;
var moduleValue2;
delete env0_15[a0];
if (env0_14 !== a0) {
r0 = false;
} else {
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
moduleValue.replaceWith(Routes.ME);
r0 = true;
}
}
return r0;
}
function _fun32537(a0) { // fn#32537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:1198, offset: 0x010190cd, size: 162 bytes, params: 2, frame: 16
const closure = SelectedGuildStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: value_32539}, {key: 'getState', value: value_32541},
{key: 'getGuildId', value: value_32542}, {key: 'getLastSelectedGuildId', value: value_32543},
{key: 'getLastSelectedTimestamp', value: value_32544}]);
}
function CHANNEL_SELECT_32546({guildId}) { // fn#32546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:2600, offset: 0x0101931d, size: 59 bytes, params: 2, frame: 13
if (env0_13 === guildId) {
return false;
}
const updateLastSelectedGuildMillisBinding = updateLastSelectedGuildMillis;
updateLastSelectedGuildMillisBinding(env0_13);
updateLastSelectedGuildMillisBinding(guildId);
if (guildId == null) {
}
}
function GUILD_MEMBER_REMOVE_32547({guildId, user}) { // fn#32547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:2766, offset: 0x01019358, size: 55 bytes, params: 2, frame: 13
const id = user.id;
const getId = AuthenticationStore.getId;
return id === Reflect.apply(getId, AuthenticationStore, []) && handleGuildRemove(guildId);
}
function GUILD_DELETE_32548({guild}) { // fn#32548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:2879, offset: 0x0101938f, size: 44 bytes, params: 2, frame: 12
return guild.unavailable !== true && handleGuildRemove(guild.id);
}
function pickFallbackGuildId(a0) { // fn#32535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:778, owner: handleGuildRemove.pickFallbackGuildId, offset: 0x01018fba, size: 254 bytes, params: 2, frame: 26
var environment;
var r7;
var r8;
var r9;
var r15;
var r12;
var r13;
var r1;
var id;
var getGuild;
var property;
var property2;
var value6;
var value7;
var value8;
const env0_0 = a0;
let value = environment.__proto__;
const value2 = null;
if (value2 != env1_14) {
getGuild = GuildStore.getGuild;
reducibleJoin2: while (true) {
if (value2 != Reflect.apply(getGuild, GuildStore, [env1_14])) {
return env1_14;
if (env0_13 === a0) {
value4 = pickFallbackGuildId(a0);
if (value4 != null) {
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
moduleValue2.replaceWith(Routes.CHANNEL(value4));
r0 = true;
} else {
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
moduleValue.replaceWith(Routes.ME);
r0 = true;
}
break reducibleJoin2;
}
}
const Object = global.Object;
const value3 = Object.keys(env1_15);
let length = value3.length;
const value4 = 0;
const value5 = undefined;
if (value4 < length) {
r7 = value4;
r8 = value4;
r9 = value2;
reducibleLoop3: while (true) {
property = value3[r7];
reducibleJoin7: while (true) {
if (property === a0) {
r12 = r9;
r13 = r8;
break reducibleJoin7;
}
property2 = env1_15[property];
value6 = property2 > r8;
reducibleJoin6: while (true) {
if (value6) {
getGuild = GuildStore.getGuild;
value7 = value2 != Reflect.apply(getGuild, GuildStore, [property]);
r15 = value7;
break reducibleJoin6;
return r0;
function pickFallbackGuildId(a0) { // fn#32535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:778, owner: handleGuildRemove.pickFallbackGuildId, offset: 0x01018fba, size: 254 bytes, params: 2, frame: 26
var environment;
var r7;
var r8;
var r9;
var r15;
var r12;
var r13;
var r1;
var id;
var guildStoreBinding;
var getGuild;
var property;
var property2;
var value6;
var value7;
var value8;
const env0_0 = a0;
let value = environment.__proto__;
const value2 = null;
if (value2 != env1_14) {
guildStoreBinding = GuildStore;
getGuild = guildStoreBinding.getGuild;
reducibleJoin2: while (true) {
if (value2 != Reflect.apply(getGuild, guildStoreBinding, [env1_14])) {
return env1_14;
}
r15 = value6;
break reducibleJoin6;
break reducibleJoin2;
}
if (r15) {
r12 = property;
r13 = property2;
break reducibleJoin7;
}
const Object = global.Object;
const value3 = Object.keys(env1_15);
let length = value3.length;
const value4 = 0;
const value5 = undefined;
if (value4 < length) {
r7 = value4;
r8 = value4;
r9 = value2;
reducibleLoop3: while (true) {
property = value3[r7];
reducibleJoin7: while (true) {
if (property === a0) {
r12 = r9;
r13 = r8;
break reducibleJoin7;
}
property2 = env1_15[property];
value6 = property2 > r8;
reducibleJoin6: while (true) {
if (value6) {
guildStoreBinding = GuildStore;
getGuild = guildStoreBinding.getGuild;
value7 = value2 != Reflect.apply(getGuild, guildStoreBinding, [property]);
r15 = value7;
break reducibleJoin6;
}
r15 = value6;
break reducibleJoin6;
}
if (r15) {
r12 = property;
r13 = property2;
break reducibleJoin7;
}
r12 = r9;
r13 = r8;
break reducibleJoin7;
}
value8 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
length = value3.length;
if (value8 < length) {
r7 = value8;
r8 = r13;
r9 = r12;
continue reducibleLoop3;
}
r1 = r12;
break reducibleLoop3;
}
r12 = r9;
r13 = r8;
break reducibleJoin7;
} else {
r1 = value2;
}
value8 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
length = value3.length;
if (value8 < length) {
r7 = value8;
r8 = r13;
r9 = r12;
continue reducibleLoop3;
if (value2 != r1) {
return r1;
}
r1 = r12;
break reducibleLoop3;
value = GuildStore.getGuildsArray();
value = value.find(_fun32536);
reducibleJoin11: while (true) {
if (value2 == value) {
id = value5;
break reducibleJoin11;
}
id = value.id;
break reducibleJoin11;
}
return value2 != id ? id : value2;
function _fun32536({id}) { // fn#32536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:1054, offset: 0x010190b8, size: 21 bytes, params: 2, frame: 2
return id !== env0_0;
}
}
} else {
r1 = value2;
}
if (value2 != r1) {
return r1;
}
value = GuildStore.getGuildsArray();
value = value.find(_fun32536);
reducibleJoin11: while (true) {
if (value2 == value) {
id = value5;
break reducibleJoin11;
function _fun32537(a0) { // fn#32537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:1198, offset: 0x010190cd, size: 162 bytes, params: 2, frame: 16
const SelectedGuildStore2 = SelectedGuildStore;
Inherits(SelectedGuildStore2, a0);
return CreateClass(SelectedGuildStore2, [{key: 'initialize', value: value_32539}, {key: 'getState', value: value_32541},
{key: 'getGuildId', value: value_32542}, {key: 'getLastSelectedGuildId', value: value_32543},
{key: 'getLastSelectedTimestamp', value: value_32544}]);
function SelectedGuildStore() { // fn#32538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:1210, offset: 0x00fc4bce, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, SelectedGuildStore);
const value3 = env1_5(SelectedGuildStore);
return env1_4(this, _isNativeReflectConstruct_32529() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
id = value.id;
break reducibleJoin11;
function value_32539(a0) { // fn#32539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:1518, offset: 0x0101916f, size: 316 bytes, params: 2, frame: 23
this.mustEmitChanges(function(a0) {
return a0.type !== 'CONNECTION_OPEN';
});
this.waitFor(AuthenticationStore, DefaultRouteStore, GuildStore, UserGuildJoinRequestStore);
const value2 = null;
const value3 = undefined;
const selectedGuildTimestampMillis = value2 == a0 ? value3 : a0.selectedGuildTimestampMillis;
const r4 = value2 != selectedGuildTimestampMillis ? selectedGuildTimestampMillis : {};
const selectedGuildId = value2 == a0 ? value3 : a0.selectedGuildId;
env1_13 = value2 != selectedGuildId ? selectedGuildId : value2;
const lastSelectedGuildId = value2 == a0 ? value3 : a0.lastSelectedGuildId;
let r1 = value2 != lastSelectedGuildId ? lastSelectedGuildId : value2;
const lastNonVoiceRoute = DefaultRouteStore.lastNonVoiceRoute;
const matchPath = MatchPathCompatModule.matchPath;
const CHANNEL = Routes.CHANNEL;
const RouteParam = (RouteUtilsModule).RouteParam;
let guildId = RouteParam.guildId;
const value4 = Reflect.apply(matchPath, MatchPathCompatModule, [lastNonVoiceRoute, {path: Reflect.apply(CHANNEL,
Routes, [Reflect.apply(guildId, RouteParam, [])])}]);
guildId = value2 == value4 || value2 == value4.params ? value3 : value4.params.guildId;
r1 = guildId === ME ? value2 : value2 != guildId ? guildId : value2;
if (value2 != r1 && r1 !== env1_13) {
}
return value3;
}
function value_32541() { // fn#32541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:2052, offset: 0x010192bd, size: 34 bytes, params: 1, frame: 3
return {selectedGuildTimestampMillis: env1_15, selectedGuildId: env1_13, lastSelectedGuildId: env1_14};
}
function value_32542() { // fn#32542, offset: 0x00e2f9d5, size: 9 bytes, params: 1, frame: 1
return env1_13;
}
function value_32543() { // fn#32543, offset: 0x00df0f5a, size: 9 bytes, params: 1, frame: 1
return env1_14;
}
function value_32544(a0) { // fn#32544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:2286, offset: 0x010192df, size: 30 bytes, params: 2, frame: 4
return env1_13 === a0 ? -1 : env1_15[a0];
}
}
return value2 != id ? id : value2;
}
function value_32539(a0) { // fn#32539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:1518, offset: 0x0101916f, size: 316 bytes, params: 2, frame: 23
this.mustEmitChanges(function(a0) {
return a0.type !== 'CONNECTION_OPEN';
});
this.waitFor(AuthenticationStore, DefaultRouteStore, GuildStore, UserGuildJoinRequestStore);
const value2 = null;
const value3 = undefined;
const selectedGuildTimestampMillis = value2 == a0 ? value3 : a0.selectedGuildTimestampMillis;
const r4 = value2 != selectedGuildTimestampMillis ? selectedGuildTimestampMillis : {};
const selectedGuildId = value2 == a0 ? value3 : a0.selectedGuildId;
env1_13 = value2 != selectedGuildId ? selectedGuildId : value2;
const lastSelectedGuildId = value2 == a0 ? value3 : a0.lastSelectedGuildId;
let r1 = value2 != lastSelectedGuildId ? lastSelectedGuildId : value2;
const lastNonVoiceRoute = DefaultRouteStore.lastNonVoiceRoute;
const matchPathCompatModule = require(3974) /* metro dependency 3974: matchPathCompat */;
const matchPath = matchPathCompatModule.matchPath;
const CHANNEL = Routes.CHANNEL;
const RouteParam = (require(3987) /* metro dependency 3987: RouteUtils */).RouteParam;
let guildId = RouteParam.guildId;
const value4 = Reflect.apply(matchPath, matchPathCompatModule, [lastNonVoiceRoute, {path: Reflect.apply(CHANNEL,
Routes, [Reflect.apply(guildId, RouteParam, [])])}]);
guildId = value2 == value4 || value2 == value4.params ? value3 : value4.params.guildId;
r1 = guildId === ME ? value2 : value2 != guildId ? guildId : value2;
if (value2 != r1 && r1 !== env1_13) {
function CHANNEL_SELECT_32546({guildId}) { // fn#32546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:2600, offset: 0x0101931d, size: 59 bytes, params: 2, frame: 13
if (env0_13 === guildId) {
return false;
}
const updateLastSelectedGuildMillisBinding = updateLastSelectedGuildMillis;
updateLastSelectedGuildMillisBinding(env0_13);
updateLastSelectedGuildMillisBinding(guildId);
if (guildId == null) {
}
}
return value3;
}
function value_32541() { // fn#32541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:2052, offset: 0x010192bd, size: 34 bytes, params: 1, frame: 3
return {selectedGuildTimestampMillis: env1_15, selectedGuildId: env1_13, lastSelectedGuildId: env1_14};
}
function GUILD_MEMBER_REMOVE_32547({guildId, user}) { // fn#32547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:2766, offset: 0x01019358, size: 55 bytes, params: 2, frame: 13
const id = user.id;
const authenticationStoreBinding = AuthenticationStore;
const getId = authenticationStoreBinding.getId;
return id === Reflect.apply(getId, authenticationStoreBinding, []) && handleGuildRemove(guildId);
}
function GUILD_DELETE_32548({guild}) { // fn#32548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:2879, offset: 0x0101938f, size: 44 bytes, params: 2, frame: 12
return guild.unavailable !== true && handleGuildRemove(guild.id);
}
function value_32544(a0) { // fn#32544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4118:2286, offset: 0x010192df, size: 30 bytes, params: 2, frame: 4
return env1_13 === a0 ? -1 : env1_15[a0];
}
global.__d(_fun32528, 3969, [6, 7, 15, 17, 18, 3970, 1226, 3973, 1867, 661, 1230, 3974, 3987, 566, 694,
2]) /* metro module 3969, dependencies: [6, 7, 15, 17, 18, 3970, 1226, 3973, 1867, 661, 1230, 3974, 3987, 566, 694, 2] */;
+333 -309
View File
@@ -1,4 +1,23 @@
/* Metro module 6876; source: stores/SelfPresenceStore.tsx; dependencies: [6, 7, 15, 17, 18, 6867, 1348, 4267, 4795, 4270, 6877, 4396, 4296, 661, 4278, 3829, 1391, 6887, 644, 22, 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 UserSettingsProtoStore from '../modules/user_settings/UserSettingsProtoStore.tsx'; /* Metro dependency 1348 */
import DetectableGameStore from './DetectableGameStore.tsx'; /* Metro dependency 4267 */
import LibraryApplicationStore from './LibraryApplicationStore.tsx'; /* Metro dependency 4270 */
import SessionsStore from './SessionsStore.tsx'; /* Metro dependency 4296 */
import PresenceStore from './PresenceStore.tsx'; /* Metro dependency 4396 */
import IdleStore from './IdleStore.tsx'; /* Metro dependency 4795 */
import SpotifyStore from '../modules/spotify/SpotifyStore.tsx'; /* Metro dependency 6867 */
import LocalActivityStore from './LocalActivityStore.tsx'; /* Metro dependency 6877 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as FlagUtilsModule from '../external/discord_common/js/shared/utils/FlagUtils.tsx'; /* Metro dependency 1391 */
import * as PresenceStoreModule from './PresenceStore.tsx'; /* Metro dependency 4396 */
function _fun54523(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:6, offset: 0x01367670, size: 778 bytes, params: 8, frame: 24
const env0_0 = require;
const _arrayLikeToArray_54529 = function(a0, a1) {
@@ -47,25 +66,11 @@ function _fun54523(global, require, importDefault, importAll, module, exports, d
const shouldShowApplicationActivity = function(a0) {
return require(dependencyMap[14]).shouldShareApplicationActivity(a0, LibraryApplicationStore);
};
const closure = START_SESSION_54533;
const closure2 = CONNECTION_OPEN_SUPPLEMENTAL_54536;
const START_SESSION_545332 = START_SESSION_54533;
const CONNECTION_OPEN_SUPPLEMENTAL_545362 = CONNECTION_OPEN_SUPPLEMENTAL_54536;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const spotifyStore = importDefault(6867) /* metro dependency 6867: SpotifyStore */;
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
const detectableGameStore = importDefault(4267) /* metro dependency 4267: DetectableGameStore */;
const idleStore = importDefault(4795) /* metro dependency 4795: IdleStore */;
const libraryApplicationStore = importDefault(4270) /* metro dependency 4270: LibraryApplicationStore */;
const localActivityStore = importDefault(6877) /* metro dependency 6877: LocalActivityStore */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const env0_15 = (require(4396) /* metro dependency 4396: PresenceStore */).sortActivity;
const sessionsStore = importDefault(4296) /* metro dependency 4296: SessionsStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const StatusTypes = value.StatusTypes;
const env0_18 = value.ActivityFlags;
const env0_19 = value.ActivityTypes;
@@ -80,16 +85,20 @@ function _fun54523(global, require, importDefault, importAll, module, exports, d
const env0_30 = Object.freeze([]);
const env0_31 = [];
const env0_32 = [];
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun54537(Store).displayName = 'SelfPresenceStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {START_SESSION: closure,
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {START_SESSION: START_SESSION_545332,
CONNECTION_OPEN: function() {
CONNECTION_OPEN_SUPPLEMENTAL_54536();
}, CONNECTION_OPEN_SUPPLEMENTAL: closure2, OVERLAY_INITIALIZE: closure2, CONNECTION_CLOSED: closure, IDLE: closure,
AFK: closure, RUNNING_GAMES_CHANGE: closure, STREAMING_UPDATE: closure, USER_SETTINGS_PROTO_UPDATE: closure,
LOCAL_ACTIVITY_UPDATE: closure, SPOTIFY_PLAYER_STATE: closure, SPOTIFY_PLAYER_PLAY: closure,
USER_CONNECTIONS_UPDATE: closure, SESSIONS_REPLACE: closure, RPC_APP_DISCONNECTED: closure,
LIBRARY_FETCH_SUCCESS: closure, LIBRARY_APPLICATION_FLAGS_UPDATE_SUCCESS: closure, LOGOUT: function() {
}, CONNECTION_OPEN_SUPPLEMENTAL: CONNECTION_OPEN_SUPPLEMENTAL_545362,
OVERLAY_INITIALIZE: CONNECTION_OPEN_SUPPLEMENTAL_545362, CONNECTION_CLOSED: START_SESSION_545332,
IDLE: START_SESSION_545332, AFK: START_SESSION_545332, RUNNING_GAMES_CHANGE: START_SESSION_545332,
STREAMING_UPDATE: START_SESSION_545332, USER_SETTINGS_PROTO_UPDATE: START_SESSION_545332,
LOCAL_ACTIVITY_UPDATE: START_SESSION_545332, SPOTIFY_PLAYER_STATE: START_SESSION_545332,
SPOTIFY_PLAYER_PLAY: START_SESSION_545332, USER_CONNECTIONS_UPDATE: START_SESSION_545332,
SESSIONS_REPLACE: START_SESSION_545332, RPC_APP_DISCONNECTED: START_SESSION_545332,
LIBRARY_FETCH_SUCCESS: START_SESSION_545332, LIBRARY_APPLICATION_FLAGS_UPDATE_SUCCESS: START_SESSION_545332,
LOGOUT: function() {
env0_28 = true;
env0_23 = ONLINE;
START_SESSION_54533();
@@ -100,324 +109,339 @@ function _fun54523(global, require, importDefault, importAll, module, exports, d
env0_21 = false;
START_SESSION_54533();
}, APP_STATE_UPDATE: APP_STATE_UPDATE_54553});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/SelfPresenceStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/SelfPresenceStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_54524() { // fn#54524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:336, offset: 0x0136797a, 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_54524_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_54527(a0, a1) { // fn#54527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:529, offset: 0x013679d8, 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) {
function _isNativeReflectConstruct_54524() { // fn#54524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:336, offset: 0x0136797a, 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 _fun54528;
return (_isNativeReflectConstruct_54524_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_54529(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') {
function _createForOfIteratorHelperLoose_54527(a0, a1) { // fn#54527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:529, offset: 0x013679d8, 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 _fun54528;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_54529(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_54529(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_54529(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun54528;
}
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 _fun54528() { // fn#54528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:1100, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
return _fun54528;
}
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 filterPlayingActivities_54530(a0) { // fn#54530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:1545, offset: 0x01367b4a, size: 214 bytes, params: 2, frame: 21
var r10;
var r5;
var value4;
var type;
var PLAYING;
var value5;
if (a0.length === 0) {
return a0;
}
const items5 = [];
const items2 = [];
const value2 = _createForOfIteratorHelperLoose_54527(a0);
const value3 = value2();
let done = value3.done;
if (!done) {
r5 = value3;
while (true) {
value4 = r5.value;
type = value4.type;
PLAYING = ActivityTypes.PLAYING;
if (type === PLAYING) {
items2.push(value4);
function filterPlayingActivities_54530(a0) { // fn#54530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:1545, offset: 0x01367b4a, size: 214 bytes, params: 2, frame: 21
var r10;
var r5;
var value4;
var type;
var PLAYING;
var value5;
if (a0.length === 0) {
return a0;
}
const items5 = [];
const items2 = [];
const value2 = _createForOfIteratorHelperLoose_54527(a0);
const value3 = value2();
let done = value3.done;
if (!done) {
r5 = value3;
while (true) {
value4 = r5.value;
type = value4.type;
PLAYING = ActivityTypes.PLAYING;
if (type === PLAYING) {
items2.push(value4);
} else {
items5.push(value4);
}
value5 = value2();
done = value5.done;
if (done) {
r10 = type;
break;
}
r5 = value5;
continue;
}
}
if (items2.length === 0) {
return a0;
}
if (items2.length === 1) {
return a0;
}
const items3 = [];
arraySpread(items3, items2, 0, r10);
const property = items3.sort(sortActivity)[0];
const items4 = [];
const value6 = arraySpread(items4, items5, 0, r10);
items4[value6] = property;
value6 + 1;
return items4.sort(sortActivity);
}
function shouldShowActivity(a0) { // fn#54532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:1924, offset: 0x01367c4e, size: 357 bytes, params: 2, frame: 19
var r0;
var value4;
const hasFlag = FlagUtilsModule.hasFlag;
const flags = a0.flags;
const value2 = 0;
const r5 = flags ?? value2;
const CONTEXTLESS = ActivityFlags.CONTEXTLESS;
if (Reflect.apply(hasFlag, FlagUtilsModule, [r5, CONTEXTLESS])) {
return true;
}
const type = a0.type;
const LISTENING = ActivityTypes.LISTENING;
if (LISTENING === type) {
r0 = (importDefault(6887) /* metro dependency 6887: isListeningOnSpotify */)(a0) ? SpotifyStore.shouldShowActivity() : a0.application_id != null && shouldShowApplicationActivity(a0.application_id);
} else {
var PLAYING = ActivityTypes.PLAYING;
if (PLAYING === type) {
if (a0.application_id != null) {
r0 = shouldShowApplicationActivity(a0.application_id);
} else {
value4 = DetectableGameStore.searchGamesByName(a0.name);
r0 = value4.length === 1 ? shouldShowApplicationActivity(value4[value2]) : (require(3829) /* metro dependency 3829: UserSettings */).ShowCurrentGame.getSetting();
}
return r0;
}
var STREAMING = ActivityTypes.STREAMING;
if (STREAMING !== type) {
ActivityTypes.WATCHING;
}
r0 = a0.application_id == null || shouldShowApplicationActivity(a0.application_id);
}
return r0;
}
function AFK_54533() { // fn#54533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:2556, offset: 0x01367db3, size: 511 bytes, params: 1, frame: 19
var r6;
var r3;
var setting;
var StatusTypesBinding;
var INVISIBLE;
var activities;
var items2;
var defaultImport2;
var binding;
var value15;
const idleSince = IdleStore.getIdleSince();
const value3 = 0;
let r0 = idleSince ?? value3;
env0_24 = r0;
env0_27 = IdleStore.isAFK();
if (!env0_28) {
if (env0_21) {
INVISIBLE = StatusTypes.INVISIBLE;
} else {
items5.push(value4);
setting = (require(3829) /* metro dependency 3829: UserSettings */).StatusSetting.getSetting();
r0 = setting !== StatusTypes.UNKNOWN ? setting : StatusTypes.ONLINE;
}
value5 = value2();
done = value5.done;
if (done) {
r10 = type;
break;
}
r5 = value5;
continue;
}
const ONLINE3 = StatusTypes.ONLINE;
StatusTypesBinding = ONLINE === ONLINE3 && env0_24 > value3 ? StatusTypes : StatusTypesBinding;
if (env0_28) {
r6 = [];
} else if (ONLINE === StatusTypes.INVISIBLE) {
r6 = [];
} else {
activities = LocalActivityStore.getActivities();
r6 = activities.filter(shouldShowActivity);
}
if ((importDefault(644) /* metro dependency 644 */)(env0_25, r6)) {
r3 = false;
} else {
env0_25 = r6;
env0_26 = filterPlayingActivities_54530(r6);
r3 = true;
}
const remoteActivities = SessionsStore.getRemoteActivities();
if (remoteActivities2 !== remoteActivities) {
remoteActivities2 = remoteActivities;
r3 = true;
}
if (env0_30 === SessionsStore.getHiddenActivities()) {
}
if (r3) {
defaultImport2 = importDefault(22) /* metro dependency 22 */;
binding = env0_25;
items2 = [];
value15 = arraySpread(items2, binding, value3, undefined);
binding = remoteActivities2;
arraySpread(items2, binding.filter(function({type}) {
return type !== ActivityTypes.CUSTOM_STATUS;
}), value15, binding);
env0_32 = filterPlayingActivities_54530(defaultImport2(items2.sort(sortActivity)).uniqBy(_fun54535).value());
}
}
if (items2.length === 0) {
return a0;
}
if (items2.length === 1) {
return a0;
}
const items3 = [];
arraySpread(items3, items2, 0, r10);
const property = items3.sort(sortActivity)[0];
const items4 = [];
const value6 = arraySpread(items4, items5, 0, r10);
items4[value6] = property;
value6 + 1;
return items4.sort(sortActivity);
}
function shouldShowActivity(a0) { // fn#54532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:1924, offset: 0x01367c4e, size: 357 bytes, params: 2, frame: 19
var r0;
var value4;
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
const hasFlag = flagUtilsModule.hasFlag;
const flags = a0.flags;
const value2 = 0;
const r5 = flags ?? value2;
const CONTEXTLESS = ActivityFlags.CONTEXTLESS;
if (Reflect.apply(hasFlag, flagUtilsModule, [r5, CONTEXTLESS])) {
return true;
function CONNECTION_OPEN_SUPPLEMENTAL_54536() { // fn#54536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:3160, offset: 0x01368001, size: 61 bytes, params: 1, frame: 14
env0_23 = StatusTypes.UNKNOWN;
START_SESSION_54533();
PresenceStore.setCurrentUserOnConnectionOpen(ONLINE, env0_31);
}
const type = a0.type;
const LISTENING = ActivityTypes.LISTENING;
if (LISTENING === type) {
r0 = (importDefault(6887) /* metro dependency 6887: isListeningOnSpotify */)(a0) ? SpotifyStore.shouldShowActivity() : a0.application_id != null && shouldShowApplicationActivity(a0.application_id);
} else {
var PLAYING = ActivityTypes.PLAYING;
if (PLAYING === type) {
if (a0.application_id != null) {
r0 = shouldShowApplicationActivity(a0.application_id);
} else {
value4 = DetectableGameStore.searchGamesByName(a0.name);
r0 = value4.length === 1 ? shouldShowApplicationActivity(value4[value2]) : (require(3829) /* metro dependency 3829: UserSettings */).ShowCurrentGame.getSetting();
}
function _fun54537(a0) { // fn#54537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:3268, offset: 0x0136803e, size: 254 bytes, params: 2, frame: 16
const SelfPresenceStore2 = SelfPresenceStore;
Inherits(SelfPresenceStore2, a0);
return CreateClass(SelfPresenceStore2, [{key: 'initialize', value: function() {
this.waitFor(DetectableGameStore, IdleStore, LibraryApplicationStore, LocalActivityStore, PresenceStore,
SessionsStore, SpotifyStore, UserSettingsProtoStore);
this.syncWith([LocalActivityStore], START_SESSION_54533);
}}, {key: 'getLocalPresence', value: value_54540}, {key: 'getStatus', value: function() {
return ONLINE;
}}, {key: 'getActivities', value: value_54542}, {key: 'getUnfilteredActivities', value: value_54543},
{key: 'getHiddenActivities', value: value_54544}, {key: 'getPrimaryActivity', value: function() {
var value = a0;
return this.getActivities(!(value !== undefined) || value)[0];
}}, {key: 'getApplicationActivity', value: function(a0) {
var value = a1;
var env0_0 = a0;
return this.findActivity(_fun54547, !(value !== undefined) || value);
}}, {key: 'findActivity', value: function(a0) {
var value = a1;
return this.getActivities(!(value !== undefined) || value).find(a0);
}}]);
function SelfPresenceStore() { // fn#54538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:3280, offset: 0x0136813c, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, SelfPresenceStore);
const value3 = env1_6(SelfPresenceStore);
return env1_5(this, _isNativeReflectConstruct_54524() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_54540() { // fn#54540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:3688, offset: 0x01368200, size: 42 bytes, params: 1, frame: 3
return {status: ONLINE, since: env1_24, activities: env1_26, afk: env1_27};
}
function value_54542() { // fn#54542, offset: 0x0136822a, size: 29 bytes, params: 1, frame: 3
let value = a0;
let r0 = !(value !== undefined) || value;
value = environment.__proto__;
r0 = r0 ? env1_32 : env1_26;
return r0;
}
var STREAMING = ActivityTypes.STREAMING;
if (STREAMING !== type) {
ActivityTypes.WATCHING;
function value_54543() { // fn#54543, offset: 0x01368247, size: 29 bytes, params: 1, frame: 3
let value = a0;
let r0 = !(value !== undefined) || value;
value = environment.__proto__;
r0 = r0 ? env1_31 : env1_25;
return r0;
}
r0 = a0.application_id == null || shouldShowApplicationActivity(a0.application_id);
}
return r0;
}
function AFK_54533() { // fn#54533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:2556, offset: 0x01367db3, size: 511 bytes, params: 1, frame: 19
var r6;
var r3;
var setting;
var StatusTypesBinding;
var INVISIBLE;
var activities;
var items2;
var defaultImport2;
var binding;
var value15;
const idleSince = IdleStore.getIdleSince();
const value3 = 0;
let r0 = idleSince ?? value3;
env0_24 = r0;
env0_27 = IdleStore.isAFK();
if (!env0_28) {
if (env0_21) {
INVISIBLE = StatusTypes.INVISIBLE;
} else {
setting = (require(3829) /* metro dependency 3829: UserSettings */).StatusSetting.getSetting();
r0 = setting !== StatusTypes.UNKNOWN ? setting : StatusTypes.ONLINE;
function value_54544() { // fn#54544, offset: 0x00e45481, size: 9 bytes, params: 1, frame: 1
return env1_30;
}
}
const ONLINE3 = StatusTypes.ONLINE;
StatusTypesBinding = ONLINE === ONLINE3 && env0_24 > value3 ? StatusTypes : StatusTypesBinding;
if (env0_28) {
r6 = [];
} else if (ONLINE === StatusTypes.INVISIBLE) {
r6 = [];
} else {
activities = LocalActivityStore.getActivities();
r6 = activities.filter(shouldShowActivity);
}
if ((importDefault(644) /* metro dependency 644 */)(env0_25, r6)) {
r3 = false;
} else {
env0_25 = r6;
env0_26 = filterPlayingActivities_54530(r6);
r3 = true;
}
const remoteActivities = SessionsStore.getRemoteActivities();
if (env0_29 !== remoteActivities) {
env0_29 = remoteActivities;
r3 = true;
}
if (env0_30 === SessionsStore.getHiddenActivities()) {
}
if (r3) {
defaultImport2 = importDefault(22) /* metro dependency 22 */;
binding = env0_25;
items2 = [];
value15 = arraySpread(items2, binding, value3, undefined);
binding = env0_29;
arraySpread(items2, binding.filter(function({type}) {
return type !== ActivityTypes.CUSTOM_STATUS;
}), value15, binding);
env0_32 = filterPlayingActivities_54530(defaultImport2(items2.sort(sortActivity)).uniqBy(_fun54535).value());
}
}
function CONNECTION_OPEN_SUPPLEMENTAL_54536() { // fn#54536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:3160, offset: 0x01368001, size: 61 bytes, params: 1, frame: 14
env0_23 = StatusTypes.UNKNOWN;
START_SESSION_54533();
PresenceStore.setCurrentUserOnConnectionOpen(ONLINE, env0_31);
}
function value_54546(a0) { // fn#54546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:4086, offset: 0x01368285, size: 42 bytes, params: 2, frame: 13
const value = a1;
const env0_0 = a0;
return this.findActivity(_fun54547, !(value !== undefined) || value);
function _fun54547({application_id}) { // fn#54547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:4129, offset: 0x0108da35, size: 22 bytes, params: 2, frame: 2
return application_id === env0_0;
}
function _fun54537(a0) { // fn#54537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:3268, offset: 0x0136803e, size: 254 bytes, params: 2, frame: 16
const closure = SelfPresenceStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(DetectableGameStore, IdleStore, LibraryApplicationStore, LocalActivityStore, PresenceStore,
SessionsStore, SpotifyStore, UserSettingsProtoStore);
this.syncWith([LocalActivityStore], START_SESSION_54533);
}}, {key: 'getLocalPresence', value: value_54540}, {key: 'getStatus', value: function() {
return ONLINE;
}}, {key: 'getActivities', value: value_54542}, {key: 'getUnfilteredActivities', value: value_54543},
{key: 'getHiddenActivities', value: value_54544}, {key: 'getPrimaryActivity', value: function() {
var value = a0;
return this.getActivities(!(value !== undefined) || value)[0];
}}, {key: 'getApplicationActivity', value: function(a0) {
var value = a1;
var env0_0 = a0;
return this.findActivity(_fun54547, !(value !== undefined) || value);
}}, {key: 'findActivity', value: function(a0) {
var value = a1;
return this.getActivities(!(value !== undefined) || value).find(a0);
}}]);
}
function APP_STATE_UPDATE_54553({state}) { // fn#54553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:5203, offset: 0x01368335, size: 54 bytes, params: 2, frame: 10
const ACTIVE = AppStates.ACTIVE;
if (state === ACTIVE) {
if (env0_21) {
START_SESSION_54533();
return undefined;
}
}
return false;
function APP_STATE_UPDATE_54553({state}) { // fn#54553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:5203, offset: 0x01368335, size: 54 bytes, params: 2, frame: 10
const ACTIVE = AppStates.ACTIVE;
if (state === ACTIVE) {
if (env0_21) {
START_SESSION_54533();
return undefined;
}
}
return false;
}
}
function _fun54535({type, application_id, name}) { // fn#54535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:3075, offset: 0x01367fcd, size: 52 bytes, params: 2, frame: 18
return '' + type + ':' + application_id + ':' + name;
}
function SelfPresenceStore() { // fn#54538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:3280, offset: 0x0136813c, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, SelfPresenceStore);
const value3 = env1_6(SelfPresenceStore);
return env1_5(this, _isNativeReflectConstruct_54524() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_54540() { // fn#54540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:3688, offset: 0x01368200, size: 42 bytes, params: 1, frame: 3
return {status: ONLINE, since: env1_24, activities: env1_26, afk: env1_27};
}
function value_54542() { // fn#54542, offset: 0x0136822a, size: 29 bytes, params: 1, frame: 3
let value = a0;
let r0 = !(value !== undefined) || value;
value = environment.__proto__;
r0 = r0 ? env1_32 : env1_26;
return r0;
}
function value_54543() { // fn#54543, offset: 0x01368247, size: 29 bytes, params: 1, frame: 3
let value = a0;
let r0 = !(value !== undefined) || value;
value = environment.__proto__;
r0 = r0 ? env1_31 : env1_25;
return r0;
}
function value_54546(a0) { // fn#54546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7054:4086, offset: 0x01368285, size: 42 bytes, params: 2, frame: 13
const value = a1;
const env0_0 = a0;
return this.findActivity(_fun54547, !(value !== undefined) || value);
}
global.__d(_fun54523, 6876, [6, 7, 15, 17, 18, 6867, 1348, 4267, 4795, 4270, 6877, 4396, 4296, 661, 4278, 3829,
1391, 6887, 644, 22, 566, 694,
2]) /* metro module 6876, dependencies: [6, 7, 15, 17, 18, 6867, 1348, 4267, 4795, 4270, 6877, 4396, 4296, 661, 4278, 3829, 1391, 6887, 644, 22, 566, 694, 2] */;
+70 -65
View File
@@ -1,4 +1,13 @@
/* Metro module 15824; source: stores/SelfPresenceStoreManager.tsx; dependencies: [7, 6, 15, 17, 18, 6876, 4860, 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 AutomaticLifecycleManager from '../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */
import SelfPresenceStore from './SelfPresenceStore.tsx'; /* Metro dependency 6876 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun121620(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16032:6, offset: 0x0254c48a, size: 253 bytes, params: 8, frame: 18
const handleChange_121624 = function() {
var defaultImport = importDefault(dependencyMap[7]);
@@ -10,77 +19,73 @@ function _fun121620(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(7) /* metro dependency 7 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
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 selfPresenceStore = importDefault(6876) /* metro dependency 6876: SelfPresenceStore */;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
let value = AutomaticLifecycleManager;
value = _fun121625(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/SelfPresenceStoreManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/SelfPresenceStoreManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_121621() { // fn#121621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16032:158, offset: 0x0254c587, 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) {
function _isNativeReflectConstruct_121621() { // fn#121621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16032:158, offset: 0x0254c587, 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_121621_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_121621_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun121625(a0) { // fn#121625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16032:532, offset: 0x0254c653, size: 42 bytes, params: 2, frame: 14
const closure = SelfPresenceStoreManager;
env0_6(closure, a0);
return env0_2(closure);
}
function _fun121625(a0) { // fn#121625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16032:532, offset: 0x0254c653, size: 42 bytes, params: 2, frame: 14
const SelfPresenceStoreManager2 = SelfPresenceStoreManager;
Inherits(SelfPresenceStoreManager2, a0);
return CreateClass(SelfPresenceStoreManager2);
function SelfPresenceStoreManager(a0) { // fn#121626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16032:544, offset: 0x0254c67d, size: 179 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, SelfPresenceStoreManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(SelfPresenceStoreManager);
binding = env1_4;
if (_isNativeReflectConstruct_121621()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
const Map = global.Map;
const map = new Map();
value.stores = map.set(SelfPresenceStore, handleChange_121624);
return value;
}
function SelfPresenceStoreManager(a0) { // fn#121626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16032:544, offset: 0x0254c67d, size: 179 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, SelfPresenceStoreManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(SelfPresenceStoreManager);
binding = env1_4;
if (_isNativeReflectConstruct_121621()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
const Map = global.Map;
const map = new Map();
value.stores = map.set(SelfPresenceStore, handleChange_121624);
return value;
}
global.__d(_fun121620, 15824, [7, 6, 15, 17, 18, 6876, 4860, 694,
2]) /* metro module 15824, dependencies: [7, 6, 15, 17, 18, 6876, 4860, 694, 2] */;
+142 -108
View File
@@ -1,4 +1,14 @@
/* Metro module 4296; source: stores/SessionsStore.tsx; dependencies: [6, 7, 15, 17, 18, 1226, 22, 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 Module00022 from '../by-id/module-00022.js'; /* Metro dependency 22 */
import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import AuthenticationStore from './AuthenticationStore.tsx'; /* Metro dependency 1226 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun36505(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:6, offset: 0x0108d57d, size: 319 bytes, params: 8, frame: 20
const closure = function(a0) {
env0_9 = {};
@@ -6,131 +16,155 @@ function _fun36505(global, require, importDefault, importAll, module, exports, d
};
let 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 authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
Object = global.Object;
const env0_8 = Object.freeze([]);
let env0_9 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun36511(Store);
value.displayName = 'SessionsStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: closure,
SESSIONS_REPLACE: closure});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/SessionsStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/SessionsStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_36506() { // fn#36506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:158, offset: 0x0108d6bc, 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) {
function _isNativeReflectConstruct_36506() { // fn#36506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:158, offset: 0x0108d6bc, 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_36506_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_36506_isNativeReflectConstruct = function() {
return !!result;
})();
}
function CONNECTION_OPEN_36509({sessions}) { // fn#36509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:380, offset: 0x0108d71a, size: 39 bytes, params: 2, frame: 11
env0_9 = {};
sessions.forEach(_fun36510);
}
function CONNECTION_OPEN_36509({sessions}) { // fn#36509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:380, offset: 0x0108d71a, size: 39 bytes, params: 2, frame: 11
env0_9 = {};
sessions.forEach(_fun36510);
function _fun36510(a0) { // fn#36510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:430, offset: 0x0108d741, size: 24 bytes, params: 2, frame: 3
env1_9[a0.sessionId] = a0;
}
function _fun36511(a0) { // fn#36511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:460, offset: 0x0108d759, size: 233 bytes, params: 2, frame: 16
const closure = SessionsStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(AuthenticationStore);
}}, {key: 'getSessions', value: value_36514}, {key: 'getSession', value: value_36515}, {key: 'getRemoteActivities',
value: value_36516}, {key: 'getHiddenActivities', value: value_36518}, {key: 'getSessionById',
value: value_36520}, {key: 'getActiveSession', value: value_36521}, {key: 'getRemoteApplicationActivity',
value: value_36523}]);
}
function _fun36510(a0) { // fn#36510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:430, offset: 0x0108d741, size: 24 bytes, params: 2, frame: 3
env1_9[a0.sessionId] = a0;
}
function value_36515() { // fn#36515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:855, offset: 0x0108d842, size: 42 bytes, params: 1, frame: 12
var r0;
let value = environment.__proto__;
value = AuthenticationStore.getSessionId();
const value2 = null;
if (value2 != value) {
value = this.getSessionById(value);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function value_36516() { // fn#36516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:967, offset: 0x0108d86c, size: 86 bytes, params: 1, frame: 14
const env0_0 = AuthenticationStore.getSessionId();
const defaultImport = importDefault(22) /* metro dependency 22 */;
const value2 = defaultImport.find(env1_9, _fun36517);
return value2 != null ? value2.activities : env1_8;
}
function _fun36511(a0) { // fn#36511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:460, offset: 0x0108d759, size: 233 bytes, params: 2, frame: 16
const SessionsStore2 = SessionsStore;
Inherits(SessionsStore2, a0);
return CreateClass(SessionsStore2, [{key: 'initialize', value: function() {
this.waitFor(AuthenticationStore);
}}, {key: 'getSessions', value: value_36514}, {key: 'getSession', value: value_36515}, {key: 'getRemoteActivities',
value: value_36516}, {key: 'getHiddenActivities', value: value_36518}, {key: 'getSessionById',
value: value_36520}, {key: 'getActiveSession', value: value_36521}, {key: 'getRemoteApplicationActivity',
value: value_36523}]);
function SessionsStore() { // fn#36512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:472, offset: 0x00ec62ac, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, SessionsStore);
const value3 = env1_5(SessionsStore);
return env1_4(this, _isNativeReflectConstruct_36506() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_36518() { // fn#36518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:1115, offset: 0x0108d8e1, size: 96 bytes, params: 1, frame: 14
const env0_0 = AuthenticationStore.getSessionId();
const defaultImport = importDefault(22) /* metro dependency 22 */;
const value2 = defaultImport.find(env1_9, _fun36519);
return value2 == null ? env1_8 : value2.hiddenActivities ?? env1_8;
}
function value_36514() { // fn#36514, offset: 0x00e07a77, size: 9 bytes, params: 1, frame: 1
return env1_9;
}
function value_36521() { // fn#36521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:1346, offset: 0x0108d941, size: 50 bytes, params: 1, frame: 13
const defaultImport = importDefault(22) /* metro dependency 22 */;
return defaultImport.find(env1_9, function(a0) {
return a0.active;
});
}
function value_36515() { // fn#36515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:855, offset: 0x0108d842, size: 42 bytes, params: 1, frame: 12
var r0;
let value = environment.__proto__;
value = AuthenticationStore.getSessionId();
const value2 = null;
if (value2 != value) {
value = this.getSessionById(value);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function value_36516() { // fn#36516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:967, offset: 0x0108d86c, size: 86 bytes, params: 1, frame: 14
const env0_0 = AuthenticationStore.getSessionId();
const defaultImport = Module00022;
const value2 = defaultImport.find(env1_9, _fun36517);
return value2 != null ? value2.activities : env1_8;
function _fun36517(a0) { // fn#36517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:1019, offset: 0x0108d8c2, size: 31 bytes, params: 2, frame: 3
return a0.active && a0.sessionId !== env0_0;
}
}
function value_36518() { // fn#36518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:1115, offset: 0x0108d8e1, size: 96 bytes, params: 1, frame: 14
const env0_0 = AuthenticationStore.getSessionId();
const defaultImport = Module00022;
const value2 = defaultImport.find(env1_9, _fun36519);
return value2 == null ? env1_8 : value2.hiddenActivities ?? env1_8;
function _fun36519(a0) { // fn#36519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:1167, offset: 0x0108d8c2, size: 31 bytes, params: 2, frame: 3
return a0.active && a0.sessionId !== env0_0;
}
}
function value_36520(a0) { // fn#36520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:1290, offset: 0x010197cf, size: 16 bytes, params: 2, frame: 2
return env1_9[a0];
}
function value_36521() { // fn#36521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:1346, offset: 0x0108d941, size: 50 bytes, params: 1, frame: 13
const defaultImport = Module00022;
return defaultImport.find(env1_9, function(a0) {
return a0.active;
});
}
function value_36523(a0) { // fn#36523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:1442, offset: 0x0108d97e, size: 152 bytes, params: 2, frame: 16
var environment;
const env0_0 = a0;
if (a0 == null) {
return null;
}
let value = environment.__proto__;
const env0_1 = AuthenticationStore.getSessionId();
const value2 = undefined;
const defaultImport = Module00022;
value = defaultImport.find(env1_9, _fun36524);
if (value == null) {
return null;
}
return value.activities.find(_fun36525) ?? (value.hiddenActivities == null ? value2 : value.hiddenActivities.find(_fun36526));
function _fun36524(a0) { // fn#36524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:1524, offset: 0x0108da16, size: 31 bytes, params: 2, frame: 3
return a0.active && a0.sessionId !== env0_1;
}
function _fun36525({application_id}) { // fn#36525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:1603, offset: 0x0108da35, size: 22 bytes, params: 2, frame: 2
return application_id === env0_0;
}
function _fun36526({application_id}) { // fn#36526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:1690, offset: 0x0108da35, size: 22 bytes, params: 2, frame: 2
return application_id === env0_0;
}
}
function value_36523(a0) { // fn#36523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:1442, offset: 0x0108d97e, size: 152 bytes, params: 2, frame: 16
var environment;
const env0_0 = a0;
if (a0 == null) {
return null;
}
let value = environment.__proto__;
const env0_1 = AuthenticationStore.getSessionId();
const value2 = undefined;
const defaultImport = importDefault(22) /* metro dependency 22 */;
value = defaultImport.find(env1_9, _fun36524);
if (value == null) {
return null;
}
return value.activities.find(_fun36525) ?? (value.hiddenActivities == null ? value2 : value.hiddenActivities.find(_fun36526));
}
function _fun36517(a0) { // fn#36517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:1019, offset: 0x0108d8c2, size: 31 bytes, params: 2, frame: 3
return a0.active && a0.sessionId !== env0_0;
}
function _fun36524(a0) { // fn#36524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:1524, offset: 0x0108da16, size: 31 bytes, params: 2, frame: 3
return a0.active && a0.sessionId !== env0_1;
}
global.__d(_fun36505, 4296, [6, 7, 15, 17, 18, 1226, 22, 566, 694,
2]) /* metro module 4296, dependencies: [6, 7, 15, 17, 18, 1226, 22, 566, 694, 2] */;
+301 -284
View File
@@ -1,6 +1,16 @@
/* Metro module 7080; source: stores/SlowmodeStore.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 3784, 7081, 4041, 694, 672, 566, 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 ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */
import PermissionStore from './PermissionStore.tsx'; /* Metro dependency 3784 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as SlowmodeUtilsModule from '../modules/chat/SlowmodeUtils.tsx'; /* Metro dependency 7081 */
function _fun56487(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:6, offset: 0x013c9572, size: 470 bytes, params: 8, frame: 21
var object3;
const env0_0 = require;
const _arrayLikeToArray_56493 = function(a0, a1) {
var r0;
@@ -45,331 +55,338 @@ function _fun56487(global, require, importDefault, importAll, module, exports, d
}
return value;
};
const closure = UPLOAD_FAIL_56497;
const UPLOAD_FAIL_564972 = UPLOAD_FAIL_56497;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
object3 = {SendMessage: 0};
object3[0] = 'SendMessage';
object3.CreateThread = 1;
object3[1] = 'CreateThread';
const object4 = {};
const SendMessage = object3.SendMessage;
object4[SendMessage] = {};
const CreateThread = object3.CreateThread;
object4[CreateThread] = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
object = {SendMessage: 0};
object[0] = 'SendMessage';
object.CreateThread = 1;
object[1] = 'CreateThread';
const object2 = {};
const SendMessage = object.SendMessage;
object2[SendMessage] = {};
const CreateThread = object.CreateThread;
object2[CreateThread] = {};
const Store = (Flux).Store;
let value = _fun56498(Store);
value.displayName = 'SlowmodeStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{SLOWMODE_RESET_COOLDOWN: function({channelId, slowmodeType}) {
return resetCooldown(channelId, slowmodeType);
}, SLOWMODE_SET_COOLDOWN: SLOWMODE_SET_COOLDOWN, UPLOAD_START: UPLOAD_START_56505, UPLOAD_FAIL: closure,
UPLOAD_CANCEL_REQUEST: closure, CHANNEL_UPDATES: CHANNEL_UPDATES_56506, LOGOUT: LOGOUT_56508});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/SlowmodeStore.tsx');
}, SLOWMODE_SET_COOLDOWN: SLOWMODE_SET_COOLDOWN, UPLOAD_START: UPLOAD_START_56505, UPLOAD_FAIL: UPLOAD_FAIL_564972,
UPLOAD_CANCEL_REQUEST: UPLOAD_FAIL_564972, CHANNEL_UPDATES: CHANNEL_UPDATES_56506, LOGOUT: LOGOUT_56508});
(FileImportTrackerModule).fileFinishedImporting('stores/SlowmodeStore.tsx');
exports.default = value;
exports.SlowmodeType = object3;
}
function _isNativeReflectConstruct_56488() { // fn#56488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:170, offset: 0x013c9748, 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_56488_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_56491(a0, a1) { // fn#56491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:363, offset: 0x013c97a6, 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) {
exports.SlowmodeType = object;
function _isNativeReflectConstruct_56488() { // fn#56488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:170, offset: 0x013c9748, 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 _fun56492;
return (_isNativeReflectConstruct_56488_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_56493(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') {
function _createForOfIteratorHelperLoose_56491(a0, a1) { // fn#56491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:363, offset: 0x013c97a6, 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 _fun56492;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_56493(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_56493(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_56493(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun56492;
}
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 _fun56492() { // fn#56492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:934, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
return _fun56492;
}
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 setCooldown(a0, a1, a2) { // fn#56494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:1416, offset: 0x013c9918, size: 312 bytes, params: 4, frame: 21
var Date;
var value2;
var object2;
var Timeout;
var value3;
var timeout;
const env0_0 = a0;
const env0_1 = a1;
let property = env0_11[a1];
let id = a0.id;
if (property[id] != null) {
property = env0_11[a1];
id = a0.id;
property[id].timer.stop();
property = env0_11[a1];
id = a0.id;
delete property[id];
}
const slowmodeUtilsModule = require(7081) /* metro dependency 7081: SlowmodeUtils */;
if (!slowmodeUtilsModule.canBypassSlowmode(a0, a1)) {
if (!(a2 <= 0)) {
Date = global.Date;
value2 = a2 + Date.now();
function setCooldown(a0, a1, a2) { // fn#56494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:1416, offset: 0x013c9918, size: 312 bytes, params: 4, frame: 21
var Date;
var value2;
var object;
var Timeout;
var value3;
var timeout;
const env0_0 = a0;
const env0_1 = a1;
let property = env0_11[a1];
let id = a0.id;
if (property[id] != null) {
property = env0_11[a1];
id = a0.id;
object2 = {};
object2.rateLimitPerUser = a0.rateLimitPerUser;
object2.cooldownMs = a2;
object2.cooldownEndTimestamp = value2;
Timeout = (require(4041) /* metro dependency 4041: Timers */).Timeout;
value3 = Object.create(Timeout.prototype, {constructor: {value: Timeout}});
timeout = new Timeout();
object2.timer = timeout instanceof Object ? timeout : value3;
property[id] = object2;
property[id].timer.stop();
property = env0_11[a1];
id = a0.id;
property[id].timer.start(1000, _fun56495, true);
delete property[id];
}
if (!SlowmodeUtilsModule.canBypassSlowmode(a0, a1)) {
if (!(a2 <= 0)) {
Date = global.Date;
value2 = a2 + Date.now();
property = env0_11[a1];
id = a0.id;
object = {};
object.rateLimitPerUser = a0.rateLimitPerUser;
object.cooldownMs = a2;
object.cooldownEndTimestamp = value2;
Timeout = (require(4041) /* metro dependency 4041: Timers */).Timeout;
value3 = Object.create(Timeout.prototype, {constructor: {value: Timeout}});
timeout = new Timeout();
object.timer = timeout instanceof Object ? timeout : value3;
property[id] = object;
property = env0_11[a1];
id = a0.id;
property[id].timer.start(1000, _fun56495, true);
}
}
function _fun56495() { // fn#56495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:1745, offset: 0x013c9a50, size: 123 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
const dispatch = value.dispatch;
const Math = global.Math;
const max = Math.max;
const binding = env0_2;
const Date = global.Date;
Reflect.apply(dispatch, value, [{type: 'SLOWMODE_SET_COOLDOWN', channelId: env0_0.id, slowmodeType: require,
cooldownMs: Reflect.apply(max, Math, [binding - Date.now(), 0])}]);
}
}
}
function resetCooldown(a0, a1) { // fn#56496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:1872, offset: 0x013c9acb, size: 111 bytes, params: 3, frame: 17
const channel = ChannelStore.getChannel(a0);
if (channel == null) {
return false;
function resetCooldown(a0, a1) { // fn#56496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:1872, offset: 0x013c9acb, size: 111 bytes, params: 3, frame: 17
const channel = ChannelStore.getChannel(a0);
if (channel == null) {
return false;
}
const setCooldownBinding = setCooldown;
const rateLimitPerUser = channel.rateLimitPerUser;
const value3 = 0;
setCooldownBinding(channel, a1,
value3 === rateLimitPerUser ? value3 : channel.rateLimitPerUser * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND + 100);
}
const setCooldownBinding = setCooldown;
const rateLimitPerUser = channel.rateLimitPerUser;
const value3 = 0;
setCooldownBinding(channel, a1,
value3 === rateLimitPerUser ? value3 : channel.rateLimitPerUser * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND + 100);
}
function UPLOAD_CANCEL_REQUEST({channelId}) { // fn#56497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:2030, offset: 0x013c9b3a, size: 63 bytes, params: 2, frame: 16
var r0;
var setCooldownBinding;
var SendMessage;
var value;
const channel = ChannelStore.getChannel(channelId);
const value3 = channel != null;
if (value3) {
setCooldownBinding = setCooldown;
SendMessage = env0_10.SendMessage;
value = undefined;
setCooldownBinding(channel, SendMessage, 0);
r0 = value;
} else {
r0 = value3;
function UPLOAD_CANCEL_REQUEST({channelId}) { // fn#56497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:2030, offset: 0x013c9b3a, size: 63 bytes, params: 2, frame: 16
var r0;
var setCooldownBinding;
var SendMessage;
var value;
const channel = ChannelStore.getChannel(channelId);
const value3 = channel != null;
if (value3) {
setCooldownBinding = setCooldown;
SendMessage = env0_10.SendMessage;
value = undefined;
setCooldownBinding(channel, SendMessage, 0);
r0 = value;
} else {
r0 = value3;
}
return r0;
}
return r0;
}
function _fun56498(a0) { // fn#56498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:2148, offset: 0x013c9b79, size: 114 bytes, params: 2, frame: 16
const closure = SlowmodeStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, PermissionStore);
}}, {key: 'getSlowmodeCooldownGuess', value: value_56501}, {key: 'isChannelOnCooldown', value: function(a0, a1) {
var value = this.getSlowmodeCooldownGuess(a0.id, a1);
value = value > 0;
return value && a0.rateLimitPerUser > 0;
}}]);
}
function _fun56498(a0) { // fn#56498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:2148, offset: 0x013c9b79, size: 114 bytes, params: 2, frame: 16
const SlowmodeStore2 = SlowmodeStore;
Inherits(SlowmodeStore2, a0);
return CreateClass(SlowmodeStore2, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, PermissionStore);
}}, {key: 'getSlowmodeCooldownGuess', value: value_56501}, {key: 'isChannelOnCooldown', value: function(a0, a1) {
var value = this.getSlowmodeCooldownGuess(a0.id, a1);
value = value > 0;
return value && a0.rateLimitPerUser > 0;
}}]);
function SlowmodeStore() { // fn#56499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:2160, offset: 0x0108afcb, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, SlowmodeStore);
const value3 = env1_6(SlowmodeStore);
return env1_5(this, _isNativeReflectConstruct_56488() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_56501(a0, a1) { // fn#56501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:2512, offset: 0x013c9beb, size: 54 bytes, params: 3, frame: 5
const property = env1_11[a1 ?? env1_10.SendMessage][a0];
return property != null ? property.cooldownMs : 0;
}
function SLOWMODE_SET_COOLDOWN({channelId, slowmodeType, cooldownMs}) { // fn#56504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:2922, offset: 0x013c9c6f, size: 75 bytes, params: 2, frame: 16
const channel = ChannelStore.getChannel(channelId);
if (channel == null) {
return false;
}
setCooldown(channel, slowmodeType, cooldownMs === 0 ? 0 : cooldownMs + 100);
}
function UPLOAD_START_56505({channelId}) { // fn#56505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:3087, offset: 0x013c9cba, size: 35 bytes, params: 2, frame: 13
const resetCooldownBinding = resetCooldown;
const SendMessage = env0_10.SendMessage;
return resetCooldownBinding(channelId, SendMessage);
}
function SLOWMODE_SET_COOLDOWN({channelId, slowmodeType, cooldownMs}) { // fn#56504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:2922, offset: 0x013c9c6f, size: 75 bytes, params: 2, frame: 16
const channel = ChannelStore.getChannel(channelId);
if (channel == null) {
return false;
}
setCooldown(channel, slowmodeType, cooldownMs === 0 ? 0 : cooldownMs + 100);
}
function CHANNEL_UPDATES_56506({channels}) { // fn#56506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:3256, offset: 0x013c9cdd, size: 69 bytes, params: 2, frame: 12
const SendMessage = env0_10.SendMessage;
const CreateThread = env0_10.CreateThread;
[SendMessage, CreateThread].forEach(_fun56507);
}
function UPLOAD_START_56505({channelId}) { // fn#56505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:3087, offset: 0x013c9cba, size: 35 bytes, params: 2, frame: 13
const resetCooldownBinding = resetCooldown;
const SendMessage = env0_10.SendMessage;
return resetCooldownBinding(channelId, SendMessage);
}
function LOGOUT_56508() { // fn#56508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:3598, offset: 0x013c9df7, size: 56 bytes, params: 1, frame: 11
const SendMessage = env0_10.SendMessage;
const CreateThread = env0_10.CreateThread;
[SendMessage, CreateThread].forEach(_fun56509);
}
function _fun56495() { // fn#56495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:1745, offset: 0x013c9a50, size: 123 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
const dispatch = value.dispatch;
const Math = global.Math;
const max = Math.max;
const binding = env0_2;
const Date = global.Date;
Reflect.apply(dispatch, value, [{type: 'SLOWMODE_SET_COOLDOWN', channelId: env0_0.id, slowmodeType: require,
cooldownMs: Reflect.apply(max, Math, [binding - Date.now(), 0])}]);
}
function value_56501(a0, a1) { // fn#56501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:2512, offset: 0x013c9beb, size: 54 bytes, params: 3, frame: 5
const property = env1_11[a1 ?? env1_10.SendMessage][a0];
return property != null ? property.cooldownMs : 0;
}
function _fun56507(a0) { // fn#56507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:3340, offset: 0x013c9d22, size: 213 bytes, params: 2, frame: 30
var r3;
var cooldownMs;
var r15;
var value6;
var property;
var id;
var rateLimitPerUser;
var rateLimitPerUser2;
var setCooldownBinding;
var Math;
var min;
var value7;
var Millis;
var SECOND;
var value8;
const _createForOfIteratorHelperLoose_56491Binding = _createForOfIteratorHelperLoose_56491;
const channelsBinding = channels;
const value3 = undefined;
const value4 = _createForOfIteratorHelperLoose_56491Binding(channelsBinding);
const value5 = value4();
let done = value5.done;
if (!done) {
r3 = value5;
while (true) {
value6 = r3.value;
property = env1_11[a0];
id = value6.id;
property = property[id];
rateLimitPerUser = value6.rateLimitPerUser;
if (property != null) {
rateLimitPerUser2 = property.rateLimitPerUser;
if (rateLimitPerUser2 === rateLimitPerUser) {
break;
}
setCooldownBinding = setCooldown;
Math = global.Math;
min = Math.min;
if (property == null) {
cooldownMs = value3;
function CHANNEL_UPDATES_56506({channels}) { // fn#56506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:3256, offset: 0x013c9cdd, size: 69 bytes, params: 2, frame: 12
const SendMessage = env0_10.SendMessage;
const CreateThread = env0_10.CreateThread;
[SendMessage, CreateThread].forEach(_fun56507);
function _fun56507(a0) { // fn#56507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:3340, offset: 0x013c9d22, size: 213 bytes, params: 2, frame: 30
var r3;
var cooldownMs;
var r15;
var value6;
var property;
var id;
var rateLimitPerUser;
var rateLimitPerUser2;
var setCooldownBinding;
var Math;
var min;
var value7;
var Millis;
var SECOND;
var value8;
const _createForOfIteratorHelperLoose_56491Binding = _createForOfIteratorHelperLoose_56491;
const channelsBinding = channels;
const value3 = undefined;
const value4 = _createForOfIteratorHelperLoose_56491Binding(channelsBinding);
const value5 = value4();
let done = value5.done;
if (!done) {
r3 = value5;
while (true) {
value6 = r3.value;
property = env1_11[a0];
id = value6.id;
property = property[id];
rateLimitPerUser = value6.rateLimitPerUser;
if (property != null) {
rateLimitPerUser2 = property.rateLimitPerUser;
if (rateLimitPerUser2 === rateLimitPerUser) {
break;
}
setCooldownBinding = setCooldown;
Math = global.Math;
min = Math.min;
if (property == null) {
cooldownMs = value3;
continue;
}
cooldownMs = property.cooldownMs;
value7 = 0;
if (cooldownMs != null) {
r15 = cooldownMs;
continue;
}
r15 = value7;
continue;
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
SECOND = Millis.SECOND;
setCooldownBinding(value6, a0, Reflect.apply(min, Math, [r15, rateLimitPerUser * SECOND]));
break;
}
value8 = value4();
done = value8.done;
if (done) {
break;
}
r3 = value8;
continue;
}
cooldownMs = property.cooldownMs;
value7 = 0;
if (cooldownMs != null) {
r15 = cooldownMs;
continue;
}
r15 = value7;
continue;
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
SECOND = Millis.SECOND;
setCooldownBinding(value6, a0, Reflect.apply(min, Math, [r15, rateLimitPerUser * SECOND]));
break;
}
value8 = value4();
done = value8.done;
if (done) {
break;
}
r3 = value8;
continue;
return value3;
}
}
return value3;
}
function _fun56509(a0) { // fn#56509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:3655, offset: 0x013c9e2f, size: 67 bytes, params: 2, frame: 14
const env0_0 = a0;
const Object = global.Object;
Object.keys(env1_11[a0]).forEach(_fun56510);
env1_11[a0] = {};
}
function _fun56510(a0) { // fn#56510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:3686, offset: 0x013c9e72, size: 43 bytes, params: 2, frame: 9
return env2_11[env0_0][a0].timer.stop();
function LOGOUT_56508() { // fn#56508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:3598, offset: 0x013c9df7, size: 56 bytes, params: 1, frame: 11
const SendMessage = env0_10.SendMessage;
const CreateThread = env0_10.CreateThread;
[SendMessage, CreateThread].forEach(_fun56509);
function _fun56509(a0) { // fn#56509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:3655, offset: 0x013c9e2f, size: 67 bytes, params: 2, frame: 14
const env0_0 = a0;
const Object = global.Object;
Object.keys(env1_11[a0]).forEach(_fun56510);
env1_11[a0] = {};
function _fun56510(a0) { // fn#56510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7258:3686, offset: 0x013c9e72, size: 43 bytes, params: 2, frame: 9
return env2_11[env0_0][a0].timer.stop();
}
}
}
}
global.__d(_fun56487, 7080, [6, 7, 15, 17, 18, 1379, 3784, 7081, 4041, 694, 672, 566,
2]) /* metro module 7080, dependencies: [6, 7, 15, 17, 18, 1379, 3784, 7081, 4041, 694, 672, 566, 2] */;
File diff suppressed because it is too large. Load diff
+461 -427
View File
@@ -1,4 +1,20 @@
/* Metro module 4607; source: stores/SpeakingStore.tsx; dependencies: [6, 7, 15, 17, 18, 57, 1379, 4259, 4294, 1934, 661, 4291, 3789, 4608, 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 Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */
import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectedChannelStore from './SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import MediaEngineStore from './MediaEngineStore.tsx'; /* Metro dependency 4259 */
import RTCConnectionStore from './RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import ProportionalVadIndicatorExperiment from '../modules/calls/ProportionalVadIndicatorExperiment.tsx'; /* Metro dependency 4608 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as ConstantsModule2 from '../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */
function _fun39488(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:6, offset: 0x010e321e, size: 547 bytes, params: 8, frame: 21
const _arrayLikeToArray_39494 = function(a0, a1) {
var r0;
@@ -50,23 +66,12 @@ function _fun39488(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const env0_8 = importDefault(57) /* metro dependency 57 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const env0_13 = (require(661) /* metro dependency 661: Constants */).Permissions;
const constantsModule = require(4291) /* metro dependency 4291: Constants */;
const constantsModule = ConstantsModule2;
const env0_14 = constantsModule.SpeakingFlags;
const env0_15 = constantsModule.MediaEngineContextTypes;
const Map = global.Map;
let map = new Map();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun39500(Store).displayName = 'SpeakingStore';
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: closure,
OVERLAY_INITIALIZE: closure, SPEAKING: SPEAKING_39517, VOICE_STATE_UPDATES: function({voiceStates}) {
@@ -74,465 +79,494 @@ function _fun39488(global, require, importDefault, importAll, module, exports, d
}, PUSH_TO_TALK_STATE_CHANGE: function(a0) {
env0_20 = a0.isActive;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/SpeakingStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/SpeakingStore.tsx');
exports.default = map;
}
function _isNativeReflectConstruct_39489() { // fn#39489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:282, offset: 0x010e3441, 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_39489_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_39492(a0, a1) { // fn#39492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:475, offset: 0x010e349f, 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) {
function _isNativeReflectConstruct_39489() { // fn#39489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:282, offset: 0x010e3441, 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 _fun39493;
return (_isNativeReflectConstruct_39489_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_39494(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') {
function _createForOfIteratorHelperLoose_39492(a0, a1) { // fn#39492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:475, offset: 0x010e349f, 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 _fun39493;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_39494(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_39494(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_39494(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun39493;
}
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 _fun39493() { // fn#39493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:1046, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
return _fun39493;
}
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 clearSpeakingFlagsInContext(a0, a1) { // fn#39495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:1425, offset: 0x010e3611, size: 70 bytes, params: 3, frame: 13
const value2 = env0_16.get(a0);
if (value2 == null) {
return false;
}
const value3 = value2.delete(a1);
if (value2.size === 0) {
env0_16.delete(a0);
}
return value3;
}
function hasSpeakingFlagInContext(a0, a1, a2) { // fn#39496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:1553, offset: 0x010e3657, size: 85 bytes, params: 4, frame: 16
var flags;
var value4;
const value2 = env0_16.get(a0);
const value3 = undefined;
if (value2 == null) {
flags = value3;
} else {
value4 = value2.get(a1);
flags = value4 == null ? value3 : value4.flags;
function clearSpeakingFlagsInContext(a0, a1) { // fn#39495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:1425, offset: 0x010e3611, size: 70 bytes, params: 3, frame: 13
const value2 = env0_16.get(a0);
if (value2 == null) {
return false;
}
const value3 = value2.delete(a1);
if (value2.size === 0) {
env0_16.delete(a0);
}
return value3;
}
return ((flags ?? SpeakingFlags.NONE) & a2) === a2;
}
function anyoneHasFlagInContext(a0, a1) { // fn#39497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:1691, offset: 0x010e36ac, size: 145 bytes, params: 3, frame: 21
var r8;
var r1;
var value5;
var value6;
var property;
var flags;
var value7;
let value = a2;
reducibleJoin2: while (true) {
if (value !== undefined) {
function hasSpeakingFlagInContext(a0, a1, a2) { // fn#39496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:1553, offset: 0x010e3657, size: 85 bytes, params: 4, frame: 16
var flags;
var value4;
const value2 = env0_16.get(a0);
const value3 = undefined;
if (value2 == null) {
flags = value3;
} else {
value4 = value2.get(a1);
flags = value4 == null ? value3 : value4.flags;
}
return ((flags ?? SpeakingFlags.NONE) & a2) === a2;
}
function anyoneHasFlagInContext(a0, a1) { // fn#39497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:1691, offset: 0x010e36ac, size: 145 bytes, params: 3, frame: 21
var r8;
var r1;
var value5;
var value6;
var property;
var flags;
var value7;
let value = a2;
reducibleJoin2: while (true) {
if (value !== undefined) {
r8 = value;
break reducibleJoin2;
}
value = false;
r8 = value;
break reducibleJoin2;
}
value = false;
r8 = value;
break reducibleJoin2;
}
const value2 = env0_16.get(a0);
if (value2 != null) {
var value3 = _createForOfIteratorHelperLoose_39492(value2);
var value4 = value3();
var done = value4.done;
if (!done) {
r1 = value4;
reducibleLoop4: while (true) {
value5 = r1.value;
value6 = env0_8(value5, 2);
property = value6[0];
flags = value6[1].flags;
if (r8) {
reducibleJoin6: while (true) {
if (property === env0_17) {
value7 = value3();
done = value7.done;
if (done) {
return false;
const value2 = env0_16.get(a0);
if (value2 != null) {
var value3 = _createForOfIteratorHelperLoose_39492(value2);
var value4 = value3();
var done = value4.done;
if (!done) {
r1 = value4;
reducibleLoop4: while (true) {
value5 = r1.value;
value6 = Module00057(value5, 2);
property = value6[0];
flags = value6[1].flags;
if (r8) {
reducibleJoin6: while (true) {
if (property === env0_17) {
value7 = value3();
done = value7.done;
if (done) {
return false;
}
r1 = value7;
continue reducibleLoop4;
}
r1 = value7;
continue reducibleLoop4;
break reducibleJoin6;
}
break reducibleJoin6;
}
if ((flags & a1) === a1) {
return true;
}
value7 = value3();
done = value7.done;
if (done) {
return false;
}
r1 = value7;
continue reducibleLoop4;
}
if ((flags & a1) === a1) {
return true;
}
value7 = value3();
done = value7.done;
if (done) {
return false;
}
r1 = value7;
continue reducibleLoop4;
}
}
return false;
}
return false;
}
function setSpeakingFlagForUserInContext(a0, a1, a2) { // fn#39498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:1918, offset: 0x010e373d, size: 358 bytes, params: 4, frame: 22
var r1;
var since;
var r8;
var map;
var VOICE;
var value14;
let value = a0;
const value2 = a3;
const value3 = undefined;
const r7 = value2 !== value3 ? value2 : -Infinity;
const r3 = value !== value3 ? value : MediaEngineContextTypes.DEFAULT;
const value7 = env0_16.get(r3);
const value8 = null;
if (value8 != value7) {
r1 = value7;
} else {
map = new global.Map();
env0_16.set(r3, map);
r1 = map;
}
const value11 = r1.get(a1);
const flags = value8 == value11 ? value3 : value11.flags;
const value12 = 0;
const r10 = value8 != flags ? flags : value12;
if (value12 !== r10) {
if (value12 === a2) {
r1.delete(a1);
if (value12 === r1.size) {
env0_16.delete(value);
}
function setSpeakingFlagForUserInContext(a0, a1, a2) { // fn#39498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:1918, offset: 0x010e373d, size: 358 bytes, params: 4, frame: 22
var r1;
var since;
var r8;
var map;
var VOICE;
var value14;
let value = a0;
const value2 = a3;
const value3 = undefined;
const r7 = value2 !== value3 ? value2 : -Infinity;
const r3 = value !== value3 ? value : MediaEngineContextTypes.DEFAULT;
const value7 = env0_16.get(r3);
const value8 = null;
if (value8 != value7) {
r1 = value7;
} else {
since = value8 == value11 ? value3 : value11.since;
r8 = value8 != since ? since : value8;
VOICE = SpeakingFlags.VOICE;
value = r10 & VOICE;
VOICE = SpeakingFlags.VOICE;
value14 = (a2 & SpeakingFlags.VOICE) === SpeakingFlags.VOICE;
r8 = value === VOICE !== value14 ? value14 ? global.Date.now() : value8 : r8;
r1.set(a1, {flags: a2, since: r8, voiceDb: r7});
map = new global.Map();
env0_16.set(r3, map);
r1 = map;
}
} else {
if (value12 === a2) {
return false;
}
if (value12 === a2) {
r1.delete(a1);
if (value12 === r1.size) {
env0_16.delete(value);
}
} else {
since = value8 == value11 ? value3 : value11.since;
r8 = value8 != since ? since : value8;
VOICE = SpeakingFlags.VOICE;
value = r10 & VOICE;
VOICE = SpeakingFlags.VOICE;
value14 = (a2 & SpeakingFlags.VOICE) === SpeakingFlags.VOICE;
r8 = value === VOICE !== value14 ? value14 ? global.Date.now() : value8 : r8;
r1.set(a1, {flags: a2, since: r8, voiceDb: r7});
}
}
return true;
}
function _fun39500(a0) { // fn#39500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:2457, offset: 0x010e38cb, size: 358 bytes, params: 2, frame: 16
const closure = SpeakingStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.mustEmitChanges(_fun39503);
this.waitFor(ChannelStore, MediaEngineStore, RTCConnectionStore, SelectedChannelStore);
}}, {key: 'getSpeakingDuration', value: value_39504}, {key: 'getSpeakers', value: value_39505}, {key: 'isSpeaking',
value: value_39507}, {key: 'isPrioritySpeaker', value: value_39508}, {key: 'isSoundSharing',
value: value_39509}, {key: 'isAnyoneElseSpeaking', value: value_39510}, {key: 'isCurrentUserSpeaking',
value: value_39511}, {key: 'isCurrentUserPTTActive', value: value_39512}, {key: 'isAnyonePrioritySpeaking',
value: value_39513}, {key: 'isCurrentUserPrioritySpeaker', value: value_39514},
{key: 'isCurrentUserPrioritySpeaking', value: value_39515}, {key: 'getVoiceVolume', value: value_39516}]);
}
function SPEAKING_39517({context, userId, speakingFlags, voiceDb}) { // fn#39517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:4484, offset: 0x010e3e42, size: 269 bytes, params: 2, frame: 22
var r2;
var value3;
var moduleValue;
var can;
var object2;
let PRIORITY = SpeakingFlags.PRIORITY;
const value2 = speakingFlags & PRIORITY;
PRIORITY = SpeakingFlags.PRIORITY;
if (value2 !== PRIORITY) {
r2 = speakingFlags;
} else {
value3 = ChannelStore.getChannel(SelectedChannelStore.getVoiceChannelId());
if (value3 == null) {
MediaEngineStore.setCanHavePriority(userId, false);
r2 = speakingFlags & ~SpeakingFlags.PRIORITY;
} else {
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
can = moduleValue.can;
object2 = {};
object2.permission = Permissions.PRIORITY_SPEAKER;
object2.user = userId;
object2.context = value3;
if (Reflect.apply(can, moduleValue, [object2])) {
MediaEngineStore.setCanHavePriority(userId, true);
r2 = speakingFlags;
const value11 = r1.get(a1);
const flags = value8 == value11 ? value3 : value11.flags;
const value12 = 0;
const r10 = value8 != flags ? flags : value12;
if (value12 !== r10) {
if (value12 === a2) {
r1.delete(a1);
if (value12 === r1.size) {
env0_16.delete(value);
}
} else {
MediaEngineStore.setCanHavePriority(userId, false);
r2 = speakingFlags & ~SpeakingFlags.PRIORITY;
since = value8 == value11 ? value3 : value11.since;
r8 = value8 != since ? since : value8;
VOICE = SpeakingFlags.VOICE;
value = r10 & VOICE;
VOICE = SpeakingFlags.VOICE;
value14 = (a2 & SpeakingFlags.VOICE) === SpeakingFlags.VOICE;
r8 = value === VOICE !== value14 ? value14 ? global.Date.now() : value8 : r8;
r1.set(a1, {flags: a2, since: r8, voiceDb: r7});
}
} else {
if (value12 === a2) {
return false;
}
if (value12 === a2) {
r1.delete(a1);
if (value12 === r1.size) {
env0_16.delete(value);
}
} else {
since = value8 == value11 ? value3 : value11.since;
r8 = value8 != since ? since : value8;
VOICE = SpeakingFlags.VOICE;
value = r10 & VOICE;
VOICE = SpeakingFlags.VOICE;
value14 = (a2 & SpeakingFlags.VOICE) === SpeakingFlags.VOICE;
r8 = value === VOICE !== value14 ? value14 ? global.Date.now() : value8 : r8;
r1.set(a1, {flags: a2, since: r8, voiceDb: r7});
}
}
return true;
}
let HIDDEN = SpeakingFlags.HIDDEN;
const value5 = r2 & HIDDEN;
HIDDEN = SpeakingFlags.HIDDEN;
r2 = value5 === HIDDEN ? 0 : r2;
return setSpeakingFlagForUserInContext(context, userId, r2, voiceDb);
}
function VOICE_STATE_UPDATES_39518({voiceStates}) { // fn#39518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:4873, offset: 0x010e3f4f, size: 32 bytes, params: 2, frame: 13
return voiceStates.reduce(_fun39519, false);
}
function _fun39500(a0) { // fn#39500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:2457, offset: 0x010e38cb, size: 358 bytes, params: 2, frame: 16
const SpeakingStore2 = SpeakingStore;
Inherits(SpeakingStore2, a0);
return CreateClass(SpeakingStore2, [{key: 'initialize', value: function() {
this.mustEmitChanges(_fun39503);
this.waitFor(ChannelStore, MediaEngineStore, RTCConnectionStore, SelectedChannelStore);
}}, {key: 'getSpeakingDuration', value: value_39504}, {key: 'getSpeakers', value: value_39505}, {key: 'isSpeaking',
value: value_39507}, {key: 'isPrioritySpeaker', value: value_39508}, {key: 'isSoundSharing',
value: value_39509}, {key: 'isAnyoneElseSpeaking', value: value_39510}, {key: 'isCurrentUserSpeaking',
value: value_39511}, {key: 'isCurrentUserPTTActive', value: value_39512}, {key: 'isAnyonePrioritySpeaking',
value: value_39513}, {key: 'isCurrentUserPrioritySpeaker', value: value_39514},
{key: 'isCurrentUserPrioritySpeaking', value: value_39515}, {key: 'getVoiceVolume', value: value_39516}]);
function SpeakingStore() { // fn#39501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:2469, offset: 0x010e3a31, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, SpeakingStore);
const value3 = env1_6(SpeakingStore);
return env1_5(this, _isNativeReflectConstruct_39489() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_39502() { // fn#39502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:2752, offset: 0x010e3aa2, size: 57 bytes, params: 1, frame: 17
this.mustEmitChanges(function(a0) {
return a0.type !== 'CONNECTION_OPEN' && a0.type !== 'VOICE_STATE_UPDATES';
});
this.waitFor(ChannelStore, MediaEngineStore, RTCConnectionStore, SelectedChannelStore);
}
function value_39502() { // fn#39502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:2752, offset: 0x010e3aa2, size: 57 bytes, params: 1, frame: 17
this.mustEmitChanges(function(a0) {
return a0.type !== 'CONNECTION_OPEN' && a0.type !== 'VOICE_STATE_UPDATES';
});
this.waitFor(ChannelStore, MediaEngineStore, RTCConnectionStore, SelectedChannelStore);
}
function value_39504(a0, a1) { // fn#39504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:2906, offset: 0x010e3adb, size: 96 bytes, params: 3, frame: 14
var since;
let value = a2;
const value2 = undefined;
const r2 = value !== value2 ? value : MediaEngineContextTypes.DEFAULT;
value = environment.__proto__;
value = env1_16.get(r2);
if (value == null) {
since = value2;
} else {
value = value.get(a0);
since = value == null ? value2 : value.since;
}
return since != null ? a1 - since : 0;
}
function value_39505() { // fn#39505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:3042, offset: 0x010e3b3b, size: 108 bytes, params: 1, frame: 15
var environment;
var r3;
let value = a0;
const value2 = undefined;
const r6 = value !== value2 ? value : MediaEngineContextTypes.DEFAULT;
const Array = global.Array;
const from = Array.from;
value = environment.__proto__;
value = env1_16.get(r6);
if (value == null) {
r3 = value2;
} else {
value = value.keys();
r3 = value;
}
r3 = r3 ?? [];
return Reflect.apply(from, Array, [r3]).filter(_fun39506);
}
function value_39507(a0) { // fn#39507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:3218, offset: 0x010e3bcd, size: 51 bytes, params: 2, frame: 15
let value = a1;
const r4 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT;
value = environment.__proto__;
const hasSpeakingFlagInContextBinding = hasSpeakingFlagInContext;
const VOICE = SpeakingFlags.VOICE;
return hasSpeakingFlagInContextBinding(r4, a0, VOICE);
}
function value_39508(a0) { // fn#39508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:3320, offset: 0x010e3c00, size: 51 bytes, params: 2, frame: 15
let value = a1;
const r4 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT;
value = environment.__proto__;
const hasSpeakingFlagInContextBinding = hasSpeakingFlagInContext;
const PRIORITY = SpeakingFlags.PRIORITY;
return hasSpeakingFlagInContextBinding(r4, a0, PRIORITY);
}
function value_39509(a0) { // fn#39509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:3422, offset: 0x010e3c33, size: 51 bytes, params: 2, frame: 15
let value = a1;
const r4 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT;
value = environment.__proto__;
const hasSpeakingFlagInContextBinding = hasSpeakingFlagInContext;
const SOUNDSHARE = SpeakingFlags.SOUNDSHARE;
return hasSpeakingFlagInContextBinding(r4, a0, SOUNDSHARE);
}
function value_39510() { // fn#39510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:3532, offset: 0x010e3c66, size: 50 bytes, params: 1, frame: 15
let value = a0;
const r4 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT;
value = environment.__proto__;
const anyoneHasFlagInContextBinding = anyoneHasFlagInContext;
const VOICE = SpeakingFlags.VOICE;
return anyoneHasFlagInContextBinding(r4, VOICE, true);
}
function value_39511() { // fn#39511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:3635, offset: 0x010e3c98, size: 59 bytes, params: 1, frame: 14
let value = a0;
const r4 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT;
value = environment.__proto__;
return env1_17 != null && this.isSpeaking(env1_17, r4);
}
function value_39513() { // fn#39513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:3792, offset: 0x010e3cd3, size: 61 bytes, params: 1, frame: 14
let value = a0;
const r3 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT;
value = environment.__proto__;
const anyoneHasFlagInContextBinding = anyoneHasFlagInContext;
const VOICE = SpeakingFlags.VOICE;
const PRIORITY = SpeakingFlags.PRIORITY;
return anyoneHasFlagInContextBinding(r3, VOICE | PRIORITY);
}
function value_39514() { // fn#39514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:3910, offset: 0x010e3d10, size: 59 bytes, params: 1, frame: 14
let value = a0;
const r4 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT;
value = environment.__proto__;
return env1_17 != null && this.isPrioritySpeaker(env1_17, r4);
}
function value_39515() { // fn#39515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:4021, offset: 0x010e3d4b, size: 78 bytes, params: 1, frame: 15
let value = a0;
const r4 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT;
value = environment.__proto__;
return env1_17 != null && this.isPrioritySpeaker(env1_17, r4) && this.isSpeaking(env1_17, r4);
}
function value_39516(a0) { // fn#39516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:4139, offset: 0x010e3d99, size: 169 bytes, params: 2, frame: 16
var voiceDb;
var r0;
let value = a1;
const value2 = undefined;
const r4 = value !== value2 ? value : MediaEngineContextTypes.DEFAULT;
value = environment.__proto__;
const config = (importDefault(4608) /* metro dependency 4608: ProportionalVadIndicatorExperiment */).getConfig({location: 'SpeakingStore'});
const enabled = config.enabled;
const value4 = -Infinity;
if (enabled) {
if (config.disableUI) {
r0 = value4;
} else {
value = env1_16.get(r4);
function value_39504(a0, a1) { // fn#39504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:2906, offset: 0x010e3adb, size: 96 bytes, params: 3, frame: 14
var since;
let value = a2;
const value2 = undefined;
const r2 = value !== value2 ? value : MediaEngineContextTypes.DEFAULT;
value = environment.__proto__;
value = env1_16.get(r2);
if (value == null) {
voiceDb = value2;
since = value2;
} else {
value = value.get(a0);
voiceDb = value == null ? value2 : value.voiceDb;
since = value == null ? value2 : value.since;
}
r0 = voiceDb ?? value4;
return since != null ? a1 - since : 0;
}
} else {
r0 = value4;
function value_39505() { // fn#39505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:3042, offset: 0x010e3b3b, size: 108 bytes, params: 1, frame: 15
var environment;
var r3;
let value = a0;
const value2 = undefined;
const r6 = value !== value2 ? value : MediaEngineContextTypes.DEFAULT;
const Array = global.Array;
const from = Array.from;
value = environment.__proto__;
value = env1_16.get(r6);
if (value == null) {
r3 = value2;
} else {
value = value.keys();
r3 = value;
}
r3 = r3 ?? [];
return Reflect.apply(from, Array, [r3]).filter(_fun39506);
function _fun39506(a0) { // fn#39506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:3149, offset: 0x010e3ba7, size: 38 bytes, params: 2, frame: 15
const hasSpeakingFlagInContextBinding = hasSpeakingFlagInContext;
const binding = env0_0;
const VOICE = SpeakingFlags.VOICE;
return hasSpeakingFlagInContextBinding(binding, a0, VOICE);
}
}
function value_39507(a0) { // fn#39507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:3218, offset: 0x010e3bcd, size: 51 bytes, params: 2, frame: 15
let value = a1;
const r4 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT;
value = environment.__proto__;
const hasSpeakingFlagInContextBinding = hasSpeakingFlagInContext;
const VOICE = SpeakingFlags.VOICE;
return hasSpeakingFlagInContextBinding(r4, a0, VOICE);
}
function value_39508(a0) { // fn#39508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:3320, offset: 0x010e3c00, size: 51 bytes, params: 2, frame: 15
let value = a1;
const r4 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT;
value = environment.__proto__;
const hasSpeakingFlagInContextBinding = hasSpeakingFlagInContext;
const PRIORITY = SpeakingFlags.PRIORITY;
return hasSpeakingFlagInContextBinding(r4, a0, PRIORITY);
}
function value_39509(a0) { // fn#39509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:3422, offset: 0x010e3c33, size: 51 bytes, params: 2, frame: 15
let value = a1;
const r4 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT;
value = environment.__proto__;
const hasSpeakingFlagInContextBinding = hasSpeakingFlagInContext;
const SOUNDSHARE = SpeakingFlags.SOUNDSHARE;
return hasSpeakingFlagInContextBinding(r4, a0, SOUNDSHARE);
}
function value_39510() { // fn#39510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:3532, offset: 0x010e3c66, size: 50 bytes, params: 1, frame: 15
let value = a0;
const r4 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT;
value = environment.__proto__;
const anyoneHasFlagInContextBinding = anyoneHasFlagInContext;
const VOICE = SpeakingFlags.VOICE;
return anyoneHasFlagInContextBinding(r4, VOICE, true);
}
function value_39511() { // fn#39511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:3635, offset: 0x010e3c98, size: 59 bytes, params: 1, frame: 14
let value = a0;
const r4 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT;
value = environment.__proto__;
return env1_17 != null && this.isSpeaking(env1_17, r4);
}
function value_39512() { // fn#39512, offset: 0x00e4253a, size: 9 bytes, params: 1, frame: 1
return env1_20;
}
function value_39513() { // fn#39513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:3792, offset: 0x010e3cd3, size: 61 bytes, params: 1, frame: 14
let value = a0;
const r3 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT;
value = environment.__proto__;
const anyoneHasFlagInContextBinding = anyoneHasFlagInContext;
const VOICE = SpeakingFlags.VOICE;
const PRIORITY = SpeakingFlags.PRIORITY;
return anyoneHasFlagInContextBinding(r3, VOICE | PRIORITY);
}
function value_39514() { // fn#39514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:3910, offset: 0x010e3d10, size: 59 bytes, params: 1, frame: 14
let value = a0;
const r4 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT;
value = environment.__proto__;
return env1_17 != null && this.isPrioritySpeaker(env1_17, r4);
}
function value_39515() { // fn#39515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:4021, offset: 0x010e3d4b, size: 78 bytes, params: 1, frame: 15
let value = a0;
const r4 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT;
value = environment.__proto__;
return env1_17 != null && this.isPrioritySpeaker(env1_17, r4) && this.isSpeaking(env1_17, r4);
}
function value_39516(a0) { // fn#39516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:4139, offset: 0x010e3d99, size: 169 bytes, params: 2, frame: 16
var voiceDb;
var r0;
let value = a1;
const value2 = undefined;
const r4 = value !== value2 ? value : MediaEngineContextTypes.DEFAULT;
value = environment.__proto__;
const config = (ProportionalVadIndicatorExperiment).getConfig({location: 'SpeakingStore'});
const enabled = config.enabled;
const value4 = -Infinity;
if (enabled) {
if (config.disableUI) {
r0 = value4;
} else {
value = env1_16.get(r4);
if (value == null) {
voiceDb = value2;
} else {
value = value.get(a0);
voiceDb = value == null ? value2 : value.voiceDb;
}
r0 = voiceDb ?? value4;
}
} else {
r0 = value4;
}
return r0;
}
}
return r0;
function SPEAKING_39517({context, userId, speakingFlags, voiceDb}) { // fn#39517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:4484, offset: 0x010e3e42, size: 269 bytes, params: 2, frame: 22
var r2;
var channelStoreBinding;
var getChannel;
var selectedChannelStoreBinding;
var value3;
var moduleValue;
var can;
var object;
let PRIORITY = SpeakingFlags.PRIORITY;
const value2 = speakingFlags & PRIORITY;
PRIORITY = SpeakingFlags.PRIORITY;
if (value2 !== PRIORITY) {
r2 = speakingFlags;
} else {
channelStoreBinding = ChannelStore;
getChannel = channelStoreBinding.getChannel;
selectedChannelStoreBinding = SelectedChannelStore;
value3 = Reflect.apply(getChannel, channelStoreBinding, [selectedChannelStoreBinding.getVoiceChannelId()]);
if (value3 == null) {
MediaEngineStore.setCanHavePriority(userId, false);
r2 = speakingFlags & ~SpeakingFlags.PRIORITY;
} else {
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
can = moduleValue.can;
object = {};
object.permission = Permissions.PRIORITY_SPEAKER;
object.user = userId;
object.context = value3;
if (Reflect.apply(can, moduleValue, [object])) {
MediaEngineStore.setCanHavePriority(userId, true);
r2 = speakingFlags;
} else {
MediaEngineStore.setCanHavePriority(userId, false);
r2 = speakingFlags & ~SpeakingFlags.PRIORITY;
}
}
}
let HIDDEN = SpeakingFlags.HIDDEN;
const value5 = r2 & HIDDEN;
HIDDEN = SpeakingFlags.HIDDEN;
r2 = value5 === HIDDEN ? 0 : r2;
return setSpeakingFlagForUserInContext(context, userId, r2, voiceDb);
}
function VOICE_STATE_UPDATES_39518({voiceStates}) { // fn#39518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:4873, offset: 0x010e3f4f, size: 32 bytes, params: 2, frame: 13
return voiceStates.reduce(_fun39519, false);
function _fun39519(a0, {userId, channelId, sessionId}) { // fn#39519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:4940, offset: 0x010e3f6f, size: 330 bytes, params: 3, frame: 19
const value = a0;
const binding = env1_19;
let r0 = userId === env1_17 && sessionId === env1_18;
env1_19 = r0 ? channelId ?? null : env1_19;
const r4 = !(binding === env1_19) && (env1_16.delete(MediaEngineContextTypes.DEFAULT) || false);
r0 = channelId == null ? userId !== env1_17 ? clearSpeakingFlagsInContext(MediaEngineContextTypes.DEFAULT,
userId) || r4 : sessionId === env1_18 ? env1_16.delete(MediaEngineContextTypes.DEFAULT) || r4 : clearSpeakingFlagsInContext(MediaEngineContextTypes.DEFAULT,
userId) || r4 : userId !== env1_17 ? userId !== env1_17 && channelId !== RTCConnectionStore.getChannelId() ? clearSpeakingFlagsInContext(MediaEngineContextTypes.DEFAULT,
userId) || r4 : r4 : sessionId !== env1_18 ? env1_16.delete(MediaEngineContextTypes.DEFAULT) || r4 : userId !== env1_17 && channelId !== RTCConnectionStore.getChannelId() ? clearSpeakingFlagsInContext(MediaEngineContextTypes.DEFAULT,
userId) || r4 : r4;
r0 = !r0 ? value : r0;
return r0;
}
}
}
function _fun39519(a0, {userId, channelId, sessionId}) { // fn#39519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:4940, offset: 0x010e3f6f, size: 330 bytes, params: 3, frame: 19
const value = a0;
const binding = env1_19;
let r0 = userId === env1_17 && sessionId === env1_18;
env1_19 = r0 ? channelId ?? null : env1_19;
const r4 = !(binding === env1_19) && (env1_16.delete(MediaEngineContextTypes.DEFAULT) || false);
r0 = channelId == null ? userId !== env1_17 ? clearSpeakingFlagsInContext(MediaEngineContextTypes.DEFAULT,
userId) || r4 : sessionId === env1_18 ? env1_16.delete(MediaEngineContextTypes.DEFAULT) || r4 : clearSpeakingFlagsInContext(MediaEngineContextTypes.DEFAULT,
userId) || r4 : userId !== env1_17 ? userId !== env1_17 && channelId !== RTCConnectionStore.getChannelId() ? clearSpeakingFlagsInContext(MediaEngineContextTypes.DEFAULT,
userId) || r4 : r4 : sessionId !== env1_18 ? env1_16.delete(MediaEngineContextTypes.DEFAULT) || r4 : userId !== env1_17 && channelId !== RTCConnectionStore.getChannelId() ? clearSpeakingFlagsInContext(MediaEngineContextTypes.DEFAULT,
userId) || r4 : r4;
r0 = !r0 ? value : r0;
return r0;
}
function _fun39506(a0) { // fn#39506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:3149, offset: 0x010e3ba7, size: 38 bytes, params: 2, frame: 15
const hasSpeakingFlagInContextBinding = hasSpeakingFlagInContext;
const binding = env0_0;
const VOICE = SpeakingFlags.VOICE;
return hasSpeakingFlagInContextBinding(binding, a0, VOICE);
function _fun39503(a0) { // fn#39503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4785:2785, offset: 0x00eef690, size: 34 bytes, params: 2, frame: 3
return a0.type !== 'CONNECTION_OPEN' && a0.type !== 'VOICE_STATE_UPDATES';
}
global.__d(_fun39488, 4607, [6, 7, 15, 17, 18, 57, 1379, 4259, 4294, 1934, 661, 4291, 3789, 4608, 566, 694,
2]) /* metro module 4607, dependencies: [6, 7, 15, 17, 18, 57, 1379, 4259, 4294, 1934, 661, 4291, 3789, 4608, 566, 694, 2] */;
+98 -80
View File
@@ -1,14 +1,18 @@
/* Metro module 12604; source: stores/StatusPageStore.tsx; dependencies: [6, 7, 15, 17, 18, 587, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as StorageModule from '../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */
function _fun96691(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12794:6, offset: 0x021638b5, size: 329 bytes, params: 8, frame: 19
const env0_0 = require;
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 Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun96695(Store);
value.displayName = 'MaintenanceStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
@@ -18,82 +22,96 @@ function _fun96691(global, require, importDefault, importAll, module, exports, d
}, STATUS_PAGE_SCHEDULED_MAINTENANCE: function(a0) {
env0_8 = a0.maintenance;
}, STATUS_PAGE_SCHEDULED_MAINTENANCE_ACK: STATUS_PAGE_SCHEDULED_MAINTENANCE_ACK});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/StatusPageStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/StatusPageStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_96692() { // fn#96692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12794:148, offset: 0x021639fe, 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_96692_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun96695(a0) { // fn#96695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12794:393, offset: 0x02163a60, size: 126 bytes, params: 2, frame: 16
const closure = MaintenanceStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
var Storage = require(dependencyMap[5]).Storage;
env1_9 = Storage.get('MaintenanceStore');
}}, {key: 'getIncident', value: value_96698}, {key: 'getScheduledMaintenance', value: value_96699}]);
}
function STATUS_PAGE_SCHEDULED_MAINTENANCE_ACK() { // fn#96703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12794:1329, offset: 0x02163be0, size: 81 bytes, params: 1, frame: 14
if (env0_8 == null) {
return false;
}
env0_9 = env0_8.id;
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
Storage.set('MaintenanceStore', env0_9);
}
function value_96699() { // fn#96699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12794:825, offset: 0x02163b13, size: 161 bytes, params: 1, frame: 15
var r0;
var Date;
var value4;
var date;
const binding = env1_8;
const value2 = null;
const value3 = undefined;
const scheduled_until = value2 == binding ? value3 : binding.scheduled_until;
if (value2 != env1_8) {
if (env1_8.id === env1_9) {
r0 = value2;
} else if (value2 == (value2 != scheduled_until ? scheduled_until : value2 == env1_8 ? value3 : env1_8.scheduled_for)) {
r0 = env1_8;
} else {
Date = global.Date;
value4 = Date.now();
Date = global.Date;
date = new Date();
r0 = value4 < date.getTime() ? env1_8 : value2;
function _isNativeReflectConstruct_96692() { // fn#96692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12794:148, offset: 0x021639fe, 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) {
}
} else {
r0 = value2;
return (_isNativeReflectConstruct_96692_isNativeReflectConstruct = function() {
return !!result;
})();
}
return r0;
function _fun96695(a0) { // fn#96695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12794:393, offset: 0x02163a60, size: 126 bytes, params: 2, frame: 16
const MaintenanceStore2 = MaintenanceStore;
Inherits(MaintenanceStore2, a0);
return CreateClass(MaintenanceStore2, [{key: 'initialize', value: function() {
var Storage = require(dependencyMap[5]).Storage;
env1_9 = Storage.get('MaintenanceStore');
}}, {key: 'getIncident', value: value_96698}, {key: 'getScheduledMaintenance', value: value_96699}]);
function MaintenanceStore() { // fn#96696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12794:405, offset: 0x00ec62ac, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, MaintenanceStore);
const value3 = env1_5(MaintenanceStore);
return env1_4(this, _isNativeReflectConstruct_96692() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_96698() { // fn#96698, offset: 0x00fbd9cb, size: 9 bytes, params: 1, frame: 1
return env1_7;
}
function value_96699() { // fn#96699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12794:825, offset: 0x02163b13, size: 161 bytes, params: 1, frame: 15
var r0;
var Date;
var value4;
var date;
const binding = env1_8;
const value2 = null;
const value3 = undefined;
const scheduled_until = value2 == binding ? value3 : binding.scheduled_until;
if (value2 != env1_8) {
if (env1_8.id === env1_9) {
r0 = value2;
} else if (value2 == (value2 != scheduled_until ? scheduled_until : value2 == env1_8 ? value3 : env1_8.scheduled_for)) {
r0 = env1_8;
} else {
Date = global.Date;
value4 = Date.now();
Date = global.Date;
date = new Date();
r0 = value4 < date.getTime() ? env1_8 : value2;
}
} else {
r0 = value2;
}
return r0;
}
}
function STATUS_PAGE_SCHEDULED_MAINTENANCE_ACK() { // fn#96703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12794:1329, offset: 0x02163be0, size: 81 bytes, params: 1, frame: 14
if (env0_8 == null) {
return false;
}
id = env0_8.id;
const Storage = (StorageModule).Storage;
Storage.set('MaintenanceStore', id);
}
}
global.__d(_fun96691, 12604, [6, 7, 15, 17, 18, 587, 566, 694,
2]) /* metro module 12604, dependencies: [6, 7, 15, 17, 18, 587, 566, 694, 2] */;
+456 -429
View File
@@ -1,4 +1,23 @@
/* Metro module 4395; source: stores/StreamRTCConnectionStore.tsx; dependencies: [6, 7, 15, 17, 18, 4266, 1226, 4259, 4396, 4294, 661, 4286, 44, 4398, 22, 4285, 7128, 694, 4406, 477, 12381, 566, 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 Module00022 from '../by-id/module-00022.js'; /* Metro dependency 22 */
import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import Dispatcher from '../Dispatcher.tsx'; /* Metro dependency 694 */
import AuthenticationStore from './AuthenticationStore.tsx'; /* Metro dependency 1226 */
import MediaEngineStore from './MediaEngineStore.tsx'; /* Metro dependency 4259 */
import RunningGameStoreNative from '../modules/game_detection/RunningGameStore.native.tsx'; /* Metro dependency 4266 */
import RTCConnectionStore from './RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import PresenceStore from './PresenceStore.tsx'; /* Metro dependency 4396 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as StreamKeyUtilsModule from '../modules/go_live/utils/StreamKeyUtils.tsx'; /* Metro dependency 4285 */
import * as ConstantsModule2 from '../modules/go_live/Constants.tsx'; /* Metro dependency 4286 */
import * as MediaEngineModule from '../external/discord_common/js/packages/media-engine/index.tsx'; /* Metro dependency 4406 */
function _fun37208(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#37208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:6, offset: 0x0109e9a8, size: 636 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = function() {
@@ -6,20 +25,7 @@ function _fun37208(global, require, importDefault, importAll, module, exports, d
};
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 runningGameStoreNative = importDefault(4266) /* metro dependency 4266: RunningGameStoreNative */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_14 = constantsModule.RTCConnectionQuality;
const StreamLayouts = constantsModule.StreamLayouts;
const env0_15 = (require(4286) /* metro dependency 4286: Constants */).StreamTypes;
const StreamLayouts = ConstantsModule.StreamLayouts;
const env0_16 = {};
const env0_17 = {};
const env0_18 = {};
@@ -28,11 +34,11 @@ function _fun37208(global, require, importDefault, importAll, module, exports, d
const env0_21 = {};
const env0_22 = StreamLayouts.PORTRAIT;
const env0_23 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
const value3 = _fun37216(Store);
value3.displayName = 'StreamRTCConnectionStore';
const value5 = new value3(importDefault(694) /* metro dependency 694: Dispatcher */,
mediaEngineStore.isSupported() ? {CONNECTION_OPEN: function(a0) {
MediaEngineStore.isSupported() ? {CONNECTION_OPEN: function(a0) {
env0_3 = a0.sessionId;
destroyStreamRTCConnections();
}, CONNECTION_CLOSED: function() {
@@ -44,447 +50,468 @@ function _fun37208(global, require, importDefault, importAll, module, exports, d
STREAM_START: STREAM_START_37241, STREAM_STOP: STREAM_STOP_37243, STREAM_CREATE: STREAM_CREATE,
STREAM_SERVER_UPDATE: STREAM_SERVER_UPDATE, STREAM_UPDATE: STREAM_UPDATE_37247, STREAM_DELETE: STREAM_DELETE,
STREAM_LAYOUT_UPDATE: STREAM_LAYOUT_UPDATE, VIDEO_SIZE_UPDATE: VIDEO_SIZE_UPDATE_37251} : {});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/StreamRTCConnectionStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/StreamRTCConnectionStore.tsx');
exports.default = value5;
}
function _isNativeReflectConstruct_37209() { // fn#37209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:277, offset: 0x0109ec24, 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_37209_isNativeReflectConstruct = function() {
return !!result;
})();
}
function destroyStreamRTCConnections() { // fn#37212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:522, offset: 0x0109ec82, size: 49 bytes, params: 1, frame: 14
const defaultImport = importDefault(22) /* metro dependency 22 */;
defaultImport.forEach(env0_23, _fun37213);
}
function parseSourceType(a0) { // fn#37215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:715, offset: 0x0109ecf0, size: 252 bytes, params: 2, frame: 15
var startsWith;
if (a0 == null) {
return 'unknown';
}
const value = undefined;
if ((require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded) {
startsWith = a0.startsWith;
if (Reflect.apply(startsWith, a0, ['web-contents-media-stream:'])) {
return 'tab';
function _isNativeReflectConstruct_37209() { // fn#37209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:277, offset: 0x0109ec24, 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) {
}
startsWith = a0.startsWith;
if (Reflect.apply(startsWith, a0, ['window:'])) {
return 'window';
}
startsWith = a0.startsWith;
if (Reflect.apply(startsWith, a0, ['screen:'])) {
return 'screen';
}
return 'unknown';
return (_isNativeReflectConstruct_37209_isNativeReflectConstruct = function() {
return !!result;
})();
}
let platform = global.platform;
if ((platform == null ? value : platform.name) === 'Chrome') {
startsWith = a0.startsWith;
if (Reflect.apply(startsWith, a0, ['web-contents-media-stream:'])) {
return 'tab';
}
startsWith = a0.startsWith;
if (Reflect.apply(startsWith, a0, ['window:'])) {
return 'window';
}
startsWith = a0.startsWith;
if (Reflect.apply(startsWith, a0, ['screen:'])) {
return 'screen';
}
return 'unknown';
}
platform = global.platform;
if ((platform == null ? value : platform.name) === 'Firefox') {
return a0 === '' ? 'screen' : 'window';
}
platform = global.platform;
if ((platform == null ? value : platform.name) !== 'Safari') {
return 'unknown';
}
return 'window';
}
function _fun37216(a0) { // fn#37216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:1173, offset: 0x0109edec, size: 440 bytes, params: 2, frame: 16
const closure = StreamRTCConnectionStore;
env0_8(closure, a0);
return env0_5(closure, [{key: 'initialize', value: function() {
this.waitFor(AuthenticationStore, MediaEngineStore, RTCConnectionStore, RunningGameStoreNative);
}}, {key: 'getRTCConnections', value: value_37219}, {key: 'getAllActiveStreamKeys', value: value_37220},
{key: 'getRTCConnection', value: value_37221}, {key: 'getQuality', value: value_37222},
{key: 'getMediaSessionId', value: value_37223}, {key: 'getRtcConnectionId', value: value_37224},
{key: 'getVideoStats', value: value_37225}, {key: 'getHostname', value: value_37226}, {key: 'getRegion',
value: value_37227}, {key: 'getMaxViewers', value: value_37228}, {key: 'getStreamSourceId', value: value_37229},
{key: 'getLastNonZeroRemoteVideoSinkWantsTime', value: value_37230}, {key: 'getUserIds', value: value_37231},
{key: 'isUserConnected', value: value_37232}, {key: 'getSecureFramesState', value: value_37233},
{key: 'getSecureFramesRosterMapEntry', value: value_37234}]);
}
function destroyStreamRTCConnections() { // fn#37212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:522, offset: 0x0109ec82, size: 49 bytes, params: 1, frame: 14
const defaultImport = Module00022;
defaultImport.forEach(env0_23, _fun37213);
function _fun37213(a0, a1) { // fn#37213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:581, offset: 0x0109ecb3, size: 61 bytes, params: 3, frame: 13
a0.destroy(a0.isOwner ? 'sender-disconnect' : 'receiver-disconnect');
value = environment.__proto__;
delete env1_23[a1];
delete env1_21[a1];
}
function RTC_CONNECTION_UPDATE_ID_37237(a0) { // fn#37237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:3586, offset: 0x0109f2da, size: 57 bytes, params: 2, frame: 14
const env0_0 = a0;
const defaultImport = importDefault(22) /* metro dependency 22 */;
return defaultImport.some(env0_23, _fun37238);
}
}
function RTC_CONNECTION_REMOTE_VIDEO_SINK_WANTS_37239({context, wants, userId, guildId, channelId}) { // fn#37239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:3764, offset: 0x0109f329, size: 243 bytes, params: 2, frame: 21
var r1;
var value7;
var binding;
var performance;
let value3 = (require(4285) /* metro dependency 4285: StreamKeyUtils */).encodeStreamKey({streamType: guildId == null ? StreamTypes.CALL : StreamTypes.GUILD,
guildId: guildId, channelId: channelId, ownerId: userId});
const MediaEngineContextTypes = (require(4406) /* metro dependency 4406: mediaEngine */).MediaEngineContextTypes;
const STREAM = MediaEngineContextTypes.STREAM;
let r0 = context === STREAM && env0_23[value3] != null;
if (r0) {
value7 = global.Object.entries(wants).some(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;
function parseSourceType(a0) { // fn#37215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:715, offset: 0x0109ecf0, size: 252 bytes, params: 2, frame: 15
var startsWith;
if (a0 == null) {
return 'unknown';
}
const value = undefined;
if ((require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded) {
startsWith = a0.startsWith;
if (Reflect.apply(startsWith, a0, ['web-contents-media-stream:'])) {
return 'tab';
}
startsWith = a0.startsWith;
if (Reflect.apply(startsWith, a0, ['window:'])) {
return 'window';
}
startsWith = a0.startsWith;
if (Reflect.apply(startsWith, a0, ['screen:'])) {
return 'screen';
}
return 'unknown';
}
let platform = global.platform;
if ((platform == null ? value : platform.name) === 'Chrome') {
startsWith = a0.startsWith;
if (Reflect.apply(startsWith, a0, ['web-contents-media-stream:'])) {
return 'tab';
}
startsWith = a0.startsWith;
if (Reflect.apply(startsWith, a0, ['window:'])) {
return 'window';
}
startsWith = a0.startsWith;
if (Reflect.apply(startsWith, a0, ['screen:'])) {
return 'screen';
}
return 'unknown';
}
platform = global.platform;
if ((platform == null ? value : platform.name) === 'Firefox') {
return a0 === '' ? 'screen' : 'window';
}
platform = global.platform;
if ((platform == null ? value : platform.name) !== 'Safari') {
return 'unknown';
}
return 'window';
}
function _fun37216(a0) { // fn#37216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:1173, offset: 0x0109edec, size: 440 bytes, params: 2, frame: 16
const StreamRTCConnectionStore2 = StreamRTCConnectionStore;
Inherits(StreamRTCConnectionStore2, a0);
return CreateClass(StreamRTCConnectionStore2, [{key: 'initialize', value: function() {
this.waitFor(AuthenticationStore, MediaEngineStore, RTCConnectionStore, RunningGameStoreNative);
}}, {key: 'getRTCConnections', value: value_37219}, {key: 'getAllActiveStreamKeys', value: value_37220},
{key: 'getRTCConnection', value: value_37221}, {key: 'getQuality', value: value_37222},
{key: 'getMediaSessionId', value: value_37223}, {key: 'getRtcConnectionId', value: value_37224},
{key: 'getVideoStats', value: value_37225}, {key: 'getHostname', value: value_37226}, {key: 'getRegion',
value: value_37227}, {key: 'getMaxViewers', value: value_37228}, {key: 'getStreamSourceId', value: value_37229},
{key: 'getLastNonZeroRemoteVideoSinkWantsTime', value: value_37230}, {key: 'getUserIds', value: value_37231},
{key: 'isUserConnected', value: value_37232}, {key: 'getSecureFramesState', value: value_37233},
{key: 'getSecureFramesRosterMapEntry', value: value_37234}]);
function StreamRTCConnectionStore() { // fn#37217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:1185, offset: 0x0109efa4, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_4(this, StreamRTCConnectionStore);
const value3 = env1_7(StreamRTCConnectionStore);
return env1_6(this, _isNativeReflectConstruct_37209() ? global.Reflect.construct(value3, arguments,
env1_7(this).constructor) : value3.apply(this, arguments));
}
function value_37219() { // fn#37219, offset: 0x00df3ac4, size: 9 bytes, params: 1, frame: 1
return env1_23;
}
function value_37220() { // fn#37220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:1647, offset: 0x0109f03c, size: 27 bytes, params: 1, frame: 11
const Object = global.Object;
return Object.keys(env1_23);
}
function value_37221(a0) { // fn#37221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:1712, offset: 0x0109f057, size: 16 bytes, params: 2, frame: 2
return env1_23[a0];
}
function value_37222(a0) { // fn#37222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:1762, offset: 0x0109f067, size: 85 bytes, params: 2, frame: 13
return (importDefault(12381) /* metro dependency 12381: canSpectate */)(MediaEngineStore) ? a0 == null ? RTCConnectionQuality.UNKNOWN : env1_23[a0]?.quality ?? RTCConnectionQuality.UNKNOWN : RTCConnectionQuality.UNKNOWN;
}
function value_37223(a0) { // fn#37223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:1898, offset: 0x0109f0bc, size: 55 bytes, params: 2, frame: 12
const value = null;
if (value == a0) {
return value;
}
const property = env1_23[a0];
return value != property ? value != property ? property.getMediaSessionId() : value : undefined;
}
function value_37224(a0) { // fn#37224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:2035, offset: 0x0109f0f3, size: 55 bytes, params: 2, frame: 12
const value = null;
if (value == a0) {
return value;
}
const property = env1_23[a0];
return value != property ? value != property ? property.getRTCConnectionId() : value : undefined;
}
function value_37225(a0) { // fn#37225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:2168, offset: 0x0109f12a, size: 43 bytes, params: 2, frame: 11
const value = null;
if (value == a0) {
return value;
}
const property = env1_23[a0];
return value != property ? property.getVideoStats() : value;
}
function value_37226(a0) { // fn#37226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:2279, offset: 0x0109f155, size: 64 bytes, params: 2, frame: 5
if (a0 == null) {
return '';
}
const value = environment.__proto__;
const property = env1_23[a0];
return property != null && property.hostname != null ? property.hostname : '';
}
function value_37227(a0) { // fn#37227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:2394, offset: 0x0109f195, size: 43 bytes, params: 2, frame: 11
const value = null;
if (value == a0) {
return value;
}
const property = env1_23[a0];
return value != property ? property.getRegion() : value;
}
function value_37228(a0) { // fn#37228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:2503, offset: 0x0109f1c0, size: 43 bytes, params: 2, frame: 11
const value = null;
if (value == a0) {
return value;
}
const property = env1_23[a0];
return value != property ? property.getMaxViewers() : value;
}
function value_37229(a0) { // fn#37229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:2620, offset: 0x0109f1eb, size: 16 bytes, params: 2, frame: 2
return env1_19[a0];
}
function value_37230(a0) { // fn#37230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:2698, offset: 0x01080378, size: 16 bytes, params: 2, frame: 2
return env1_21[a0];
}
function value_37231(a0) { // fn#37231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:2748, offset: 0x0109f1fb, size: 37 bytes, params: 2, frame: 10
const value = environment.__proto__;
return env1_23[a0]?.getUserIds();
}
function value_37232(a0, a1) { // fn#37232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:2839, offset: 0x0109f220, size: 41 bytes, params: 3, frame: 12
const value = environment.__proto__;
return env1_23[a0]?.getIsUserConnected(a1);
}
function value_37233(a0) { // fn#37233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:2946, offset: 0x0109f249, size: 37 bytes, params: 2, frame: 10
const value = environment.__proto__;
return env1_23[a0]?.getSecureFramesState();
}
function value_37234(a0, a1) { // fn#37234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:3061, offset: 0x0109f26e, size: 59 bytes, params: 3, frame: 13
let value = environment.__proto__;
const property = env1_23[a0];
value = undefined;
const r3 = property == null ? value : property.getSecureFramesRosterMap();
return r3 == null ? value : r3.get(a1);
}
}
function RTC_CONNECTION_UPDATE_ID_37237(a0) { // fn#37237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:3586, offset: 0x0109f2da, size: 57 bytes, params: 2, frame: 14
const env0_0 = a0;
const defaultImport = Module00022;
return defaultImport.some(env0_23, _fun37238);
function _fun37238(a0) { // fn#37238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:3650, offset: 0x0109f313, size: 22 bytes, params: 2, frame: 2
return a0 === env0_0.connection;
}
}
function RTC_CONNECTION_REMOTE_VIDEO_SINK_WANTS_37239({context, wants, userId, guildId, channelId}) { // fn#37239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:3764, offset: 0x0109f329, size: 243 bytes, params: 2, frame: 21
var r1;
var value7;
var binding;
var performance;
let value3 = (require(4285) /* metro dependency 4285: StreamKeyUtils */).encodeStreamKey({streamType: guildId == null ? StreamTypes.CALL : StreamTypes.GUILD,
guildId: guildId, channelId: channelId, ownerId: userId});
const MediaEngineContextTypes = (MediaEngineModule).MediaEngineContextTypes;
const STREAM = MediaEngineContextTypes.STREAM;
let r0 = context === STREAM && env0_23[value3] != null;
if (r0) {
value7 = global.Object.entries(wants).some(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 = value3;
r3 = value2;
} else {
r0 = item3;
r2 = item;
r3 = value3;
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 !== 'any' && r2 !== 0;
});
if (value7) {
binding = env0_21;
performance = global.performance;
binding[value3] = performance.now();
r1 = undefined;
} else {
r1 = !!value7;
}
if (!r3) {
r0.return();
r0 = r1;
}
return r0;
}
function STREAM_START_37241({streamType, guildId, channelId, appContext, pid, sourceId, sourcePid, nativePickerStyleUsed, goLiveModalDurationMs, analyticsLocations}) { // fn#37241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:4129, offset: 0x0109f41c, size: 415 bytes, params: 2, frame: 25
var property;
var gameForPID;
const encodeStreamKey = StreamKeyUtilsModule.encodeStreamKey;
const object = {streamType: streamType, guildId: guildId, channelId: channelId};
object.ownerId = AuthenticationStore.getId();
const value2 = Reflect.apply(encodeStreamKey, StreamKeyUtilsModule, [object]);
env0_16[value2] = {appContext: appContext, analyticsLocations: analyticsLocations};
const defaultImport = Module00022;
defaultImport.forEach(env0_23, function({analyticsContext, isOwner}) {
analyticsContext.setActionContext(appContext);
analyticsContext.setNativePickerStyleUsed(nativePickerStyleUsed);
if (isOwner) {
analyticsContext.trackStart();
}
return r1 !== 'any' && r2 !== 0;
});
if (value7) {
binding = env0_21;
performance = global.performance;
binding[value3] = performance.now();
r1 = undefined;
const r7 = pid ?? sourcePid;
env0_19[value2] = sourceId;
env0_18[value2] = r7;
if (r7 != null) {
gameForPID = RunningGameStoreNative.getGameForPID(r7);
if (gameForPID != null) {
env0_17[value2] = {name: gameForPID.name, id: gameForPID.id, exe: gameForPID.exeName,
distributor: gameForPID.distributor, sku: gameForPID.sku, gameMetadata: gameForPID.gameMetadata};
}
property = env0_23[value2];
if (property != null) {
property.analyticsContext.updateStreamApplication(env0_17[value2]);
}
} else {
r1 = !!value7;
property = env0_23[value2];
if (property != null) {
property.analyticsContext.updateStreamApplication(null);
}
}
r0 = r1;
}
return r0;
}
function STREAM_START_37241({streamType, guildId, channelId, appContext, pid, sourceId, sourcePid, nativePickerStyleUsed, goLiveModalDurationMs, analyticsLocations}) { // fn#37241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:4129, offset: 0x0109f41c, size: 415 bytes, params: 2, frame: 25
var property;
var gameForPID;
const streamKeyUtilsModule = require(4285) /* metro dependency 4285: StreamKeyUtils */;
const encodeStreamKey = streamKeyUtilsModule.encodeStreamKey;
const object2 = {streamType: streamType, guildId: guildId, channelId: channelId};
object2.ownerId = AuthenticationStore.getId();
const value2 = Reflect.apply(encodeStreamKey, streamKeyUtilsModule, [object2]);
env0_16[value2] = {appContext: appContext, analyticsLocations: analyticsLocations};
const defaultImport = importDefault(22) /* metro dependency 22 */;
defaultImport.forEach(env0_23, function({analyticsContext, isOwner}) {
analyticsContext.setActionContext(appContext);
analyticsContext.setNativePickerStyleUsed(nativePickerStyleUsed);
if (isOwner) {
analyticsContext.trackStart();
}
});
const r7 = pid ?? sourcePid;
env0_19[value2] = sourceId;
env0_18[value2] = r7;
if (r7 != null) {
gameForPID = RunningGameStoreNative.getGameForPID(r7);
if (gameForPID != null) {
env0_17[value2] = {name: gameForPID.name, id: gameForPID.id, exe: gameForPID.exeName,
distributor: gameForPID.distributor, sku: gameForPID.sku, gameMetadata: gameForPID.gameMetadata};
}
property = env0_23[value2];
if (property != null) {
property.analyticsContext.updateStreamApplication(env0_17[value2]);
}
} else {
property = env0_23[value2];
if (property != null) {
property.analyticsContext.updateStreamApplication(null);
if (goLiveModalDurationMs != null) {
env0_20[value2] = goLiveModalDurationMs;
} else {
delete env0_20[value2];
}
}
if (goLiveModalDurationMs != null) {
env0_20[value2] = goLiveModalDurationMs;
} else {
delete env0_20[value2];
}
}
function STREAM_STOP_37243({appContext, streamKey}) { // fn#37243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:4926, offset: 0x0109f600, size: 114 bytes, params: 2, frame: 16
env0_16[streamKey] = {appContext: appContext, analyticsLocations: undefined};
const defaultImport = importDefault(22) /* metro dependency 22 */;
defaultImport.forEach(env0_23, function({analyticsContext, isOwner}) {
analyticsContext.setActionContext(appContext);
if (isOwner) {
analyticsContext.trackEnd();
function STREAM_STOP_37243({appContext, streamKey}) { // fn#37243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:4926, offset: 0x0109f600, size: 114 bytes, params: 2, frame: 16
env0_16[streamKey] = {appContext: appContext, analyticsLocations: undefined};
const defaultImport = Module00022;
defaultImport.forEach(env0_23, function({analyticsContext, isOwner}) {
analyticsContext.setActionContext(appContext);
if (isOwner) {
analyticsContext.trackEnd();
}
});
env0_19[streamKey] = null;
env0_18[streamKey] = null;
delete env0_20[streamKey];
}
function STREAM_CREATE({streamKey, rtcServerId, rtcChannelId, region, viewerIds}) { // fn#37245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:5169, offset: 0x0109f6a6, size: 577 bytes, params: 2, frame: 23
var r5;
var binding;
var moduleValue2;
var StreamRTCAnalyticsContext;
var object;
var prototype;
var value9;
var streamRTCAnalyticsContext;
var value10;
var defaultImport2;
var value11;
var defaultImport22;
var value13;
let property = env0_23[streamKey];
if (property == null && rtcServerId != null) {
if (env0_18[streamKey] == null) {
env0_17[streamKey] = null;
}
if (env0_17[streamKey] == null && env0_19[streamKey] == null) {
binding = env0_17;
moduleValue2 = require(7128) /* metro dependency 7128: StreamerApplicationSelectors */;
binding[streamKey] = moduleValue2.getStreamerApplication((require(4285) /* metro dependency 4285: StreamKeyUtils */).decodeStreamKey(streamKey),
PresenceStore);
}
StreamRTCAnalyticsContext = (require(4398) /* metro dependency 4398: StreamRTCConnection */).StreamRTCAnalyticsContext;
object = {streamRegion: region, streamApplication: env0_17[streamKey]};
object.streamSourceType = parseSourceType(env0_19[streamKey]);
property = env0_16[streamKey];
object.actionContext = property?.appContext;
object.numViewers = viewerIds != null ? viewerIds.length : 0;
object.goLiveModalDurationMs = env0_20[streamKey];
property = env0_16[streamKey];
object.analyticsLocations = property?.analyticsLocations;
prototype = StreamRTCAnalyticsContext.prototype;
value9 = Object.create(prototype, {constructor: {value: StreamRTCAnalyticsContext}});
streamRTCAnalyticsContext = new StreamRTCAnalyticsContext();
value10 = streamRTCAnalyticsContext instanceof Object ? streamRTCAnalyticsContext : value9;
(importDefault(44) /* metro dependency 44 */)(env0_3 != null, 'Creating RTCConnection without session.');
defaultImport2 = importDefault(4398) /* metro dependency 4398: StreamRTCConnection */;
object = {sessionId: env0_3, streamKey: streamKey, serverId: rtcServerId, channelId: rtcChannelId};
object.initialLayout = PORTRAIT;
object.analyticsContext = value10;
object.parentMediaSessionId = RTCConnectionStore.getMediaSessionId();
prototype = defaultImport2.prototype;
value11 = Object.create(prototype, {constructor: {value: defaultImport2}});
defaultImport22 = new defaultImport2();
value13 = defaultImport22 instanceof Object ? defaultImport22 : value11;
env0_23[streamKey] = value13;
r5 = value13;
} else {
r5 = property;
}
});
env0_19[streamKey] = null;
env0_18[streamKey] = null;
delete env0_20[streamKey];
}
delete env0_21[streamKey];
const dispatch = Dispatcher.dispatch;
object = {type: 'MEDIA_ENGINE_CONNECTION_STATS_HISTORY_RESET'};
object.mediaEngineConnectionId = r5.getMediaEngineConnectionId();
Reflect.apply(dispatch, Dispatcher, [object]);
}
function STREAM_CREATE({streamKey, rtcServerId, rtcChannelId, region, viewerIds}) { // fn#37245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:5169, offset: 0x0109f6a6, size: 577 bytes, params: 2, frame: 23
var r5;
var binding;
var moduleValue2;
var StreamRTCAnalyticsContext;
var object2;
var prototype;
var value9;
var streamRTCAnalyticsContext;
var value10;
var defaultImport2;
var value11;
var defaultImport22;
var value13;
let property = env0_23[streamKey];
if (property == null && rtcServerId != null) {
if (env0_18[streamKey] == null) {
env0_17[streamKey] = null;
function STREAM_SERVER_UPDATE({streamKey, endpoint, token}) { // fn#37246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:6132, offset: 0x0109f8e7, size: 58 bytes, params: 2, frame: 13
const property = env0_23[streamKey];
if (property == null) {
return false;
}
if (env0_17[streamKey] == null && env0_19[streamKey] == null) {
binding = env0_17;
moduleValue2 = require(7128) /* metro dependency 7128: StreamerApplicationSelectors */;
binding[streamKey] = moduleValue2.getStreamerApplication((require(4285) /* metro dependency 4285: StreamKeyUtils */).decodeStreamKey(streamKey),
PresenceStore);
property.connect(endpoint, token);
}
function STREAM_UPDATE_37247({streamKey, viewerIds, paused}) { // fn#37247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:6255, offset: 0x0109f921, size: 87 bytes, params: 2, frame: 13
var analyticsContext;
const property = env0_23[streamKey];
if (property == null) {
return false;
}
StreamRTCAnalyticsContext = (require(4398) /* metro dependency 4398: StreamRTCConnection */).StreamRTCAnalyticsContext;
object2 = {streamRegion: region, streamApplication: env0_17[streamKey]};
object2.streamSourceType = parseSourceType(env0_19[streamKey]);
property = env0_16[streamKey];
object2.actionContext = property?.appContext;
object2.numViewers = viewerIds != null ? viewerIds.length : 0;
object2.goLiveModalDurationMs = env0_20[streamKey];
property = env0_16[streamKey];
object2.analyticsLocations = property?.analyticsLocations;
prototype = StreamRTCAnalyticsContext.prototype;
value9 = Object.create(prototype, {constructor: {value: StreamRTCAnalyticsContext}});
streamRTCAnalyticsContext = new StreamRTCAnalyticsContext();
value10 = streamRTCAnalyticsContext instanceof Object ? streamRTCAnalyticsContext : value9;
(importDefault(44) /* metro dependency 44 */)(env0_3 != null, 'Creating RTCConnection without session.');
defaultImport2 = importDefault(4398) /* metro dependency 4398: StreamRTCConnection */;
object2 = {sessionId: env0_3, streamKey: streamKey, serverId: rtcServerId, channelId: rtcChannelId};
object2.initialLayout = PORTRAIT;
object2.analyticsContext = value10;
object2.parentMediaSessionId = RTCConnectionStore.getMediaSessionId();
prototype = defaultImport2.prototype;
value11 = Object.create(prototype, {constructor: {value: defaultImport2}});
defaultImport22 = new defaultImport2();
value13 = defaultImport22 instanceof Object ? defaultImport22 : value11;
env0_23[streamKey] = value13;
r5 = value13;
} else {
r5 = property;
if (viewerIds != null) {
analyticsContext = property.analyticsContext;
analyticsContext.trackViewerCount(viewerIds.length);
}
property.streamUpdate(paused);
}
delete env0_21[streamKey];
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
const dispatch = dispatcher.dispatch;
object2 = {type: 'MEDIA_ENGINE_CONNECTION_STATS_HISTORY_RESET'};
object2.mediaEngineConnectionId = r5.getMediaEngineConnectionId();
Reflect.apply(dispatch, dispatcher, [object2]);
}
function STREAM_SERVER_UPDATE({streamKey, endpoint, token}) { // fn#37246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:6132, offset: 0x0109f8e7, size: 58 bytes, params: 2, frame: 13
const property = env0_23[streamKey];
if (property == null) {
return false;
function STREAM_DELETE({streamKey}) { // fn#37248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:6438, offset: 0x0109f978, size: 116 bytes, params: 2, frame: 16
const property = env0_23[streamKey];
if (property == null) {
return false;
}
const defaultImport = Dispatcher;
const dispatch = defaultImport.dispatch;
const object = {type: 'MEDIA_ENGINE_CONNECTION_STATS_HISTORY_RESET'};
object.mediaEngineConnectionId = property.getMediaEngineConnectionId();
Reflect.apply(dispatch, defaultImport, [object]);
property.destroy('stream-end');
delete env0_23[streamKey];
}
property.connect(endpoint, token);
}
function STREAM_UPDATE_37247({streamKey, viewerIds, paused}) { // fn#37247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:6255, offset: 0x0109f921, size: 87 bytes, params: 2, frame: 13
var analyticsContext;
const property = env0_23[streamKey];
if (property == null) {
return false;
function STREAM_LAYOUT_UPDATE({layout}) { // fn#37249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:6697, offset: 0x0109f9ec, size: 63 bytes, params: 2, frame: 12
const Object = global.Object;
Object.values(env0_23).forEach(function(a0) {
return a0.layoutChange(layout);
});
}
if (viewerIds != null) {
analyticsContext = property.analyticsContext;
analyticsContext.trackViewerCount(viewerIds.length);
}
property.streamUpdate(paused);
}
function STREAM_DELETE({streamKey}) { // fn#37248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:6438, offset: 0x0109f978, size: 116 bytes, params: 2, frame: 16
const property = env0_23[streamKey];
if (property == null) {
return false;
}
const defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
const dispatch = defaultImport.dispatch;
const object2 = {type: 'MEDIA_ENGINE_CONNECTION_STATS_HISTORY_RESET'};
object2.mediaEngineConnectionId = property.getMediaEngineConnectionId();
Reflect.apply(dispatch, defaultImport, [object2]);
property.destroy('stream-end');
delete env0_23[streamKey];
}
function VIDEO_SIZE_UPDATE_37251({streamId, dimensions, zoom}) { // fn#37251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:6809, offset: 0x0109fa42, size: 82 bytes, params: 2, frame: 14
const defaultImport = Module00022;
defaultImport.forEach(env0_23, _fun37252);
function _fun37252(a0) { // fn#37252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:6894, offset: 0x0109fa94, size: 41 bytes, params: 2, frame: 15
if (a0 != null) {
a0.setVideoSize(streamId, dimensions, zoom);
}
}
function STREAM_LAYOUT_UPDATE({layout}) { // fn#37249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:6697, offset: 0x0109f9ec, size: 63 bytes, params: 2, frame: 12
const Object = global.Object;
Object.values(env0_23).forEach(function(a0) {
return a0.layoutChange(layout);
});
}
function VIDEO_SIZE_UPDATE_37251({streamId, dimensions, zoom}) { // fn#37251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:6809, offset: 0x0109fa42, size: 82 bytes, params: 2, frame: 14
const defaultImport = importDefault(22) /* metro dependency 22 */;
defaultImport.forEach(env0_23, _fun37252);
}
function _fun37213(a0, a1) { // fn#37213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:581, offset: 0x0109ecb3, size: 61 bytes, params: 3, frame: 13
a0.destroy(a0.isOwner ? 'sender-disconnect' : 'receiver-disconnect');
value = environment.__proto__;
delete env1_23[a1];
delete env1_21[a1];
}
function value_37220() { // fn#37220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:1647, offset: 0x0109f03c, size: 27 bytes, params: 1, frame: 11
const Object = global.Object;
return Object.keys(env1_23);
}
function value_37222(a0) { // fn#37222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:1762, offset: 0x0109f067, size: 85 bytes, params: 2, frame: 13
return (importDefault(12381) /* metro dependency 12381: canSpectate */)(MediaEngineStore) ? a0 == null ? RTCConnectionQuality.UNKNOWN : env1_23[a0]?.quality ?? RTCConnectionQuality.UNKNOWN : RTCConnectionQuality.UNKNOWN;
}
function value_37223(a0) { // fn#37223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:1898, offset: 0x0109f0bc, size: 55 bytes, params: 2, frame: 12
const value = null;
if (value == a0) {
return value;
}
const property = env1_23[a0];
return value != property ? value != property ? property.getMediaSessionId() : value : undefined;
}
function value_37224(a0) { // fn#37224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:2035, offset: 0x0109f0f3, size: 55 bytes, params: 2, frame: 12
const value = null;
if (value == a0) {
return value;
}
const property = env1_23[a0];
return value != property ? value != property ? property.getRTCConnectionId() : value : undefined;
}
function value_37225(a0) { // fn#37225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:2168, offset: 0x0109f12a, size: 43 bytes, params: 2, frame: 11
const value = null;
if (value == a0) {
return value;
}
const property = env1_23[a0];
return value != property ? property.getVideoStats() : value;
}
function value_37226(a0) { // fn#37226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:2279, offset: 0x0109f155, size: 64 bytes, params: 2, frame: 5
if (a0 == null) {
return '';
}
const value = environment.__proto__;
const property = env1_23[a0];
return property != null && property.hostname != null ? property.hostname : '';
}
function value_37227(a0) { // fn#37227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:2394, offset: 0x0109f195, size: 43 bytes, params: 2, frame: 11
const value = null;
if (value == a0) {
return value;
}
const property = env1_23[a0];
return value != property ? property.getRegion() : value;
}
function value_37228(a0) { // fn#37228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:2503, offset: 0x0109f1c0, size: 43 bytes, params: 2, frame: 11
const value = null;
if (value == a0) {
return value;
}
const property = env1_23[a0];
return value != property ? property.getMaxViewers() : value;
}
function value_37229(a0) { // fn#37229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:2620, offset: 0x0109f1eb, size: 16 bytes, params: 2, frame: 2
return env1_19[a0];
}
function value_37231(a0) { // fn#37231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:2748, offset: 0x0109f1fb, size: 37 bytes, params: 2, frame: 10
const value = environment.__proto__;
return env1_23[a0]?.getUserIds();
}
function value_37232(a0, a1) { // fn#37232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:2839, offset: 0x0109f220, size: 41 bytes, params: 3, frame: 12
const value = environment.__proto__;
return env1_23[a0]?.getIsUserConnected(a1);
}
function value_37233(a0) { // fn#37233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:2946, offset: 0x0109f249, size: 37 bytes, params: 2, frame: 10
const value = environment.__proto__;
return env1_23[a0]?.getSecureFramesState();
}
function value_37234(a0, a1) { // fn#37234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:3061, offset: 0x0109f26e, size: 59 bytes, params: 3, frame: 13
let value = environment.__proto__;
const property = env1_23[a0];
value = undefined;
const r3 = property == null ? value : property.getSecureFramesRosterMap();
return r3 == null ? value : r3.get(a1);
}
function _fun37238(a0) { // fn#37238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:3650, offset: 0x0109f313, size: 22 bytes, params: 2, frame: 2
return a0 === env0_0.connection;
}
function _fun37252(a0) { // fn#37252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4567:6894, offset: 0x0109fa94, size: 41 bytes, params: 2, frame: 15
if (a0 != null) {
a0.setVideoSize(streamId, dimensions, zoom);
}
}
global.__d(_fun37208, 4395, [6, 7, 15, 17, 18, 4266, 1226, 4259, 4396, 4294, 661, 4286, 44, 4398, 22, 4285, 7128,
694, 4406, 477, 12381, 566,
2]) /* metro module 4395, dependencies: [6, 7, 15, 17, 18, 4266, 1226, 4259, 4396, 4294, 661, 4286, 44, 4398, 22, 4285, 7128, 694, 4406, 477, 12381, 566, 2] */;
+262 -241
View File
@@ -1,4 +1,15 @@
/* Metro module 3996; source: stores/StreamerModeStore.tsx; dependencies: [6, 7, 15, 17, 18, 1226, 661, 683, 3997, 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 './AuthenticationStore.tsx'; /* Metro dependency 1226 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as OverlayV3ExperimentModule from '../modules/overlay/OverlayV3Experiment.tsx'; /* Metro dependency 3997 */
function _fun32826(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#32826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:6, offset: 0x0101f518, size: 425 bytes, params: 8, frame: 19
const env0_0 = require;
const trackToggle = function(a0, a1) {
@@ -8,18 +19,11 @@ function _fun32826(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const env0_9 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_11 = {};
copyDataProperties({}, {'enabled': false, 'autoToggle': true, 'hideInstantInvites': true,
'hidePersonalInformation': true, 'disableSounds': true, 'disableNotifications': true,
'disabledOverlayWidgets': null, 'enableContentProtection': false, disabledOverlayWidgets: []}, undefined);
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
let value = _fun32831(PersistedStore);
value.displayName = 'StreamerModeStore';
value.persistKey = 'StreamerModeStore';
@@ -27,255 +31,272 @@ function _fun32826(global, require, importDefault, importAll, module, exports, d
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: LOGOUT_32846,
MULTI_ACCOUNT_REMOVE_ACCOUNT: MULTI_ACCOUNT_REMOVE_ACCOUNT_32847, STREAMER_MODE_UPDATE: STREAMER_MODE_UPDATE,
RUNNING_STREAMER_TOOLS_CHANGE: RUNNING_STREAMER_TOOLS_CHANGE});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/StreamerModeStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/StreamerModeStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_32827() { // fn#32827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:183, offset: 0x0101f6c1, 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) {
function _isNativeReflectConstruct_32827() { // fn#32827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:183, offset: 0x0101f6c1, 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_32827_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_32827_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun32831(a0) { // fn#32831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:660, offset: 0x0101f760, size: 300 bytes, params: 2, frame: 16
const closure = StreamerModeStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: value_32833}, {key: 'getState', value: value_32835},
{key: 'getSettings', value: value_32836}, {key: 'enabled', get: get_32837}, {key: 'autoToggle', get: get_32838},
{key: 'hideInstantInvites', get: get_32839}, {key: 'hidePersonalInformation', get: get_32840},
{key: 'disableSounds', get: get_32841}, {key: 'disableNotifications', get: get_32842},
{key: 'enableContentProtection', get: get_32843}, {key: 'isOverlayWidgetDisabled', value: value_32844}]);
}
function _fun32831(a0) { // fn#32831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:660, offset: 0x0101f760, size: 300 bytes, params: 2, frame: 16
const StreamerModeStore2 = StreamerModeStore;
Inherits(StreamerModeStore2, a0);
return CreateClass(StreamerModeStore2, [{key: 'initialize', value: value_32833}, {key: 'getState', value: value_32835},
{key: 'getSettings', value: value_32836}, {key: 'enabled', get: get_32837}, {key: 'autoToggle', get: get_32838},
{key: 'hideInstantInvites', get: get_32839}, {key: 'hidePersonalInformation', get: get_32840},
{key: 'disableSounds', get: get_32841}, {key: 'disableNotifications', get: get_32842},
{key: 'enableContentProtection', get: get_32843}, {key: 'isOverlayWidgetDisabled', value: value_32844}]);
function StreamerModeStore() { // fn#32832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:672, offset: 0x00ef83e3, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, StreamerModeStore);
const value3 = env1_6(StreamerModeStore);
return env1_5(this, _isNativeReflectConstruct_32827() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_32833(a0) { // fn#32833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:975, offset: 0x0101f88c, size: 67 bytes, params: 2, frame: 15
const Object = global.Object;
Object.assign(env1_11, a0);
this.syncWith([AuthenticationStore], _fun32834);
function _fun32834() { // fn#32834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:1025, offset: 0x0101f8cf, size: 85 bytes, params: 1, frame: 16
var object;
var binding;
const id = AuthenticationStore.getId();
if (id != null) {
if (env2_11[id] == null) {
binding = env2_11;
object = {};
copyDataProperties(object, env2_10, undefined);
binding[id] = object;
}
} else {
copyDataProperties({}, env2_10, undefined);
}
}
}
function value_32835() { // fn#32835, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
function value_32836() { // fn#32836, offset: 0x00e2f9de, size: 9 bytes, params: 1, frame: 1
return env1_12;
}
function get_32837() { // fn#32837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:1252, offset: 0x0101f924, size: 14 bytes, params: 1, frame: 1
return env1_12.enabled;
}
function get_32838() { // fn#32838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:1304, offset: 0x0101f932, size: 15 bytes, params: 1, frame: 1
return env1_12.autoToggle;
}
function get_32839() { // fn#32839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:1367, offset: 0x0101f941, size: 26 bytes, params: 1, frame: 2
return this.enabled && env1_12.hideInstantInvites;
}
function get_32840() { // fn#32840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:1457, offset: 0x0101f95b, size: 26 bytes, params: 1, frame: 2
return this.enabled && env1_12.hidePersonalInformation;
}
function get_32841() { // fn#32841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:1542, offset: 0x0101f975, size: 26 bytes, params: 1, frame: 2
return this.enabled && env1_12.disableSounds;
}
function get_32842() { // fn#32842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:1624, offset: 0x0101f98f, size: 26 bytes, params: 1, frame: 2
return this.enabled && env1_12.disableNotifications;
}
function get_32843() { // fn#32843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:1716, offset: 0x0101f9a9, size: 26 bytes, params: 1, frame: 2
return this.enabled && env1_12.enableContentProtection;
}
function value_32844(a0) { // fn#32844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:1813, offset: 0x0101f9c3, size: 112 bytes, params: 2, frame: 14
const value = environment.__proto__;
const value2 = undefined;
const getOverlayStreamerModeConfig = OverlayV3ExperimentModule.getOverlayStreamerModeConfig;
const enabled = Reflect.apply(getOverlayStreamerModeConfig, OverlayV3ExperimentModule,
['StreamerModeStore']).enabled;
return enabled ? this.enabled && (env1_12.disabledOverlayWidgets == null ? value2 : env1_12.disabledOverlayWidgets.includes(a0)) === true : !!enabled;
}
function _fun32845(a0) { // fn#32845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:2095, offset: 0x0101fa33, size: 55 bytes, params: 2, frame: 13
var object;
var object3;
const id = AuthenticationStore.getId();
if (a0 == null) {
object = {};
} else if (id == null) {
object = {};
} else {
object3 = {};
copyDataProperties(object3, a0, a0);
object = {[id]: object3};
}
return object;
}
function LOGOUT_32846(a0) { // fn#32846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:2186, offset: 0x0101fa6a, size: 25 bytes, params: 2, frame: 2
if (!a0.isSwitchingAccount) {
env0_11 = {};
function _fun32845(a0) { // fn#32845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:2095, offset: 0x0101fa33, size: 55 bytes, params: 2, frame: 13
var object2;
var object4;
const id = AuthenticationStore.getId();
if (a0 == null) {
object2 = {};
} else if (id == null) {
object2 = {};
} else {
object4 = {};
copyDataProperties(object4, a0, a0);
object2 = {[id]: object4};
}
return object2;
}
}
function MULTI_ACCOUNT_REMOVE_ACCOUNT_32847(a0) { // fn#32847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:2270, offset: 0x0101fa83, size: 39 bytes, params: 2, frame: 4
const userId = a0.userId;
if (userId in env0_11) {
delete env0_11[a0.userId];
function LOGOUT_32846(a0) { // fn#32846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:2186, offset: 0x0101fa6a, size: 25 bytes, params: 2, frame: 2
if (!a0.isSwitchingAccount) {
env0_11 = {};
}
}
}
function STREAMER_MODE_UPDATE(a0) { // fn#32848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:2363, offset: 0x0101faaa, size: 469 bytes, params: 2, frame: 22
var r11;
var value4;
var defaultImport;
var track;
var UPDATE_STREAMER_MODE_SETTINGS;
var object2;
var enabled;
var autoToggle;
var disableNotifications;
var disableSounds;
var hideInstantInvites;
var hidePersonalInformation;
var enableContentProtection;
var disabledOverlayWidgets;
const object4 = {};
var value;
copyDataProperties(object4, env0_12, undefined);
const Object = global.Object;
Object.assign(env0_12, {[a0.key]: a0.value});
if (a0.key !== 'enabled') {
value4 = undefined;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
UPDATE_STREAMER_MODE_SETTINGS = AnalyticEvents.UPDATE_STREAMER_MODE_SETTINGS;
object2 = {};
enabled = env0_12.enabled;
object2.enabled = enabled;
autoToggle = env0_12.autoToggle;
object2.automatic = autoToggle;
disableNotifications = env0_12.disableNotifications;
object2.disable_notifications = disableNotifications;
disableSounds = env0_12.disableSounds;
object2.disable_sounds = disableSounds;
hideInstantInvites = env0_12.hideInstantInvites;
object2.hide_instant_invites = hideInstantInvites;
hidePersonalInformation = env0_12.hidePersonalInformation;
object2.hide_personal_info = hidePersonalInformation;
enableContentProtection = env0_12.enableContentProtection;
object2.enable_content_protection = enableContentProtection;
disabledOverlayWidgets = env0_12.disabledOverlayWidgets;
r11 = disabledOverlayWidgets == null ? value4 : disabledOverlayWidgets.join(',');
value = '';
object2.disabled_overlay_widgets = r11 ?? value;
enabled = object4.enabled;
object2.old_enabled = enabled;
autoToggle = object4.autoToggle;
object2.old_automatic = autoToggle;
disableNotifications = object4.disableNotifications;
object2.old_disable_notifications = disableNotifications;
disableSounds = object4.disableSounds;
object2.old_disable_sounds = disableSounds;
hideInstantInvites = object4.hideInstantInvites;
object2.old_hide_instant_invites = hideInstantInvites;
hidePersonalInformation = object4.hidePersonalInformation;
object2.old_hide_personal_info = hidePersonalInformation;
enableContentProtection = object4.enableContentProtection;
object2.old_enable_content_protection = enableContentProtection;
disabledOverlayWidgets = object4.disabledOverlayWidgets;
object2.old_disabled_overlay_widgets = (disabledOverlayWidgets == null ? value4 : disabledOverlayWidgets.join(',')) ?? value;
Reflect.apply(track, defaultImport, [UPDATE_STREAMER_MODE_SETTINGS, object2]);
} else if (typeof a0.value === 'boolean') {
trackToggle(a0.value, false);
} else {
value4 = undefined;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
UPDATE_STREAMER_MODE_SETTINGS = AnalyticEvents.UPDATE_STREAMER_MODE_SETTINGS;
object2 = {};
enabled = env0_12.enabled;
object2.enabled = enabled;
autoToggle = env0_12.autoToggle;
object2.automatic = autoToggle;
disableNotifications = env0_12.disableNotifications;
object2.disable_notifications = disableNotifications;
disableSounds = env0_12.disableSounds;
object2.disable_sounds = disableSounds;
hideInstantInvites = env0_12.hideInstantInvites;
object2.hide_instant_invites = hideInstantInvites;
hidePersonalInformation = env0_12.hidePersonalInformation;
object2.hide_personal_info = hidePersonalInformation;
enableContentProtection = env0_12.enableContentProtection;
object2.enable_content_protection = enableContentProtection;
disabledOverlayWidgets = env0_12.disabledOverlayWidgets;
r11 = disabledOverlayWidgets == null ? value4 : disabledOverlayWidgets.join(',');
value = '';
object2.disabled_overlay_widgets = r11 ?? value;
enabled = object4.enabled;
object2.old_enabled = enabled;
autoToggle = object4.autoToggle;
object2.old_automatic = autoToggle;
disableNotifications = object4.disableNotifications;
object2.old_disable_notifications = disableNotifications;
disableSounds = object4.disableSounds;
object2.old_disable_sounds = disableSounds;
hideInstantInvites = object4.hideInstantInvites;
object2.old_hide_instant_invites = hideInstantInvites;
hidePersonalInformation = object4.hidePersonalInformation;
object2.old_hide_personal_info = hidePersonalInformation;
enableContentProtection = object4.enableContentProtection;
object2.old_enable_content_protection = enableContentProtection;
disabledOverlayWidgets = object4.disabledOverlayWidgets;
object2.old_disabled_overlay_widgets = (disabledOverlayWidgets == null ? value4 : disabledOverlayWidgets.join(',')) ?? value;
Reflect.apply(track, defaultImport, [UPDATE_STREAMER_MODE_SETTINGS, object2]);
function MULTI_ACCOUNT_REMOVE_ACCOUNT_32847(a0) { // fn#32847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:2270, offset: 0x0101fa83, size: 39 bytes, params: 2, frame: 4
const userId = a0.userId;
if (userId in env0_11) {
delete env0_11[a0.userId];
}
}
return true;
}
function RUNNING_STREAMER_TOOLS_CHANGE(a0) { // fn#32849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:3347, offset: 0x0101fc7f, size: 60 bytes, params: 2, frame: 13
var value2;
if (env0_12.autoToggle) {
value2 = a0.count > 0;
env0_12.enabled = value2;
trackToggle(value2, true);
function STREAMER_MODE_UPDATE(a0) { // fn#32848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:2363, offset: 0x0101faaa, size: 469 bytes, params: 2, frame: 22
var r11;
var value4;
var defaultImport;
var track;
var UPDATE_STREAMER_MODE_SETTINGS;
var object;
var enabled;
var autoToggle;
var disableNotifications;
var disableSounds;
var hideInstantInvites;
var hidePersonalInformation;
var enableContentProtection;
var disabledOverlayWidgets;
const object3 = {};
var value;
copyDataProperties(object3, env0_12, undefined);
const Object = global.Object;
Object.assign(env0_12, {[a0.key]: a0.value});
if (a0.key !== 'enabled') {
value4 = undefined;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
UPDATE_STREAMER_MODE_SETTINGS = AnalyticEvents.UPDATE_STREAMER_MODE_SETTINGS;
object = {};
enabled = env0_12.enabled;
object.enabled = enabled;
autoToggle = env0_12.autoToggle;
object.automatic = autoToggle;
disableNotifications = env0_12.disableNotifications;
object.disable_notifications = disableNotifications;
disableSounds = env0_12.disableSounds;
object.disable_sounds = disableSounds;
hideInstantInvites = env0_12.hideInstantInvites;
object.hide_instant_invites = hideInstantInvites;
hidePersonalInformation = env0_12.hidePersonalInformation;
object.hide_personal_info = hidePersonalInformation;
enableContentProtection = env0_12.enableContentProtection;
object.enable_content_protection = enableContentProtection;
disabledOverlayWidgets = env0_12.disabledOverlayWidgets;
r11 = disabledOverlayWidgets == null ? value4 : disabledOverlayWidgets.join(',');
value = '';
object.disabled_overlay_widgets = r11 ?? value;
enabled = object3.enabled;
object.old_enabled = enabled;
autoToggle = object3.autoToggle;
object.old_automatic = autoToggle;
disableNotifications = object3.disableNotifications;
object.old_disable_notifications = disableNotifications;
disableSounds = object3.disableSounds;
object.old_disable_sounds = disableSounds;
hideInstantInvites = object3.hideInstantInvites;
object.old_hide_instant_invites = hideInstantInvites;
hidePersonalInformation = object3.hidePersonalInformation;
object.old_hide_personal_info = hidePersonalInformation;
enableContentProtection = object3.enableContentProtection;
object.old_enable_content_protection = enableContentProtection;
disabledOverlayWidgets = object3.disabledOverlayWidgets;
object.old_disabled_overlay_widgets = (disabledOverlayWidgets == null ? value4 : disabledOverlayWidgets.join(',')) ?? value;
Reflect.apply(track, defaultImport, [UPDATE_STREAMER_MODE_SETTINGS, object]);
} else if (typeof a0.value === 'boolean') {
trackToggle(a0.value, false);
} else {
value4 = undefined;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
UPDATE_STREAMER_MODE_SETTINGS = AnalyticEvents.UPDATE_STREAMER_MODE_SETTINGS;
object = {};
enabled = env0_12.enabled;
object.enabled = enabled;
autoToggle = env0_12.autoToggle;
object.automatic = autoToggle;
disableNotifications = env0_12.disableNotifications;
object.disable_notifications = disableNotifications;
disableSounds = env0_12.disableSounds;
object.disable_sounds = disableSounds;
hideInstantInvites = env0_12.hideInstantInvites;
object.hide_instant_invites = hideInstantInvites;
hidePersonalInformation = env0_12.hidePersonalInformation;
object.hide_personal_info = hidePersonalInformation;
enableContentProtection = env0_12.enableContentProtection;
object.enable_content_protection = enableContentProtection;
disabledOverlayWidgets = env0_12.disabledOverlayWidgets;
r11 = disabledOverlayWidgets == null ? value4 : disabledOverlayWidgets.join(',');
value = '';
object.disabled_overlay_widgets = r11 ?? value;
enabled = object3.enabled;
object.old_enabled = enabled;
autoToggle = object3.autoToggle;
object.old_automatic = autoToggle;
disableNotifications = object3.disableNotifications;
object.old_disable_notifications = disableNotifications;
disableSounds = object3.disableSounds;
object.old_disable_sounds = disableSounds;
hideInstantInvites = object3.hideInstantInvites;
object.old_hide_instant_invites = hideInstantInvites;
hidePersonalInformation = object3.hidePersonalInformation;
object.old_hide_personal_info = hidePersonalInformation;
enableContentProtection = object3.enableContentProtection;
object.old_enable_content_protection = enableContentProtection;
disabledOverlayWidgets = object3.disabledOverlayWidgets;
object.old_disabled_overlay_widgets = (disabledOverlayWidgets == null ? value4 : disabledOverlayWidgets.join(',')) ?? value;
Reflect.apply(track, defaultImport, [UPDATE_STREAMER_MODE_SETTINGS, object]);
}
return true;
}
return false;
}
function value_32833(a0) { // fn#32833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:975, offset: 0x0101f88c, size: 67 bytes, params: 2, frame: 15
const Object = global.Object;
Object.assign(env1_11, a0);
this.syncWith([AuthenticationStore], _fun32834);
}
function get_32837() { // fn#32837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:1252, offset: 0x0101f924, size: 14 bytes, params: 1, frame: 1
return env1_12.enabled;
}
function get_32838() { // fn#32838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:1304, offset: 0x0101f932, size: 15 bytes, params: 1, frame: 1
return env1_12.autoToggle;
}
function get_32839() { // fn#32839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:1367, offset: 0x0101f941, size: 26 bytes, params: 1, frame: 2
return this.enabled && env1_12.hideInstantInvites;
}
function get_32840() { // fn#32840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:1457, offset: 0x0101f95b, size: 26 bytes, params: 1, frame: 2
return this.enabled && env1_12.hidePersonalInformation;
}
function get_32841() { // fn#32841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:1542, offset: 0x0101f975, size: 26 bytes, params: 1, frame: 2
return this.enabled && env1_12.disableSounds;
}
function get_32842() { // fn#32842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:1624, offset: 0x0101f98f, size: 26 bytes, params: 1, frame: 2
return this.enabled && env1_12.disableNotifications;
}
function get_32843() { // fn#32843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:1716, offset: 0x0101f9a9, size: 26 bytes, params: 1, frame: 2
return this.enabled && env1_12.enableContentProtection;
}
function value_32844(a0) { // fn#32844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:1813, offset: 0x0101f9c3, size: 112 bytes, params: 2, frame: 14
const value = environment.__proto__;
const value2 = undefined;
const overlayV3ExperimentModule = require(3997) /* metro dependency 3997: OverlayV3Experiment */;
const getOverlayStreamerModeConfig = overlayV3ExperimentModule.getOverlayStreamerModeConfig;
const enabled = Reflect.apply(getOverlayStreamerModeConfig, overlayV3ExperimentModule,
['StreamerModeStore']).enabled;
return enabled ? this.enabled && (env1_12.disabledOverlayWidgets == null ? value2 : env1_12.disabledOverlayWidgets.includes(a0)) === true : !!enabled;
}
function _fun32834() { // fn#32834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:1025, offset: 0x0101f8cf, size: 85 bytes, params: 1, frame: 16
var object2;
var binding;
const id = AuthenticationStore.getId();
if (id != null) {
if (env2_11[id] == null) {
binding = env2_11;
object2 = {};
copyDataProperties(object2, env2_10, undefined);
binding[id] = object2;
function RUNNING_STREAMER_TOOLS_CHANGE(a0) { // fn#32849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4154:3347, offset: 0x0101fc7f, size: 60 bytes, params: 2, frame: 13
var value2;
if (env0_12.autoToggle) {
value2 = a0.count > 0;
env0_12.enabled = value2;
trackToggle(value2, true);
return true;
}
} else {
copyDataProperties({}, env2_10, undefined);
return false;
}
}
global.__d(_fun32826, 3996, [6, 7, 15, 17, 18, 1226, 661, 683, 3997, 566, 694,
2]) /* metro module 3996, dependencies: [6, 7, 15, 17, 18, 1226, 661, 683, 3997, 566, 694, 2] */;
Loaded 100 of 22448 files, more files were not shown because too many files have changed in this diff. Show more