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,50 @@
/* Metro module 4285; source: modules/go_live/utils/StreamKeyUtils.tsx; dependencies: [57, 4286, 2] */
function _fun36336(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4457:6, offset: 0x01089742, size: 148 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(57) /* metro dependency 57 */;
const env0_1 = (require(4286) /* metro dependency 4286: Constants */).StreamTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/go_live/utils/StreamKeyUtils.tsx');
exports.isStreamKey = function(a0) {
return a0 != null && (a0.startsWith(StreamTypes.GUILD) || a0.startsWith(StreamTypes.CALL));
};
exports.decodeStreamKey = decodeStreamKey;
exports.encodeStreamKey = encodeStreamKey;
}
function decodeStreamKey(a0) { // fn#36338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4457:321, offset: 0x01089817, size: 219 bytes, params: 2, frame: 16
let value = a0.split(':');
const property = value[0];
const GUILD = StreamTypes.GUILD;
if (GUILD === property) {
value = env0_0(value, 4);
return {streamType: value[0], guildId: value[1], channelId: value[2], ownerId: value[3]};
}
const CALL = StreamTypes.CALL;
if (CALL === property) {
value = env0_0(value, 3);
return {streamType: value[0], channelId: value[1], ownerId: value[2]};
}
const Error = global.Error;
value = 'Unknown stream type ' + property;
const value3 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error(value);
throw error instanceof Object ? error : value3;
}
function encodeStreamKey({streamType, guildId, channelId, ownerId}) { // fn#36339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4457:625, offset: 0x010898f2, size: 176 bytes, params: 2, frame: 15
const GUILD = StreamTypes.GUILD;
if (GUILD === streamType) {
return [streamType, guildId, channelId, ownerId].join(':');
}
const CALL = StreamTypes.CALL;
if (CALL === streamType) {
return [streamType, channelId, ownerId].join(':');
}
const Error = global.Error;
const value = 'Unknown stream type ' + streamType;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error(value);
throw error instanceof Object ? error : value2;
}
@@ -0,0 +1,265 @@
/* Metro module 7118; source: modules/go_live/utils/StreamPermissionUtils.tsx; dependencies: [4295, 1383, 1935, 1867, 3784, 4297, 661, 4808, 1244, 4800, 5072, 566, 2] */
function _fun56927(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7296:6, offset: 0x013d5f45, size: 387 bytes, params: 8, frame: 23
var object2;
let env0_0 = require;
const _arrayLikeToArray_56930 = 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 = canStreamInChannel;
const closure2 = canWatchStream;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const gameConsoleStore = importDefault(4295) /* metro dependency 4295: GameConsoleStore */;
const env0_4 = (require(1383) /* metro dependency 1383: ChannelRecord */).ChannelRecordBase;
const env0_5 = (require(1935) /* metro dependency 1935: GuildChannelStore */).GUILD_VOCAL_CHANNELS_KEY;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const env0_9 = (require(661) /* metro dependency 661: Constants */).Permissions;
object2 = {REMOTE_MODE: 0};
object2[0] = 'REMOTE_MODE';
object2.CHANNEL_FULL = 1;
object2[1] = 'CHANNEL_FULL';
object2.NO_PERMISSION = 2;
object2[2] = 'NO_PERMISSION';
object2.AGE_RESTRICTED = 3;
object2[3] = 'AGE_RESTRICTED';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/go_live/utils/StreamPermissionUtils.tsx');
exports.canStreamInChannel = closure;
exports.getStreamCTAString = getStreamCTAString;
exports.getStreamCTAAriaLabel = getStreamCTAAriaLabel;
exports.StreamUnavailableReasons = object2;
exports.canWatchStream = closure2;
exports.useCanWatchStream = function(a0) {
var env0_0 = a0;
return require(dependencyMap[11]).useStateFromStoresArray([VoiceStateStore, GuildStore, PermissionStore,
GameConsoleStore], _fun56936);
};
exports.getStreamEligibleChannels = function(a0, a1, a2) {
var r2;
var channel;
var value4;
var items = [];
var value2 = _createForOfIteratorHelperLoose_56928(a0[GUILD_VOCAL_CHANNELS_KEY]);
var value3 = value2();
if (!value3.done) {
r2 = value3;
while (true) {
channel = r2.value.channel;
if (canStreamInChannel(channel, a1, a2)) {
items.push(channel);
}
value4 = value2();
if (value4.done) {
break;
}
r2 = value4;
continue;
}
}
return items;
};
}
function _createForOfIteratorHelperLoose_56928(a0, a1) { // fn#56928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7296:228, offset: 0x013d60c8, 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 _fun56929;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_56930(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_56930(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_56930(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun56929;
}
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 canStreamInChannel(a0, a1, a2) { // fn#56931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7296:1138, offset: 0x013d623a, size: 223 bytes, params: 4, frame: 19
let value = a3;
const value2 = undefined;
let r1 = !(value !== value2) || value;
if (a0.isPrivate()) {
return true;
}
const getGuild = a1.getGuild;
const getGuildId = a0.getGuildId;
value = Reflect.apply(getGuild, a1, [Reflect.apply(getGuildId, a0, [])]);
const maxStageVideoChannelUsers = value == null ? value2 : value.maxStageVideoChannelUsers;
const value3 = 0;
let r0 = a0.isGuildStageVoice() && (maxStageVideoChannelUsers ?? value3) <= value3;
if (r0) {
r0 = !r0;
} else {
r1 = r1 && !(importDefault(4808) /* metro dependency 4808: canJoinVoiceChannel */)(a0, a2);
r1 = !r1 && (a2.can(Permissions.STREAM,
a0) ? value != null && value.afkChannelId !== a0.id : !!a2.can(Permissions.STREAM, a0));
r0 = r1;
}
return r0;
}
function canWatchStream(a0, a1, a2, a3, a4) { // fn#56932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7296:1595, offset: 0x013d6319, size: 356 bytes, params: 6, frame: 21
var r5;
var moduleValue3;
if (a0 == null) {
return [false, env0_10.NO_PERMISSION];
}
const value = a1.isInChannel(a0.id);
const r4 = a0 instanceof ChannelRecordBase && (require(4800) /* metro dependency 4800: ChannelUtils */).isChannelFull(a0,
a1, a2);
const value4 = undefined;
const value5 = (importDefault(4808) /* metro dependency 4808: canJoinVoiceChannel */)(a0, a3);
const getAwaitingRemoteSessionInfo = a4.getAwaitingRemoteSessionInfo;
const r6 = Reflect.apply(getAwaitingRemoteSessionInfo, a4, []) != null || a4.getRemoteSessionId() != null;
const shouldAgeVerifyForAgeGate2 = (require(5072) /* metro dependency 5072: AgeGateUtils */).shouldAgeVerifyForAgeGate();
if (shouldAgeVerifyForAgeGate2) {
moduleValue3 = require(5072) /* metro dependency 5072: AgeGateUtils */;
r5 = moduleValue3.shouldShowAgeGateForChannelId(a0.id);
} else {
r5 = shouldAgeVerifyForAgeGate2;
}
return [!r6 && !r5 && (value || value5 && !r4),
r6 ? env0_10.REMOTE_MODE : r5 ? env0_10.AGE_RESTRICTED : value5 || value ? r4 && !value ? env0_10.CHANNEL_FULL : value4 : env0_10.NO_PERMISSION];
}
function getStreamCTAString(a0) { // fn#56933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7296:2185, offset: 0x013d647d, size: 366 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const REMOTE_MODE = env0_10.REMOTE_MODE;
if (REMOTE_MODE === a0) {
return intl.string(t['1i3tSY']);
}
const CHANNEL_FULL = env0_10.CHANNEL_FULL;
if (CHANNEL_FULL === a0) {
return intl.string(t.elyVbv);
}
const NO_PERMISSION = env0_10.NO_PERMISSION;
if (NO_PERMISSION === a0) {
return intl.string(t.pgUTZC);
}
const AGE_RESTRICTED = env0_10.AGE_RESTRICTED;
if (AGE_RESTRICTED === a0) {
return intl.string(t.b5FqhF);
}
return intl.string(t['7Xq/nV']);
}
function getStreamCTAAriaLabel(a0) { // fn#56934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7296:2584, offset: 0x013d65eb, size: 739 bytes, params: 2, frame: 18
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const REMOTE_MODE = env0_10.REMOTE_MODE;
if (REMOTE_MODE === a0) {
return '' + intl.string(t['7Xq/nV']) + ': ' + intl.string(t['1i3tSY']);
}
const CHANNEL_FULL = env0_10.CHANNEL_FULL;
if (CHANNEL_FULL === a0) {
return '' + intl.string(t['7Xq/nV']) + ': ' + intl.string(t.elyVbv);
}
const NO_PERMISSION = env0_10.NO_PERMISSION;
if (NO_PERMISSION === a0) {
return '' + intl.string(t['7Xq/nV']) + ': ' + intl.string(t.pgUTZC);
}
const AGE_RESTRICTED = env0_10.AGE_RESTRICTED;
if (AGE_RESTRICTED === a0) {
return '' + intl.string(t['7Xq/nV']) + ': ' + intl.string(t.b5FqhF);
}
return '' + intl.string(t['7Xq/nV']) + ': ' + intl.string(t['9C444m']);
}
function useCanWatchStream(a0) { // fn#56935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7296:3300, offset: 0x013d68ce, size: 89 bytes, params: 2, frame: 15
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([VoiceStateStore, GuildStore,
PermissionStore, GameConsoleStore], _fun56936);
}
function _fun56936() { // fn#56936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7296:3382, offset: 0x013d6927, size: 38 bytes, params: 1, frame: 19
return canWatchStream(env0_0, VoiceStateStore, GuildStore, PermissionStore, GameConsoleStore);
}
@@ -0,0 +1,61 @@
/* Metro module 7128; source: modules/go_live/utils/StreamerApplicationSelectors.tsx; dependencies: [4396, 661, 6885, 628, 566, 2] */
function _fun56983(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7306:6, offset: 0x013d7c26, size: 203 bytes, params: 8, frame: 22
let env0_0 = require;
const closure = function(a0, a1) {
return a1.findActivity(a0, _findPlayingActivity);
};
const closure2 = getStreamerActivity;
const closure3 = function(a0, a1) {
var value = null;
if (value == a0) {
return value;
}
var value3 = getStreamerActivity(a0, a1);
return value == value3 ? value : {id: value3.application_id, name: value3.name};
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).ActivityTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/go_live/utils/StreamerApplicationSelectors.tsx');
exports.getStreamerActivityByUserId = closure;
exports.getStreamerActivity = closure2;
exports.getStreamerApplication = closure3;
exports.useGetStreamApplication = function(a0) {
var env0_0 = a0;
return require(dependencyMap[4]).useStateFromStores([PresenceStore], _fun56990, [a0],
streamApplicationEqualityCheck);
};
}
function _findPlayingActivity(a0) { // fn#56984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7306:131, offset: 0x013d7cf1, size: 60 bytes, params: 2, frame: 13
const type = a0.type;
const PLAYING = ActivityTypes.PLAYING;
return type === PLAYING && !(importDefault(6885) /* metro dependency 6885: isEmbeddedActivity */)(a0);
}
function getStreamerActivity(a0, a1) { // fn#56986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7306:291, offset: 0x013d7d48, size: 38 bytes, params: 3, frame: 14
const value = null;
return value != a0 ? getStreamerActivityByUserId(a0.ownerId, a1) : value;
}
function streamApplicationEqualityCheck(a0, a1) { // fn#56988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7306:531, offset: 0x013d7dae, size: 65 bytes, params: 3, frame: 16
var r1;
var r0;
const value = a0 === a1;
if (value) {
r0 = value;
} else {
r1 = a0 != null && a1 != null;
r1 = r1 && (importDefault(628) /* metro dependency 628: shallowEqual */)(a0, a1);
r0 = r1;
}
return r0;
}
function useGetStreamApplication(a0) { // fn#56989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7306:883, offset: 0x013d7def, size: 83 bytes, params: 2, frame: 18
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([PresenceStore], _fun56990, [a0],
streamApplicationEqualityCheck);
}
@@ -0,0 +1,11 @@
/* Metro module 12381; source: modules/go_live/utils/canSpectate.tsx; dependencies: [4291, 2] */
function _fun94330(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12567:6, offset: 0x0211425c, size: 105 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(4291) /* metro dependency 4291: Constants */).Features;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/go_live/utils/canSpectate.tsx');
exports.default = function(a0) {
return true;
};
}
@@ -0,0 +1,176 @@
/* Metro module 10798; source: modules/go_live/utils/canStreamWithSettings.tsx; dependencies: [4282, 10799, 10800, 2] */
function _fun82947(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10984:6, offset: 0x01f079e0, size: 156 bytes, params: 8, frame: 18
const env0_0 = require;
const _arrayLikeToArray_82950 = 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 Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const streamSettingsConstantsModule = require(4282) /* metro dependency 4282: StreamSettingsConstants */;
const env0_3 = streamSettingsConstantsModule.ApplicationStreamSettingRequirements;
const env0_4 = streamSettingsConstantsModule.ApplicationStreamPresets;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/go_live/utils/canStreamWithSettings.tsx');
exports.default = canStreamWithSettings;
}
function _createForOfIteratorHelperLoose_82948(a0, a1) { // fn#82948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10984:181, offset: 0x01f07a7c, 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 _fun82949;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_82950(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_82950(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_82950(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun82949;
}
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 canStreamWithSettings(a0, a1, a2, a3, a4, a5) { // fn#82951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10984:1184, offset: 0x01f07bf0, size: 231 bytes, params: 7, frame: 26
var r2;
var value4;
var preset;
var resolution;
var fps;
var value5;
var value;
const PRESET_AUTO = ApplicationStreamPresets.PRESET_AUTO;
if (a0 === PRESET_AUTO) {
value = require(10799) /* metro dependency 10799: GoLiveAutoQualityExperiment */;
return value.getGoLiveAutoQualityExperimentConfig({location: 'canStreamWithSettings'}).allowAutoQuality;
}
const value2 = _createForOfIteratorHelperLoose_82948(ApplicationStreamSettingRequirements);
const value3 = value2();
let done = value3.done;
if (!done) {
r2 = value3;
reducibleLoop2: while (true) {
value4 = r2.value;
preset = value4.preset;
if (preset != null) {
preset = value4.preset;
reducibleJoin4: while (true) {
if (a0 !== preset) {
value5 = value2();
done = value5.done;
if (done) {
return false;
}
r2 = value5;
continue reducibleLoop2;
}
break reducibleJoin4;
}
}
resolution = value4.resolution;
if (a1 === resolution) {
fps = value4.fps;
reducibleJoin7: while (true) {
if (a2 !== fps) {
break reducibleJoin7;
}
if ((importDefault(10800) /* metro dependency 10800: canUseStreamSetting */)(value4, a3, a4, a5)) {
return true;
}
break reducibleJoin7;
}
}
value5 = value2();
done = value5.done;
if (done) {
return false;
}
r2 = value5;
continue reducibleLoop2;
}
}
return false;
}
@@ -0,0 +1,63 @@
/* Metro module 10800; source: modules/go_live/utils/canUseStreamSetting.tsx; dependencies: [1880, 3802, 8249, 2] */
function _fun82957(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10986:6, offset: 0x01f07fa7, size: 124 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(1880) /* metro dependency 1880: PremiumConstants */).StreamQualities;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/go_live/utils/canUseStreamSetting.tsx');
exports.default = canUseStreamSetting;
}
function canUseStreamSetting(a0, a1, a2) { // fn#82958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10986:211, offset: 0x01f08023, size: 289 bytes, params: 4, frame: 20
var r3;
var r1;
var r0;
if (a0 == null) {
return true;
}
let quality = a0.quality;
if (quality == null) {
if (a0.guildPremiumTier == null) {
return true;
}
}
quality = a0.quality;
let value = false;
if (quality != null) {
quality = a0.quality;
if (StreamQualities.HIGH_STREAMING_QUALITY === quality) {
value = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
value = value.canStreamQuality((importDefault(3802) /* metro dependency 3802: PremiumUtils */).StreamQuality.HIGH,
a1);
r3 = value;
} else if (StreamQualities.MID_STREAMING_QUALITY === quality) {
value = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
value = value.canStreamQuality((importDefault(3802) /* metro dependency 3802: PremiumUtils */).StreamQuality.MID,
a1);
r3 = value;
} else {
a0.quality;
r3 = value;
}
} else {
r3 = value;
}
if (a0.guildPremiumTier == null) {
r0 = r3;
} else {
if (r3) {
r1 = r3;
} else {
value = require(8249) /* metro dependency 8249: GuildBoostingUtils */;
value = value.isGuildBoostedAtLeast(a2, a0.guildPremiumTier);
r1 = value;
}
r0 = r1;
}
return r0;
}
@@ -0,0 +1,31 @@
/* Metro module 4489; source: modules/go_live/utils/getSoundshareAnalyticsContext.tsx; dependencies: [4266, 2] */
function _fun38257(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4667:6, offset: 0x010baee9, size: 104 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const runningGameStoreNative = importDefault(4266) /* metro dependency 4266: RunningGameStoreNative */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/go_live/utils/getSoundshareAnalyticsContext.tsx');
exports.default = getSoundshareAnalyticsContext;
}
function getSoundshareAnalyticsContext(a0) { // fn#38258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4667:205, offset: 0x010baf51, size: 107 bytes, params: 2, frame: 16
var name;
var r1;
var r2;
var gameForPID;
if (a0 == null) {
return {};
}
const sourcePid = a0.sourcePid;
const value = undefined;
if (sourcePid != null) {
gameForPID = RunningGameStoreNative.getGameForPID(sourcePid);
name = gameForPID == null ? value : gameForPID.name;
r1 = gameForPID == null ? value : gameForPID.id;
r2 = name;
} else {
r1 = value;
r2 = value;
}
return {soundshare_session: a0.soundshareSession, share_game_name: r2, share_game_id: r1};
}
@@ -0,0 +1,51 @@
/* Metro module 15560; source: modules/go_live/utils/getStreamIssueReportOptions.tsx; dependencies: [4286, 1244, 2] */
function _fun119098(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15757:6, offset: 0x024fc543, size: 117 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(4286) /* metro dependency 4286: Constants */).StreamIssueReportReasons;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/go_live/utils/getStreamIssueReportOptions.tsx');
exports.default = getStreamIssueReportOptions;
}
function getStreamIssueReportOptions({isEndStream}) { // fn#119099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15757:228, offset: 0x024fc5b8, size: 895 bytes, params: 2, frame: 19
let object2 = {id: 'black-screen'};
const BLACK_SCREEN = StreamIssueReportReasons.BLACK_SCREEN;
object2.value = BLACK_SCREEN;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.label = isEndStream ? Reflect.apply(string, intl, [t['0X5Zbq']]) : Reflect.apply(string, intl, [t.fxiRNr]);
const items2 = [object2];
const BLURRY = StreamIssueReportReasons.BLURRY;
string = intl.string;
items2[1] = {id: 'blurry', value: BLURRY, label: isEndStream ? Reflect.apply(string, intl,
[t.VVPQyy]) : Reflect.apply(string, intl, [t.E8jTMN])};
const LAGGING = StreamIssueReportReasons.LAGGING;
string = intl.string;
items2[2] = {id: 'lagging', value: LAGGING, label: isEndStream ? Reflect.apply(string, intl,
[t.ObEHd4]) : Reflect.apply(string, intl, [t.VoSJEQ])};
const OUT_OF_SYNC = StreamIssueReportReasons.OUT_OF_SYNC;
string = intl.string;
items2[3] = {id: 'out-of-sync', value: OUT_OF_SYNC, label: isEndStream ? Reflect.apply(string, intl,
[t.mYmwD3]) : Reflect.apply(string, intl, [t['+NluQm']])};
const AUDIO_MISSING = StreamIssueReportReasons.AUDIO_MISSING;
string = intl.string;
items2[4] = {id: 'audio-missing', value: AUDIO_MISSING, label: isEndStream ? Reflect.apply(string, intl,
[t['Xwv41+']]) : Reflect.apply(string, intl, [t.G2egzT])};
const AUDIO_POOR = StreamIssueReportReasons.AUDIO_POOR;
string = intl.string;
items2[5] = {id: 'audio-poor', value: AUDIO_POOR, label: isEndStream ? Reflect.apply(string, intl,
[t['fHey+d']]) : Reflect.apply(string, intl, [t.aHOfIo])};
const STREAM_STOPPED = StreamIssueReportReasons.STREAM_STOPPED;
items2[6] = {id: 'stream-stopped', value: STREAM_STOPPED, label: intl.string(t.uEoqQp)};
object2 = {id: 'vibes-off'};
const VIBES_OFF = StreamIssueReportReasons.VIBES_OFF;
object2.value = VIBES_OFF;
object2.label = intl.string(t['++JLL0']);
items2[7] = object2;
const OTHER = StreamIssueReportReasons.OTHER;
items2[8] = {id: 'other', value: OTHER, label: intl.string(t.emlT91)};
return items2;
}
@@ -0,0 +1,216 @@
/* Metro module 10796; source: modules/go_live/utils/getStreamSettingsForPreset.tsx; dependencies: [4282, 10797, 10798, 2] */
function _fun82938(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10982:6, offset: 0x01f073f3, size: 211 bytes, params: 8, frame: 20
const _arrayLikeToArray_82941 = 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 = getApplicationStreamPresetValues;
const closure2 = getStreamSettingsForPreset;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const streamSettingsConstantsModule = require(4282) /* metro dependency 4282: StreamSettingsConstants */;
const env0_2 = streamSettingsConstantsModule.ApplicationStreamFPS;
const env0_3 = streamSettingsConstantsModule.ApplicationStreamPresets;
const env0_4 = streamSettingsConstantsModule.ApplicationStreamResolutions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/go_live/utils/getStreamSettingsForPreset.tsx');
exports.default = closure2;
exports.getApplicationStreamPresetValues = closure;
exports.getMaxSettingsForPreset = getMaxSettingsForPreset;
exports.canStreamWithPreset = canStreamWithPreset;
}
function _createForOfIteratorHelperLoose_82939(a0, a1) { // fn#82939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10982:198, offset: 0x01f074c6, 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 _fun82940;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_82941(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_82941(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_82941(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun82940;
}
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 getApplicationStreamPresetValues() { // fn#82942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10982:1108, offset: 0x01f0763a, size: 505 bytes, params: 1, frame: 15
var object2;
const defaultImport = importDefault(10797) /* metro dependency 10797: GoLiveVideoPresetResolutionExperiment */;
const getConfig = defaultImport.getConfig;
const videoPresetResolutionMax = Reflect.apply(getConfig, defaultImport,
[{location: 'getApplicationStreamPresetValues'}]).videoPresetResolutionMax;
object2 = {};
const PRESET_DOCUMENTS = ApplicationStreamPresets.PRESET_DOCUMENTS;
let RESOLUTION_SOURCE = ApplicationStreamResolutions.RESOLUTION_SOURCE;
const FPS_15 = ApplicationStreamFPS.FPS_15;
const items3 = [{resolution: RESOLUTION_SOURCE, fps: FPS_15}];
RESOLUTION_SOURCE = ApplicationStreamResolutions.RESOLUTION_SOURCE;
const FPS_5 = ApplicationStreamFPS.FPS_5;
items3[1] = {resolution: RESOLUTION_SOURCE, fps: FPS_5};
object2[PRESET_DOCUMENTS] = items3;
const PRESET_VIDEO = ApplicationStreamPresets.PRESET_VIDEO;
let FPS_60 = ApplicationStreamFPS.FPS_60;
const items2 = [{resolution: videoPresetResolutionMax, fps: FPS_60}];
let RESOLUTION_1080 = ApplicationStreamResolutions.RESOLUTION_1080;
FPS_60 = ApplicationStreamFPS.FPS_60;
items2[1] = {resolution: RESOLUTION_1080, fps: FPS_60};
let RESOLUTION_720 = ApplicationStreamResolutions.RESOLUTION_720;
FPS_60 = ApplicationStreamFPS.FPS_60;
items2[2] = {resolution: RESOLUTION_720, fps: FPS_60};
RESOLUTION_720 = ApplicationStreamResolutions.RESOLUTION_720;
let FPS_30 = ApplicationStreamFPS.FPS_30;
items2[3] = {resolution: RESOLUTION_720, fps: FPS_30};
object2[PRESET_VIDEO] = items2;
const PRESET_AUTO = ApplicationStreamPresets.PRESET_AUTO;
object2[PRESET_AUTO] = [];
const PRESET_CUSTOM = ApplicationStreamPresets.PRESET_CUSTOM;
object2[PRESET_CUSTOM] = [];
const PRESET_MOBILE_DEFAULT = ApplicationStreamPresets.PRESET_MOBILE_DEFAULT;
RESOLUTION_720 = ApplicationStreamResolutions.RESOLUTION_720;
FPS_30 = ApplicationStreamFPS.FPS_30;
object2[PRESET_MOBILE_DEFAULT] = [{resolution: RESOLUTION_720, fps: FPS_30}];
const PRESET_MOBILE_PERFORMANCE = ApplicationStreamPresets.PRESET_MOBILE_PERFORMANCE;
const RESOLUTION_480 = ApplicationStreamResolutions.RESOLUTION_480;
FPS_30 = ApplicationStreamFPS.FPS_30;
object2[PRESET_MOBILE_PERFORMANCE] = [{resolution: RESOLUTION_480, fps: FPS_30}];
const PRESET_MOBILE_HIGH_QUALITY = ApplicationStreamPresets.PRESET_MOBILE_HIGH_QUALITY;
RESOLUTION_1080 = ApplicationStreamResolutions.RESOLUTION_1080;
FPS_60 = ApplicationStreamFPS.FPS_60;
object2[PRESET_MOBILE_HIGH_QUALITY] = [{resolution: RESOLUTION_1080, fps: FPS_60}];
return object2;
}
function getStreamSettingsForPreset(a0, a1, a2) { // fn#82943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10982:1810, offset: 0x01f07833, size: 161 bytes, params: 4, frame: 25
var value4;
var defaultImport;
var resolution;
var fps;
var value5;
const property = getApplicationStreamPresetValues()[a0];
if (property == null) {
return null;
}
const value2 = _createForOfIteratorHelperLoose_82939(property);
const value3 = value2();
let done = value3.done;
if (done) {
return null;
}
let r3 = value3;
loopExit2: while (true) {
value4 = r3.value;
defaultImport = importDefault(10798) /* metro dependency 10798: canStreamWithSettings */;
resolution = value4.resolution;
fps = value4.fps;
if (defaultImport(a0, resolution, fps, a1, a2)) {
break loopExit2;
}
value5 = value2();
done = value5.done;
if (done) {
return null;
}
r3 = value5;
continue;
}
return [value4.resolution, value4.fps];
}
function getMaxSettingsForPreset(a0) { // fn#82944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10982:2294, offset: 0x01f078d4, size: 49 bytes, params: 2, frame: 11
const getApplicationStreamPresetValuesBinding = getApplicationStreamPresetValues;
const value = undefined;
const property = getApplicationStreamPresetValuesBinding()[a0];
const value3 = null;
const r1 = value3 == property ? value : property[0];
return value3 != r1 ? r1 : value3;
}
function canStreamWithPreset(a0, a1, a2) { // fn#82945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10982:2446, offset: 0x01f07905, size: 33 bytes, params: 4, frame: 15
return getStreamSettingsForPreset(a0, a1, a2) != null;
}
@@ -0,0 +1,10 @@
/* Metro module 4490; source: modules/go_live/utils/getStreamSourceMetadata.native.tsx; dependencies: [2] */
function _fun38259(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4668:6, offset: 0x010bafbc, size: 85 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/go_live/utils/getStreamSourceMetadata.native.tsx');
exports.default = function() {
return {};
};
}
@@ -0,0 +1,32 @@
/* Metro module 4494; source: modules/go_live/utils/getTitleFromPickedStreamContent.tsx; dependencies: [1244, 2] */
function _fun38347(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4672:6, offset: 0x010bd86d, size: 94 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/go_live/utils/getTitleFromPickedStreamContent.tsx');
exports.default = getTitleFromPickedStreamContent;
}
function getTitleFromPickedStreamContent(a0) { // fn#38348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4672:193, offset: 0x010bd8cb, size: 201 bytes, params: 2, frame: 17
var r0;
var value;
var intl;
if (a0.windows.length > 0) {
value = a0.windows.map(function(a0) {
return a0.title;
});
value = value.join(', ');
r0 = value;
} else if (a0.applications.length > 0) {
value = a0.applications.map(_fun38350);
value = value.join(', ');
r0 = value;
} else if (a0.displays.length > 0) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.R4wpLN);
} else {
r0 = null;
}
return r0;
}
@@ -0,0 +1,28 @@
/* Metro module 15559; source: modules/go_live/utils/trackStreamProblem.tsx; dependencies: [661, 683, 2] */
function _fun119096(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15756:6, offset: 0x024fc3ed, size: 120 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/go_live/utils/trackStreamProblem.tsx');
exports.default = trackStreamProblem;
}
function trackStreamProblem({problem, stream, feedback, streamApplication, analyticsData, location, rating, category, variant}) { // fn#119097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15756:209, offset: 0x024fc465, size: 222 bytes, params: 2, frame: 23
rating = rating === undefined ? null : rating;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const STREAM_REPORT_PROBLEM = AnalyticEvents.STREAM_REPORT_PROBLEM;
const object2 = {reason: problem, category: category, reason_variant: variant};
object2.streamer_user_id = stream.ownerId;
object2.stream_channel_id = stream.channelId;
object2.guild_id = stream.guildId;
const value = null;
object2.application_id = value != streamApplication ? streamApplication.id : value;
object2.application_name = value != streamApplication ? streamApplication.name : value;
object2.location = location;
object2.rating = rating;
object2.feedback = feedback;
copyDataProperties(object2, analyticsData, problem);
Reflect.apply(track, defaultImport, [STREAM_REPORT_PROBLEM, object2]);
}
@@ -0,0 +1,19 @@
/* Metro module 8915; source: modules/go_live/utils/transitionToStream.native.tsx; dependencies: [1379, 4080, 5080, 7709, 2] */
function _fun69580(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9100:6, offset: 0x01c77451, size: 118 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/go_live/utils/transitionToStream.native.tsx');
exports.default = transitionToStream;
}
function transitionToStream({channelId}) { // fn#69581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9100:201, offset: 0x01c774c7, size: 123 bytes, params: 2, frame: 16
const channel = ChannelStore.getChannel(channelId);
if (channel != null) {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popAll();
(require(7709) /* metro dependency 7709: PrivateChannelCallUtils */).openGuildVoiceModal(channel, 'Go Live');
}
}
@@ -0,0 +1,19 @@
/* Metro module 4493; source: modules/go_live/utils/windowSourceMatches.tsx; dependencies: [57, 2] */
function _fun38345(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4671:6, offset: 0x010bd7b7, size: 104 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(57) /* metro dependency 57 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/go_live/utils/windowSourceMatches.tsx');
exports.default = windowSourceMatches;
}
function windowSourceMatches(a0, a1) { // fn#38346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4671:195, offset: 0x010bd81f, size: 78 bytes, params: 3, frame: 14
if (a1 == null) {
return false;
}
let value = a0.split(':');
value = env0_0(value, 2);
value = value[0] === 'window';
return value && value[1] === a1;
}