Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,505 @@
/* Metro module 14703; source: modules/voice_calls/RTCConnectionDesyncHooks.tsx; dependencies: [57, 31, 4606, 4298, 1226, 1379, 1945, 12603, 4294, 1878, 4297, 22, 566, 1360, 4610, 2] */
function _fun110903(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:6, offset: 0x0238bedf, size: 344 bytes, params: 8, frame: 20
let env0_0 = require;
const _arrayLikeToArray_110906 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const closure = function(a0) {
var env0_0 = a0;
return require(dependencyMap[12]).useStateFromStores([RTCConnectionDesyncStore, RTCConnectionStore],
_fun110908);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const voiceStateRecord = importDefault(4298) /* metro dependency 4298: VoiceStateRecord */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const rtcConnectionDesyncStore = importDefault(12603) /* metro dependency 12603: RTCConnectionDesyncStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/RTCConnectionDesyncHooks.tsx');
exports.useEnsureSyncedChannelVoiceStates = useEnsureSyncedChannelVoiceStates;
exports.useDesyncedChannelParticipants = closure;
exports.useEnsureSyncedChannelParticipants = useEnsureSyncedChannelParticipants;
exports.useIsRTCDisconnectedUIVisible = useIsRTCDisconnectedUIVisible;
}
function _createForOfIteratorHelperLoose_110904(a0, a1) { // fn#110904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:212, offset: 0x0238c037, 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 _fun110905;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_110906(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_110906(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_110906(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun110905;
}
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 useDesyncedChannelParticipants(a0) { // fn#110907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1122, offset: 0x0238c1ab, size: 74 bytes, params: 2, frame: 15
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionDesyncStore,
RTCConnectionStore], _fun110908);
}
function useEnsureSyncedChannelVoiceStates(a0, a1) { // fn#110909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1389, offset: 0x0238c225, size: 306 bytes, params: 3, frame: 21
const env0_0 = a0;
const env0_1 = a1;
const value2 = undefined;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionDesyncStore,
RTCConnectionStore], _fun110910);
const env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([ChannelRTCStore],
_fun110911);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserStore], _fun110912);
const basicChannel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun110914);
return env0_3.useMemo(_fun110917, [value3, a1, env0_3.useMemo(_fun110915, [value4,
basicChannel == null ? value2 : basicChannel.guild_id])]);
}
function useEnsureSyncedChannelParticipants(a0, a1) { // fn#110923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2604, offset: 0x0238c6a2, size: 66 bytes, params: 3, frame: 15
const env0_0 = a1;
return env0_3.useMemo(_fun110924, [useDesyncedChannelParticipants(a0), a1]);
}
function useIsRTCDisconnectedUIVisible(a0, a1) { // fn#110928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2944, offset: 0x0238c7bb, size: 401 bytes, params: 3, frame: 26
const env0_0 = a0;
const env0_1 = a1;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], _fun110929);
const channelId = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore],
function() {
return RTCConnectionStore.getChannelId();
});
const env0_2 = channelId;
const binding = env0_3;
var env0_3 = binding.useRef(null);
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_2;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_4 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value5[0];
const env0_5 = value5[1];
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore,
VoiceStateStore], _fun110931);
const value = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore,
VoiceStateStore], _fun110932);
binding.useEffect(_fun110933, [value6]);
binding.useEffect(_fun110934, [a0, channelId]);
binding.useEffect(_fun110935, [value]);
return !value2 && property2 && property;
}
function _fun110908() { // fn#110908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1208, offset: 0x0238c1f5, size: 48 bytes, params: 1, frame: 11
const binding = env0_0;
const value = environment.__proto__;
return binding !== RTCConnectionStore.getChannelId() ? null : RTCConnectionDesyncStore.getDesyncedParticipants();
}
function _fun110910() { // fn#110910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1479, offset: 0x0238c357, size: 48 bytes, params: 1, frame: 11
const binding = env0_0;
const value = environment.__proto__;
return binding !== RTCConnectionStore.getChannelId() ? null : RTCConnectionDesyncStore.getDesyncedVoiceStates();
}
function _fun110911() { // fn#110911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1579, offset: 0x0238c387, size: 56 bytes, params: 1, frame: 13
var r0;
var value2;
var items2;
var guildRingingUsers;
if (env0_0 == null) {
r0 = [];
} else {
value2 = environment.__proto__;
guildRingingUsers = ChannelRTCStore.getGuildRingingUsers(env0_0);
items2 = [];
arraySpread(items2, guildRingingUsers, 0, ChannelRTCStore);
r0 = items2;
}
return r0;
}
function _fun110912() { // fn#110912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1668, offset: 0x0238c3bf, size: 69 bytes, params: 1, frame: 13
const value = env0_3.map(function(a0) {
return UserStore.getUser(a0);
});
return value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
}
function _fun110914() { // fn#110914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1766, offset: 0x0238c41b, size: 27 bytes, params: 1, frame: 11
return ChannelStore.getBasicChannel(env0_0);
}
function _fun110915() { // fn#110915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1806, offset: 0x0238c436, size: 28 bytes, params: 1, frame: 11
return env0_4.map(_fun110916);
}
function _fun110917() { // fn#110917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2056, offset: 0x0238c4f3, size: 35 bytes, params: 1, frame: 15
return syncChannelVoiceStates(env0_2, require, env0_6);
}
function _fun110924() { // fn#110924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2711, offset: 0x0238c6e4, size: 30 bytes, params: 1, frame: 13
return ((a0, a1) => {
if (a0 == null) {
return a1;
}
if (a0.length === 0) {
return a1;
}
var items = [];
arraySpread(items, a1, 0, a0);
var env0_0 = items;
a0.forEach(_fun110926);
return items;
})(env0_1, require);
}
function _fun110929() { // fn#110929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3028, offset: 0x0238c94c, size: 30 bytes, params: 1, frame: 9
const value = environment.__proto__;
return AuthenticationStore.getId() === require;
}
function _fun110931() { // fn#110931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3242, offset: 0x0238c96a, size: 113 bytes, params: 1, frame: 16
let r0 = require != null && env0_0 != null && RTCConnectionStore.getChannelId() === env0_0;
r0 = r0 && VoiceStateStore.isInChannel(env0_0, require) != null && RTCConnectionStore.isUserConnected(require);
return r0;
}
function _fun110932() { // fn#110932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3373, offset: 0x0238c9db, size: 116 bytes, params: 1, frame: 16
let r0 = require != null && env0_0 != null && RTCConnectionStore.getChannelId() === env0_0;
r0 = r0 && VoiceStateStore.isInChannel(env0_0, require) != null && !RTCConnectionStore.isUserConnected(require);
return r0;
}
function _fun110933() { // fn#110933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3487, offset: 0x0238ca4f, size: 27 bytes, params: 1, frame: 11
if (env0_6) {
env0_5(true);
}
}
function _fun110934() { // fn#110934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3521, offset: 0x0238ca6a, size: 32 bytes, params: 1, frame: 11
if (channelId !== env0_0) {
env0_5(false);
}
}
function _fun110935() { // fn#110935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3561, offset: 0x0238ca8a, size: 117 bytes, params: 1, frame: 15
var clearTimeout;
var binding;
if (env0_7) {
if (env0_3.current == null) {
env0_3.current = global.setTimeout(_fun110936, 250);
} else {
clearTimeout = global.clearTimeout;
binding = env0_3;
clearTimeout(binding.current);
binding.current = null;
env0_4(false);
}
} else {
clearTimeout = global.clearTimeout;
binding = env0_3;
clearTimeout(binding.current);
binding.current = null;
env0_4(false);
}
return _fun110937;
}
function _fun110916(a0) { // fn#110916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1817, offset: 0x0238c452, size: 161 bytes, params: 2, frame: 18
const value = environment.__proto__.__proto__;
const id = a0.id;
const value2 = Object.create(VoiceStateRecord.prototype, {constructor: {value: VoiceStateRecord}});
const voiceStateRecord = new VoiceStateRecord(id);
const basicChannelBinding = basicChannel;
const value5 = null;
const value6 = undefined;
return {voiceState: voiceStateRecord instanceof Object ? voiceStateRecord : value2, user: a0,
member: value5 != (value5 == basicChannelBinding ? value6 : basicChannel.guild_id) ? GuildMemberStore.getMember(value5 == basicChannel ? value6 : basicChannel.guild_id,
a0.id) : value5, nick: a0.globalName, comparator: a0.globalName, _isPlaceholder: false};
}
function syncChannelVoiceStates(a0, a1, a2) { // fn#110918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2060, offset: 0x0238c516, size: 211 bytes, params: 4, frame: 20
var environment;
var r7;
var length;
var items2;
var Set;
var prototype;
var value;
var set;
var value2;
var value3;
var value4;
var done;
var value5;
var push;
var add;
var user;
var id;
var value6;
var forEach;
if (a0 != null) {
length = a0.length;
reducibleJoin2: while (true) {
if (length !== 0) {
items2 = [];
var env0_0 = items2;
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value = set instanceof Object ? set : value;
var env0_1 = value;
value2 = environment.__proto__.__proto__;
value3 = _createForOfIteratorHelperLoose_110904(a1);
value4 = value3();
done = value4.done;
if (!done) {
r7 = value4;
reducibleLoop4: while (true) {
value5 = r7.value;
push = items2.push;
Reflect.apply(push, items2, [value5]);
add = value.add;
user = value5.user;
id = user.id;
Reflect.apply(add, value, [id]);
value6 = value3();
done = value6.done;
if (done) {
break reducibleLoop4;
}
r7 = value6;
continue reducibleLoop4;
}
}
reducibleJoin7: while (true) {
if (a0 == null) {
break reducibleJoin7;
}
forEach = a0.forEach;
Reflect.apply(forEach, a0, [_fun110919]);
break reducibleJoin7;
}
length = a2.length;
reducibleJoin9: while (true) {
if (length > 0) {
forEach = a2.forEach;
Reflect.apply(forEach, a2, [_fun110921]);
break reducibleJoin9;
}
break reducibleJoin9;
}
return items2;
}
break reducibleJoin2;
}
}
if (a2.length === 0) {
return a1;
}
items2 = [];
Set = global.Set;
set = new Set();
value3 = _createForOfIteratorHelperLoose_110904(a1);
value4 = value3();
done = value4.done;
if (!done) {
r7 = value4;
reducibleLoop4: while (true) {
value5 = r7.value;
push = items2.push;
Reflect.apply(push, items2, [value5]);
add = set.add;
user = value5.user;
id = user.id;
Reflect.apply(add, set, [id]);
value6 = value3();
done = value6.done;
if (done) {
break reducibleLoop4;
}
r7 = value6;
continue reducibleLoop4;
}
}
reducibleJoin7: while (true) {
if (a0 == null) {
break reducibleJoin7;
}
forEach = a0.forEach;
Reflect.apply(forEach, a0, [_fun110919]);
break reducibleJoin7;
}
reducibleJoin9: while (true) {
if (a2.length > 0) {
forEach = a2.forEach;
Reflect.apply(forEach, a2, [_fun110921]);
break reducibleJoin9;
}
break reducibleJoin9;
}
return items2;
}
function syncChannelParticipants(a0, a1) { // fn#110925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2715, offset: 0x0238c702, size: 66 bytes, params: 3, frame: 15
if (a0 == null) {
return a1;
}
if (a0.length === 0) {
return a1;
}
const items2 = [];
arraySpread(items2, a1, 0, a0);
a0.forEach(_fun110926);
return items2;
}
function _fun110936() { // fn#110936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3607, offset: 0x0238caff, size: 30 bytes, params: 1, frame: 11
env1_3.current = null;
env1_4(true);
}
function _fun110937() { // fn#110937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3687, offset: 0x0238cb1d, size: 37 bytes, params: 1, frame: 12
const clearTimeout = global.clearTimeout;
const binding = env1_3;
clearTimeout(binding.current);
binding.current = null;
}
function _fun110919(a0) { // fn#110919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2295, offset: 0x0238c5e9, size: 78 bytes, params: 2, frame: 18
const binding = env0_0;
const splice = binding.splice;
const moduleValue = require(22) /* metro dependency 22 */;
Reflect.apply(splice, binding, [moduleValue.sortedIndexBy(env0_0, a0, function(a0) {
return a0.comparator;
}), 0, a0]);
}
function _fun110921(a0) { // fn#110921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2390, offset: 0x0238c637, size: 107 bytes, params: 2, frame: 17
var environment;
var splice;
var value2;
var moduleValue;
let binding = env0_1;
const has = binding.has;
const user = a0.user;
if (!Reflect.apply(has, binding, [user.id])) {
binding = env0_0;
splice = binding.splice;
value2 = environment.__proto__.__proto__.__proto__;
moduleValue = require(22) /* metro dependency 22 */;
Reflect.apply(splice, binding, [moduleValue.sortedIndexBy(env0_0, a0, function(a0) {
return a0.comparator;
}), 0, a0]);
}
}
function _fun110926(a0) { // fn#110926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2818, offset: 0x0238c744, size: 78 bytes, params: 2, frame: 18
const binding = env0_0;
const splice = binding.splice;
const moduleValue = require(22) /* metro dependency 22 */;
Reflect.apply(splice, binding, [moduleValue.sortedIndexBy(env0_0, a0, _fun110927), 0, a0]);
}
function _fun110927(a0) { // fn#110927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2860, offset: 0x0238c792, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__.__proto__.__proto__;
return (require(4610) /* metro dependency 4610: ChannelRTCParticipants */).sortKey(a0);
}