425 lines
26 KiB
TypeScript
425 lines
26 KiB
TypeScript
/* Metro module 13591; source: modules/quests/native/QuestBottomSheet/QuestBottomSheet.tsx; dependencies: [57, 31, 27, 7093, 6528, 33, 4501, 697, 7099, 9484, 3857, 1244, 8947, 9483, 9520, 6531, 13568, 566, 10183, 7116, 6275, 13592, 13593, 9949, 9513, 7120, 9519, 9517, 9518, 7121, 13630, 13632, 13633, 7114, 8129, 4573, 2] */
|
|
function _fun103256(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:6, offset: 0x0225e8d9, size: 687 bytes, params: 8, frame: 28
|
|
const env0_0 = require;
|
|
const closure = useEnrolledQuestContentProps;
|
|
const closure2 = QuestBottomSheetContent;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
|
let value = importDefault(31) /* metro dependency 31 */;
|
|
const env0_5 = (require(31) /* metro dependency 31 */).useState;
|
|
const env0_6 = (require(27) /* metro dependency 27 */).View;
|
|
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
|
|
const questConstantsModule = require(6528) /* metro dependency 6528: QuestConstants */;
|
|
const env0_8 = questConstantsModule.QuestsExperimentLocations;
|
|
const env0_9 = questConstantsModule.QuestTaskPlatform;
|
|
const value3 = require(33) /* metro dependency 33 */;
|
|
const env0_10 = value3.jsx;
|
|
const env0_11 = value3.jsxs;
|
|
const env0_12 = value3.Fragment;
|
|
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = createStylesModule.createStyles;
|
|
const object = {};
|
|
const object5 = {display: 'flex'};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object5.paddingHorizontal = PX_16;
|
|
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object5.gap = PX_24;
|
|
object.contentContainer = object5;
|
|
const object6 = {display: 'flex'};
|
|
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object6.gap = PX_8;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object6.marginHorizontal = -PX_16;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object6.paddingHorizontal = PX_16;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object6.marginTop = PX_16;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object6.paddingTop = PX_16;
|
|
object6.borderTopWidth = 1;
|
|
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object6.borderTopColor = BORDER_SUBTLE;
|
|
object.microphoneUnit = object6;
|
|
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object.microphoneUnitHeader = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', gap: PX_8};
|
|
const env0_14 = Reflect.apply(createStyles, createStylesModule, [object]);
|
|
value = value.createContext({isInQuestBottomSheet: false});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheet.tsx');
|
|
exports.default = QuestBottomSheetConnected;
|
|
exports.QuestBottomSheetStep = {TASK_SELECT: 'TASK_SELECT', CONSOLE_CONNECT: 'CONSOLE_CONNECT',
|
|
TASK_STATUS: 'TASK_STATUS'};
|
|
exports.useEnrolledQuestContentProps = closure;
|
|
exports.QuestBottomSheetContent = closure2;
|
|
exports.QuestBottomSheetContext = value;
|
|
}
|
|
|
|
function QuestBottomSheet({quest, initialStep, sourceQuestContent}) { // fn#103257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:861, offset: 0x0225eb88, size: 628 bytes, params: 2, frame: 35
|
|
const styles = useStyles();
|
|
let QUEST_HOME_MOBILE = QuestsExperimentLocations.QUEST_HOME_MOBILE;
|
|
const {step, defibrillator, stepActions, handleTaskSelect,
|
|
showMicrophone} = useEnrolledQuestContentProps({quest: quest, initialStep: initialStep,
|
|
location: QUEST_HOME_MOBILE, sourceQuestContent: sourceQuestContent});
|
|
const value3 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useHasWatchVideoOnMobileTasks(quest.config);
|
|
const hasWatchVideoTasks2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).hasWatchVideoTasks(quest);
|
|
const isInGameQuest2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).isInGameQuest(quest);
|
|
const [property, env0_0] = env0_3(useState(0), 2);
|
|
const value7 = env0_4.useMemo(function() {
|
|
return {isInQuestBottomSheet: true};
|
|
}, []);
|
|
const Provider = env0_15.Provider;
|
|
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
|
const object = {};
|
|
const QuestBottomSheetHeader = importDefault(13592) /* metro dependency 13592: QuestBottomSheetHeader */;
|
|
QUEST_HOME_MOBILE = QuestsExperimentLocations.QUEST_HOME_MOBILE;
|
|
object.header = <QuestBottomSheetHeader quest={quest} step={step} location={QUEST_HOME_MOBILE} />;
|
|
object.footer = isInGameQuest2 ? null : hasWatchVideoTasks2 ? value3 ? ((Component) => <Component quest={quest} sourceQuestContent={sourceQuestContent} step={step} isDefibrilating={defibrillator.isActive} onLayout={onLayout_103259} onBack={stepActions.onBack} onDefib={defibrillator.start} onConnectConsoleNext={stepActions.onNext} />)(importDefault(13593) /* metro dependency 13593: QuestBottomSheetFooter */) : null : ((Component) => <Component quest={quest} sourceQuestContent={sourceQuestContent} step={step} isDefibrilating={defibrillator.isActive} onLayout={onLayout_103259} onBack={stepActions.onBack} onDefib={defibrillator.start} onConnectConsoleNext={stepActions.onNext} />)(importDefault(13593) /* metro dependency 13593: QuestBottomSheetFooter */);
|
|
object.startExpanded = true;
|
|
const TASK_SELECT = env0_13.TASK_SELECT;
|
|
QUEST_HOME_MOBILE = QuestsExperimentLocations.QUEST_HOME_MOBILE;
|
|
return (
|
|
<Provider value={value7}>
|
|
<BottomSheet {...object}>
|
|
<View style={[styles.contentContainer, {paddingBottom: step === TASK_SELECT ? 0 : property}]}>
|
|
<QuestBottomSheetContent
|
|
defibrillator={defibrillator}
|
|
quest={quest}
|
|
handleTaskSelect={handleTaskSelect}
|
|
location={QUEST_HOME_MOBILE}
|
|
showMicrophone={showMicrophone}
|
|
sourceQuestContent={sourceQuestContent}
|
|
step={step}
|
|
/>
|
|
</View>
|
|
</BottomSheet>
|
|
</Provider>
|
|
);
|
|
}
|
|
|
|
function useEnrolledQuestContentProps({quest, initialStep, location, sourceQuestContent}) { // fn#103260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:1913, offset: 0x0225ee07, size: 407 bytes, params: 2, frame: 23
|
|
const env0_2 = (require(9949) /* metro dependency 9949: AnalyticsHooks */).useTrackQuestContentClickedWithImpression();
|
|
const env0_3 = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId();
|
|
const value3 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
|
|
const value4 = (require(9483) /* metro dependency 9483: QuestHooks */).useIsQuestProgressing(quest);
|
|
const value6 = env0_3((require(9483) /* metro dependency 9483: QuestHooks */).useTaskPlatformScreen(quest, value3),
|
|
3);
|
|
const property = value6[0];
|
|
const env0_4 = value6[2];
|
|
const value7 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useHasWatchVideoOnMobileTasks(quest.config);
|
|
const value9 = env0_3(useSteps({quest: quest, initialStep: initialStep, location: location}), 2);
|
|
const property2 = value9[0];
|
|
const property3 = value9[1];
|
|
const value10 = useDefibrillator(quest);
|
|
const userStatus = quest.userStatus;
|
|
return {quest: quest, defibrillator: value10, step: property2, stepActions: property3,
|
|
showMicrophone: !(userStatus?.completedAt != null) && !value4 && property === (require(6531) /* metro dependency 6531: QuestTypes */).TaskPlatformScreen.CONSOLE && !value7,
|
|
handleTaskSelect: handleTaskSelect};
|
|
}
|
|
|
|
function QuestBottomSheetContent({defibrillator, quest, handleTaskSelect, showMicrophone, sourceQuestContent, step}) { // fn#103279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:5366, offset: 0x0225f98c, size: 400 bytes, params: 2, frame: 27
|
|
var r5;
|
|
var r10;
|
|
var items2;
|
|
showMicrophone = !(showMicrophone === undefined) && showMicrophone;
|
|
const value4 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useHasWatchVideoOnMobileTasks(quest.config);
|
|
const value5 = env0_4.useMemo(_fun103280, [quest, value4, sourceQuestContent]);
|
|
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
|
|
const TASK_SELECT = env0_13.TASK_SELECT;
|
|
const items3 = [step === TASK_SELECT && ((Component) => <Component onTaskSelect={handleTaskSelect} />)(importDefault(13632) /* metro dependency 13632: QuestBottomSheetTaskSelect */)];
|
|
const CONSOLE_CONNECT = env0_13.CONSOLE_CONNECT;
|
|
items3[1] = step === CONSOLE_CONNECT && ((Component) => <Component quest={quest} step={step} sourceQuestContent={sourceQuestContent} />)(importDefault(13633) /* metro dependency 13633: QuestBottomSheetConsoleConnect */);
|
|
const TASK_STATUS = env0_13.TASK_STATUS;
|
|
const value10 = step === TASK_STATUS;
|
|
if (value10) {
|
|
items2 = [value5];
|
|
r10 = showMicrophone && !value4;
|
|
r10 = r10 && <MicrophoneUnit quest={quest} errorHints={defibrillator?.errorHints} />;
|
|
items2[1] = r10;
|
|
r5 = <View>{items2}</View>;
|
|
} else {
|
|
r5 = value10;
|
|
}
|
|
items3[2] = r5;
|
|
return (
|
|
<>
|
|
{items3}
|
|
</>
|
|
);
|
|
}
|
|
|
|
function MicrophoneUnit({quest, errorHints}) { // fn#103281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:6111, offset: 0x0225fbec, size: 648 bytes, params: 2, frame: 30
|
|
var r7;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
var items;
|
|
var value7;
|
|
var value8;
|
|
const styles = useStyles();
|
|
const questHooksModule = require(9483) /* metro dependency 9483: QuestHooks */;
|
|
const useQuestHowToHelpArticle = questHooksModule.useQuestHowToHelpArticle;
|
|
const message = Reflect.apply(useQuestHowToHelpArticle, questHooksModule, []).message;
|
|
const value4 = (errorHints?.length ?? 0) > 0;
|
|
if (value4) {
|
|
if (errorHints != null) {
|
|
value7 = errorHints.map(function(a0) {
|
|
return a0.message;
|
|
});
|
|
items = [];
|
|
value8 = arraySpread(items, value7, 0, undefined);
|
|
items[value8] = message;
|
|
value8 + 1;
|
|
r7 = items;
|
|
} else {
|
|
r7 = [(require(7114) /* metro dependency 7114: QuestUtils */).isSponsoredPlayQuest(quest) ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bUyEZZ) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.GXqvC1,
|
|
|
|
|
|
{gameTitle: quest.config.messages.gameTitle})];
|
|
}
|
|
} else {
|
|
r7 = [(require(7114) /* metro dependency 7114: QuestUtils */).isSponsoredPlayQuest(quest) ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bUyEZZ) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.GXqvC1,
|
|
|
|
{gameTitle: quest.config.messages.gameTitle})];
|
|
}
|
|
const WarningIcon = (require(8129) /* metro dependency 8129: WarningIcon */).WarningIcon;
|
|
const warningIcon = <WarningIcon color={value4 ? 'text-feedback-critical' : 'text-feedback-warning'} />;
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
const items2 = [<View style={styles.microphoneUnitHeader}>{warningIcon}<Text variant="text-md/medium" color="mobile-text-heading-primary">{value4 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['28Ql27'],
|
|
{gameTitle: quest.config.messages.gameTitle}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.YstzGO)}</Text></View>];
|
|
items2[1] = r7.map(_fun103283);
|
|
return (
|
|
<View style={styles.microphoneUnit}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function QuestBottomSheetConnected({questId, initialStep, sourceQuestContent, questContentPosition}) { // fn#103284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:7103, offset: 0x0225feb5, size: 211 bytes, params: 2, frame: 21
|
|
const quest = (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore], function() {
|
|
return QuestStore.getQuest(questId);
|
|
});
|
|
if (quest == null) {
|
|
return null;
|
|
} else {
|
|
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
|
|
return (
|
|
<QuestContentImpressionTrackerNative
|
|
overrideVisibility
|
|
questOrQuests={quest}
|
|
questContent={(require(6531) /* metro dependency 6531: QuestTypes */).QuestContent.QUEST_BOTTOM_SHEET}
|
|
questContentPosition={questContentPosition}
|
|
sourceQuestContent={sourceQuestContent}
|
|
>
|
|
{children_103286}
|
|
</QuestContentImpressionTrackerNative>
|
|
);
|
|
}
|
|
}
|
|
|
|
function useSteps({quest, initialStep}) { // fn#103261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:2287, owner: useEnrolledQuestContentProps.useSteps, offset: 0x0225ef9e, size: 843 bytes, params: 2, frame: 31
|
|
const TaskPlatformScreen = (require(6531) /* metro dependency 6531: QuestTypes */).TaskPlatformScreen;
|
|
const userStatus = quest.userStatus;
|
|
const value2 = userStatus?.completedAt != null;
|
|
const questHooksModule = require(9483) /* metro dependency 9483: QuestHooks */;
|
|
const useConnectedAccounts = questHooksModule.useConnectedAccounts;
|
|
const xboxAndPlaystationAccounts = Reflect.apply(useConnectedAccounts, questHooksModule,
|
|
[]).xboxAndPlaystationAccounts;
|
|
let binding = env1_4;
|
|
const value4 = binding.useMemo(_fun103262, [quest, xboxAndPlaystationAccounts]);
|
|
const value5 = questHooksModule.useQuestTaskDetails(quest);
|
|
const value6 = questHooksModule.useIsQuestProgressing(quest);
|
|
const value8 = env1_3(questHooksModule.useTaskPlatformScreen(quest, value5), 3);
|
|
const property = value8[0];
|
|
const property2 = value8[1];
|
|
const property3 = value8[2];
|
|
binding = env1_4;
|
|
const useState = binding.useState;
|
|
let r7 = value4.length === 0 && !value2 && property === TaskPlatformScreen.CONSOLE;
|
|
r7 = !r7 ? initialStep === env1_13.CONSOLE_CONNECT : r7;
|
|
const value14 = env1_3(Reflect.apply(useState, binding, [r7]), 2);
|
|
const property4 = value14[0];
|
|
const property5 = value14[1];
|
|
const r12 = value6 || value5.progressSeconds > 0;
|
|
let r5 = value4.length !== 0 || value2;
|
|
r5 = !r5 ? property !== TaskPlatformScreen.CONSOLE : r5;
|
|
r5 = !r5 ? property4 : r5;
|
|
if (!r5) {
|
|
property5(true);
|
|
}
|
|
const value18 = env1_4.useCallback(_fun103265, [property3]);
|
|
const value19 = env1_4.useMemo(_fun103268, []);
|
|
const value20 = env1_4.useMemo(_fun103269, [property4, r12]);
|
|
const value21 = env1_4.useMemo(_fun103270, [property, property4, r12, value18]);
|
|
const value22 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useHasWatchVideoOnMobileTasks(quest.config);
|
|
const questHooksNativeModule = require(13568) /* metro dependency 13568: QuestHooksNative */;
|
|
const useMobileActivityQuest = questHooksNativeModule.useMobileActivityQuest;
|
|
const value23 = env1_4.useMemo(_fun103271, [property2, value21, value19, value20, value22,
|
|
Reflect.apply(useMobileActivityQuest, questHooksNativeModule, [quest]).isMobileActivityQuest]);
|
|
return [value23.type, {onBack: value23?.onBack, onNext: value23?.onNext}];
|
|
}
|
|
|
|
function useDefibrillator(a0) { // fn#103273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:3985, owner: useEnrolledQuestContentProps.useDefibrillator, offset: 0x0225f5c3, size: 206 bytes, params: 2, frame: 21
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const value = environment.__proto__;
|
|
const getQuestLoggerModule = require(7099) /* metro dependency 7099: getQuestLogger */;
|
|
const getQuestLogger = getQuestLoggerModule.getQuestLogger;
|
|
const QUEST_HOME_MOBILE = QuestsExperimentLocations.QUEST_HOME_MOBILE;
|
|
const value2 = Reflect.apply(getQuestLogger, getQuestLoggerModule, [{quest: a0, location: QUEST_HOME_MOBILE}]);
|
|
const [property, property2] = env1_3(useState([]), 2);
|
|
const [property3, property4] = env1_3(useState(false), 2);
|
|
const binding = env1_4;
|
|
const useCallback = binding.useCallback;
|
|
return {errorHints: property, isActive: property3, start: Reflect.apply(useCallback, binding, [_fun103274, [a0,
|
|
value2, property4, property2]])};
|
|
}
|
|
|
|
function handleTaskSelect(a0) { // fn#103278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:4688, owner: useEnrolledQuestContentProps.handleTaskSelect, offset: 0x0225f7bf, size: 461 bytes, params: 2, frame: 19
|
|
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
|
var object2;
|
|
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
|
var captureAdUserAction;
|
|
let value = environment.__proto__;
|
|
const CONSOLE = QuestTaskPlatform.CONSOLE;
|
|
const r6 = a0 === CONSOLE ? QuestContentCTA.SELECT_CONSOLE_PLATFORM : a0 === QuestTaskPlatform.DESKTOP ? QuestContentCTA.SELECT_DESKTOP_PLATFORM : QuestContentCTA.DESELECT_PLATFORM;
|
|
const adAnalyticsInterfaceExperimentModule = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
|
|
const shouldMigrateToAdAnalyticsInterface = adAnalyticsInterfaceExperimentModule.shouldMigrateToAdAnalyticsInterface;
|
|
const AdAnalyticsInterfaceExperimentStep = adAnalyticsInterfaceExperimentModule.AdAnalyticsInterfaceExperimentStep;
|
|
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
|
|
if (Reflect.apply(shouldMigrateToAdAnalyticsInterface, adAnalyticsInterfaceExperimentModule,
|
|
[STEP_2_CLICKED_INTERNAL, 'quest_bottom_sheet'])) {
|
|
value = require(9517) /* metro dependency 9517: captureAdUserAction */;
|
|
captureAdUserAction = value.captureAdUserAction;
|
|
object2 = {};
|
|
object2.type = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType.CLICK_INTERNAL;
|
|
object2.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
|
|
object2.adCreativeId = quest.id;
|
|
object2.questContentCTA = r6;
|
|
object2.surfaceId = QuestContent.QUEST_BOTTOM_SHEET;
|
|
object2.sourceQuestContent = sourceQuestContent;
|
|
object2.impressionId = env0_3;
|
|
Reflect.apply(captureAdUserAction, value, [object2]);
|
|
} else {
|
|
env0_2({questId: quest.id, questContent: QuestContent.QUEST_BOTTOM_SHEET, questContentCTA: r6,
|
|
sourceQuestContent: sourceQuestContent});
|
|
}
|
|
env0_4(a0);
|
|
}
|
|
|
|
function _fun103280() { // fn#103280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:5561, offset: 0x0225fb1c, size: 208 bytes, params: 1, frame: 17
|
|
var r0;
|
|
var moduleValue;
|
|
var isInGameQuest2;
|
|
var moduleValue2;
|
|
if (env0_2) {
|
|
const QuestBottomSheetProgressCardWatchTask = (require(13630) /* metro dependency 13630: QuestBottomSheetProgressCard */).QuestBottomSheetProgressCardWatchTask;
|
|
r0 = <QuestBottomSheetProgressCardWatchTask quest={quest} sourceQuestContent={sourceQuestContent} />;
|
|
} else {
|
|
moduleValue = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
|
isInGameQuest2 = moduleValue.isInGameQuest(quest);
|
|
moduleValue2 = require(13630) /* metro dependency 13630: QuestBottomSheetProgressCard */;
|
|
r0 = isInGameQuest2 ? <moduleValue2.QuestBottomSheetProgressCardInGameTask quest={quest} sourceQuestContent={sourceQuestContent} /> : <moduleValue2.QuestBottomSheetProgressCardPlayStreamTask quest={quest} sourceQuestContent={sourceQuestContent} />;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun103283(a0, a1) { // fn#103283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:6880, offset: 0x0225fe74, size: 65 bytes, params: 3, frame: 15
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
return <Text {...{variant: 'text-sm/normal', children: a0}} key={a1} />;
|
|
}
|
|
|
|
function QuestBottomSheetConnectedChildren() { // fn#103286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:7481, owner: QuestBottomSheetConnected.children, offset: 0x0225ffa3, size: 53 bytes, params: 1, frame: 14
|
|
return (
|
|
<QuestBottomSheet
|
|
quest={quest}
|
|
initialStep={initialStep}
|
|
sourceQuestContent={sourceQuestContent}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function _fun103262() { // fn#103262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:2464, offset: 0x0225f2e9, size: 64 bytes, params: 1, frame: 11
|
|
var environment;
|
|
let value = environment.__proto__.__proto__;
|
|
value = Reflect.apply((require(9520) /* metro dependency 9520: QuestPlatformUtils */).supportedConsoles, value,
|
|
[quest]);
|
|
return value.filter(function(a0) {
|
|
var env0_0 = a0;
|
|
return xboxAndPlaystationAccounts.find(_fun103264);
|
|
});
|
|
}
|
|
|
|
function _fun103265() { // fn#103265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:2912, offset: 0x0225f34d, size: 29 bytes, params: 1, frame: 12
|
|
env0_6(false);
|
|
env0_4(null);
|
|
}
|
|
|
|
function _fun103268() { // fn#103268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:3007, offset: 0x0225f38e, size: 36 bytes, params: 1, frame: 2
|
|
const TASK_STATUS = env2_13.TASK_STATUS;
|
|
return [{type: TASK_STATUS, shouldShow: true}];
|
|
}
|
|
|
|
function _fun103269() { // fn#103269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:3066, offset: 0x0225f3b2, size: 95 bytes, params: 1, frame: 5
|
|
const value = environment.__proto__.__proto__;
|
|
const CONSOLE_CONNECT = env2_13.CONSOLE_CONNECT;
|
|
const TASK_STATUS = env2_13.TASK_STATUS;
|
|
return [{type: CONSOLE_CONNECT, shouldShow: env0_5, onNext: hideConsoleSelect}, {type: TASK_STATUS,
|
|
shouldShow: true, onBack: env0_7 ? undefined : showConsoleSelect}];
|
|
}
|
|
|
|
function _fun103270() { // fn#103270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:3225, offset: 0x0225f411, size: 249 bytes, params: 1, frame: 17
|
|
const object2 = {};
|
|
const TASK_SELECT = env2_13.TASK_SELECT;
|
|
object2.type = TASK_SELECT;
|
|
let binding = env0_2;
|
|
const value3 = undefined;
|
|
const TaskPlatformScreen = (require(6531) /* metro dependency 6531: QuestTypes */).TaskPlatformScreen;
|
|
const SELECT = TaskPlatformScreen.SELECT;
|
|
object2.shouldShow = binding === SELECT;
|
|
const CONSOLE_CONNECT = env2_13.CONSOLE_CONNECT;
|
|
binding = env0_2;
|
|
const CONSOLE = TaskPlatformScreen.CONSOLE;
|
|
const TASK_STATUS = env2_13.TASK_STATUS;
|
|
return [object2, {type: CONSOLE_CONNECT, shouldShow: binding === CONSOLE && env0_5, onBack: env0_8,
|
|
onNext: hideConsoleSelect}, {type: TASK_STATUS, shouldShow: true,
|
|
onBack: env0_7 ? value3 : env0_2 === TaskPlatformScreen.CONSOLE ? showConsoleSelect : env0_8}];
|
|
}
|
|
|
|
function _fun103271() { // fn#103271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:3661, offset: 0x0225f50a, size: 174 bytes, params: 1, frame: 14
|
|
const r2 = env0_3.length === 1 && env0_3.includes(QuestTaskPlatform.DESKTOP) || env0_14 || isMobileActivityQuest ? env0_11 : env0_3.length === 1 && env0_3.includes(QuestTaskPlatform.CONSOLE) ? env0_12 : env0_13;
|
|
return r2.find(function(a0) {
|
|
return a0.shouldShow;
|
|
}) ?? r2.at(-1);
|
|
}
|
|
|
|
function _fun103274() { // fn#103274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:4162, offset: 0x0225f691, size: 116 bytes, params: 1, frame: 14
|
|
env0_3(true);
|
|
const questActionCreatorsModule = require(9484) /* metro dependency 9484: QuestActionCreators */;
|
|
let value = questActionCreatorsModule.manuallyStartConsoleQuest(env0_0.id);
|
|
value = value.then(_fun103275);
|
|
value = value.catch(_fun103276);
|
|
value.finally(_fun103277);
|
|
}
|
|
|
|
function _fun103263(a0) { // fn#103263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:2506, offset: 0x0225f329, size: 36 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
return xboxAndPlaystationAccounts.find(_fun103264);
|
|
}
|
|
|
|
function _fun103275({errorHints}) { // fn#103275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:4219, offset: 0x0225f705, size: 25 bytes, params: 2, frame: 11
|
|
return env1_2(errorHints);
|
|
}
|
|
|
|
function _fun103276(a0) { // fn#103276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:4251, offset: 0x0225f71e, size: 161 bytes, params: 2, frame: 19
|
|
env1_2([]);
|
|
env1_1.error('Failed to start console quest', a0);
|
|
const defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
|
const open = defaultImport.open;
|
|
const object2 = {key: 'START_DEFIBRILLATOR_ERROR'};
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const string = intl.string;
|
|
const CKsXk3 = (require(1244) /* metro dependency 1244: indexNative */).t.CKsXk3;
|
|
object2.content = Reflect.apply(string, intl, [CKsXk3]);
|
|
object2.icon = importDefault(8947) /* metro dependency 8947 */;
|
|
Reflect.apply(open, defaultImport, [object2]);
|
|
}
|
|
|