Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,153 @@
|
||||
/* Metro module 9505; source: modules/quests/utils/QuestCopyUtils.tsx; dependencies: [6528, 1244, 7110, 6797, 2] */
|
||||
function _fun74183(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9691:6, offset: 0x01d83745, size: 258 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const questConstantsModule = require(6528) /* metro dependency 6528: QuestConstants */;
|
||||
const env0_2 = questConstantsModule.QuestHomeSortMethods;
|
||||
const env0_3 = questConstantsModule.RewardFilterTypes;
|
||||
const env0_4 = questConstantsModule.TaskFilterTypes;
|
||||
const closure = function(a0) {
|
||||
return '' + global.location.protocol + '//' + global.location.host + '/quests/' + a0;
|
||||
};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/utils/QuestCopyUtils.tsx');
|
||||
exports.getContextualEntrypointHeading = getContextualEntrypointHeading;
|
||||
exports.getDisclosureText = getDisclosureText;
|
||||
exports.getExternalCtaLabel = function(a0) {
|
||||
return a0.config.ctaConfig.buttonLabel;
|
||||
};
|
||||
exports.getSortMethodText = getSortMethodText;
|
||||
exports.getFilterTypeText = getFilterTypeText;
|
||||
exports.getFilterGroupHeadingText = getFilterGroupHeadingText;
|
||||
exports.getQuestUrl = closure;
|
||||
exports.getCtaLink = function(a0) {
|
||||
return a0.ctaConfig.link;
|
||||
};
|
||||
exports.copyShareLink = copyShareLink;
|
||||
exports.getDefaultReward = function(a0) {
|
||||
var Error;
|
||||
var value;
|
||||
if (a0.rewardsConfig.rewards.length === 0) {
|
||||
Error = global.Error;
|
||||
value = 'Quest ' + a0.id + ' has no rewards configured';
|
||||
value = new Error();
|
||||
throw value;
|
||||
}
|
||||
return a0.rewardsConfig.rewards[0];
|
||||
};
|
||||
}
|
||||
|
||||
function getContextualEntrypointHeading({quest, taskDetails, thirdPartyTaskDetails}) { // fn#74185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9691:351, offset: 0x01d83885, size: 542 bytes, params: 2, frame: 19
|
||||
var percentComplete;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
let userStatus = quest.userStatus;
|
||||
const value = undefined;
|
||||
if ((userStatus == null ? value : userStatus.completedAt) != null) {
|
||||
return intl.string(t.BzFeTF);
|
||||
}
|
||||
userStatus = quest.userStatus;
|
||||
if ((userStatus == null ? value : userStatus.enrolledAt) != null) {
|
||||
percentComplete = taskDetails.percentComplete;
|
||||
percentComplete = thirdPartyTaskDetails != null ? thirdPartyTaskDetails.percentComplete : percentComplete;
|
||||
return percentComplete >= 0.75 ? intl.string(t.gvCR4H) : percentComplete >= 0.45 && percentComplete <= 0.55 ? intl.string(t.JNx8sG) : percentComplete > 0 ? intl.string(t.JMbfnc) : intl.string(t['7e5k7L']);
|
||||
}
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const EQa7os = t.EQa7os;
|
||||
return Reflect.apply(formatToPlainString, intl, [EQa7os, {questName: quest.config.messages.questName}]);
|
||||
}
|
||||
|
||||
function getDisclosureText({isTargetedDisclosure, isContextualDisclosure, isVideoQuest, gamePublisher, gameTitle, cosponsorName}) { // fn#74186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9691:964, offset: 0x01d83aa3, size: 468 bytes, params: 2, frame: 21
|
||||
var r0;
|
||||
var r5;
|
||||
var r1;
|
||||
var value;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToPlainString;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
if (isTargetedDisclosure) {
|
||||
if (isContextualDisclosure) {
|
||||
r1 = intl.string(t.nPg6f1);
|
||||
} else {
|
||||
r5 = cosponsorName == null ? intl.formatToPlainString(t.Piihy1,
|
||||
{gamePublisher: gamePublisher}) : intl.formatToPlainString(t.DV47Gy, {gamePublisher: gamePublisher,
|
||||
cosponsorName: cosponsorName});
|
||||
value = intl.string(t.fEbrT8);
|
||||
value = '' + r5 + ' ' + value;
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
r0 = isVideoQuest ? Reflect.apply(formatToPlainString, intl, [t.rctMRl,
|
||||
{gamePublisher: gamePublisher}]) : Reflect.apply(formatToPlainString, intl, [t['5bQWNG'],
|
||||
{gamePublisher: gamePublisher, gameTitle: gameTitle}]);
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getSortMethodText(a0) { // fn#74188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9691:1627, offset: 0x01d83c8e, size: 316 bytes, params: 2, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const SUGGESTED = QuestHomeSortMethods.SUGGESTED;
|
||||
if (SUGGESTED === a0) {
|
||||
return intl.string(t.gBfXPZ);
|
||||
}
|
||||
const MOST_RECENT = QuestHomeSortMethods.MOST_RECENT;
|
||||
if (MOST_RECENT === a0) {
|
||||
return intl.string(t.K6oEu2);
|
||||
}
|
||||
const EXPIRING_SOON = QuestHomeSortMethods.EXPIRING_SOON;
|
||||
if (EXPIRING_SOON === a0) {
|
||||
return intl.string(t.IB22n3);
|
||||
}
|
||||
const RECENTLY_ENROLLED = QuestHomeSortMethods.RECENTLY_ENROLLED;
|
||||
if (RECENTLY_ENROLLED === a0) {
|
||||
return intl.string(t['BB+2tX']);
|
||||
}
|
||||
}
|
||||
|
||||
function getFilterTypeText(a0) { // fn#74189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9691:1954, offset: 0x01d83dca, size: 392 bytes, params: 2, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const VIRTUAL_CURRENCY = RewardFilterTypes.VIRTUAL_CURRENCY;
|
||||
if (VIRTUAL_CURRENCY === a0) {
|
||||
return intl.string(t.ElYQFS);
|
||||
}
|
||||
const COLLECTIBLE = RewardFilterTypes.COLLECTIBLE;
|
||||
if (COLLECTIBLE === a0) {
|
||||
return intl.string(t.Jg17Ut);
|
||||
}
|
||||
const IN_GAME = RewardFilterTypes.IN_GAME;
|
||||
if (IN_GAME === a0) {
|
||||
return intl.string(t['O/J2kr']);
|
||||
}
|
||||
const VIDEO = TaskFilterTypes.VIDEO;
|
||||
if (VIDEO === a0) {
|
||||
return intl.string(t.e0iISA);
|
||||
}
|
||||
const PLAY = TaskFilterTypes.PLAY;
|
||||
if (PLAY === a0) {
|
||||
return intl.string(t['1nJR4p']);
|
||||
}
|
||||
}
|
||||
|
||||
function getFilterGroupHeadingText(a0) { // fn#74190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9691:2338, offset: 0x01d83f52, size: 151 bytes, params: 2, frame: 14
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
if (a0 === 'reward') {
|
||||
return intl.string(t.vjLqAU);
|
||||
}
|
||||
if (a0 === 'task') {
|
||||
return intl.string(t.Hufmss);
|
||||
}
|
||||
}
|
||||
|
||||
function copyShareLink(a0, {content, ctaContent, position, impressionId, sourceQuestContent}) { // fn#74192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9691:2605, offset: 0x01d83ffa, size: 136 bytes, params: 3, frame: 18
|
||||
(require(7110) /* metro dependency 7110: AnalyticsActions */).trackQuestContentClicked({questId: a0,
|
||||
questContent: content, questContentCTA: ctaContent, questContentPosition: position, impressionId: impressionId,
|
||||
sourceQuestContent: sourceQuestContent});
|
||||
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
clipboardUtilsNativeModule.copy(getQuestUrl(a0));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user