124 lines
6.8 KiB
TypeScript
124 lines
6.8 KiB
TypeScript
/* Metro module 10586; source: modules/activities/utils/InviteEmbedTextUtils.tsx; dependencies: [1878, 661, 1244, 2678, 4617, 2] */
|
|
function _fun81670(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10772:6, offset: 0x01ed9388, size: 202 bytes, params: 8, frame: 21
|
|
const env0_0 = require;
|
|
const closure = getRequestToStreamText;
|
|
const closure2 = getAskToJoinText;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
const env0_4 = (require(661) /* metro dependency 661: Constants */).ActivityActionTypes;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/InviteEmbedTextUtils.tsx');
|
|
exports.getHeaderText = getHeaderText_81673;
|
|
exports.getRequestToStreamText = closure;
|
|
exports.getAskToJoinText = closure2;
|
|
exports.getDeadGameInviteText = getDeadGameInviteText;
|
|
exports.getPartyText = getPartyText;
|
|
}
|
|
|
|
function getRequestToStreamText(a0, a1, a2) { // fn#81671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10772:136, offset: 0x01ed9452, size: 205 bytes, params: 4, frame: 20
|
|
var r0;
|
|
var value;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
var formatToPlainString;
|
|
var property;
|
|
if (a0.author.id === a2) {
|
|
r0 = intl.string((importDefault(2678) /* metro dependency 2678: RequestToStreamMessages */)['8B3U5O']);
|
|
} else {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = (importDefault(2678) /* metro dependency 2678: RequestToStreamMessages */)['d/qbC0'];
|
|
value = require(4617) /* metro dependency 4617: NicknameUtils */;
|
|
value = Reflect.apply(formatToPlainString, intl, [property, {username: value.getName(a1.guild_id, a1.id,
|
|
a0.author)}]);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function getAskToJoinText(a0, a1, a2, a3, a4) { // fn#81672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10772:342, offset: 0x01ed951f, size: 425 bytes, params: 6, frame: 19
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
var formatToPlainString;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
var value2;
|
|
if (a0.author.id === a3) {
|
|
if (a2.isPrivate()) {
|
|
value2 = UserStore.getUser(a2.getRecipientId());
|
|
if (value2 != null) {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
return a4 ? Reflect.apply(formatToPlainString, intl, [t.JddpN2, {username: value2.globalName,
|
|
appName: a1}]) : Reflect.apply(formatToPlainString, intl, [t.gYVkSW, {username: value2.globalName,
|
|
appName: a1}]);
|
|
}
|
|
formatToPlainString = intl.formatToPlainString;
|
|
return a4 ? Reflect.apply(formatToPlainString, intl, [t['2N1kNS'],
|
|
{appName: a1}]) : Reflect.apply(formatToPlainString, intl, [t.IA6uDV, {appName: a1}]);
|
|
}
|
|
formatToPlainString = intl.formatToPlainString;
|
|
return a4 ? Reflect.apply(formatToPlainString, intl, [t['2N1kNS'],
|
|
{appName: a1}]) : Reflect.apply(formatToPlainString, intl, [t.IA6uDV, {appName: a1}]);
|
|
}
|
|
formatToPlainString = intl.formatToPlainString;
|
|
return a4 ? Reflect.apply(formatToPlainString, intl, [t.XE8axA, {username: a0.author.globalName,
|
|
appName: a1}]) : Reflect.apply(formatToPlainString, intl, [t.hgcjOn, {username: a0.author.globalName,
|
|
appName: a1}]);
|
|
}
|
|
|
|
function getHeaderText_81673(a0, a1, a2) { // fn#81673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10772:1073, offset: 0x01ed96c8, size: 411 bytes, params: 4, frame: 18
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const LISTEN = ActivityActionTypes.LISTEN;
|
|
if (LISTEN === a1) {
|
|
return intl.formatToPlainString(t['/8czH4'], {name: a0});
|
|
}
|
|
const WATCH = ActivityActionTypes.WATCH;
|
|
if (WATCH === a1) {
|
|
return intl.formatToPlainString(t.BBJXVk, {name: a0});
|
|
}
|
|
const JOIN = ActivityActionTypes.JOIN;
|
|
if (JOIN === a1) {
|
|
return a2 ? undefined : intl.string(t.pkq6Vq);
|
|
}
|
|
const STREAM_REQUEST = ActivityActionTypes.STREAM_REQUEST;
|
|
if (STREAM_REQUEST === a1) {
|
|
return intl.string((importDefault(2678) /* metro dependency 2678: RequestToStreamMessages */).DKHhec);
|
|
}
|
|
ActivityActionTypes.JOIN_REQUEST;
|
|
const string = intl.string;
|
|
const Ckxb6j = t.Ckxb6j;
|
|
return Reflect.apply(string, intl, [Ckxb6j]);
|
|
}
|
|
|
|
function getDeadGameInviteText(a0, a1, a2, a3, a4) { // fn#81674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10772:1591, offset: 0x01ed9863, size: 224 bytes, params: 6, frame: 20
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const type = a0.activity?.type;
|
|
const LISTEN = ActivityActionTypes.LISTEN;
|
|
if (LISTEN === type) {
|
|
return intl.string(a4 ? t.x1UXGR : t['Ek+51n']);
|
|
}
|
|
const WATCH = ActivityActionTypes.WATCH;
|
|
if (WATCH === type) {
|
|
return intl.string(a4 ? t.x1UXGR : t['Ek+51n']);
|
|
}
|
|
const JOIN = ActivityActionTypes.JOIN;
|
|
if (JOIN === type) {
|
|
return intl.string(a4 ? t.x1UXGR : t['Ek+51n']);
|
|
}
|
|
const STREAM_REQUEST = ActivityActionTypes.STREAM_REQUEST;
|
|
if (STREAM_REQUEST === type) {
|
|
return getRequestToStreamText(a0, a2, a3);
|
|
}
|
|
ActivityActionTypes.JOIN_REQUEST;
|
|
return getAskToJoinText(a0, a1, a2, a3, true);
|
|
}
|
|
|
|
function getPartyText({activityActionType, maxPartySize, partySize}) { // fn#81675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10772:1928, offset: 0x01ed9943, size: 369 bytes, params: 2, frame: 20
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const STREAM_REQUEST = ActivityActionTypes.STREAM_REQUEST;
|
|
return activityActionType === STREAM_REQUEST ? '' : activityActionType === ActivityActionTypes.LISTEN ? maxPartySize > 0 ? intl.formatToPlainString(t.Zogoou,
|
|
{partySize: partySize, maxPartySize: maxPartySize}) : intl.formatToPlainString(t.UGei0j,
|
|
{partySize: partySize}) : maxPartySize > 0 ? intl.formatToPlainString(t.gLu7NU, {partySize: partySize,
|
|
maxPartySize: maxPartySize}) : intl.formatToPlainString(t['65JnWC'], {partySize: partySize});
|
|
}
|
|
|