This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,98 +1,104 @@
/* Metro module 15664; source: modules/quests/native/ATTModal/ATTManager.android.tsx; dependencies: [6, 7, 15, 17, 18, 7125, 1216, 4860, 2] */
import ClassCallCheck from '../../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import AutomaticLifecycleManager from '../../../../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun120097(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15872:6, offset: 0x02520c5b, size: 230 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
let value = AutomaticLifecycleManager;
value = _fun120101(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/ATTModal/ATTManager.android.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/ATTModal/ATTManager.android.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_120098() { // fn#120098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15872:148, offset: 0x02520d41, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_120098_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun120101(a0) { // fn#120101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15872:351, offset: 0x02520da3, size: 97 bytes, params: 2, frame: 16
const closure = ATTManager;
env0_7(closure, a0);
return env0_4(closure, [{key: 'onPostConnectionOpen', value: value_120103}, {key: '_terminate', value: function() {
if (this._openATTPrePromptOrFlowTimeoutId != null) {
global.clearTimeout(this._openATTPrePromptOrFlowTimeoutId);
this._openATTPrePromptOrFlowTimeoutId = null;
function _isNativeReflectConstruct_120098() { // fn#120098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15872:148, offset: 0x02520d41, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
}}]);
}
function ATTManager(a0) { // fn#120102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15872:363, offset: 0x02520e04, size: 153 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, ATTManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(ATTManager);
binding = env1_5;
if (_isNativeReflectConstruct_120098()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
return (_isNativeReflectConstruct_120098_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = binding(this, r0);
value._openATTPrePromptOrFlowTimeoutId = null;
value.actions = {POST_CONNECTION_OPEN: value.onPostConnectionOpen};
return value;
}
function value_120103() { // fn#120103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15872:748, offset: 0x02520e9d, size: 86 bytes, params: 1, frame: 12
var value;
var property;
var moduleValue;
var error;
try {
value = environment.__proto__;
property = dependencyMap[5];
moduleValue = require(property);
moduleValue.fetchAdUser('post_connection_open');
} catch (error) {
value = importDefault(dependencyMap[6]);
value.captureException(error);
function _fun120101(a0) { // fn#120101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15872:351, offset: 0x02520da3, size: 97 bytes, params: 2, frame: 16
const ATTManager2 = ATTManager;
Inherits(ATTManager2, a0);
return CreateClass(ATTManager2, [{key: 'onPostConnectionOpen', value: value_120103}, {key: '_terminate',
value: function() {
if (this._openATTPrePromptOrFlowTimeoutId != null) {
global.clearTimeout(this._openATTPrePromptOrFlowTimeoutId);
this._openATTPrePromptOrFlowTimeoutId = null;
}
}}]);
function ATTManager(a0) { // fn#120102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15872:363, offset: 0x02520e04, size: 153 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, ATTManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(ATTManager);
binding = env1_5;
if (_isNativeReflectConstruct_120098()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value._openATTPrePromptOrFlowTimeoutId = null;
value.actions = {POST_CONNECTION_OPEN: value.onPostConnectionOpen};
return value;
}
function value_120103() { // fn#120103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15872:748, offset: 0x02520e9d, size: 86 bytes, params: 1, frame: 12
var value;
var property;
var moduleValue;
var error;
try {
value = environment.__proto__;
property = dependencyMap[5];
moduleValue = require(property);
moduleValue.fetchAdUser('post_connection_open');
} catch (error) {
value = importDefault(dependencyMap[6]);
value.captureException(error);
}
}
}
}
global.__d(_fun120097, 15664, [6, 7, 15, 17, 18, 7125, 1216, 4860,
2]) /* metro module 15664, dependencies: [6, 7, 15, 17, 18, 7125, 1216, 4860, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,18 +1,23 @@
/* Metro module 9521; source: modules/quests/native/AppStoreOverlayTelemetryManager.tsx; dependencies: [6, 7, 15, 17, 18, 661, 477, 676, 4860, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import AutomaticLifecycleManager from '../../../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ConstantsIOSModule from '../../../ConstantsIOS.tsx'; /* Metro dependency 676 */
function _fun74283(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:6, offset: 0x01d88cc3, size: 284 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
let value = AutomaticLifecycleManager;
value = _fun74287(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/AppStoreOverlayTelemetryManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/AppStoreOverlayTelemetryManager.tsx');
exports.default = value;
exports.setAppStoreOverlayOpen = function(a0) {
env0_8 = a0;
@@ -21,114 +26,120 @@ function _fun74283(global, require, importDefault, importAll, module, exports, d
env0_8 = null;
env0_9 = null;
};
}
function _isNativeReflectConstruct_74284() { // fn#74284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:173, offset: 0x01d88ddf, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_74284_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun74287(a0) { // fn#74287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:394, offset: 0x01d88e41, size: 72 bytes, params: 2, frame: 15
const closure = AppStoreOverlayTelemetryManager;
env0_6(closure, a0);
return env0_3(closure, [{key: 'handleAppStateUpdate', value: value_74290}]);
}
function AppStoreOverlayTelemetryManager(a0) { // fn#74288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:406, offset: 0x01d88e89, size: 152 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, AppStoreOverlayTelemetryManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_5(AppStoreOverlayTelemetryManager);
binding = env1_4;
if (_isNativeReflectConstruct_74284()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.actions = {APP_STATE_UPDATE: APP_STATE_UPDATE_74289};
return value;
}
function value_74290({state}) { // fn#74290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:858, offset: 0x01d88f21, size: 259 bytes, params: 2, frame: 18
var r1;
var r0;
var value3;
const AppStates = (require(676) /* metro dependency 676: ConstantsIOS */).AppStates;
var BACKGROUND;
var value4;
var binding;
const value = environment.__proto__;
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
if (isAndroid2) {
r0 = !isAndroid2;
} else {
value3 = env1_8 != null;
if (value3) {
if (state !== AppStates.ACTIVE) {
BACKGROUND = AppStates.BACKGROUND;
value4 = false;
if (state !== BACKGROUND) {
r1 = value4;
} else {
binding = env1_8;
binding.trackOverlayEvent(AnalyticEvents.QUEST_APP_STORE_OVERLAY_BACKGROUNDED);
env1_9 = global.Date.now();
r1 = value4;
}
} else if (env1_9 != null) {
binding = env1_8;
binding.trackOverlayEvent(AnalyticEvents.QUEST_APP_STORE_OVERLAY_RETURNED, global.Date.now() - env1_9);
r1 = false;
} else {
BACKGROUND = AppStates.BACKGROUND;
value4 = false;
if (state !== BACKGROUND) {
r1 = value4;
} else {
binding = env1_8;
binding.trackOverlayEvent(AnalyticEvents.QUEST_APP_STORE_OVERLAY_BACKGROUNDED);
env1_9 = global.Date.now();
r1 = value4;
}
}
} else {
r1 = value3;
function _isNativeReflectConstruct_74284() { // fn#74284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:173, offset: 0x01d88ddf, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
r0 = r1;
return (_isNativeReflectConstruct_74284_isNativeReflectConstruct = function() {
return !!result;
})();
}
return r0;
function _fun74287(a0) { // fn#74287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:394, offset: 0x01d88e41, size: 72 bytes, params: 2, frame: 15
const AppStoreOverlayTelemetryManager2 = AppStoreOverlayTelemetryManager;
Inherits(AppStoreOverlayTelemetryManager2, a0);
return CreateClass(AppStoreOverlayTelemetryManager2, [{key: 'handleAppStateUpdate', value: value_74290}]);
function AppStoreOverlayTelemetryManager(a0) { // fn#74288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:406, offset: 0x01d88e89, size: 152 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, AppStoreOverlayTelemetryManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(AppStoreOverlayTelemetryManager);
binding = env1_4;
if (_isNativeReflectConstruct_74284()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.actions = {APP_STATE_UPDATE: APP_STATE_UPDATE_74289};
return value;
function AppStoreOverlayTelemetryManagerAPP_STATE_UPDATE(a0) { // fn#74289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:713, owner: AppStoreOverlayTelemetryManager.APP_STATE_UPDATE, offset: 0x0114875f, size: 23 bytes, params: 2, frame: 11
return env0_0.handleAppStateUpdate(a0);
}
}
function value_74290({state}) { // fn#74290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:858, offset: 0x01d88f21, size: 259 bytes, params: 2, frame: 18
var r1;
var r0;
var value3;
const AppStates = (ConstantsIOSModule).AppStates;
var BACKGROUND;
var value4;
var binding;
const value = environment.__proto__;
const isAndroid2 = (PlatformUtilsModule).isAndroid();
if (isAndroid2) {
r0 = !isAndroid2;
} else {
value3 = env1_8 != null;
if (value3) {
if (state !== AppStates.ACTIVE) {
BACKGROUND = AppStates.BACKGROUND;
value4 = false;
if (state !== BACKGROUND) {
r1 = value4;
} else {
binding = env1_8;
binding.trackOverlayEvent(AnalyticEvents.QUEST_APP_STORE_OVERLAY_BACKGROUNDED);
env1_9 = global.Date.now();
r1 = value4;
}
} else if (env1_9 != null) {
binding = env1_8;
binding.trackOverlayEvent(AnalyticEvents.QUEST_APP_STORE_OVERLAY_RETURNED, global.Date.now() - env1_9);
r1 = false;
} else {
BACKGROUND = AppStates.BACKGROUND;
value4 = false;
if (state !== BACKGROUND) {
r1 = value4;
} else {
binding = env1_8;
binding.trackOverlayEvent(AnalyticEvents.QUEST_APP_STORE_OVERLAY_BACKGROUNDED);
env1_9 = global.Date.now();
r1 = value4;
}
}
} else {
r1 = value3;
}
r0 = r1;
}
return r0;
}
}
}
global.__d(_fun74283, 9521, [6, 7, 15, 17, 18, 661, 477, 676, 4860,
2]) /* metro module 9521, dependencies: [6, 7, 15, 17, 18, 661, 477, 676, 4860, 2] */;
@@ -1,43 +1,46 @@
/* Metro module 13564; source: modules/quests/native/BountiesBannerBackground.tsx; dependencies: [31, 27, 4502, 33, 566, 9543, 4589, 2] */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import LinearGradient from '../../../by-id/module-04589-LinearGradient.js'; /* Metro dependency 4589 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as VideoModule from '../../../components_native/common/Video.tsx'; /* Metro dependency 9543 */
function _fun103065(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13754:6, offset: 0x02255ed5, size: 232 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_3 = value2.StyleSheet;
const env0_4 = value2.View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const value3 = require(33) /* metro dependency 33 */;
const env0_6 = value3.jsx;
const env0_7 = value3.jsxs;
let value = ReactModule;
const env0_8 = [0, 0.6];
const env0_9 = ['rgba(0, 0, 0, 0)', 'rgba(0, 0, 0, 0.9)'];
value = value.memo(BountiesBannerBackground);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesBannerBackground.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesBannerBackground.tsx');
exports.default = value;
function BountiesBannerBackground({children, style, uri}) { // fn#103066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13754:244, offset: 0x02255fbd, size: 244 bytes, params: 2, frame: 22
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const VideoComponent = (VideoModule).VideoComponent;
return (
<View style={style}>
<VideoComponent
source={{uri: uri}}
style={StyleSheet.absoluteFillObject}
resizeMode="cover"
muted
disableFocus
paused={useReducedMotion}
importantForAccessibility="no-hide-descendants"
/>
{((Component) => <Component colors={env0_9} locations={env0_8} style={StyleSheet.absoluteFillObject} />)(LinearGradient)}
{children}
</View>
);
}
}
function BountiesBannerBackground({children, style, uri}) { // fn#103066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13754:244, offset: 0x02255fbd, size: 244 bytes, params: 2, frame: 22
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
return (
<View style={style}>
<VideoComponent
source={{uri: uri}}
style={StyleSheet.absoluteFillObject}
resizeMode="cover"
muted
disableFocus
paused={useReducedMotion}
importantForAccessibility="no-hide-descendants"
/>
{((Component) => <Component colors={env0_9} locations={env0_8} style={StyleSheet.absoluteFillObject} />)(importDefault(4589) /* metro dependency 4589 */)}
{children}
</View>
);
}
global.__d(_fun103065, 13564, [31, 27, 4502, 33, 566, 9543, 4589,
2]) /* metro module 13564, dependencies: [31, 27, 4502, 33, 566, 9543, 4589, 2] */;
@@ -1,211 +1,246 @@
/* Metro module 13562; source: modules/quests/native/BountiesCtaHeader.tsx; dependencies: [31, 27, 4502, 13563, 6528, 33, 4501, 697, 1244, 4573, 13557, 6766, 566, 7121, 9529, 6531, 7110, 7120, 13515, 13564, 13565, 1305, 4578, 13561, 9949, 3868, 13551, 10183, 2] */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import BountiesModalActionCreators from './BountiesModal/BountiesModalActionCreators.tsx'; /* Metro dependency 13515 */
import OpenBountiesNuxPromoSheet from './openBountiesNuxPromoSheet.tsx'; /* Metro dependency 13557 */
import UseIsCarouselInView from './useIsCarouselInView.tsx'; /* Metro dependency 13561 */
import AdContentSeenStore from '../AdContentSeenStore.tsx'; /* Metro dependency 13563 */
import BountiesBannerBackground from './BountiesBannerBackground.tsx'; /* Metro dependency 13564 */
import Bounty_bannerMp4 from '../../../external/discord_assets/assets/quests/bounties/bounty_banner.mp4.js'; /* Metro dependency 13565 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as QuestConstantsModule from '../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestTypesModule from '../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as AnalyticsActionsModule from '../lib/analytics/AnalyticsActions.tsx'; /* Metro dependency 7110 */
import * as AnalyticsTypesModule from '../lib/analytics/AnalyticsTypes.tsx'; /* Metro dependency 7120 */
import * as AdCreativeTypeModule from '../../../external/discord_common/js/shared/shared-constants/AdCreativeType.tsx'; /* Metro dependency 7121 */
import * as UseVideoModalPlacementEnabledModule from '../hooks/useVideoModalPlacementEnabled.tsx'; /* Metro dependency 9529 */
import * as ThemeTypesModule from '../../../external/discord_common/js/packages/design/shared/ThemeTypes.tsx'; /* Metro dependency 13551 */
function _fun103039(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:6, offset: 0x02254a75, size: 307 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
value2.StyleSheet;
const env0_4 = value2.View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const adContentSeenStore = importDefault(13563) /* metro dependency 13563: AdContentSeenStore */;
const questConstantsModule = require(6528) /* metro dependency 6528: QuestConstants */;
const env0_7 = questConstantsModule.BountyCarouselEmptyStateReason;
const env0_8 = questConstantsModule.DEFAULT_PLACEHOLDER_ENTRYPOINT_BOUNTY_ID;
const value4 = require(33) /* metro dependency 33 */;
const env0_9 = value4.jsx;
const env0_10 = value4.jsxs;
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun103046);
let value = ReactModule;
ReactNativeModule.StyleSheet;
const env0_11 = (CreateStylesModule).createStyles(_fun103046);
value = value.memo(BountiesCtaHeader);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesCtaHeader.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesCtaHeader.tsx');
exports.default = value;
}
function BountiesCtaDescription({isEmptyOrCompleted}) { // fn#103040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:1628, offset: 0x02254ba8, size: 379 bytes, params: 2, frame: 23
const styles = useStyles();
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r13 = isEmptyOrCompleted ? t.q4wlOE : t.AZGGo1;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const text = <Text variant="text-sm/medium" color="text-subtle">{intl.string(r13)}</Text>;
const value3 = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.fjSvsC,
{onClick: importDefault(13557) /* metro dependency 13557: openBountiesNuxPromoSheet */});
if (isEmptyOrCompleted) {
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
return (
<TextWithIOSLinkWorkaround variant="text-sm/medium">
{text}
{' '}
{value3}
</TextWithIOSLinkWorkaround>
function BountiesCtaDescription({isEmptyOrCompleted}) { // fn#103040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:1628, offset: 0x02254ba8, size: 379 bytes, params: 2, frame: 23
const styles = useStyles();
const t = (IndexNativeModule).t;
const r13 = isEmptyOrCompleted ? t.q4wlOE : t.AZGGo1;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
const text = (
<Text variant="text-sm/medium" color="text-subtle">
{intl.string(r13)}
</Text>
);
} else {
const value3 = intl.format((IndexNativeModule).t.fjSvsC,
{onClick: OpenBountiesNuxPromoSheet});
if (isEmptyOrCompleted) {
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
return (
<TextWithIOSLinkWorkaround variant="text-sm/medium">
{text}
{' '}
{value3}
</TextWithIOSLinkWorkaround>
);
} else {
return (
<View style={styles.description}>
{text}
{((TextWithIOSLinkWorkaround) => <TextWithIOSLinkWorkaround variant="text-sm/medium">{value3}</TextWithIOSLinkWorkaround>)((require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround)}
</View>
);
}
}
function BountiesCtaHeaderInner({bounties, isEmptyOrCompleted, containerRef}) { // fn#103041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:2097, offset: 0x02254d23, size: 750 bytes, params: 2, frame: 32
isEmptyOrCompleted = !(isEmptyOrCompleted === undefined) && isEmptyOrCompleted;
const styles = useStyles();
(require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.useReducedMotion;
});
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AdContentSeenStore], function() {
return bounties.some(_fun103044);
}, [bounties]);
const value3 = (UseVideoModalPlacementEnabledModule).useVideoModalPlacementEnabled('BountiesCtaHeader');
const QuestContent = (QuestTypesModule).QuestContent;
const value4 = env0_3.useCallback(_fun103045, [bounties,
value3 ? QuestContent.VIDEO_MODAL_MOBILE : QuestContent.QUEST_HOME_MOBILE_CAROUSEL]);
const bountiesBannerBackgroundProps = {uri: Bounty_bannerMp4,
style: [styles.header, styles.headerRoundedBottom]};
const r8 = value2 && ((NewTag) => <NewTag variant="text-xs/bold" containerStyle={styles.newPill} textStyle={styles.newPillText} />)((require(1305) /* metro dependency 1305: native */).NewTag);
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const items4 = [
<Text variant="text-lg/semibold" color="white">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.qetVDw)}
</Text>,
];
items4[1] = <BountiesCtaDescription isEmptyOrCompleted={isEmptyOrCompleted} />;
items4[2] = !isEmptyOrCompleted && ((Button) => <Button grow size="md" variant="primary-overlay" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1kkbKw'])} onPress={value4} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button);
return (
<View style={styles.description}>
{text}
{((TextWithIOSLinkWorkaround) => <TextWithIOSLinkWorkaround variant="text-sm/medium">{value3}</TextWithIOSLinkWorkaround>)((require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround)}
<View ref={containerRef} style={styles.container}>
<BountiesBannerBackground {...bountiesBannerBackgroundProps}>
{r8}
<View style={styles.headerTextBox}>
{items4}
</View>
</BountiesBannerBackground>
{false}
</View>
);
function _fun103043() { // fn#103043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:2286, offset: 0x02255011, size: 29 bytes, params: 1, frame: 11
return bounties.some(function(a0) {
var adContentSeenStoreBinding = AdContentSeenStore;
var BOUNTY = require(dependencyMap[13]).AdCreativeType.BOUNTY;
return !adContentSeenStoreBinding.hasSeen(BOUNTY, a0.id);
});
function _fun103044({id}) { // fn#103044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:2298, offset: 0x0225502e, size: 66 bytes, params: 2, frame: 14
const adContentSeenStoreBinding = AdContentSeenStore;
const hasSeen = adContentSeenStoreBinding.hasSeen;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
return !Reflect.apply(hasSeen, adContentSeenStoreBinding, [BOUNTY, id]);
}
}
function _fun103045() { // fn#103045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:2527, offset: 0x02255070, size: 228 bytes, params: 1, frame: 20
const property = bounties[0];
const trackAdContentClicked = AnalyticsActionsModule.trackAdContentClicked;
const object = {};
object.adContentId = DEFAULT_PLACEHOLDER_ENTRYPOINT_BOUNTY_ID;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object.adCreativeType = BOUNTY;
const QuestContent = (QuestTypesModule).QuestContent;
let QUEST_HOME_ENTRYPOINT_MOBILE = QuestContent.QUEST_HOME_ENTRYPOINT_MOBILE;
object.questContent = QUEST_HOME_ENTRYPOINT_MOBILE;
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
const START_BOUNTY = QuestContentCTA.START_BOUNTY;
object.questContentCTA = START_BOUNTY;
QUEST_HOME_ENTRYPOINT_MOBILE = QuestContent.QUEST_HOME_ENTRYPOINT_MOBILE;
object.sourceQuestContent = QUEST_HOME_ENTRYPOINT_MOBILE;
object.questContentPosition = 0;
Reflect.apply(trackAdContentClicked, AnalyticsActionsModule, [object]);
(BountiesModalActionCreators).showModal({bountyId: property.id,
sourceQuestContent: env0_1});
}
}
}
function BountiesCtaHeaderInner({bounties, isEmptyOrCompleted, containerRef}) { // fn#103041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:2097, offset: 0x02254d23, size: 750 bytes, params: 2, frame: 32
isEmptyOrCompleted = !(isEmptyOrCompleted === undefined) && isEmptyOrCompleted;
const styles = useStyles();
(require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.useReducedMotion;
});
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AdContentSeenStore], function() {
return bounties.some(_fun103044);
}, [bounties]);
const value3 = (require(9529) /* metro dependency 9529: useVideoModalPlacementEnabled */).useVideoModalPlacementEnabled('BountiesCtaHeader');
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const value4 = env0_3.useCallback(_fun103045, [bounties,
value3 ? QuestContent.VIDEO_MODAL_MOBILE : QuestContent.QUEST_HOME_MOBILE_CAROUSEL]);
const BountiesBannerBackground = importDefault(13564) /* metro dependency 13564: BountiesBannerBackground */;
const bountiesBannerBackgroundProps = {uri: importDefault(13565) /* metro dependency 13565: bounty_bannerMp4 */,
style: [styles.header, styles.headerRoundedBottom]};
const r8 = value2 && ((NewTag) => <NewTag variant="text-xs/bold" containerStyle={styles.newPill} textStyle={styles.newPillText} />)((require(1305) /* metro dependency 1305: native */).NewTag);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const items4 = [<Text variant="text-lg/semibold" color="white">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.qetVDw)}</Text>];
items4[1] = <BountiesCtaDescription isEmptyOrCompleted={isEmptyOrCompleted} />;
items4[2] = !isEmptyOrCompleted && ((Button) => <Button grow size="md" variant="primary-overlay" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1kkbKw'])} onPress={value4} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button);
return (
<View ref={containerRef} style={styles.container}>
<BountiesBannerBackground {...bountiesBannerBackgroundProps}>
{r8}
<View style={styles.headerTextBox}>
{items4}
</View>
</BountiesBannerBackground>
{false}
</View>
);
}
function _fun103046() { // fn#103046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:301, offset: 0x02255154, size: 719 bytes, params: 1, frame: 16
const object3 = {};
const object6 = {'width': '100%', 'backgroundColor': null, 'borderWidth': 1};
let BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object6.backgroundColor = BACKGROUND_SURFACE_HIGH;
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object6.borderColor = BORDER_MUTED;
object6.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
object6.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
object6.overflow = 'hidden';
object3.container = object6;
BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object3.header = {'width': '100%', 'minHeight': 296, 'justifyContent': 'flex-end', 'overflow': 'hidden',
backgroundColor: BACKGROUND_SURFACE_HIGH};
const object8 = {};
object8.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
object8.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
object3.headerRoundedBottom = object8;
const object10 = {position: 'absolute'};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object10.top = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object10.left = PX_12;
object10.zIndex = 1;
const CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT;
object10.backgroundColor = CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT;
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object10.paddingHorizontal = PX_8;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object10.paddingVertical = PX_4;
object3.newPill = object10;
const CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT;
object3.newPillText = {color: CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT};
const object12 = {};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object12.paddingBottom = PX_24;
const PX_20 = (importDefault(697) /* metro dependency 697: native */).space.PX_20;
object12.paddingHorizontal = PX_20;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object12.gap = PX_8;
object3.headerTextBox = object12;
object3.description = {marginBottom: 16};
const object13 = {'width': '100%', 'overflow': 'hidden'};
object13.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object13.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object3.bottomSection = object13;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.bottomContent = {'paddingBottom': 24, 'paddingHorizontal': 20, gap: PX_12};
const object14 = {'alignSelf': 'stretch', 'height': 160};
object14.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object14.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object3.placeholderCards = object14;
return object3;
}
function BountiesCtaHeader(a0) { // fn#103047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:3476, offset: 0x02255423, size: 406 bytes, params: 2, frame: 25
var QuestContentImpressionTrackerNative;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
var QUEST_HOME_ENTRYPOINT_MOBILE;
const env0_0 = a0;
const {containerRef, isInView} = (importDefault(13561) /* metro dependency 13561: useIsCarouselInView */)();
const bounties = a0.bounties;
const isEmptyOrCompleted = a0.isEmptyOrCompleted;
let r4 = isEmptyOrCompleted !== undefined && isEmptyOrCompleted;
(require(9949) /* metro dependency 9949: AnalyticsHooks */).useBountyCarouselEmptyStateAnalytics(r4 ? bounties.length === 0 ? BountyCarouselEmptyStateReason.EMPTY : BountyCarouselEmptyStateReason.COMPLETED : null);
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
const ThemeTypes = (require(13551) /* metro dependency 13551: ThemeTypes */).ThemeTypes;
const DARKER = ThemeTypes.DARKER;
if (r4) {
r4 = <BountiesCtaHeaderInner {...a0} {...{['containerRef']: containerRef}} />;
} else {
QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
var questContentImpressionTrackerNativeProps = {adContentId: DEFAULT_PLACEHOLDER_ENTRYPOINT_BOUNTY_ID,
adCreativeType: (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY};
QUEST_HOME_ENTRYPOINT_MOBILE = QuestContent.QUEST_HOME_ENTRYPOINT_MOBILE;
questContentImpressionTrackerNativeProps.questContent = QUEST_HOME_ENTRYPOINT_MOBILE;
questContentImpressionTrackerNativeProps.questContentPosition = 0;
questContentImpressionTrackerNativeProps.overrideVisibility = isInView;
QUEST_HOME_ENTRYPOINT_MOBILE = QuestContent.QUEST_HOME_ENTRYPOINT_MOBILE;
questContentImpressionTrackerNativeProps.sourceQuestContent = QUEST_HOME_ENTRYPOINT_MOBILE;
r4 = <QuestContentImpressionTrackerNative {...questContentImpressionTrackerNativeProps}>{children_103048}</QuestContentImpressionTrackerNative>;
function _fun103046() { // fn#103046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:301, offset: 0x02255154, size: 719 bytes, params: 1, frame: 16
const object = {};
const object2 = {'width': '100%', 'backgroundColor': null, 'borderWidth': 1};
let BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.backgroundColor = BACKGROUND_SURFACE_HIGH;
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object2.borderColor = BORDER_MUTED;
object2.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
object2.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
object2.overflow = 'hidden';
object.container = object2;
BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object.header = {'width': '100%', 'minHeight': 296, 'justifyContent': 'flex-end', 'overflow': 'hidden',
backgroundColor: BACKGROUND_SURFACE_HIGH};
const object4 = {};
object4.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
object4.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
object.headerRoundedBottom = object4;
const object5 = {position: 'absolute'};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.top = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.left = PX_12;
object5.zIndex = 1;
const CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT;
object5.backgroundColor = CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.paddingHorizontal = PX_8;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object5.paddingVertical = PX_4;
object.newPill = object5;
const CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT;
object.newPillText = {color: CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT};
const object7 = {};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object7.paddingBottom = PX_24;
const PX_20 = (importDefault(697) /* metro dependency 697: native */).space.PX_20;
object7.paddingHorizontal = PX_20;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object7.gap = PX_8;
object.headerTextBox = object7;
object.description = {marginBottom: 16};
const object9 = {'width': '100%', 'overflow': 'hidden'};
object9.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object9.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object.bottomSection = object9;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.bottomContent = {'paddingBottom': 24, 'paddingHorizontal': 20, gap: PX_12};
const object11 = {'alignSelf': 'stretch', 'height': 160};
object11.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object11.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object.placeholderCards = object11;
return object;
}
return (
<ThemeContextProvider theme={DARKER}>
{r4}
</ThemeContextProvider>
);
}
function _fun103043() { // fn#103043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:2286, offset: 0x02255011, size: 29 bytes, params: 1, frame: 11
return bounties.some(function(a0) {
var BOUNTY = require(dependencyMap[13]).AdCreativeType.BOUNTY;
return !AdContentSeenStore.hasSeen(BOUNTY, a0.id);
});
}
function BountiesCtaHeader(a0) { // fn#103047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:3476, offset: 0x02255423, size: 406 bytes, params: 2, frame: 25
var QuestContentImpressionTrackerNative;
const QuestContent = (QuestTypesModule).QuestContent;
var QUEST_HOME_ENTRYPOINT_MOBILE;
const env0_0 = a0;
const {containerRef, isInView} = (UseIsCarouselInView)();
const bounties = a0.bounties;
const isEmptyOrCompleted = a0.isEmptyOrCompleted;
let r4 = isEmptyOrCompleted !== undefined && isEmptyOrCompleted;
(require(9949) /* metro dependency 9949: AnalyticsHooks */).useBountyCarouselEmptyStateAnalytics(r4 ? bounties.length === 0 ? BountyCarouselEmptyStateReason.EMPTY : BountyCarouselEmptyStateReason.COMPLETED : null);
const ThemeContextProvider = (NativeModule).ThemeContextProvider;
const ThemeTypes = (ThemeTypesModule).ThemeTypes;
const DARKER = ThemeTypes.DARKER;
if (r4) {
r4 = <BountiesCtaHeaderInner {...a0} {...{['containerRef']: containerRef}} />;
} else {
QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
var questContentImpressionTrackerNativeProps = {adContentId: DEFAULT_PLACEHOLDER_ENTRYPOINT_BOUNTY_ID,
adCreativeType: (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY};
QUEST_HOME_ENTRYPOINT_MOBILE = QuestContent.QUEST_HOME_ENTRYPOINT_MOBILE;
questContentImpressionTrackerNativeProps.questContent = QUEST_HOME_ENTRYPOINT_MOBILE;
questContentImpressionTrackerNativeProps.questContentPosition = 0;
questContentImpressionTrackerNativeProps.overrideVisibility = isInView;
QUEST_HOME_ENTRYPOINT_MOBILE = QuestContent.QUEST_HOME_ENTRYPOINT_MOBILE;
questContentImpressionTrackerNativeProps.sourceQuestContent = QUEST_HOME_ENTRYPOINT_MOBILE;
r4 = (
<QuestContentImpressionTrackerNative {...questContentImpressionTrackerNativeProps}>
{children_103048}
</QuestContentImpressionTrackerNative>
);
}
return (
<ThemeContextProvider theme={DARKER}>
{r4}
</ThemeContextProvider>
);
function BountiesCtaHeaderChildren() { // fn#103048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:4123, owner: BountiesCtaHeader.children, offset: 0x022555b9, size: 50 bytes, params: 1, frame: 14
return <BountiesCtaHeaderInner {...env0_0} {...{['containerRef']: containerRef}} />;
}
function _fun103045() { // fn#103045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:2527, offset: 0x02255070, size: 228 bytes, params: 1, frame: 20
const property = bounties[0];
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackAdContentClicked = analyticsActionsModule.trackAdContentClicked;
const object2 = {};
object2.adContentId = DEFAULT_PLACEHOLDER_ENTRYPOINT_BOUNTY_ID;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object2.adCreativeType = BOUNTY;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
let QUEST_HOME_ENTRYPOINT_MOBILE = QuestContent.QUEST_HOME_ENTRYPOINT_MOBILE;
object2.questContent = QUEST_HOME_ENTRYPOINT_MOBILE;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
const START_BOUNTY = QuestContentCTA.START_BOUNTY;
object2.questContentCTA = START_BOUNTY;
QUEST_HOME_ENTRYPOINT_MOBILE = QuestContent.QUEST_HOME_ENTRYPOINT_MOBILE;
object2.sourceQuestContent = QUEST_HOME_ENTRYPOINT_MOBILE;
object2.questContentPosition = 0;
Reflect.apply(trackAdContentClicked, analyticsActionsModule, [object2]);
(importDefault(13515) /* metro dependency 13515: BountiesModalActionCreators */).showModal({bountyId: property.id,
sourceQuestContent: env0_1});
}
}
function BountiesCtaHeaderChildren() { // fn#103048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:4123, owner: BountiesCtaHeader.children, offset: 0x022555b9, size: 50 bytes, params: 1, frame: 14
return <BountiesCtaHeaderInner {...env0_0} {...{['containerRef']: containerRef}} />;
}
global.__d(_fun103039, 13562, [31, 27, 4502, 13563, 6528, 33, 4501, 697, 1244, 4573, 13557, 6766, 566, 7121, 9529,
6531, 7110, 7120, 13515, 13564, 13565, 1305, 4578, 13561, 9949, 3868, 13551, 10183,
2]) /* metro module 13562, dependencies: [31, 27, 4502, 13563, 6528, 33, 4501, 697, 1244, 4573, 13557, 6766, 566, 7121, 9529, 6531, 7110, 7120, 13515, 13564, 13565, 1305, 4578, 13561, 9949, 3868, 13551, 10183, 2] */;
@@ -1,52 +1,64 @@
/* Metro module 13516; source: modules/quests/native/BountiesModal/BountiesModal.tsx; dependencies: [31, 6528, 33, 9530, 13517, 13552, 7717, 10121, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as DeviceOrientationModule from '../../../device/native/DeviceOrientation.tsx'; /* Metro dependency 7717 */
import * as BountiesStage1ExperimentModule from '../../experiments/BountiesStage1Experiment.tsx'; /* Metro dependency 9530 */
import * as ModalNativeModule from '../../../../design/components/Modal/native/Modal.native.tsx'; /* Metro dependency 10121 */
function _fun102687(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13706:6, offset: 0x02244d47, size: 174 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(BountiesModal);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModal.tsx');
exports.default = value;
function BountiesModal({bountyId, sourceQuestContent}) { // fn#102688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13706:186, offset: 0x02244df5, size: 218 bytes, params: 2, frame: 20
const BountiesStage1Experiment = (BountiesStage1ExperimentModule).BountiesStage1Experiment;
const useConfig = BountiesStage1Experiment.useConfig;
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
const verticalScrollEnabled = Reflect.apply(useConfig, BountiesStage1Experiment,
[{location: VIDEO_MODAL_MOBILE}]).verticalScrollEnabled;
const binding = env0_3;
const value2 = binding.useMemo(function() {
return {['bounty_main']: {fullscreen: true, headerLeft: _fun102690, render: _fun102691}};
}, [bountyId, sourceQuestContent, verticalScrollEnabled]);
binding.useLayoutEffect(_fun102692, []);
const Modal = (ModalNativeModule).Modal;
return (
<Modal
hideTitle
initialRouteName="bounty_main"
screens={value2}
viewStyle={{backgroundColor: '#000000'}}
/>
);
function _fun102689() { // fn#102689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13706:361, offset: 0x02244ecf, size: 50 bytes, params: 1, frame: 4
return {['bounty_main']: {fullscreen: true, headerLeft: function() {
return null;
}, render: render_102691}};
function render_102691() { // fn#102691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13706:413, offset: 0x02244f01, size: 76 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__;
return ((Component) => <Component bountyId={bountyId} sourceQuestContent={sourceQuestContent} />)(importDefault(verticalScrollEnabled ? dependencyMap[4] : dependencyMap[5]));
}
}
function _fun102692() { // fn#102692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13706:508, offset: 0x02244f4d, size: 60 bytes, params: 1, frame: 17
const value = environment.__proto__;
(DeviceOrientationModule).lockOrientation('PORTRAIT', true);
return (DeviceOrientationModule).restoreDefaultOrientation;
}
}
}
function BountiesModal({bountyId, sourceQuestContent}) { // fn#102688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13706:186, offset: 0x02244df5, size: 218 bytes, params: 2, frame: 20
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
const useConfig = BountiesStage1Experiment.useConfig;
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
const verticalScrollEnabled = Reflect.apply(useConfig, BountiesStage1Experiment,
[{location: VIDEO_MODAL_MOBILE}]).verticalScrollEnabled;
const binding = env0_3;
const value2 = binding.useMemo(function() {
return {['bounty_main']: {fullscreen: true, headerLeft: _fun102690, render: _fun102691}};
}, [bountyId, sourceQuestContent, verticalScrollEnabled]);
binding.useLayoutEffect(_fun102692, []);
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
return (
<Modal
hideTitle
initialRouteName="bounty_main"
screens={value2}
viewStyle={{backgroundColor: '#000000'}}
/>
);
}
function _fun102689() { // fn#102689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13706:361, offset: 0x02244ecf, size: 50 bytes, params: 1, frame: 4
return {['bounty_main']: {fullscreen: true, headerLeft: function() {
return null;
}, render: render_102691}};
}
function _fun102692() { // fn#102692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13706:508, offset: 0x02244f4d, size: 60 bytes, params: 1, frame: 17
const value = environment.__proto__;
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('PORTRAIT', true);
return (require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation;
}
function render_102691() { // fn#102691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13706:413, offset: 0x02244f01, size: 76 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__;
return ((Component) => <Component bountyId={bountyId} sourceQuestContent={sourceQuestContent} />)(importDefault(verticalScrollEnabled ? dependencyMap[4] : dependencyMap[5]));
function headerLeft_102690() { // fn#102690, offset: 0x00c58c16, size: 4 bytes, params: 1, frame: 1
return null;
}
global.__d(_fun102687, 13516, [31, 6528, 33, 9530, 13517, 13552, 7717, 10121,
2]) /* metro module 13516, dependencies: [31, 6528, 33, 9530, 13517, 13552, 7717, 10121, 2] */;
@@ -1,25 +1,28 @@
/* Metro module 13515; source: modules/quests/native/BountiesModal/BountiesModalActionCreators.tsx; dependencies: [5080, 13516, 1962, 2] */
import ModalActionCreators from '../../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun102684(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13705:6, offset: 0x02244c2c, size: 134 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {showModal: showModal_102685, hideModal: hideModal_102686};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalActionCreators.tsx');
exports.default = object2;
object = {showModal: showModal_102685, hideModal: hideModal_102686};
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalActionCreators.tsx');
exports.default = object;
exports.BOUNTIES_MODAL_KEY = 'BOUNTIES_MODAL';
function showModal_102685({bountyId, sourceQuestContent}) { // fn#102685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13705:118, offset: 0x02244cb2, size: 106 bytes, params: 2, frame: 18
const defaultImport = importDefault(dependencyMap[0]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {bountyId: bountyId, sourceQuestContent: sourceQuestContent},
'BOUNTIES_MODAL']);
}
function hideModal_102686() { // fn#102686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13705:240, offset: 0x02244d1c, size: 43 bytes, params: 1, frame: 12
(ModalActionCreators).popWithKey('BOUNTIES_MODAL');
}
}
function showModal_102685({bountyId, sourceQuestContent}) { // fn#102685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13705:118, offset: 0x02244cb2, size: 106 bytes, params: 2, frame: 18
const defaultImport = importDefault(dependencyMap[0]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {bountyId: bountyId, sourceQuestContent: sourceQuestContent},
'BOUNTIES_MODAL']);
}
function hideModal_102686() { // fn#102686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13705:240, offset: 0x02244d1c, size: 43 bytes, params: 1, frame: 12
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('BOUNTIES_MODAL');
}
global.__d(_fun102684, 13515, [5080, 13516, 1962, 2]) /* metro module 13515, dependencies: [5080, 13516, 1962, 2] */;
@@ -1,176 +1,216 @@
/* Metro module 13541; source: modules/quests/native/BountiesModal/BountiesModalAdvertiserCta.tsx; dependencies: [29, 31, 27, 33, 4017, 4501, 697, 13542, 9495, 13519, 4507, 4504, 4583, 9520, 7121, 7120, 6533, 7976, 5475, 4573, 4578, 2] */
import ObjectWithoutProperties from '../../../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonHooksNativeModule from '../../../../design/components/Button/native/ButtonHooks.native.tsx'; /* Metro dependency 4583 */
import * as QuestContentModule from '../../../../external/discord_common/js/shared/shared-constants/QuestContent.tsx'; /* Metro dependency 6533 */
import * as AnalyticsTypesModule from '../../lib/analytics/AnalyticsTypes.tsx'; /* Metro dependency 7120 */
import * as AdCreativeTypeModule from '../../../../external/discord_common/js/shared/shared-constants/AdCreativeType.tsx'; /* Metro dependency 7121 */
import * as UseVisibilityTransitionModule from './useVisibilityTransition.tsx'; /* Metro dependency 13519 */
import * as BountyCtaHelpersModule from './BountyCtaHelpers.tsx'; /* Metro dependency 13542 */
function _fun102904(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:6, offset: 0x0224e35b, size: 294 bytes, params: 8, frame: 19
const env0_0 = require;
const env0_3 = ['style'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(29) /* metro dependency 29 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const Pressable = value.Pressable;
const env0_6 = value.StyleSheet;
const env0_7 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
const env0_10 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(Pressable);
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102905);
const env0_10 = (ReanimatedRexport).createAnimatedComponent(Pressable);
const env0_11 = (CreateStylesModule).createStyles(_fun102905);
object = {code: 'function BountiesModalAdvertiserCtaTsx1(){const{withTiming,interpolate,visibility,visible,timingStandard,timingFast}=this.__closure;return{transform:[{translateY:withTiming(interpolate(visibility,[0,1],[8,0]),visible?timingStandard:timingFast)}]};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalAdvertiserCta.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalAdvertiserCta.tsx');
exports.default = BountiesModalAdvertiserCta;
}
function _fun102905() { // fn#102905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:268, offset: 0x0224e481, size: 435 bytes, params: 1, frame: 18
const object7 = {};
const object8 = {'position': 'absolute', 'bottom': 0, 'left': 0, 'right': 0, 'paddingHorizontal': null,
'paddingBottom': null, 'alignItems': 'center'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.paddingBottom = PX_16;
object7.outerContainer = object8;
const object9 = {};
const SHADOW_TOP_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_TOP_HIGH;
copyDataProperties(object9, SHADOW_TOP_HIGH, undefined);
object9['alignSelf'] = 'stretch';
object9['borderWidth'] = 1;
object9['borderColor'] = 'transparent';
object9['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object9['overflow'] = 'hidden';
object7.ctaPressable = object9;
const object10 = {'flexDirection': 'row', 'alignItems': 'center'};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object10.paddingLeft = PX_12;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object10.paddingRight = PX_16;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object10.paddingVertical = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object10.gap = PX_12;
object7.cta = object10;
const object11 = {'width': 40, 'height': 40, 'backgroundColor': null, 'borderRadius': null, 'overflow': 'hidden'};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object11.backgroundColor = BACKGROUND_SURFACE_HIGH;
object11.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object7.ctaLogoContainer = object11;
const object12 = {};
copyDataProperties(object12, StyleSheet.absoluteFillObject, 'hidden');
object7.ctaLogo = object12;
object7.ctaInfo = {'flex': 1, 'justifyContent': 'center', 'gap': 2};
return object7;
}
function BountiesModalAdvertiserCta({bounty, visible, sourceQuestContent}) { // fn#102906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:1248, offset: 0x0224e634, size: 1117 bytes, params: 2, frame: 31
var r0;
var View2;
var label;
var BackgroundBlurView;
var items3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items4;
const env0_4 = undefined;
const styles = useStyles();
const bountyCtaInfo = (require(13542) /* metro dependency 13542: BountyCtaHelpers */).getBountyCtaInfo(bounty);
const r20 = bountyCtaInfo.iconImageUri != null ? (require(9495) /* metro dependency 9495: AssetUtils */).getScaledImageUrl({'assetUrl': null,
'width': 40, 'height': 40, assetUrl: bountyCtaInfo.iconImageUri}) : undefined;
const useVisibilityTransitionModule = require(13519) /* metro dependency 13519: useVisibilityTransition */;
const useVisibilityTransition = useVisibilityTransitionModule.useVisibilityTransition;
const object2 = {visible: visible};
object2.entranceTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
object2.exitTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingFast;
const {opacityStyle, shouldRender} = Reflect.apply(useVisibilityTransition, useVisibilityTransitionModule,
[object2]);
const r19 = visible ? 1 : 0;
const env0_3 = r19;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = BountiesModalAdvertiserCtaB;
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming,
interpolate: reanimatedRexportModule.interpolate, visibility: r19, visible: visible,
timingStandard: (require(4507) /* metro dependency 4507: timingPresets */).timingStandard,
timingFast: (require(4507) /* metro dependency 4507: timingPresets */).timingFast};
closure.__workletHash = 4075229418021;
closure.__initData = env0_12;
const value8 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const value9 = reanimatedRexportModule.useSharedValue(0);
const value10 = (require(4583) /* metro dependency 4583: ButtonHooksNative */).useButtonPressAnimationProps(value9);
const style = value10.style;
let binding = env0_4;
const value11 = binding(value10, env0_3);
binding = env0_5;
let useCallback = binding.useCallback;
const value12 = Reflect.apply(useCallback, binding, [_fun102908, [bounty.id, bounty.cta, sourceQuestContent]]);
const value13 = binding.useCallback(_fun102909, [value12]);
useCallback = binding.useCallback;
if (shouldRender) {
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view2Props = {style: [styles.outerContainer, opacityStyle, value8]};
binding = env0_10;
var bindingProps = {...value11};
bindingProps['onPress'] = value13;
bindingProps['accessibilityRole'] = 'button';
label = bountyCtaInfo.label;
bindingProps['accessibilityLabel'] = label;
bindingProps['style'] = [styles.ctaPressable, style];
BackgroundBlurView = (require(7976) /* metro dependency 7976: BackgroundBlurViewNative */).BackgroundBlurView;
var backgroundBlurViewProps = {blurTheme: 'dark', style: styles.cta, pressed: value9};
items3 = [<View style={styles.ctaLogoContainer}>{((Component) => <Component source={{uri: r20}} style={styles.ctaLogo} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</View>];
var viewBindingProps2 = {style: styles.ctaInfo};
label = bountyCtaInfo.label;
items4 = [<Text lineClamp={2} variant="text-sm/semibold" color="text-default">{label}</Text>];
items4[1] = <Text variant="text-xs/medium" color="text-default">{bountyCtaInfo.subtext}</Text>;
items3[1] = <View {...viewBindingProps2}>{items4}</View>;
items3[2] = <View accessible={false} importantForAccessibility="no-hide-descendants">{((Button) => <Button variant="primary-overlay" text={bountyCtaInfo.buttonLabel} size="sm" onPress={Reflect.apply(useCallback,
binding, [_fun102910,
[value12]])} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>;
r0 = <View2 {...view2Props}>{((Component) => <Component {...bindingProps}><BackgroundBlurView {...backgroundBlurViewProps}>{items3}</BackgroundBlurView></Component>)(binding)}</View2>;
} else {
r0 = shouldRender;
function _fun102905() { // fn#102905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:268, offset: 0x0224e481, size: 435 bytes, params: 1, frame: 18
const object = {};
const object2 = {'position': 'absolute', 'bottom': 0, 'left': 0, 'right': 0, 'paddingHorizontal': null,
'paddingBottom': null, 'alignItems': 'center'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.paddingBottom = PX_16;
object.outerContainer = object2;
const object3 = {};
const SHADOW_TOP_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_TOP_HIGH;
copyDataProperties(object3, SHADOW_TOP_HIGH, undefined);
object3['alignSelf'] = 'stretch';
object3['borderWidth'] = 1;
object3['borderColor'] = 'transparent';
object3['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3['overflow'] = 'hidden';
object.ctaPressable = object3;
const object4 = {'flexDirection': 'row', 'alignItems': 'center'};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.paddingLeft = PX_12;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingRight = PX_16;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.paddingVertical = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.gap = PX_12;
object.cta = object4;
const object5 = {'width': 40, 'height': 40, 'backgroundColor': null, 'borderRadius': null, 'overflow': 'hidden'};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object5.backgroundColor = BACKGROUND_SURFACE_HIGH;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object.ctaLogoContainer = object5;
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, 'hidden');
object.ctaLogo = object6;
object.ctaInfo = {'flex': 1, 'justifyContent': 'center', 'gap': 2};
return object;
}
return r0;
}
function BountiesModalAdvertiserCtaB() { // fn#102907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:1661, owner: BountiesModalAdvertiserCta.b, offset: 0x0224ea91, size: 152 bytes, params: 1, frame: 22
let value = environment.__proto__;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const value3 = reanimatedRexportModule.interpolate(env0_3, [0, 1], [8, 0]);
const visibleBinding = visible;
value = require(4507) /* metro dependency 4507: timingPresets */;
return {transform: [{translateY: Reflect.apply(withTiming, timingModule, [value3,
visibleBinding ? value.timingStandard : value.timingFast])}]};
}
function BountiesModalAdvertiserCta({bounty, visible, sourceQuestContent}) { // fn#102906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:1248, offset: 0x0224e634, size: 1117 bytes, params: 2, frame: 31
var r0;
var View2;
var label;
var BackgroundBlurView;
var items3;
const Text = (TextModule).Text;
var items4;
const env0_4 = undefined;
const styles = useStyles();
const bountyCtaInfo = (BountyCtaHelpersModule).getBountyCtaInfo(bounty);
const r20 = bountyCtaInfo.iconImageUri != null ? (require(9495) /* metro dependency 9495: AssetUtils */).getScaledImageUrl({'assetUrl': null,
'width': 40, 'height': 40, assetUrl: bountyCtaInfo.iconImageUri}) : undefined;
const useVisibilityTransition = UseVisibilityTransitionModule.useVisibilityTransition;
const object = {visible: visible};
object.entranceTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
object.exitTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingFast;
const {opacityStyle, shouldRender} = Reflect.apply(useVisibilityTransition, UseVisibilityTransitionModule, [object]);
const r19 = visible ? 1 : 0;
const env0_3 = r19;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const BountiesModalAdvertiserCtaB2 = BountiesModalAdvertiserCtaB;
BountiesModalAdvertiserCtaB2.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming,
interpolate: ReanimatedRexportModule.interpolate, visibility: r19, visible: visible,
timingStandard: (require(4507) /* metro dependency 4507: timingPresets */).timingStandard,
timingFast: (require(4507) /* metro dependency 4507: timingPresets */).timingFast};
BountiesModalAdvertiserCtaB2.__workletHash = 4075229418021;
BountiesModalAdvertiserCtaB2.__initData = env0_12;
const value8 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [BountiesModalAdvertiserCtaB2]);
const value9 = ReanimatedRexportModule.useSharedValue(0);
const value10 = (ButtonHooksNativeModule).useButtonPressAnimationProps(value9);
const style = value10.style;
let binding = env0_4;
const value11 = binding(value10, env0_3);
binding = ReactModule;
let useCallback = binding.useCallback;
const value12 = Reflect.apply(useCallback, binding, [_fun102908, [bounty.id, bounty.cta, sourceQuestContent]]);
const value13 = binding.useCallback(_fun102909, [value12]);
useCallback = binding.useCallback;
if (shouldRender) {
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view2Props = {style: [styles.outerContainer, opacityStyle, value8]};
binding = env0_10;
var bindingProps = {...value11};
bindingProps['onPress'] = value13;
bindingProps['accessibilityRole'] = 'button';
label = bountyCtaInfo.label;
bindingProps['accessibilityLabel'] = label;
bindingProps['style'] = [styles.ctaPressable, style];
BackgroundBlurView = (require(7976) /* metro dependency 7976: BackgroundBlurViewNative */).BackgroundBlurView;
var backgroundBlurViewProps = {blurTheme: 'dark', style: styles.cta, pressed: value9};
items3 = [
<View style={styles.ctaLogoContainer}>
{((Component) => <Component source={{uri: r20}} style={styles.ctaLogo} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
</View>,
];
var viewBindingProps2 = {style: styles.ctaInfo};
label = bountyCtaInfo.label;
items4 = [
<Text
lineClamp={2}
variant="text-sm/semibold"
color="text-default"
>
{label}
</Text>,
];
items4[1] = (
<Text variant="text-xs/medium" color="text-default">
{bountyCtaInfo.subtext}
</Text>
);
items3[1] = (
<View {...viewBindingProps2}>
{items4}
</View>
);
items3[2] = (
<View accessible={false} importantForAccessibility="no-hide-descendants">
{((Button) => <Button variant="primary-overlay" text={bountyCtaInfo.buttonLabel} size="sm" onPress={Reflect.apply(useCallback,
binding, [_fun102910,
[value12]])} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}
</View>
);
r0 = (
<View2 {...view2Props}>
{((Component) => <Component {...bindingProps}><BackgroundBlurView {...backgroundBlurViewProps}>{items3}</BackgroundBlurView></Component>)(binding)}
</View2>
);
} else {
r0 = shouldRender;
}
return r0;
function BountiesModalAdvertiserCtaB() { // fn#102907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:1661, owner: BountiesModalAdvertiserCta.b, offset: 0x0224ea91, size: 152 bytes, params: 1, frame: 22
let value = environment.__proto__;
const withTiming = TimingModule.withTiming;
const value3 = ReanimatedRexportModule.interpolate(env0_3, [0, 1], [8, 0]);
const visibleBinding = visible;
value = require(4507) /* metro dependency 4507: timingPresets */;
return {transform: [{translateY: Reflect.apply(withTiming, TimingModule, [value3,
visibleBinding ? value.timingStandard : value.timingFast])}]};
}
function _fun102908(a0) { // fn#102908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:2121, offset: 0x0224eb29, size: 145 bytes, params: 2, frame: 18
let value = environment.__proto__;
value = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
const openAdGameLinkDirectly = value.openAdGameLinkDirectly;
const object2 = {};
const bountyBinding = bounty;
object2.adContentId = bountyBinding.id;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object2.adCreativeType = BOUNTY;
object2.cta = bountyBinding.cta;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
const OPEN_GAME_LINK = QuestContentCTA.OPEN_GAME_LINK;
Reflect.apply(openAdGameLinkDirectly, value, [object2, {content: a0, ctaContent: OPEN_GAME_LINK,
sourceQuestContent: sourceQuestContent}]);
}
function _fun102908(a0) { // fn#102908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:2121, offset: 0x0224eb29, size: 145 bytes, params: 2, frame: 18
let value = environment.__proto__;
value = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
const openAdGameLinkDirectly = value.openAdGameLinkDirectly;
const object = {};
const bountyBinding = bounty;
object.adContentId = bountyBinding.id;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object.adCreativeType = BOUNTY;
object.cta = bountyBinding.cta;
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
const OPEN_GAME_LINK = QuestContentCTA.OPEN_GAME_LINK;
Reflect.apply(openAdGameLinkDirectly, value, [object, {content: a0, ctaContent: OPEN_GAME_LINK,
sourceQuestContent: sourceQuestContent}]);
}
function _fun102909() { // fn#102909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:2352, offset: 0x0224ebba, size: 51 bytes, params: 1, frame: 12
const binding = env0_4;
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
const VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
binding(VIDEO_MODAL_MOBILE);
}
function _fun102909() { // fn#102909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:2352, offset: 0x0224ebba, size: 51 bytes, params: 1, frame: 12
const binding = env0_4;
const QuestContent = (QuestContentModule).QuestContent;
const VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
binding(VIDEO_MODAL_MOBILE);
}
function _fun102910() { // fn#102910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:2425, offset: 0x0224ebed, size: 51 bytes, params: 1, frame: 12
const binding = env0_4;
const QuestContent = (QuestContentModule).QuestContent;
const VIDEO_MODAL_MOBILE_FOOTER = QuestContent.VIDEO_MODAL_MOBILE_FOOTER;
binding(VIDEO_MODAL_MOBILE_FOOTER);
}
}
function _fun102910() { // fn#102910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:2425, offset: 0x0224ebed, size: 51 bytes, params: 1, frame: 12
const binding = env0_4;
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
const VIDEO_MODAL_MOBILE_FOOTER = QuestContent.VIDEO_MODAL_MOBILE_FOOTER;
binding(VIDEO_MODAL_MOBILE_FOOTER);
}
global.__d(_fun102904, 13541, [29, 31, 27, 33, 4017, 4501, 697, 13542, 9495, 13519, 4507, 4504, 4583, 9520, 7121,
7120, 6533, 7976, 5475, 4573, 4578,
2]) /* metro module 13541, dependencies: [29, 31, 27, 33, 4017, 4501, 697, 13542, 9495, 13519, 4507, 4504, 4583, 9520, 7121, 7120, 6533, 7976, 5475, 4573, 4578, 2] */;
@@ -1,45 +1,55 @@
/* Metro module 13550; source: modules/quests/native/BountiesModal/BountiesModalCloseButton.tsx; dependencies: [31, 33, 4501, 697, 5278, 1244, 5312, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as XSmallIconModule from '../../../../design/components/Icon/native/redesign/generated/XSmallIcon.tsx'; /* Metro dependency 5312 */
function _fun102933(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13740:6, offset: 0x022500f2, size: 171 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const env0_4 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102934);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalCloseButton.tsx');
ReactModule;
const env0_4 = (CreateStylesModule).createStyles(_fun102934);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalCloseButton.tsx');
exports.default = BountiesModalCloseButton;
function _fun102934() { // fn#102934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13740:142, offset: 0x0225019d, size: 130 bytes, params: 1, frame: 15
const object2 = {'alignItems': 'center', 'justifyContent': 'center'};
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object2.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.width = PX_32;
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.height = PX_32;
return {closeButton: object2};
}
function BountiesModalCloseButton({onPress}) { // fn#102935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13740:480, offset: 0x0225021f, size: 209 bytes, params: 2, frame: 21
const styles = useStyles();
const PressableOpacity = (PressablesModule).PressableOpacity;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const cpT0Cq = (IndexNativeModule).t.cpT0Cq;
const XSmallIcon = (XSmallIconModule).XSmallIcon;
const CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT = (Native).colors.CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT;
return (
<PressableOpacity
accessibilityLabel={Reflect.apply(string, intl, [cpT0Cq])}
accessibilityRole="button"
hitSlop={12}
onPress={onPress}
style={styles.closeButton}
>
<XSmallIcon size="sm" color={CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT} />
</PressableOpacity>
);
}
}
function _fun102934() { // fn#102934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13740:142, offset: 0x0225019d, size: 130 bytes, params: 1, frame: 15
const object = {'alignItems': 'center', 'justifyContent': 'center'};
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object.width = PX_32;
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object.height = PX_32;
return {closeButton: object};
}
function BountiesModalCloseButton({onPress}) { // fn#102935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13740:480, offset: 0x0225021f, size: 209 bytes, params: 2, frame: 21
const styles = useStyles();
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const cpT0Cq = (require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq;
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
const CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT;
return (
<PressableOpacity
accessibilityLabel={Reflect.apply(string, intl, [cpT0Cq])}
accessibilityRole="button"
hitSlop={12}
onPress={onPress}
style={styles.closeButton}
>
<XSmallIcon size="sm" color={CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT} />
</PressableOpacity>
);
}
global.__d(_fun102933, 13550, [31, 33, 4501, 697, 5278, 1244, 5312,
2]) /* metro module 13550, dependencies: [31, 33, 4501, 697, 5278, 1244, 5312, 2] */;
@@ -1,8 +1,11 @@
/* Metro module 13535; source: modules/quests/native/BountiesModal/BountiesModalConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun102866(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13725:6, offset: 0x0224c002, size: 84 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalConstants.tsx');
exports.BOUNTY_REWARD_CLAIM_FAILED_TOAST_DURATION_MS = 10000;
}
global.__d(_fun102866, 13535, [2]) /* metro module 13535, dependencies: [2] */;
@@ -1,384 +1,438 @@
/* Metro module 13552; source: modules/quests/native/BountiesModal/BountiesModalContent.tsx; dependencies: [5, 31, 27, 7092, 6528, 661, 482, 33, 1478, 1585, 4501, 697, 566, 10069, 9530, 13533, 13537, 9532, 13534, 13536, 7110, 7121, 7120, 6533, 9522, 13515, 13538, 10183, 13553, 13550, 6618, 13554, 9483, 3868, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import BountyStore from '../../BountyStore.tsx'; /* Metro dependency 7092 */
import BountiesModalActionCreators from './BountiesModalActionCreators.tsx'; /* Metro dependency 13515 */
import BountiesModalEndCard from './BountiesModalEndCard.tsx'; /* Metro dependency 13553 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as ConstantsModule2 from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestContentModule from '../../../../external/discord_common/js/shared/shared-constants/QuestContent.tsx'; /* Metro dependency 6533 */
import * as SafeAreaViewModule from '../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as AnalyticsActionsModule from '../../lib/analytics/AnalyticsActions.tsx'; /* Metro dependency 7110 */
import * as AnalyticsTypesModule from '../../lib/analytics/AnalyticsTypes.tsx'; /* Metro dependency 7120 */
import * as AdCreativeTypeModule from '../../../../external/discord_common/js/shared/shared-constants/AdCreativeType.tsx'; /* Metro dependency 7121 */
import * as QuestHooksModule from '../../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as VideoQuestUtilsModule from '../../utils/VideoQuestUtils.tsx'; /* Metro dependency 9522 */
import * as BountiesStage1ExperimentModule from '../../experiments/BountiesStage1Experiment.tsx'; /* Metro dependency 9530 */
import * as HooksModule from '../../../virtual_currency/hooks/index.tsx'; /* Metro dependency 10069 */
import * as QuestContentImpressionTrackerNativeModule from '../QuestContentImpressionTracker.native.tsx'; /* Metro dependency 10183 */
import * as UseBountiesModalTimingModule from './useBountiesModalTiming.tsx'; /* Metro dependency 13533 */
import * as UseBountiesModalVideoAnalyticsModule from './useBountiesModalVideoAnalytics.tsx'; /* Metro dependency 13536 */
import * as UseBountyVideoProgressPersistenceModule from './useBountyVideoProgressPersistence.tsx'; /* Metro dependency 13537 */
import * as BountyVideoModule from './BountyVideo.tsx'; /* Metro dependency 13538 */
function _fun102937(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:6, offset: 0x022503b2, size: 338 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const bountyStore = importDefault(7092) /* metro dependency 7092: BountyStore */;
const env0_7 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_9 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
const value = require(33) /* metro dependency 33 */;
const value = JsxRuntimeModule;
const env0_10 = value.jsx;
const env0_11 = value.Fragment;
const env0_12 = value.jsxs;
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102952);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalContent.tsx');
const env0_14 = (CreateStylesModule).createStyles(_fun102952);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalContent.tsx');
exports.default = BountiesModalContent;
}
function BountiesModalContentInner({bounty, sourceQuestContent}) { // fn#102938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:648, offset: 0x02250504, size: 1397 bytes, params: 2, frame: 45
let env0_4 = undefined;
const styles = useStyles();
const value2 = useBountiesModalVideoLayout();
const env0_3 = value2;
const value3 = env0_4.useMemo(_fun102941, [styles.videoWrapper, value2]);
const value4 = env0_4.useMemo(_fun102942, [styles.closeButton, value2.top, value2.left, value2.width]);
const value5 = env0_4.useMemo(_fun102943, [styles.bottomContainer, styles.bottomContainerFullWidth,
styles.bottomContainerNotFullWidth, value2.isFullWidth, value2.left, value2.width]);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([BountyStore], function() {
return BountyStore.isBountyCompleted(bounty.id);
});
const hooksModule = require(10069) /* metro dependency 10069: hooks */;
const useFetchVirtualCurrencyBalance = hooksModule.useFetchVirtualCurrencyBalance;
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, hooksModule, []).balance;
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
const useConfig = BountiesStage1Experiment.useConfig;
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
const {enabled, loopingEnabled, rewardTimerSeconds} = Reflect.apply(useConfig, BountiesStage1Experiment,
[{location: VIDEO_MODAL_MOBILE}]);
const BountyVideoEndMode = (require(13533) /* metro dependency 13533: useBountiesModalTiming */).BountyVideoEndMode;
const r19 = loopingEnabled ? BountyVideoEndMode.LOOP : BountyVideoEndMode.END_CARD;
const r7 = enabled ? 1000 * rewardTimerSeconds : 1000 * bounty.rewardTimerSeconds;
env0_4 = r7;
const {initialProgress, handleProgress,
flushProgress} = (require(13537) /* metro dependency 13537: useBountyVideoProgressPersistence */).useBountyVideoProgressPersistence({bountyId: bounty.id,
endMode: r19});
const value12 = env0_4.useCallback(env0_3(_fun102946), [bounty.id, sourceQuestContent]);
const {handleVideoProgressAnalytics, handleVideoEndAnalytics, handleVideoLoopedAnalytics,
handleVideoPausedAnalytics,
handleVideoResumedAnalytics} = (require(13536) /* metro dependency 13536: useBountiesModalVideoAnalytics */).useBountiesModalVideoAnalytics({bountyId: bounty.id,
sourceQuestContent: sourceQuestContent, rewardDurationMs: r7});
const value14 = env0_4.useCallback(function(a0, a1, a2) {
handleVideoProgressAnalytics(a0, a1);
handleProgress(a0, a1, a2);
}, [handleVideoProgressAnalytics, handleProgress]);
const useBountiesModalTimingModule = require(13533) /* metro dependency 13533: useBountiesModalTiming */;
const useBountiesModalTiming = useBountiesModalTimingModule.useBountiesModalTiming;
let duration = initialProgress.duration;
duration = duration > 0 ? initialProgress.duration : null;
const {isCtaVisible, isEndCardVisible, handleVideoEnd, handleVideoProgress, handleVideoPaused, handleVideoResumed,
rewardRemainingSeconds, rewardTotalSeconds, normalizedProgress, maxVideoProgressSeconds,
videoDuration} = Reflect.apply(useBountiesModalTiming, useBountiesModalTimingModule, [{endMode: r19,
rewardDurationMs: r7, isCompleted: value6, onRewardEarned: value12, onVideoProgress: value14,
onVideoEnd: handleVideoEndAnalytics, onVideoLooped: handleVideoLoopedAnalytics,
onVideoPaused: handleVideoPausedAnalytics, onVideoResumed: handleVideoResumedAnalytics,
initialProgressSec: initialProgress.timestampSec, initialMaxVideoProgressSec: initialProgress.maxTimestampSec,
initialVideoDurationSec: duration}]);
const value17 = env0_4.useCallback(_fun102948, [bounty.id, maxVideoProgressSeconds, r7, sourceQuestContent,
videoDuration, flushProgress]);
const value18 = env0_4.useCallback(_fun102949, [bounty.id, maxVideoProgressSeconds, r7, sourceQuestContent,
videoDuration, flushProgress]);
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
const BountyVideo = (require(13538) /* metro dependency 13538: BountyVideo */).BountyVideo;
const items2 = [<View style={value3}><BountyVideo isActive bounty={bounty} sourceQuestContent={sourceQuestContent} isCompleted={value6} isCtaVisible={isCtaVisible} isEndCardVisible={isEndCardVisible} isProgressBarVisible={!isEndCardVisible} orbsBalance={balance} handleVideoEnd={handleVideoEnd} handleVideoProgress={handleVideoProgress} handleVideoPaused={handleVideoPaused} handleVideoResumed={handleVideoResumed} rewardRemainingSeconds={rewardRemainingSeconds} rewardTotalSeconds={rewardTotalSeconds} normalizedProgress={normalizedProgress} repeat={loopingEnabled} initialProgress={initialProgress} renderEndCard={renderEndCard} /></View>];
items2[1] = <View style={value4}>{((Component) => <Component onPress={value17} />)(importDefault(13550) /* metro dependency 13550: BountiesModalCloseButton */)}</View>;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
items2[2] = <SafeAreaPaddingView left={value2.isFullWidth} right={value2.isFullWidth} bottom style={value5} pointerEvents="box-none">{((Component) => <Component bounty={bounty} visible={isEndCardVisible} sourceQuestContent={sourceQuestContent} onClose={value18} />)(importDefault(13554) /* metro dependency 13554: BountiesModalEndedCtaButtons */)}</SafeAreaPaddingView>;
return (
<>
{items2}
</>
);
}
function _fun102952() { // fn#102952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:300, offset: 0x0225113b, size: 199 bytes, params: 1, frame: 15
const object2 = {};
object2.videoWrapper = {position: 'absolute'};
object2.closeButton = {position: 'absolute'};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.bottomContainer = {'position': 'absolute', 'bottom': null, 'justifyContent': 'flex-end', bottom: PX_24};
const object3 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.left = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.right = PX_16;
object2.bottomContainerFullWidth = object3;
const object4 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingLeft = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingRight = PX_16;
object2.bottomContainerNotFullWidth = object4;
return object2;
}
function BountiesModalContent({bountyId, sourceQuestContent}) { // fn#102953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:5002, offset: 0x02251202, size: 280 bytes, params: 2, frame: 22
const questHooksModule = require(9483) /* metro dependency 9483: QuestHooks */;
const useQuestHomeBounties = questHooksModule.useQuestHomeBounties;
const value2 = Reflect.apply(useQuestHomeBounties, questHooksModule, []).questHomeBounties.find(function({id}) {
return id === bountyId;
});
if (value2 == null) {
return null;
} else {
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
return (
<ThemeContextProvider theme={ThemeTypes.DARKER}>
{((QuestContentImpressionTrackerNative) => <QuestContentImpressionTrackerNative adContentId={value2.id} adCreativeType={(require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY} questContent={(require(6533) /* metro dependency 6533: QuestContent */).QuestContent.VIDEO_MODAL_MOBILE} sourceQuestContent={sourceQuestContent} overrideVisibility>{children_102955}</QuestContentImpressionTrackerNative>)((require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative)}
</ThemeContextProvider>
function BountiesModalContentInner({bounty, sourceQuestContent}) { // fn#102938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:648, offset: 0x02250504, size: 1397 bytes, params: 2, frame: 45
let env0_4 = undefined;
const styles = useStyles();
const value2 = useBountiesModalVideoLayout();
const env0_3 = value2;
const value3 = env0_4.useMemo(_fun102941, [styles.videoWrapper, value2]);
const value4 = env0_4.useMemo(_fun102942, [styles.closeButton, value2.top, value2.left, value2.width]);
const value5 = env0_4.useMemo(_fun102943, [styles.bottomContainer, styles.bottomContainerFullWidth,
styles.bottomContainerNotFullWidth, value2.isFullWidth, value2.left, value2.width]);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([BountyStore], function() {
return BountyStore.isBountyCompleted(bounty.id);
});
const useFetchVirtualCurrencyBalance = HooksModule.useFetchVirtualCurrencyBalance;
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, HooksModule, []).balance;
const BountiesStage1Experiment = (BountiesStage1ExperimentModule).BountiesStage1Experiment;
const useConfig = BountiesStage1Experiment.useConfig;
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
const {enabled, loopingEnabled, rewardTimerSeconds} = Reflect.apply(useConfig, BountiesStage1Experiment,
[{location: VIDEO_MODAL_MOBILE}]);
const BountyVideoEndMode = (UseBountiesModalTimingModule).BountyVideoEndMode;
const r19 = loopingEnabled ? BountyVideoEndMode.LOOP : BountyVideoEndMode.END_CARD;
const r7 = enabled ? 1000 * rewardTimerSeconds : 1000 * bounty.rewardTimerSeconds;
env0_4 = r7;
const {initialProgress, handleProgress,
flushProgress} = (UseBountyVideoProgressPersistenceModule).useBountyVideoProgressPersistence({bountyId: bounty.id,
endMode: r19});
const value12 = env0_4.useCallback(env0_3(_fun102946), [bounty.id, sourceQuestContent]);
const {handleVideoProgressAnalytics, handleVideoEndAnalytics, handleVideoLoopedAnalytics,
handleVideoPausedAnalytics,
handleVideoResumedAnalytics} = (UseBountiesModalVideoAnalyticsModule).useBountiesModalVideoAnalytics({bountyId: bounty.id,
sourceQuestContent: sourceQuestContent, rewardDurationMs: r7});
const value14 = env0_4.useCallback(function(a0, a1, a2) {
handleVideoProgressAnalytics(a0, a1);
handleProgress(a0, a1, a2);
}, [handleVideoProgressAnalytics, handleProgress]);
const useBountiesModalTiming = UseBountiesModalTimingModule.useBountiesModalTiming;
let duration = initialProgress.duration;
duration = duration > 0 ? initialProgress.duration : null;
const {isCtaVisible, isEndCardVisible, handleVideoEnd, handleVideoProgress, handleVideoPaused, handleVideoResumed,
rewardRemainingSeconds, rewardTotalSeconds, normalizedProgress, maxVideoProgressSeconds,
videoDuration} = Reflect.apply(useBountiesModalTiming, UseBountiesModalTimingModule, [{endMode: r19,
rewardDurationMs: r7, isCompleted: value6, onRewardEarned: value12, onVideoProgress: value14,
onVideoEnd: handleVideoEndAnalytics, onVideoLooped: handleVideoLoopedAnalytics,
onVideoPaused: handleVideoPausedAnalytics, onVideoResumed: handleVideoResumedAnalytics,
initialProgressSec: initialProgress.timestampSec, initialMaxVideoProgressSec: initialProgress.maxTimestampSec,
initialVideoDurationSec: duration}]);
const value17 = env0_4.useCallback(_fun102948, [bounty.id, maxVideoProgressSeconds, r7, sourceQuestContent,
videoDuration, flushProgress]);
const value18 = env0_4.useCallback(_fun102949, [bounty.id, maxVideoProgressSeconds, r7, sourceQuestContent,
videoDuration, flushProgress]);
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
const BountyVideo = (BountyVideoModule).BountyVideo;
const items2 = [
<View style={value3}>
<BountyVideo
isActive
bounty={bounty}
sourceQuestContent={sourceQuestContent}
isCompleted={value6}
isCtaVisible={isCtaVisible}
isEndCardVisible={isEndCardVisible}
isProgressBarVisible={!isEndCardVisible}
orbsBalance={balance}
handleVideoEnd={handleVideoEnd}
handleVideoProgress={handleVideoProgress}
handleVideoPaused={handleVideoPaused}
handleVideoResumed={handleVideoResumed}
rewardRemainingSeconds={rewardRemainingSeconds}
rewardTotalSeconds={rewardTotalSeconds}
normalizedProgress={normalizedProgress}
repeat={loopingEnabled}
initialProgress={initialProgress}
renderEndCard={renderEndCard_102950}
/>
</View>,
];
items2[1] = (
<View style={value4}>
{((Component) => <Component onPress={value17} />)(importDefault(13550) /* metro dependency 13550: BountiesModalCloseButton */)}
</View>
);
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
items2[2] = (
<SafeAreaPaddingView
left={value2.isFullWidth}
right={value2.isFullWidth}
bottom
style={value5}
pointerEvents="box-none"
>
{((Component) => <Component bounty={bounty} visible={isEndCardVisible} sourceQuestContent={sourceQuestContent} onClose={value18} />)(importDefault(13554) /* metro dependency 13554: BountiesModalEndedCtaButtons */)}
</SafeAreaPaddingView>
);
return (
<>
{items2}
</>
);
function useBountiesModalVideoLayout() { // fn#102939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:728, owner: BountiesModalContentInner.useBountiesModalVideoLayout, offset: 0x02250a79, size: 141 bytes, params: 1, frame: 17
const {width, height} = (UseWindowDimensionsNative)();
const value3 = (UseSafeAreaInsetsNative)();
return env1_4.useMemo(_fun102940, [width, height, value3.top, value3.bottom, value3.left, value3.right]);
function _fun102940() { // fn#102940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:834, offset: 0x02250b06, size: 220 bytes, params: 1, frame: 20
var r1;
var r4;
var r6;
var value9;
const widthBinding = width;
let binding = env0_2;
const value3 = widthBinding - binding.left - binding.right;
const value5 = height - binding.top - binding.bottom;
const value7 = value3 / env2_13;
if (value7 > value5) {
value9 = value5 * env2_13;
r1 = false;
r4 = value5;
r6 = value9;
} else {
r1 = true;
r4 = value7;
r6 = value3;
}
const object = {};
let Math = global.Math;
const floor = Math.floor;
binding = env0_2;
object.top = Reflect.apply(floor, Math, [binding.top + (value5 - r4) / 2]);
Math = global.Math;
object.left = Math.floor(binding.left + (value3 - r6) / 2);
Math = global.Math;
object.width = Math.floor(r6);
Math = global.Math;
object.height = Math.floor(r4);
object.isFullWidth = r1;
return object;
}
}
function _fun102941() { // fn#102941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:1099, offset: 0x02250be2, size: 69 bytes, params: 1, frame: 4
const binding = env0_3;
return [styles.videoWrapper, {top: binding.top, left: binding.left, width: binding.width, height: binding.height}];
}
function _fun102942() { // fn#102942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:1208, offset: 0x02250c27, size: 146 bytes, params: 1, frame: 17
const items2 = [styles.closeButton];
const object = {};
const binding = env0_3;
const top = binding.top;
let value = environment.__proto__;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.top = top + PX_8;
value = binding.left + binding.width;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
value -= PX_32;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.left = value - PX_8;
items2[1] = object;
return items2;
}
function _fun102943() { // fn#102943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:1373, offset: 0x02250cb9, size: 97 bytes, params: 1, frame: 6
const isFullWidth = env0_3.isFullWidth;
const stylesBinding = styles;
const bottomContainer = stylesBinding.bottomContainer;
return isFullWidth ? [bottomContainer, stylesBinding.bottomContainerFullWidth] : [bottomContainer,
stylesBinding.bottomContainerNotFullWidth, {left: env0_3.left, width: env0_3.width}];
}
function* _fun102946() { // fn#102946, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:2133, offset: 0x02250d45, size: 121 bytes, params: 1, frame: 14
var binding;
var binding2;
var property;
var value3;
var claimBountyReward;
var id;
var value5;
var value6;
var value7;
var error;
if (true) {
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
property = binding2[17];
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
claimBountyReward = value3.claimBountyReward;
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
id = require.id;
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
value5 = Reflect.apply(claimBountyReward, value3, [id, importDefault]);
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
if (value7) {
return value6;
}
}
}
function _fun102948() { // fn#102948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:3138, offset: 0x02250de3, size: 325 bytes, params: 1, frame: 22
const value = environment.__proto__;
const trackAdContentEvent = AnalyticsActionsModule.trackAdContentEvent;
const object = {};
object.adContentId = bounty.id;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object.adCreativeType = BOUNTY;
const AD_VIDEO_MODAL_CLOSED = AnalyticEvents.AD_VIDEO_MODAL_CLOSED;
object.event = AD_VIDEO_MODAL_CLOSED;
const object2 = {};
const getQuestContentName = AnalyticsTypesModule.getQuestContentName;
const QuestContent = (QuestContentModule).QuestContent;
let VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
object2.content_name = Reflect.apply(getQuestContentName, AnalyticsTypesModule, [VIDEO_MODAL_MOBILE]);
VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
object2.content_id = VIDEO_MODAL_MOBILE;
object2.video_progress = VideoQuestUtilsModule.formatVideoProgressRatio(maxVideoProgressSeconds, videoDuration ?? 0);
object2.threshold_met = 1000 * maxVideoProgressSeconds >= env0_4;
object2.reward_timer_seconds = env0_4 / 1000;
object.properties = object2;
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, AnalyticsActionsModule, [object]);
flushProgress();
(BountiesModalActionCreators).hideModal();
}
function _fun102949() { // fn#102949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:3621, offset: 0x02250f28, size: 311 bytes, params: 1, frame: 22
const value = environment.__proto__;
const trackAdContentEvent = AnalyticsActionsModule.trackAdContentEvent;
const object = {};
object.adContentId = bounty.id;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object.adCreativeType = BOUNTY;
const AD_VIDEO_MODAL_CLOSED = AnalyticEvents.AD_VIDEO_MODAL_CLOSED;
object.event = AD_VIDEO_MODAL_CLOSED;
const object2 = {};
const getQuestContentName = AnalyticsTypesModule.getQuestContentName;
const QuestContent = (QuestContentModule).QuestContent;
let VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
object2.content_name = Reflect.apply(getQuestContentName, AnalyticsTypesModule, [VIDEO_MODAL_END_CARD]);
VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
object2.content_id = VIDEO_MODAL_END_CARD;
object2.video_progress = VideoQuestUtilsModule.formatVideoProgressRatio(maxVideoProgressSeconds, videoDuration ?? 0);
object2.threshold_met = true;
object2.reward_timer_seconds = env0_4 / 1000;
object.properties = object2;
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, AnalyticsActionsModule, [object]);
flushProgress();
(BountiesModalActionCreators).hideModal();
}
function BountiesModalContentInnerRenderEndCard() { // fn#102950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:4468, owner: BountiesModalContentInner.renderEndCard, offset: 0x0225105f, size: 151 bytes, params: 1, frame: 17
const QuestContentImpressionTrackerNative = (QuestContentImpressionTrackerNativeModule).QuestContentImpressionTrackerNative;
const id = bounty.id;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
const QuestContent = (QuestContentModule).QuestContent;
const VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
return (
<QuestContentImpressionTrackerNative
adContentId={id}
adCreativeType={BOUNTY}
questContent={VIDEO_MODAL_END_CARD}
sourceQuestContent={sourceQuestContent}
overrideVisibility={isEndCardVisible}
>
{children_102951}
</QuestContentImpressionTrackerNative>
);
function renderEndCardChildren_102951() { // fn#102951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:4690, owner: BountiesModalContentInner.renderEndCard.children, offset: 0x022510f6, size: 69 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__;
return ((Component) => <Component bounty={bounty} visible={isEndCardVisible} sourceQuestContent={sourceQuestContent} />)(BountiesModalEndCard);
}
}
}
}
function useBountiesModalVideoLayout() { // fn#102939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:728, owner: BountiesModalContentInner.useBountiesModalVideoLayout, offset: 0x02250a79, size: 141 bytes, params: 1, frame: 17
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const value3 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
return env1_4.useMemo(_fun102940, [width, height, value3.top, value3.bottom, value3.left, value3.right]);
}
function _fun102941() { // fn#102941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:1099, offset: 0x02250be2, size: 69 bytes, params: 1, frame: 4
const binding = env0_3;
return [styles.videoWrapper, {top: binding.top, left: binding.left, width: binding.width, height: binding.height}];
}
function _fun102942() { // fn#102942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:1208, offset: 0x02250c27, size: 146 bytes, params: 1, frame: 17
const items2 = [styles.closeButton];
const object2 = {};
const binding = env0_3;
const top = binding.top;
let value = environment.__proto__;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.top = top + PX_8;
value = binding.left + binding.width;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
value -= PX_32;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.left = value - PX_8;
items2[1] = object2;
return items2;
}
function _fun102943() { // fn#102943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:1373, offset: 0x02250cb9, size: 97 bytes, params: 1, frame: 6
const isFullWidth = env0_3.isFullWidth;
const stylesBinding = styles;
const bottomContainer = stylesBinding.bottomContainer;
return isFullWidth ? [bottomContainer, stylesBinding.bottomContainerFullWidth] : [bottomContainer,
stylesBinding.bottomContainerNotFullWidth, {left: env0_3.left, width: env0_3.width}];
}
function* _fun102946() { // fn#102946, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:2133, offset: 0x02250d45, size: 121 bytes, params: 1, frame: 14
var binding;
var binding2;
var property;
var value3;
var claimBountyReward;
var id;
var value5;
var value6;
var value7;
var error;
if (true) {
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
property = binding2[17];
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
claimBountyReward = value3.claimBountyReward;
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
id = require.id;
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
value5 = Reflect.apply(claimBountyReward, value3, [id, importDefault]);
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
if (value7) {
return value6;
}
function _fun102952() { // fn#102952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:300, offset: 0x0225113b, size: 199 bytes, params: 1, frame: 15
const object = {};
object.videoWrapper = {position: 'absolute'};
object.closeButton = {position: 'absolute'};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object.bottomContainer = {'position': 'absolute', 'bottom': null, 'justifyContent': 'flex-end', bottom: PX_24};
const object5 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.left = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.right = PX_16;
object.bottomContainerFullWidth = object5;
const object6 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingLeft = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingRight = PX_16;
object.bottomContainerNotFullWidth = object6;
return object;
}
}
function _fun102948() { // fn#102948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:3138, offset: 0x02250de3, size: 325 bytes, params: 1, frame: 22
const value = environment.__proto__;
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackAdContentEvent = analyticsActionsModule.trackAdContentEvent;
const object3 = {};
object3.adContentId = bounty.id;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object3.adCreativeType = BOUNTY;
const AD_VIDEO_MODAL_CLOSED = AnalyticEvents.AD_VIDEO_MODAL_CLOSED;
object3.event = AD_VIDEO_MODAL_CLOSED;
const object4 = {};
const analyticsTypesModule = require(7120) /* metro dependency 7120: AnalyticsTypes */;
const getQuestContentName = analyticsTypesModule.getQuestContentName;
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
let VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
object4.content_name = Reflect.apply(getQuestContentName, analyticsTypesModule, [VIDEO_MODAL_MOBILE]);
VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
object4.content_id = VIDEO_MODAL_MOBILE;
const videoQuestUtilsModule = require(9522) /* metro dependency 9522: VideoQuestUtils */;
object4.video_progress = videoQuestUtilsModule.formatVideoProgressRatio(maxVideoProgressSeconds, videoDuration ?? 0);
object4.threshold_met = 1000 * maxVideoProgressSeconds >= env0_4;
object4.reward_timer_seconds = env0_4 / 1000;
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, analyticsActionsModule, [object3]);
flushProgress();
(importDefault(13515) /* metro dependency 13515: BountiesModalActionCreators */).hideModal();
}
function BountiesModalContent({bountyId, sourceQuestContent}) { // fn#102953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:5002, offset: 0x02251202, size: 280 bytes, params: 2, frame: 22
const useQuestHomeBounties = QuestHooksModule.useQuestHomeBounties;
const value2 = Reflect.apply(useQuestHomeBounties, QuestHooksModule, []).questHomeBounties.find(function({id}) {
return id === bountyId;
});
if (value2 == null) {
return null;
} else {
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
return (
<ThemeContextProvider theme={ThemeTypes.DARKER}>
{((QuestContentImpressionTrackerNative) => <QuestContentImpressionTrackerNative adContentId={value2.id} adCreativeType={(require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY} questContent={(require(6533) /* metro dependency 6533: QuestContent */).QuestContent.VIDEO_MODAL_MOBILE} sourceQuestContent={sourceQuestContent} overrideVisibility>{children_102955}</QuestContentImpressionTrackerNative>)((require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative)}
</ThemeContextProvider>
);
}
function BountiesModalContentChildren() { // fn#102955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:5437, owner: BountiesModalContent.children, offset: 0x0225131a, size: 44 bytes, params: 1, frame: 14
return <BountiesModalContentInner bounty={env0_2} sourceQuestContent={sourceQuestContent} />;
}
function _fun102949() { // fn#102949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:3621, offset: 0x02250f28, size: 311 bytes, params: 1, frame: 22
const value = environment.__proto__;
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackAdContentEvent = analyticsActionsModule.trackAdContentEvent;
const object3 = {};
object3.adContentId = bounty.id;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object3.adCreativeType = BOUNTY;
const AD_VIDEO_MODAL_CLOSED = AnalyticEvents.AD_VIDEO_MODAL_CLOSED;
object3.event = AD_VIDEO_MODAL_CLOSED;
const object4 = {};
const analyticsTypesModule = require(7120) /* metro dependency 7120: AnalyticsTypes */;
const getQuestContentName = analyticsTypesModule.getQuestContentName;
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
let VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
object4.content_name = Reflect.apply(getQuestContentName, analyticsTypesModule, [VIDEO_MODAL_END_CARD]);
VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
object4.content_id = VIDEO_MODAL_END_CARD;
const videoQuestUtilsModule = require(9522) /* metro dependency 9522: VideoQuestUtils */;
object4.video_progress = videoQuestUtilsModule.formatVideoProgressRatio(maxVideoProgressSeconds, videoDuration ?? 0);
object4.threshold_met = true;
object4.reward_timer_seconds = env0_4 / 1000;
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, analyticsActionsModule, [object3]);
flushProgress();
(importDefault(13515) /* metro dependency 13515: BountiesModalActionCreators */).hideModal();
}
function BountiesModalContentInnerRenderEndCard() { // fn#102950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:4468, owner: BountiesModalContentInner.renderEndCard, offset: 0x0225105f, size: 151 bytes, params: 1, frame: 17
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
const id = bounty.id;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
const VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
return (
<QuestContentImpressionTrackerNative
adContentId={id}
adCreativeType={BOUNTY}
questContent={VIDEO_MODAL_END_CARD}
sourceQuestContent={sourceQuestContent}
overrideVisibility={isEndCardVisible}
>
{children_102951}
</QuestContentImpressionTrackerNative>
);
}
function BountiesModalContentChildren() { // fn#102955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:5437, owner: BountiesModalContent.children, offset: 0x0225131a, size: 44 bytes, params: 1, frame: 14
return <BountiesModalContentInner bounty={env0_2} sourceQuestContent={sourceQuestContent} />;
}
function _fun102940() { // fn#102940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:834, offset: 0x02250b06, size: 220 bytes, params: 1, frame: 20
var r1;
var r4;
var r6;
var value9;
const widthBinding = width;
let binding = env0_2;
const value3 = widthBinding - binding.left - binding.right;
const value5 = height - binding.top - binding.bottom;
const value7 = value3 / env2_13;
if (value7 > value5) {
value9 = value5 * env2_13;
r1 = false;
r4 = value5;
r6 = value9;
} else {
r1 = true;
r4 = value7;
r6 = value3;
}
const object2 = {};
let Math = global.Math;
const floor = Math.floor;
binding = env0_2;
object2.top = Reflect.apply(floor, Math, [binding.top + (value5 - r4) / 2]);
Math = global.Math;
object2.left = Math.floor(binding.left + (value3 - r6) / 2);
Math = global.Math;
object2.width = Math.floor(r6);
Math = global.Math;
object2.height = Math.floor(r4);
object2.isFullWidth = r1;
return object2;
}
function renderEndCardChildren_102951() { // fn#102951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:4690, owner: BountiesModalContentInner.renderEndCard.children, offset: 0x022510f6, size: 69 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__;
return ((Component) => <Component bounty={bounty} visible={isEndCardVisible} sourceQuestContent={sourceQuestContent} />)(importDefault(13553) /* metro dependency 13553: BountiesModalEndCard */);
}
global.__d(_fun102937, 13552, [5, 31, 27, 7092, 6528, 661, 482, 33, 1478, 1585, 4501, 697, 566, 10069, 9530, 13533,
13537, 9532, 13534, 13536, 7110, 7121, 7120, 6533, 9522, 13515, 13538, 10183, 13553, 13550, 6618, 13554, 9483,
3868,
2]) /* metro module 13552, dependencies: [5, 31, 27, 7092, 6528, 661, 482, 33, 1478, 1585, 4501, 697, 566, 10069, 9530, 13533, 13537, 9532, 13534, 13536, 7110, 7121, 7120, 6533, 9522, 13515, 13538, 10183, 13553, 13550, 6618, 13554, 9483, 3868, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,120 +1,158 @@
/* Metro module 13553; source: modules/quests/native/BountiesModal/BountiesModalEndCard.tsx; dependencies: [27, 33, 4501, 697, 13542, 9495, 4017, 4504, 4507, 4589, 9520, 7121, 6533, 7120, 5475, 4573, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as QuestContentModule from '../../../../external/discord_common/js/shared/shared-constants/QuestContent.tsx'; /* Metro dependency 6533 */
import * as AnalyticsTypesModule from '../../lib/analytics/AnalyticsTypes.tsx'; /* Metro dependency 7120 */
import * as AdCreativeTypeModule from '../../../../external/discord_common/js/shared/shared-constants/AdCreativeType.tsx'; /* Metro dependency 7121 */
import * as BountyCtaHelpersModule from './BountyCtaHelpers.tsx'; /* Metro dependency 13542 */
function _fun102956(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13743:6, offset: 0x02251346, size: 222 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_3 = value.Pressable;
const env0_4 = value.StyleSheet;
const env0_5 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102957);
const env0_8 = (CreateStylesModule).createStyles(_fun102957);
object = {code: 'function BountiesModalEndCardTsx1(){const{withTiming,visible,timingStandard}=this.__closure;return{opacity:withTiming(visible?1:0,timingStandard)};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalEndCard.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalEndCard.tsx');
exports.default = BountiesModalEndCard;
}
function _fun102957() { // fn#102957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13743:195, offset: 0x02251424, size: 249 bytes, params: 1, frame: 17
const object6 = {container: {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0,
'justifyContent': 'center', 'alignItems': 'center'}};
const object7 = {};
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
object7['backgroundColor'] = 'rgba(241, 251, 169, 0.15)';
object6.backdropTint = object7;
const object8 = {};
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
object6.backdropGradient = object8;
const object9 = {'width': 92, 'height': 92, 'borderRadius': null, 'borderWidth': 1};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object9.borderColor = BORDER_MUTED;
object6.image = object9;
const object10 = {};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object10.gap = PX_4;
object10.alignItems = 'center';
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object10.marginTop = PX_12;
object6.info = object10;
object6.ctaContainer = {'position': 'relative', 'alignItems': 'center'};
return object6;
}
function BountiesModalEndCard({bounty, visible, sourceQuestContent}) { // fn#102958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13743:849, offset: 0x0225151d, size: 693 bytes, params: 2, frame: 28
var r0;
var View2;
var items2;
var label;
var items3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items4;
var value;
const styles = useStyles();
const bountyCtaInfo = (require(13542) /* metro dependency 13542: BountyCtaHelpers */).getBountyCtaInfo(bounty);
const r17 = bountyCtaInfo.iconImageUri != null ? (require(9495) /* metro dependency 9495: AssetUtils */).getScaledImageUrl({'assetUrl': null,
'width': 92, 'height': 92, assetUrl: bountyCtaInfo.iconImageUri}) : undefined;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var object = {};
var moduleValue = require(dependencyMap[7]);
object.opacity = moduleValue.withTiming(visible ? 1 : 0, require(dependencyMap[8]).timingStandard);
function _fun102957() { // fn#102957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13743:195, offset: 0x02251424, size: 249 bytes, params: 1, frame: 17
const object = {container: {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0,
'justifyContent': 'center', 'alignItems': 'center'}};
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['backgroundColor'] = 'rgba(241, 251, 169, 0.15)';
object.backdropTint = object2;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object.backdropGradient = object3;
const object4 = {'width': 92, 'height': 92, 'borderRadius': null, 'borderWidth': 1};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object4.borderColor = BORDER_MUTED;
object.image = object4;
const object5 = {};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object5.gap = PX_4;
object5.alignItems = 'center';
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.marginTop = PX_12;
object.info = object5;
object.ctaContainer = {'position': 'relative', 'alignItems': 'center'};
return object;
};
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, visible: visible,
timingStandard: (require(4507) /* metro dependency 4507: timingPresets */).timingStandard};
closure.__workletHash = 15062259404736;
closure.__initData = env0_9;
if (visible) {
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view2Props = {style: [styles.container, Reflect.apply(useAnimatedStyle, reanimatedRexportModule,
[closure])],
pointerEvents: 'box-none'};
items2 = [<View style={styles.backdropTint} />];
items2[1] = ((Component) => <Component colors={['rgba(0, 0, 0, 0.60)', 'rgba(0, 0, 0, 1)']} locations={[0,
0.841]} style={styles.backdropGradient} />)(importDefault(4589) /* metro dependency 4589 */);
var pressableBindingProps = {'onPress': null, 'hitSlop': 16, 'accessibilityRole': 'button',
onPress: onPress_102960};
label = bountyCtaInfo.label;
pressableBindingProps.accessibilityLabel = label;
pressableBindingProps.style = styles.ctaContainer;
items3 = [((Component) => <Component source={{uri: r17}} style={styles.image} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
var viewBindingProps = {style: styles.info};
label = bountyCtaInfo.label;
value = <Text variant="text-md/semibold" color="text-strong">{label}</Text>;
items4 = [value];
items4[1] = <Text variant="text-sm/medium" color="text-default">{bountyCtaInfo.subtext}</Text>;
items3[1] = <View {...viewBindingProps}>{items4}</View>;
items2[2] = <Pressable {...pressableBindingProps}>{items3}</Pressable>;
value = <View2 {...view2Props}>{items2}</View2>;
r0 = value;
} else {
r0 = visible;
}
return r0;
}
function BountiesModalEndCardOnPress() { // fn#102960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13743:1533, owner: BountiesModalEndCard.onPress, offset: 0x02251827, size: 166 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
const openAdGameLinkDirectly = value.openAdGameLinkDirectly;
const object3 = {};
const bountyBinding = bounty;
object3.adContentId = bountyBinding.id;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object3.adCreativeType = BOUNTY;
object3.cta = bountyBinding.cta;
const object4 = {};
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
const VIDEO_MODAL_ICON_END_CARD = QuestContent.VIDEO_MODAL_ICON_END_CARD;
object4.content = VIDEO_MODAL_ICON_END_CARD;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
const OPEN_GAME_LINK = QuestContentCTA.OPEN_GAME_LINK;
object4.ctaContent = OPEN_GAME_LINK;
object4.sourceQuestContent = sourceQuestContent;
Reflect.apply(openAdGameLinkDirectly, value, [object3, object4]);
function BountiesModalEndCard({bounty, visible, sourceQuestContent}) { // fn#102958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13743:849, offset: 0x0225151d, size: 693 bytes, params: 2, frame: 28
var r0;
var View2;
var items2;
var label;
var items3;
const Text = (TextModule).Text;
var items4;
var value;
const styles = useStyles();
const bountyCtaInfo = (BountyCtaHelpersModule).getBountyCtaInfo(bounty);
const r17 = bountyCtaInfo.iconImageUri != null ? (require(9495) /* metro dependency 9495: AssetUtils */).getScaledImageUrl({'assetUrl': null,
'width': 92, 'height': 92, assetUrl: bountyCtaInfo.iconImageUri}) : undefined;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var object = {};
var moduleValue = require(dependencyMap[7]);
object.opacity = moduleValue.withTiming(visible ? 1 : 0, require(dependencyMap[8]).timingStandard);
return object;
};
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, visible: visible,
timingStandard: (require(4507) /* metro dependency 4507: timingPresets */).timingStandard};
closure.__workletHash = 15062259404736;
closure.__initData = env0_9;
if (visible) {
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view2Props = {style: [styles.container, Reflect.apply(useAnimatedStyle, ReanimatedRexportModule,
[closure])],
pointerEvents: 'box-none'};
items2 = [
<View style={styles.backdropTint} />,
];
items2[1] = ((Component) => <Component colors={['rgba(0, 0, 0, 0.60)', 'rgba(0, 0, 0, 1)']} locations={[0,
0.841]} style={styles.backdropGradient} />)(importDefault(4589) /* metro dependency 4589 */);
var pressableBindingProps = {'onPress': null, 'hitSlop': 16, 'accessibilityRole': 'button',
onPress: onPress_102960};
label = bountyCtaInfo.label;
pressableBindingProps.accessibilityLabel = label;
pressableBindingProps.style = styles.ctaContainer;
items3 = [
((Component) => <Component source={{uri: r17}} style={styles.image} />)(importDefault(5475) /* metro dependency 5475: FastImage */),
];
var viewBindingProps = {style: styles.info};
label = bountyCtaInfo.label;
value = (
<Text variant="text-md/semibold" color="text-strong">
{label}
</Text>
);
items4 = [value];
items4[1] = (
<Text variant="text-sm/medium" color="text-default">
{bountyCtaInfo.subtext}
</Text>
);
items3[1] = (
<View {...viewBindingProps}>
{items4}
</View>
);
items2[2] = (
<Pressable {...pressableBindingProps}>
{items3}
</Pressable>
);
value = (
<View2 {...view2Props}>
{items2}
</View2>
);
r0 = value;
} else {
r0 = visible;
}
return r0;
function BountiesModalEndCardOnPress() { // fn#102960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13743:1533, owner: BountiesModalEndCard.onPress, offset: 0x02251827, size: 166 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
const openAdGameLinkDirectly = value.openAdGameLinkDirectly;
const object = {};
const bountyBinding = bounty;
object.adContentId = bountyBinding.id;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object.adCreativeType = BOUNTY;
object.cta = bountyBinding.cta;
const object2 = {};
const QuestContent = (QuestContentModule).QuestContent;
const VIDEO_MODAL_ICON_END_CARD = QuestContent.VIDEO_MODAL_ICON_END_CARD;
object2.content = VIDEO_MODAL_ICON_END_CARD;
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
const OPEN_GAME_LINK = QuestContentCTA.OPEN_GAME_LINK;
object2.ctaContent = OPEN_GAME_LINK;
object2.sourceQuestContent = sourceQuestContent;
Reflect.apply(openAdGameLinkDirectly, value, [object, object2]);
}
}
}
global.__d(_fun102956, 13553, [27, 33, 4501, 697, 13542, 9495, 4017, 4504, 4507, 4589, 9520, 7121, 6533, 7120, 5475,
4573,
2]) /* metro module 13553, dependencies: [27, 33, 4501, 697, 13542, 9495, 4017, 4504, 4507, 4589, 9520, 7121, 6533, 7120, 5475, 4573, 2] */;
@@ -1,79 +1,103 @@
/* Metro module 13554; source: modules/quests/native/BountiesModal/BountiesModalEndedCtaButtons.tsx; dependencies: [33, 4501, 697, 4017, 4504, 4507, 13542, 4578, 9520, 7121, 6533, 7120, 1244, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as QuestContentModule from '../../../../external/discord_common/js/shared/shared-constants/QuestContent.tsx'; /* Metro dependency 6533 */
import * as AnalyticsTypesModule from '../../lib/analytics/AnalyticsTypes.tsx'; /* Metro dependency 7120 */
import * as AdCreativeTypeModule from '../../../../external/discord_common/js/shared/shared-constants/AdCreativeType.tsx'; /* Metro dependency 7121 */
function _fun102961(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13744:6, offset: 0x022518cd, size: 181 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
var object2 = {};
object2.gap = importDefault(dependencyMap[2]).space.PX_8;
return {container: object2};
});
object = {code: 'function BountiesModalEndedCtaButtonsTsx1(){const{withTiming,visible,timingStandard}=this.__closure;return{opacity:withTiming(visible?1:0,timingStandard)};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalEndedCtaButtons.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalEndedCtaButtons.tsx');
exports.default = BountiesModalEndedCtaButtons;
}
function BountiesModalEndedCtaButtons({bounty, visible, sourceQuestContent, onClose}) { // fn#102963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13744:366, offset: 0x022519b3, size: 436 bytes, params: 2, frame: 24
var r0;
var View;
const Button = (ButtonNativeModule).Button;
var items2;
var intl;
var value;
const styles = useStyles();
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var object = {};
var moduleValue = require(dependencyMap[4]);
object.opacity = moduleValue.withTiming(visible ? 1 : 0, require(dependencyMap[5]).timingStandard);
return object;
};
let object = {};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.visible = visible;
object.timingStandard = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
closure.__closure = object;
closure.__workletHash = 11417131685254;
closure.__initData = env0_6;
if (visible) {
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var viewProps = {style: [styles.container, Reflect.apply(useAnimatedStyle, ReanimatedRexportModule,
[closure])]};
value = (
<Button
variant="primary-overlay"
text={(require(13542) /* metro dependency 13542: BountyCtaHelpers */).getBountyCtaInfo(bounty).buttonLabel}
size="lg"
onPress={onPress_102965}
/>
);
items2 = [value];
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = (
<Button
variant="secondary-overlay"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
size="lg"
onPress={onClose}
/>
);
value = (
<View {...viewProps}>
{items2}
</View>
);
r0 = value;
} else {
r0 = visible;
}
return r0;
function BountiesModalEndedCtaButtonsOnPress() { // fn#102965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13744:874, owner: BountiesModalEndedCtaButtons.onPress, offset: 0x02251bbc, size: 166 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
const openAdGameLinkDirectly = value.openAdGameLinkDirectly;
const object = {};
const bountyBinding = bounty;
object.adContentId = bountyBinding.id;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object.adCreativeType = BOUNTY;
object.cta = bountyBinding.cta;
const object2 = {};
const QuestContent = (QuestContentModule).QuestContent;
const VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
object2.content = VIDEO_MODAL_END_CARD;
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
const OPEN_GAME_LINK = QuestContentCTA.OPEN_GAME_LINK;
object2.ctaContent = OPEN_GAME_LINK;
object2.sourceQuestContent = sourceQuestContent;
Reflect.apply(openAdGameLinkDirectly, value, [object, object2]);
}
function BountiesModalEndedCtaButtons({bounty, visible, sourceQuestContent, onClose}) { // fn#102963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13744:366, offset: 0x022519b3, size: 436 bytes, params: 2, frame: 24
var r0;
var View;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
var items2;
var intl;
var value;
const styles = useStyles();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var object = {};
var moduleValue = require(dependencyMap[4]);
object.opacity = moduleValue.withTiming(visible ? 1 : 0, require(dependencyMap[5]).timingStandard);
return object;
};
const object2 = {};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.visible = visible;
object2.timingStandard = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
closure.__closure = object2;
closure.__workletHash = 11417131685254;
closure.__initData = env0_6;
if (visible) {
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var viewProps = {style: [styles.container, Reflect.apply(useAnimatedStyle, reanimatedRexportModule,
[closure])]};
value = <Button variant="primary-overlay" text={(require(13542) /* metro dependency 13542: BountyCtaHelpers */).getBountyCtaInfo(bounty).buttonLabel} size="lg" onPress={onPress_102965} />;
items2 = [value];
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <Button variant="secondary-overlay" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} size="lg" onPress={onClose} />;
value = <View {...viewProps}>{items2}</View>;
r0 = value;
} else {
r0 = visible;
}
return r0;
}
function BountiesModalEndedCtaButtonsOnPress() { // fn#102965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13744:874, owner: BountiesModalEndedCtaButtons.onPress, offset: 0x02251bbc, size: 166 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
const openAdGameLinkDirectly = value.openAdGameLinkDirectly;
const object3 = {};
const bountyBinding = bounty;
object3.adContentId = bountyBinding.id;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object3.adCreativeType = BOUNTY;
object3.cta = bountyBinding.cta;
const object4 = {};
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
const VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
object4.content = VIDEO_MODAL_END_CARD;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
const OPEN_GAME_LINK = QuestContentCTA.OPEN_GAME_LINK;
object4.ctaContent = OPEN_GAME_LINK;
object4.sourceQuestContent = sourceQuestContent;
Reflect.apply(openAdGameLinkDirectly, value, [object3, object4]);
}
global.__d(_fun102961, 13554, [33, 4501, 697, 4017, 4504, 4507, 13542, 4578, 9520, 7121, 6533, 7120, 1244,
2]) /* metro module 13554, dependencies: [33, 4501, 697, 4017, 4504, 4507, 13542, 4578, 9520, 7121, 6533, 7120, 1244, 2] */;
@@ -1,118 +1,124 @@
/* Metro module 13539; source: modules/quests/native/BountiesModal/BountiesModalProgress.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 4017, 4504, 4507, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
function _fun102892(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13729:6, offset: 0x0224d3f3, size: 269 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.StyleSheet;
const env0_6 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102893);
const env0_9 = (CreateStylesModule).createStyles(_fun102893);
object = {code: 'function BountiesModalProgressTsx1(){const{withTiming,visible,timingFast}=this.__closure;return{opacity:withTiming(visible?1:0,timingFast)};}'};
object = {code: 'function BountiesModalProgressTsx2(){const{withTiming,progress,shouldSkipAnimation,timingNone,timingFast}=this.__closure;return{width:withTiming(progress*100+"%",shouldSkipAnimation?timingNone:timingFast,\'animate-always\')};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalProgress.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalProgress.tsx');
exports.default = BountiesModalProgress;
exports.PROGRESS_BAR_HEIGHT = 4;
}
function _fun102893() { // fn#102893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13729:201, offset: 0x0224d500, size: 331 bytes, params: 1, frame: 17
const object2 = {};
object2.progressContainer = {height: 4};
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object6['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.round;
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object6['backgroundColor'] = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object6['opacity'] = 0.54;
object2.progressTrack = object6;
const object7 = {'position': 'absolute', 'height': '100%', 'left': 0, 'bottom': 0, 'borderRadius': null,
'backgroundColor': null, 'shadowOffset': null, 'shadowRadius': 8, 'shadowOpacity': 1, 'elevation': 4,
'shadowColor': '#30C773'};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
let GREEN_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_300;
object7.backgroundColor = GREEN_300;
object7.shadowOffset = {'width': 0, 'height': 0};
object2.progressBar = object7;
const object8 = {'position': 'absolute', 'height': '100%', 'left': 0, 'bottom': 0, 'borderRadius': null,
'backgroundColor': null, 'shadowOffset': null, 'shadowRadius': 12, 'shadowOpacity': 1, 'elevation': 8};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
GREEN_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_300;
object8.backgroundColor = GREEN_300;
object8.shadowOffset = {'width': 0, 'height': 0};
GREEN_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_300;
object8.shadowColor = GREEN_300;
object2.progressBarGlowLayer = object8;
return object2;
}
function BountiesModalProgress({progress, visible, style}) { // fn#102894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13729:1323, offset: 0x0224d64b, size: 575 bytes, params: 2, frame: 26
const styles = useStyles();
const binding = env0_4;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_3;
const value3 = binding2(value2, 2);
const property = value3[0];
const property2 = value3[1];
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, [progress]), 2);
const property3 = value4[0];
if (progress !== property3) {
value4[1](progress);
property2(progress < property3);
}
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = function() {
var object = {};
var moduleValue = require(dependencyMap[7]);
object.opacity = moduleValue.withTiming(visible ? 1 : 0, require(dependencyMap[8]).timingFast);
function _fun102893() { // fn#102893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13729:201, offset: 0x0224d500, size: 331 bytes, params: 1, frame: 17
const object = {};
object.progressContainer = {height: 4};
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.round;
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object3['backgroundColor'] = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object3['opacity'] = 0.54;
object.progressTrack = object3;
const object4 = {'position': 'absolute', 'height': '100%', 'left': 0, 'bottom': 0, 'borderRadius': null,
'backgroundColor': null, 'shadowOffset': null, 'shadowRadius': 8, 'shadowOpacity': 1, 'elevation': 4,
'shadowColor': '#30C773'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
let GREEN_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_300;
object4.backgroundColor = GREEN_300;
object4.shadowOffset = {'width': 0, 'height': 0};
object.progressBar = object4;
const object5 = {'position': 'absolute', 'height': '100%', 'left': 0, 'bottom': 0, 'borderRadius': null,
'backgroundColor': null, 'shadowOffset': null, 'shadowRadius': 12, 'shadowOpacity': 1, 'elevation': 8};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
GREEN_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_300;
object5.backgroundColor = GREEN_300;
object5.shadowOffset = {'width': 0, 'height': 0};
GREEN_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_300;
object5.shadowColor = GREEN_300;
object.progressBarGlowLayer = object5;
return object;
};
const object2 = {};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.visible = visible;
object2.timingFast = (require(4507) /* metro dependency 4507: timingPresets */).timingFast;
closure.__closure = object2;
closure.__workletHash = 5158131592262;
closure.__initData = env0_10;
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue2 = reanimatedRexportModule;
useAnimatedStyle = moduleValue2.useAnimatedStyle;
closure = BountiesModalProgressB;
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, progress: progress,
shouldSkipAnimation: property,
timingNone: (require(4507) /* metro dependency 4507: timingPresets */).timingNone,
timingFast: (require(4507) /* metro dependency 4507: timingPresets */).timingFast};
closure.__workletHash = 15586067343237;
closure.__initData = env0_11;
const value6 = Reflect.apply(useAnimatedStyle, moduleValue2, [closure]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items3 = [styles.progressContainer, style, value5];
const items2 = [<View style={styles.progressTrack} />];
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items2[1] = <View3 style={[styles.progressBarGlowLayer, value6]} />;
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items2[2] = <View4 style={[styles.progressBar, value6]} />;
return (
<View2 style={items3}>
{items2}
</View2>
);
}
}
function BountiesModalProgress({progress, visible, style}) { // fn#102894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13729:1323, offset: 0x0224d64b, size: 575 bytes, params: 2, frame: 26
const styles = useStyles();
let useState = ReactModule.useState;
const value2 = Reflect.apply(useState, ReactModule, [false]);
const value3 = Module00057(value2, 2);
const property = value3[0];
const property2 = value3[1];
useState = ReactModule.useState;
const value4 = Module00057(Reflect.apply(useState, ReactModule, [progress]), 2);
const property3 = value4[0];
if (progress !== property3) {
value4[1](progress);
property2(progress < property3);
}
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = function() {
var object = {};
var moduleValue = require(dependencyMap[7]);
object.opacity = moduleValue.withTiming(visible ? 1 : 0, require(dependencyMap[8]).timingFast);
return object;
};
let object = {};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.visible = visible;
object.timingFast = (require(4507) /* metro dependency 4507: timingPresets */).timingFast;
closure.__closure = object;
closure.__workletHash = 5158131592262;
closure.__initData = env0_10;
const value5 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = BountiesModalProgressB;
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, progress: progress,
shouldSkipAnimation: property,
timingNone: (require(4507) /* metro dependency 4507: timingPresets */).timingNone,
timingFast: (require(4507) /* metro dependency 4507: timingPresets */).timingFast};
closure.__workletHash = 15586067343237;
closure.__initData = env0_11;
const value6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const View2 = (ReanimatedRexport).View;
const items3 = [styles.progressContainer, style, value5];
const items2 = [
<View style={styles.progressTrack} />,
];
const View3 = (ReanimatedRexport).View;
items2[1] = <View3 style={[styles.progressBarGlowLayer, value6]} />;
const View4 = (ReanimatedRexport).View;
items2[2] = <View4 style={[styles.progressBar, value6]} />;
return (
<View2 style={items3}>
{items2}
</View2>
);
function BountiesModalProgressB() { // fn#102896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13729:1759, owner: BountiesModalProgress.B, offset: 0x0224d8df, size: 114 bytes, params: 1, frame: 19
let value = environment.__proto__;
const withTiming = TimingModule.withTiming;
const value3 = 100 * progress;
const binding = env0_2;
value = require(4507) /* metro dependency 4507: timingPresets */;
return {width: Reflect.apply(withTiming, TimingModule, [value3 + '%', binding ? value.timingNone : value.timingFast,
'animate-always'])};
}
}
function BountiesModalProgressB() { // fn#102896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13729:1759, owner: BountiesModalProgress.B, offset: 0x0224d8df, size: 114 bytes, params: 1, frame: 19
let value = environment.__proto__;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const value3 = 100 * progress;
const binding = env0_2;
value = require(4507) /* metro dependency 4507: timingPresets */;
return {width: Reflect.apply(withTiming, timingModule, [value3 + '%', binding ? value.timingNone : value.timingFast,
'animate-always'])};
}
global.__d(_fun102892, 13539, [57, 31, 27, 33, 4501, 697, 4017, 4504, 4507,
2]) /* metro module 13539, dependencies: [57, 31, 27, 33, 4501, 697, 4017, 4504, 4507, 2] */;
@@ -1,210 +1,229 @@
/* Metro module 13540; source: modules/quests/native/BountiesModal/BountiesModalTimer.tsx; dependencies: [31, 27, 33, 4582, 4017, 7744, 4501, 697, 477, 4504, 4573, 8707, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import Module07744 from '../../../../by-id/module-07744.js'; /* Metro dependency 7744 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as ButtonConstantsNativeModule from '../../../../design/components/Button/native/ButtonConstants.native.tsx'; /* Metro dependency 4582 */
import * as Module07744Module from '../../../../by-id/module-07744.js'; /* Metro dependency 7744 */
import * as CheckmarkSmallBoldIconModule from '../../../../design/components/Icon/native/redesign/generated/CheckmarkSmallBoldIcon.tsx'; /* Metro dependency 8707 */
function _fun102897(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:6, offset: 0x0224d951, size: 817 bytes, params: 8, frame: 26
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = undefined;
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const value2 = require(33) /* metro dependency 33 */;
const env0_5 = value2.jsx;
const env0_6 = value2.jsxs;
const SMALL_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_HEIGHT;
const SMALL_BUTTON_HEIGHT = (ButtonConstantsNativeModule).SMALL_BUTTON_HEIGHT;
const value3 = (SMALL_BUTTON_HEIGHT - 4) / 2;
const Math = global.Math;
const PI = Math.PI;
const env0_8 = 2 * PI * value3;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
const Easing = (ReanimatedRexportModule).Easing;
const env0_9 = Easing.bezier(0.15, 0.21, 0.58, 1);
const env0_10 = Easing.bezier(0.61, 0, 0.58, 1);
const env0_11 = Easing.bezier(0.42, 0, 0.58, 1);
const reanimatedRexport = importDefault(4017) /* metro dependency 4017: ReanimatedRexport */;
const createAnimatedComponent = reanimatedRexport.createAnimatedComponent;
const Circle = (require(7744) /* metro dependency 7744 */).Circle;
const env0_12 = Reflect.apply(createAnimatedComponent, reanimatedRexport, [Circle]);
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {'alignItems': 'center', 'justifyContent': 'center'};
const createAnimatedComponent = ReanimatedRexport.createAnimatedComponent;
const Circle = (Module07744Module).Circle;
const env0_12 = Reflect.apply(createAnimatedComponent, ReanimatedRexport, [Circle]);
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'alignItems': 'center', 'justifyContent': 'center'};
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object4.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object4.width = SMALL_BUTTON_HEIGHT;
object4.height = SMALL_BUTTON_HEIGHT;
object3.progress = object4;
object3.ring = {position: 'absolute', transform: [{rotate: '-90deg'}]};
object2.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.width = SMALL_BUTTON_HEIGHT;
object2.height = SMALL_BUTTON_HEIGHT;
object.progress = object2;
object.ring = {position: 'absolute', transform: [{rotate: '-90deg'}]};
const BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST;
object3.trackPath = {color: BACKGROUND_SURFACE_HIGHEST};
const object5 = {};
object.trackPath = {color: BACKGROUND_SURFACE_HIGHEST};
const object6 = {};
const CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT;
object5.color = CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object5.lineHeight = platformUtilsModule.isAndroid() ? 14 : value;
object3.countdownText = object5;
object3.checkmarkLayer = {'position': 'absolute', 'inset': 6, 'alignItems': 'center', 'justifyContent': 'center'};
const object8 = {'width': 20, 'height': 20, 'backgroundColor': '#2ECC71'};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.checkmarkBackground = object8;
object3.checkmarkIcon = {'width': 20, 'height': 20};
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object3]);
object3 = {code: 'function BountiesModalTimerTsx1(){const{PROGRESS_CIRCUMFERENCE,animatedProgress}=this.__closure;return{strokeDashoffset:PROGRESS_CIRCUMFERENCE-PROGRESS_CIRCUMFERENCE*animatedProgress.get()};}'};
object3 = {code: 'function BountiesModalTimerTsx2(){const{checkmarkBackgroundScale}=this.__closure;return{transform:[{scale:checkmarkBackgroundScale.get()}]};}'};
object3 = {code: 'function BountiesModalTimerTsx3(){const{checkmarkScale}=this.__closure;return{transform:[{scale:checkmarkScale.get()}]};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalTimer.tsx');
object6.color = CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT;
object6.lineHeight = PlatformUtilsModule.isAndroid() ? 14 : value;
object.countdownText = object6;
object.checkmarkLayer = {'position': 'absolute', 'inset': 6, 'alignItems': 'center', 'justifyContent': 'center'};
const object7 = {'width': 20, 'height': 20, 'backgroundColor': '#2ECC71'};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.checkmarkBackground = object7;
object.checkmarkIcon = {'width': 20, 'height': 20};
const env0_13 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: 'function BountiesModalTimerTsx1(){const{PROGRESS_CIRCUMFERENCE,animatedProgress}=this.__closure;return{strokeDashoffset:PROGRESS_CIRCUMFERENCE-PROGRESS_CIRCUMFERENCE*animatedProgress.get()};}'};
object = {code: 'function BountiesModalTimerTsx2(){const{checkmarkBackgroundScale}=this.__closure;return{transform:[{scale:checkmarkBackgroundScale.get()}]};}'};
object = {code: 'function BountiesModalTimerTsx3(){const{checkmarkScale}=this.__closure;return{transform:[{scale:checkmarkScale.get()}]};}'};
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalTimer.tsx');
exports.default = BountiesModalTimer;
return value;
}
function BountiesModalTimer({isCompleted, totalSeconds, remainingSeconds}) { // fn#102898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:1577, offset: 0x0224dc82, size: 1169 bytes, params: 2, frame: 34
const styles = useStyles();
let r6 = isCompleted || remainingSeconds <= 0;
const Math = global.Math;
const max = Math.max;
const Math2 = global.Math;
const value5 = Reflect.apply(max, Math, [1, Math2.ceil(remainingSeconds)]);
const r1 = isCompleted ? 1 : totalSeconds > 0 ? 1 - remainingSeconds / totalSeconds : 0;
const value8 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(r1);
const value9 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const env0_3 = value9;
const value10 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
let binding = env0_3;
binding.useEffect(_fun102899, [value8, r1]);
const env0_5 = binding.useRef(false);
binding.useEffect(_fun102900, [r6, value9, value10]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedProps = reanimatedRexportModule.useAnimatedProps;
let closure = BountiesModalTimerU;
binding = env0_8;
closure.__closure = {PROGRESS_CIRCUMFERENCE: binding, animatedProgress: value8};
closure.__workletHash = 12964700773124;
closure.__initData = env0_14;
const value11 = Reflect.apply(useAnimatedProps, reanimatedRexportModule, [closure]);
const moduleValue5 = reanimatedRexportModule;
let useAnimatedStyle = moduleValue5.useAnimatedStyle;
closure = BountiesModalTimerX;
closure.__closure = {checkmarkBackgroundScale: value9};
closure.__workletHash = 10834015407160;
closure.__initData = env0_15;
const value12 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
const moduleValue6 = reanimatedRexportModule;
useAnimatedStyle = moduleValue6.useAnimatedStyle;
closure = BountiesModalTimerG;
closure.__closure = {checkmarkScale: value10};
closure.__workletHash = 7510845920441;
closure.__initData = env0_16;
const value13 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
const defaultImport = importDefault(7744) /* metro dependency 7744 */;
const object = {};
const SMALL_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_HEIGHT;
object.height = SMALL_BUTTON_HEIGHT;
object.width = SMALL_BUTTON_HEIGHT;
object.style = styles.ring;
const Circle = (require(7744) /* metro dependency 7744 */).Circle;
const binding2 = env0_7;
const items2 = [((Component) => <Component {...object}><Circle cx={SMALL_BUTTON_HEIGHT / 2} cy={SMALL_BUTTON_HEIGHT / 2} r={binding2} fill="none" stroke={styles.trackPath.color} strokeWidth={4} />{((Component) => <Component cx={SMALL_BUTTON_HEIGHT / 2} cy={SMALL_BUTTON_HEIGHT / 2} r={binding2} fill="none" stroke="#2ECC71" strokeWidth={4} strokeDasharray={binding} strokeLinecap="round" animatedProps={value11} />)(env0_12)}</Component>)(defaultImport)];
r6 = !r6 && ((Text) => <Text variant="text-sm/semibold" style={styles.countdownText} maxFontSizeMultiplier={1}>{value5}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
items2[1] = r6;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items2[2] = <View2 style={[styles.checkmarkLayer, value12]}><View style={styles.checkmarkBackground} /></View2>;
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items4 = [styles.checkmarkLayer, value13];
const CheckmarkSmallBoldIcon = (require(8707) /* metro dependency 8707: CheckmarkSmallBoldIcon */).CheckmarkSmallBoldIcon;
const CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT;
items2[3] = <View3 style={items4}><CheckmarkSmallBoldIcon size="custom" color={CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT} style={styles.checkmarkIcon} /></View3>;
return (
<View style={styles.progress}>
{items2}
</View>
);
}
function _fun102899() { // fn#102899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:1829, offset: 0x0224e113, size: 78 bytes, params: 1, frame: 18
const binding = env0_2;
const set = binding.set;
const timingModule = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, binding, [timingModule.withTiming(env0_1, {duration: 500}, 'animate-always')]);
}
function _fun102900() { // fn#102900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:1936, offset: 0x0224e161, size: 388 bytes, params: 1, frame: 30
var r1;
var r0;
var value2;
var value3;
var moduleValue;
var withSequence;
var withTiming;
var value4;
var moduleValue3;
var withDelay;
var moduleValue4;
var moduleValue5;
var binding3;
var value5;
var moduleValue6;
var value;
const current = env0_5.current;
env0_5.current = true;
let binding = env0_0;
const binding2 = env0_3;
let set = binding2.set;
if (binding) {
if (current) {
value2 = environment.__proto__;
value3 = undefined;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withSequence = moduleValue.withSequence;
value4 = (require(4504) /* metro dependency 4504: timing */).withTiming(1.65, {duration: 267,
easing: env1_9});
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue3.withTiming;
Reflect.apply(set, binding2, [Reflect.apply(withSequence, moduleValue, [value4, Reflect.apply(withTiming,
moduleValue3, [1, {duration: 233, easing: env1_10}])])]);
binding = env0_4;
set = binding.set;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = value.withDelay;
moduleValue4 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withSequence = moduleValue4.withSequence;
moduleValue5 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue5.withTiming;
binding3 = env1_11;
value5 = Reflect.apply(withTiming, moduleValue5, [1.25, {duration: 167, easing: binding3}]);
moduleValue6 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue6.withTiming;
Reflect.apply(set, binding, [Reflect.apply(withDelay, value, [167, Reflect.apply(withSequence, moduleValue4,
[value5, Reflect.apply(withTiming, moduleValue6, [1, {duration: 333, easing: binding3}])])])]);
r1 = value3;
} else {
Reflect.apply(set, binding2, [1]);
env0_4.set(1);
r1 = undefined;
function BountiesModalTimer({isCompleted, totalSeconds, remainingSeconds}) { // fn#102898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:1577, offset: 0x0224dc82, size: 1169 bytes, params: 2, frame: 34
const styles = useStyles();
let r6 = isCompleted || remainingSeconds <= 0;
const Math = global.Math;
const max = Math.max;
const Math2 = global.Math;
const value5 = Reflect.apply(max, Math, [1, Math2.ceil(remainingSeconds)]);
const r1 = isCompleted ? 1 : totalSeconds > 0 ? 1 - remainingSeconds / totalSeconds : 0;
const value8 = (ReanimatedRexportModule).useSharedValue(r1);
const value9 = (ReanimatedRexportModule).useSharedValue(0);
const env0_3 = value9;
const value10 = (ReanimatedRexportModule).useSharedValue(0);
let binding = env0_3;
binding.useEffect(_fun102899, [value8, r1]);
const env0_5 = binding.useRef(false);
binding.useEffect(_fun102900, [r6, value9, value10]);
const useAnimatedProps = ReanimatedRexportModule.useAnimatedProps;
let closure = BountiesModalTimerU;
binding = env0_8;
closure.__closure = {PROGRESS_CIRCUMFERENCE: binding, animatedProgress: value8};
closure.__workletHash = 12964700773124;
closure.__initData = env0_14;
const value11 = Reflect.apply(useAnimatedProps, ReanimatedRexportModule, [closure]);
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = BountiesModalTimerX;
closure.__closure = {checkmarkBackgroundScale: value9};
closure.__workletHash = 10834015407160;
closure.__initData = env0_15;
const value12 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = BountiesModalTimerG;
closure.__closure = {checkmarkScale: value10};
closure.__workletHash = 7510845920441;
closure.__initData = env0_16;
const value13 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const defaultImport = Module07744;
const object2 = {};
const SMALL_BUTTON_HEIGHT = (ButtonConstantsNativeModule).SMALL_BUTTON_HEIGHT;
object2.height = SMALL_BUTTON_HEIGHT;
object2.width = SMALL_BUTTON_HEIGHT;
object2.style = styles.ring;
const Circle = (Module07744Module).Circle;
const binding2 = env0_7;
const items2 = [
((Component) => <Component {...object2}><Circle cx={SMALL_BUTTON_HEIGHT / 2} cy={SMALL_BUTTON_HEIGHT / 2} r={binding2} fill="none" stroke={styles.trackPath.color} strokeWidth={4} />{((Component) => <Component cx={SMALL_BUTTON_HEIGHT / 2} cy={SMALL_BUTTON_HEIGHT / 2} r={binding2} fill="none" stroke="#2ECC71" strokeWidth={4} strokeDasharray={binding} strokeLinecap="round" animatedProps={value11} />)(env0_12)}</Component>)(defaultImport),
];
r6 = !r6 && ((Text) => <Text variant="text-sm/semibold" style={styles.countdownText} maxFontSizeMultiplier={1}>{value5}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
items2[1] = r6;
const View2 = (ReanimatedRexport).View;
items2[2] = (
<View2 style={[styles.checkmarkLayer, value12]}>
<View style={styles.checkmarkBackground} />
</View2>
);
const View3 = (ReanimatedRexport).View;
const items4 = [styles.checkmarkLayer, value13];
const CheckmarkSmallBoldIcon = (CheckmarkSmallBoldIconModule).CheckmarkSmallBoldIcon;
const CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT = (Native).colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT;
items2[3] = (
<View3 style={items4}>
<CheckmarkSmallBoldIcon
size="custom"
color={CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT}
style={styles.checkmarkIcon}
/>
</View3>
);
return (
<View style={styles.progress}>
{items2}
</View>
);
function _fun102899() { // fn#102899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:1829, offset: 0x0224e113, size: 78 bytes, params: 1, frame: 18
const binding = env0_2;
const set = binding.set;
Reflect.apply(set, binding, [TimingModule.withTiming(env0_1, {duration: 500}, 'animate-always')]);
}
r0 = r1;
} else {
Reflect.apply(set, binding2, [0]);
env0_4.set(0);
r0 = undefined;
function _fun102900() { // fn#102900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:1936, offset: 0x0224e161, size: 388 bytes, params: 1, frame: 30
var r1;
var r0;
var value2;
var value3;
var moduleValue;
var withSequence;
var withTiming;
var value4;
var moduleValue3;
var withDelay;
var moduleValue4;
var moduleValue5;
var binding3;
var value5;
var moduleValue6;
var value;
const current = env0_5.current;
env0_5.current = true;
let binding = env0_0;
const binding2 = env0_3;
let set = binding2.set;
if (binding) {
if (current) {
value2 = environment.__proto__;
value3 = undefined;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withSequence = moduleValue.withSequence;
value4 = (require(4504) /* metro dependency 4504: timing */).withTiming(1.65, {duration: 267,
easing: env1_9});
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue3.withTiming;
Reflect.apply(set, binding2, [Reflect.apply(withSequence, moduleValue, [value4, Reflect.apply(withTiming,
moduleValue3, [1, {duration: 233, easing: env1_10}])])]);
binding = ReactNativeModule.View;
set = binding.set;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = value.withDelay;
moduleValue4 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withSequence = moduleValue4.withSequence;
moduleValue5 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue5.withTiming;
binding3 = env1_11;
value5 = Reflect.apply(withTiming, moduleValue5, [1.25, {duration: 167, easing: binding3}]);
moduleValue6 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue6.withTiming;
Reflect.apply(set, binding, [Reflect.apply(withDelay, value, [167, Reflect.apply(withSequence, moduleValue4,
[value5, Reflect.apply(withTiming, moduleValue6, [1, {duration: 333, easing: binding3}])])])]);
r1 = value3;
} else {
Reflect.apply(set, binding2, [1]);
ReactNativeModule.View.set(1);
r1 = undefined;
}
r0 = r1;
} else {
Reflect.apply(set, binding2, [0]);
ReactNativeModule.View.set(0);
r0 = undefined;
}
return r0;
}
function BountiesModalTimerU() { // fn#102901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:2362, owner: BountiesModalTimer.U, offset: 0x0224e2e5, size: 40 bytes, params: 1, frame: 11
const binding = env1_8;
const binding2 = env0_2;
const get = binding2.get;
return {strokeDashoffset: binding - binding * Reflect.apply(get, binding2, [])};
}
function BountiesModalTimerX() { // fn#102902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:2536, owner: BountiesModalTimer.x, offset: 0x0224e30d, size: 39 bytes, params: 1, frame: 11
const object2 = {};
object2.scale = env0_3.get();
return {transform: [object2]};
}
function BountiesModalTimerG() { // fn#102903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:2692, owner: BountiesModalTimer.G, offset: 0x0224e334, size: 39 bytes, params: 1, frame: 11
const object2 = {};
object2.scale = ReactNativeModule.View.get();
return {transform: [object2]};
}
}
return r0;
}
function BountiesModalTimerU() { // fn#102901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:2362, owner: BountiesModalTimer.U, offset: 0x0224e2e5, size: 40 bytes, params: 1, frame: 11
const binding = env1_8;
const binding2 = env0_2;
const get = binding2.get;
return {strokeDashoffset: binding - binding * Reflect.apply(get, binding2, [])};
}
function BountiesModalTimerX() { // fn#102902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:2536, owner: BountiesModalTimer.x, offset: 0x0224e30d, size: 39 bytes, params: 1, frame: 11
const object = {};
object.scale = env0_3.get();
return {transform: [object]};
}
function BountiesModalTimerG() { // fn#102903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:2692, owner: BountiesModalTimer.G, offset: 0x0224e334, size: 39 bytes, params: 1, frame: 11
const object = {};
object.scale = env0_4.get();
return {transform: [object]};
}
global.__d(_fun102897, 13540, [31, 27, 33, 4582, 4017, 7744, 4501, 697, 477, 4504, 4573, 8707,
2]) /* metro module 13540, dependencies: [31, 27, 33, 4582, 4017, 7744, 4501, 697, 477, 4504, 4573, 8707, 2] */;
@@ -1,111 +1,145 @@
/* Metro module 13543; source: modules/quests/native/BountiesModal/BountiesScrollEndCard.tsx; dependencies: [31, 27, 33, 4501, 697, 13542, 1244, 13519, 4507, 4017, 4504, 4589, 4573, 10234, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as UseVisibilityTransitionModule from './useVisibilityTransition.tsx'; /* Metro dependency 13519 */
import * as BountyCtaHelpersModule from './BountyCtaHelpers.tsx'; /* Metro dependency 13542 */
function _fun102913(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13733:6, offset: 0x0224eced, size: 237 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.Pressable;
const env0_4 = value.StyleSheet;
const env0_5 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102914);
const env0_8 = (CreateStylesModule).createStyles(_fun102914);
object = {code: 'function BountiesScrollEndCardTsx1(){const{isScrollingInBoundsSharedValue,withTiming,isActive,timingStandard}=this.__closure;var _isScrollingInBoundsS;const isScrollingInBounds=((_isScrollingInBoundsS=isScrollingInBoundsSharedValue)===null||_isScrollingInBoundsS===void 0?void 0:_isScrollingInBoundsS.get())===true;return{opacity:withTiming(isActive&&!isScrollingInBounds?1:0,timingStandard)};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollEndCard.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollEndCard.tsx');
exports.default = BountiesScrollEndCard;
}
function _fun102914() { // fn#102914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13733:203, offset: 0x0224edda, size: 242 bytes, params: 1, frame: 17
const object = {};
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object.container = object2;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['backgroundColor'] = 'rgba(0, 0, 0, 0.6)';
object.backdropTint = object3;
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
object.backdropGradient = object4;
const object5 = {};
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
object5['justifyContent'] = 'center';
object5['alignItems'] = 'center';
object.pressable = object5;
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object.overlayContent = {alignItems: 'center', gap: PX_4};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object.textBlock = {alignItems: 'center', gap: PX_4};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.replayIcon = {margin: PX_12};
return object;
}
function _fun102914() { // fn#102914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13733:203, offset: 0x0224edda, size: 242 bytes, params: 1, frame: 17
const object6 = {};
const object7 = {};
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
object6.container = object7;
const object8 = {};
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
object8['backgroundColor'] = 'rgba(0, 0, 0, 0.6)';
object6.backdropTint = object8;
const object9 = {};
copyDataProperties(object9, StyleSheet.absoluteFillObject, undefined);
object6.backdropGradient = object9;
const object10 = {};
copyDataProperties(object10, StyleSheet.absoluteFillObject, undefined);
object10['justifyContent'] = 'center';
object10['alignItems'] = 'center';
object6.pressable = object10;
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object6.overlayContent = {alignItems: 'center', gap: PX_4};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object6.textBlock = {alignItems: 'center', gap: PX_4};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.replayIcon = {margin: PX_12};
return object6;
}
function BountiesScrollEndCard({bounty, visible, onReplay, isActive, isScrollingInBoundsSharedValue}) { // fn#102915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13733:1015, offset: 0x0224eecc, size: 826 bytes, params: 2, frame: 33
var r0;
var View2;
var items2;
var View3;
const Text = (TextModule).Text;
var items4;
var value;
const styles = useStyles();
const bountyCtaInfo = (BountyCtaHelpersModule).getBountyCtaInfo(bounty);
const intl = (IndexNativeModule).intl;
const value4 = intl.string((IndexNativeModule).t['9UtZAY']);
const useVisibilityTransition = UseVisibilityTransitionModule.useVisibilityTransition;
let object = {visible: visible};
object.entranceTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
object.exitTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
const {opacityStyle, shouldRender} = Reflect.apply(useVisibilityTransition, UseVisibilityTransitionModule, [object]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const BountiesScrollEndCardH2 = BountiesScrollEndCardH;
object = {isScrollingInBoundsSharedValue: isScrollingInBoundsSharedValue};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.isActive = isActive;
object.timingStandard = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
BountiesScrollEndCardH2.__closure = object;
BountiesScrollEndCardH2.__workletHash = 13628650628423;
BountiesScrollEndCardH2.__initData = env0_9;
if (shouldRender) {
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view2Props = {style: [styles.container, opacityStyle], pointerEvents: 'box-none'};
items2 = [
<View style={styles.backdropTint} />,
];
items2[1] = ((Component) => <Component colors={['rgba(0, 0, 0, 0.48)',
'rgba(0, 0, 0, 0.8)']} style={styles.backdropGradient} />)(importDefault(4589) /* metro dependency 4589 */);
var pressableBindingProps = {onPress: isActive ? onReplay : undefined, disabled: !isActive,
accessibilityRole: 'button', accessibilityLabel: value4, style: styles.pressable};
View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view3Props = {style: [styles.overlayContent, Reflect.apply(useAnimatedStyle, ReanimatedRexportModule,
[BountiesScrollEndCardH2])]};
var viewBindingProps = {style: styles.textBlock};
value = (
<Text variant="heading-md/semibold" color="text-strong">
{bountyCtaInfo.label}
</Text>
);
items4 = [value];
items4[1] = (
<Text variant="heading-sm/medium" color="text-default">
{value4}
</Text>
);
value = (
<View {...viewBindingProps}>
{items4}
</View>
);
items2[2] = (
<Pressable {...pressableBindingProps}>
<View3 {...view3Props}>
{value}
{((RetryIcon) => <RetryIcon accessible={false} color={(importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT} style={styles.replayIcon} />)((require(10234) /* metro dependency 10234: RetryIcon */).RetryIcon)}
</View3>
</Pressable>
);
value = (
<View2 {...view2Props}>
{items2}
</View2>
);
r0 = value;
} else {
r0 = shouldRender;
}
return r0;
function BountiesScrollEndCardH() { // fn#102916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13733:1392, owner: BountiesScrollEndCard.h, offset: 0x0224f206, size: 121 bytes, params: 1, frame: 18
const r7 = isScrollingInBoundsSharedValue?.get();
const object = {};
const withTiming = TimingModule.withTiming;
const isActiveBinding = isActive;
const value = 0;
object.opacity = Reflect.apply(withTiming, TimingModule, [isActiveBinding ? r7 === true ? value : 1 : value,
(require(4507) /* metro dependency 4507: timingPresets */).timingStandard]);
return object;
}
function BountiesScrollEndCard({bounty, visible, onReplay, isActive, isScrollingInBoundsSharedValue}) { // fn#102915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13733:1015, offset: 0x0224eecc, size: 826 bytes, params: 2, frame: 33
var r0;
var View2;
var items2;
var View3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items4;
var value;
const styles = useStyles();
const bountyCtaInfo = (require(13542) /* metro dependency 13542: BountyCtaHelpers */).getBountyCtaInfo(bounty);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value4 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9UtZAY']);
const useVisibilityTransitionModule = require(13519) /* metro dependency 13519: useVisibilityTransition */;
const useVisibilityTransition = useVisibilityTransitionModule.useVisibilityTransition;
let object2 = {visible: visible};
object2.entranceTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
object2.exitTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
const {opacityStyle, shouldRender} = Reflect.apply(useVisibilityTransition, useVisibilityTransitionModule,
[object2]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = BountiesScrollEndCardH;
object2 = {isScrollingInBoundsSharedValue: isScrollingInBoundsSharedValue};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.isActive = isActive;
object2.timingStandard = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
closure.__closure = object2;
closure.__workletHash = 13628650628423;
closure.__initData = env0_9;
if (shouldRender) {
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view2Props = {style: [styles.container, opacityStyle], pointerEvents: 'box-none'};
items2 = [<View style={styles.backdropTint} />];
items2[1] = ((Component) => <Component colors={['rgba(0, 0, 0, 0.48)',
'rgba(0, 0, 0, 0.8)']} style={styles.backdropGradient} />)(importDefault(4589) /* metro dependency 4589 */);
var pressableBindingProps = {onPress: isActive ? onReplay : undefined, disabled: !isActive,
accessibilityRole: 'button', accessibilityLabel: value4, style: styles.pressable};
View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view3Props = {style: [styles.overlayContent, Reflect.apply(useAnimatedStyle, reanimatedRexportModule,
[closure])]};
var viewBindingProps = {style: styles.textBlock};
value = <Text variant="heading-md/semibold" color="text-strong">{bountyCtaInfo.label}</Text>;
items4 = [value];
items4[1] = <Text variant="heading-sm/medium" color="text-default">{value4}</Text>;
value = <View {...viewBindingProps}>{items4}</View>;
items2[2] = <Pressable {...pressableBindingProps}><View3 {...view3Props}>{value}{((RetryIcon) => <RetryIcon accessible={false} color={(importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT} style={styles.replayIcon} />)((require(10234) /* metro dependency 10234: RetryIcon */).RetryIcon)}</View3></Pressable>;
value = <View2 {...view2Props}>{items2}</View2>;
r0 = value;
} else {
r0 = shouldRender;
}
return r0;
}
function BountiesScrollEndCardH() { // fn#102916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13733:1392, owner: BountiesScrollEndCard.h, offset: 0x0224f206, size: 121 bytes, params: 1, frame: 18
const r7 = isScrollingInBoundsSharedValue?.get();
const object2 = {};
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const isActiveBinding = isActive;
const value = 0;
object2.opacity = Reflect.apply(withTiming, timingModule, [isActiveBinding ? r7 === true ? value : 1 : value,
(require(4507) /* metro dependency 4507: timingPresets */).timingStandard]);
return object2;
}
global.__d(_fun102913, 13543, [31, 27, 33, 4501, 697, 13542, 1244, 13519, 4507, 4017, 4504, 4589, 4573, 10234,
2]) /* metro module 13543, dependencies: [31, 27, 33, 4501, 697, 13542, 1244, 13519, 4507, 4017, 4504, 4589, 4573, 10234, 2] */;
@@ -1,14 +1,17 @@
/* Metro module 13518; source: modules/quests/native/BountiesModal/BountiesScrollPromptFooter.tsx; dependencies: [31, 27, 4502, 33, 4501, 697, 13519, 4507, 566, 1585, 4017, 3868, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UseVisibilityTransitionModule from './useVisibilityTransition.tsx'; /* Metro dependency 13519 */
function _fun102749(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13708:6, offset: 0x022474ec, size: 231 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).StyleSheet;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
var object = {root: {'position': 'absolute', 'bottom': 0, 'left': 0, 'right': 0}};
var object2 = {'flex': 1, 'minHeight': 97, 'alignItems': 'center', 'justifyContent': 'center'};
@@ -19,44 +22,44 @@ function _fun102749(global, require, importDefault, importAll, module, exports,
object.gradient = object3;
return object;
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollPromptFooter.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollPromptFooter.tsx');
exports.default = BountiesScrollPromptFooter;
exports.BOUNTIES_MODAL_BASE_FOOTER_HEIGHT = 97;
function BountiesScrollPromptFooter({visible, children, onContentLayout, zIndex, opacityStyle}) { // fn#102751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13708:507, offset: 0x0224763b, size: 547 bytes, params: 2, frame: 28
const styles = useStyles();
const useVisibilityTransition = UseVisibilityTransitionModule.useVisibilityTransition;
const object = {visible: visible};
object.entranceTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
object.exitTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
const value2 = Reflect.apply(useVisibilityTransition, UseVisibilityTransitionModule, [object]);
const opacityStyle2 = value2.opacityStyle;
const shouldRender = value2.shouldRender;
let useMemo = ReactModule.useMemo;
const value3 = Reflect.apply(useMemo, ReactModule, [function() {
return zIndex != null ? {zIndex: zIndex} : undefined;
}, [zIndex]]);
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value4 = (UseSafeAreaInsetsNative)();
useMemo = ReactModule.useMemo;
return shouldRender && ((View) => <View style={[styles.root, opacityStyle2,
value3]} pointerEvents="none">{((View) => <View style={[styles.gradient,
opacityStyle]}>{((BountiesScrollGradientRive) => <BountiesScrollGradientRive stateMachine="State Machine 1" fit="fill" alignment="bottom-center" withReducedMotion={useReducedMotion ? 'halt' : 'play'} />)((require(3868) /* metro dependency 3868: native */).BountiesScrollGradientRive)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)}{((View) => <View style={[styles.content,
Reflect.apply(useMemo, ReactModule, [_fun102754, [value4.bottom]]),
opacityStyle]} onLayout={onContentLayout}>{children}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View);
function _fun102754() { // fn#102754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13708:905, offset: 0x02247880, size: 75 bytes, params: 1, frame: 16
const Math = global.Math;
const max = Math.max;
const bottom = env0_1.bottom;
const PX_8 = (Native).space.PX_8;
return {paddingBottom: Reflect.apply(max, Math, [bottom, PX_8])};
}
}
}
function BountiesScrollPromptFooter({visible, children, onContentLayout, zIndex, opacityStyle}) { // fn#102751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13708:507, offset: 0x0224763b, size: 547 bytes, params: 2, frame: 28
const styles = useStyles();
const useVisibilityTransitionModule = require(13519) /* metro dependency 13519: useVisibilityTransition */;
const useVisibilityTransition = useVisibilityTransitionModule.useVisibilityTransition;
const object2 = {visible: visible};
object2.entranceTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
object2.exitTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
const value2 = Reflect.apply(useVisibilityTransition, useVisibilityTransitionModule, [object2]);
const opacityStyle2 = value2.opacityStyle;
const shouldRender = value2.shouldRender;
const binding = env0_3;
let useMemo = binding.useMemo;
const value3 = Reflect.apply(useMemo, binding, [function() {
return zIndex != null ? {zIndex: zIndex} : undefined;
}, [zIndex]]);
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value4 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
useMemo = binding.useMemo;
return shouldRender && ((View) => <View style={[styles.root, opacityStyle2,
value3]} pointerEvents="none">{((View) => <View style={[styles.gradient,
opacityStyle]}>{((BountiesScrollGradientRive) => <BountiesScrollGradientRive stateMachine="State Machine 1" fit="fill" alignment="bottom-center" withReducedMotion={useReducedMotion ? 'halt' : 'play'} />)((require(3868) /* metro dependency 3868: native */).BountiesScrollGradientRive)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)}{((View) => <View style={[styles.content,
Reflect.apply(useMemo, binding, [_fun102754, [value4.bottom]]),
opacityStyle]} onLayout={onContentLayout}>{children}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View);
}
function _fun102754() { // fn#102754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13708:905, offset: 0x02247880, size: 75 bytes, params: 1, frame: 16
const Math = global.Math;
const max = Math.max;
const bottom = env0_1.bottom;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
return {paddingBottom: Reflect.apply(max, Math, [bottom, PX_8])};
}
global.__d(_fun102749, 13518, [31, 27, 4502, 33, 4501, 697, 13519, 4507, 566, 1585, 4017, 3868,
2]) /* metro module 13518, dependencies: [31, 27, 4502, 33, 4501, 697, 13519, 4507, 566, 1585, 4017, 3868, 2] */;
@@ -1,43 +1,47 @@
/* Metro module 13544; source: modules/quests/native/BountiesModal/BountiesScrollPromptNuxFooter.tsx; dependencies: [27, 33, 4501, 4573, 1244, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun102917(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13734:6, offset: 0x0224f27f, size: 179 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(27) /* metro dependency 27 */).View;
const value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
return {root: {'alignItems': 'center', 'gap': 2}, titleText: {textAlign: 'center'},
swipeText: {'textAlign': 'center', 'textTransform': 'uppercase'}};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollPromptNuxFooter.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollPromptNuxFooter.tsx');
exports.default = BountiesScrollPromptFooter_102919;
function BountiesScrollPromptFooter_102919() { // fn#102919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13734:406, offset: 0x0224f36b, size: 263 bytes, params: 1, frame: 24
const styles = useStyles();
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const H57f41 = (IndexNativeModule).t.H57f41;
return (
<View style={styles.root}>
<Text
variant="text-md/semibold"
color="text-default"
style={styles.titleText}
>
{Reflect.apply(string, intl, [H57f41])}
</Text>
<Text
variant="text-xxs/semibold"
color="text-muted"
style={styles.swipeText}
>
{intl.string((IndexNativeModule).t.tG0zsk)}
</Text>
</View>
);
}
}
function BountiesScrollPromptFooter_102919() { // fn#102919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13734:406, offset: 0x0224f36b, size: 263 bytes, params: 1, frame: 24
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const H57f41 = (require(1244) /* metro dependency 1244: indexNative */).t.H57f41;
return (
<View style={styles.root}>
<Text
variant="text-md/semibold"
color="text-default"
style={styles.titleText}
>
{Reflect.apply(string, intl, [H57f41])}
</Text>
<Text
variant="text-xxs/semibold"
color="text-muted"
style={styles.swipeText}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tG0zsk)}
</Text>
</View>
);
}
global.__d(_fun102917, 13544, [27, 33, 4501, 4573, 1244,
2]) /* metro module 13544, dependencies: [27, 33, 4501, 4573, 1244, 2] */;
@@ -1,72 +1,109 @@
/* Metro module 13545; source: modules/quests/native/BountiesModal/BountiesScrollRecapFooter.tsx; dependencies: [31, 27, 4502, 33, 4501, 697, 477, 1244, 4573, 10076, 566, 3868, 2] */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as OrbsIconModule from '../../../../design/components/Icon/native/redesign/generated/OrbsIcon.tsx'; /* Metro dependency 10076 */
function _fun102920(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13735:6, offset: 0x0224f472, size: 232 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102921);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollRecapFooter.tsx');
ReactModule;
const env0_7 = (CreateStylesModule).createStyles(_fun102921);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollRecapFooter.tsx');
exports.BountiesScrollRecapFooter = BountiesScrollRecapFooter;
exports.BountiesScrollRecapFooterGradient = BountiesScrollRecapFooterGradient;
function _fun102921() { // fn#102921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13735:180, offset: 0x0224f55a, size: 185 bytes, params: 1, frame: 16
const object = {};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object.container = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center', gap: PX_4};
object.headerLabel = {textTransform: 'uppercase'};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object.orbRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_4};
object.rive = {'flex': 1, 'width': '100%'};
const object4 = {};
const value = 6;
object4.marginTop = require(dependencyMap[value]).isIOS() ? value : 0;
object.orbAmount = object4;
return object;
}
function BountiesScrollRecapFooter({orbAmount}) { // fn#102922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13735:585, offset: 0x0224f613, size: 381 bytes, params: 2, frame: 25
const styles = useStyles();
const intl = (IndexNativeModule).intl;
const value2 = intl.string((IndexNativeModule).t.d6Rrn6);
const Text = (TextModule).Text;
const items2 = [
<Text
variant="text-xs/bold"
color="text-brand"
style={styles.headerLabel}
accessible={false}
>
{value2}
</Text>,
];
const OrbsIcon = (OrbsIconModule).OrbsIcon;
items2[1] = (
<View
style={styles.orbRow}
accessible={false}
importantForAccessibility="no-hide-descendants"
>
<OrbsIcon
size="sm"
color="icon-strong"
accessible={false}
/>
<Text
variant="display-sm"
color="text-strong"
accessible={false}
style={styles.orbAmount}
>
{'+' + orbAmount}
</Text>
</View>
);
return (
<View
style={styles.container}
pointerEvents="none"
accessible
accessibilityRole="text"
accessibilityLabel={'' + value2 + ', +' + orbAmount}
>
{items2}
</View>
);
}
function BountiesScrollRecapFooterGradient() { // fn#102923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13735:1232, offset: 0x0224f790, size: 153 bytes, params: 1, frame: 18
const styles = useStyles();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const BountiesScrollGradientRive = (NativeModule).BountiesScrollGradientRive;
return (
<View style={styles.rive}>
<BountiesScrollGradientRive
stateMachine="State Machine 1"
fit="fill"
alignment="bottom-center"
withReducedMotion={useReducedMotion ? 'halt' : 'play'}
/>
</View>
);
}
}
function _fun102921() { // fn#102921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13735:180, offset: 0x0224f55a, size: 185 bytes, params: 1, frame: 16
const object2 = {};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.container = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center', gap: PX_4};
object2.headerLabel = {textTransform: 'uppercase'};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.orbRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_4};
object2.rive = {'flex': 1, 'width': '100%'};
const object3 = {};
const value = 6;
object3.marginTop = require(dependencyMap[value]).isIOS() ? value : 0;
object2.orbAmount = object3;
return object2;
}
function BountiesScrollRecapFooter({orbAmount}) { // fn#102922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13735:585, offset: 0x0224f613, size: 381 bytes, params: 2, frame: 25
const styles = useStyles();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.d6Rrn6);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<Text variant="text-xs/bold" color="text-brand" style={styles.headerLabel} accessible={false}>{value2}</Text>];
const OrbsIcon = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
items2[1] = <View style={styles.orbRow} accessible={false} importantForAccessibility="no-hide-descendants"><OrbsIcon size="sm" color="icon-strong" accessible={false} /><Text variant="display-sm" color="text-strong" accessible={false} style={styles.orbAmount}>{'+' + orbAmount}</Text></View>;
return (
<View
style={styles.container}
pointerEvents="none"
accessible
accessibilityRole="text"
accessibilityLabel={'' + value2 + ', +' + orbAmount}
>
{items2}
</View>
);
}
function BountiesScrollRecapFooterGradient() { // fn#102923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13735:1232, offset: 0x0224f790, size: 153 bytes, params: 1, frame: 18
const styles = useStyles();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const BountiesScrollGradientRive = (require(3868) /* metro dependency 3868: native */).BountiesScrollGradientRive;
return (
<View style={styles.rive}>
<BountiesScrollGradientRive
stateMachine="State Machine 1"
fit="fill"
alignment="bottom-center"
withReducedMotion={useReducedMotion ? 'halt' : 'play'}
/>
</View>
);
}
global.__d(_fun102920, 13545, [31, 27, 4502, 33, 4501, 697, 477, 1244, 4573, 10076, 566, 3868,
2]) /* metro module 13545, dependencies: [31, 27, 4502, 33, 4501, 697, 477, 1244, 4573, 10076, 566, 3868, 2] */;
@@ -1,112 +1,200 @@
/* Metro module 13546; source: modules/quests/native/BountiesModal/BountiesScrollRecapPage.tsx; dependencies: [31, 27, 4502, 33, 697, 4501, 477, 7897, 13547, 9543, 13548, 1585, 566, 13549, 4573, 1244, 10076, 4578, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import Starfield_bgMp4 from '../../../../external/discord_assets/assets/quests/bounties/starfield_bg.mp4.js'; /* Metro dependency 13549 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as VideoModule from '../../../../components_native/common/Video.tsx'; /* Metro dependency 9543 */
import * as OrbsIconModule from '../../../../design/components/Icon/native/redesign/generated/OrbsIcon.tsx'; /* Metro dependency 10076 */
function _fun102925(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13736:6, offset: 0x0224f829, size: 265 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.StyleSheet;
const env0_4 = value.View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102927);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollRecapPage.tsx');
const env0_9 = (CreateStylesModule).createStyles(_fun102927);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollRecapPage.tsx');
exports.BountiesScrollRecapPage = BountiesScrollRecapPage;
}
function BountiesRecapOrbsBackground({style, reducedMotion}) { // fn#102926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13736:922, offset: 0x0224f932, size: 260 bytes, params: 2, frame: 22
var r0;
var VideoComponent;
var object;
if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid()) {
r0 = <View style={style} needsOffscreenAlphaCompositing renderToHardwareTextureAndroid pointerEvents="none">{((APNGPlayer) => <APNGPlayer url={importDefault(13547) /* metro dependency 13547: _3d_orbsPng */} style={StyleSheet.absoluteFillObject} autoplay={!reducedMotion} />)((require(7897) /* metro dependency 7897: APNGPlayerAndroid */).APNGPlayer)}</View>;
} else {
VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
object = {};
object.uri = importDefault(13548) /* metro dependency 13548: _3d_orbsMov */;
r0 = <VideoComponent source={object} style={style} resizeMode="contain" paused={reducedMotion} disableFocus preventsDisplaySleepDuringVideoPlayback={false} importantForAccessibility="no-hide-descendants" />;
function BountiesRecapOrbsBackground({style, reducedMotion}) { // fn#102926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13736:922, offset: 0x0224f932, size: 260 bytes, params: 2, frame: 22
var r0;
var VideoComponent;
var object2;
if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid()) {
r0 = (
<View
style={style}
needsOffscreenAlphaCompositing
renderToHardwareTextureAndroid
pointerEvents="none"
>
{((APNGPlayer) => <APNGPlayer url={importDefault(13547) /* metro dependency 13547: _3d_orbsPng */} style={StyleSheet.absoluteFillObject} autoplay={!reducedMotion} />)((require(7897) /* metro dependency 7897: APNGPlayerAndroid */).APNGPlayer)}
</View>
);
} else {
VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
object2 = {};
object2.uri = importDefault(13548) /* metro dependency 13548: _3d_orbsMov */;
r0 = (
<VideoComponent
source={object2}
style={style}
resizeMode="contain"
paused={reducedMotion}
disableFocus
preventsDisplaySleepDuringVideoPlayback={false}
importantForAccessibility="no-hide-descendants"
/>
);
}
return r0;
}
return r0;
}
function _fun102927() { // fn#102927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13736:218, offset: 0x0224fa36, size: 398 bytes, params: 1, frame: 18
const object3 = {};
const object4 = {overflow: 'hidden'};
object4.borderRadius = lg;
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object4.backgroundColor = MOBILE_ACTIONSHEET_BACKGROUND;
object3.root = object4;
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object3.content = {'flex': 1, 'paddingHorizontal': null, 'justifyContent': 'center', 'alignItems': 'center',
paddingHorizontal: PX_24};
object3.centeredCopy = {'alignItems': 'center', 'width': '100%'};
object3.orbsBackground = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'height': '40%', 'zIndex': 1};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.headerLabel = {paddingBottom: PX_4, textTransform: 'uppercase'};
const object8 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center'};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object8.paddingBottom = PX_24;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object8.gap = PX_8;
object3.titleRow = object8;
const object9 = {position: 'absolute'};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object9.left = PX_24;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object9.right = PX_24;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object9.gap = PX_12;
object3.actions = object9;
const object10 = {};
const value = 6;
object10.marginTop = require(dependencyMap[value]).isIOS() ? value : 0;
object10.lineHeight = 46;
object3.orbAmount = object10;
return object3;
}
function _fun102927() { // fn#102927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13736:218, offset: 0x0224fa36, size: 398 bytes, params: 1, frame: 18
const object = {};
const object2 = {overflow: 'hidden'};
object2.borderRadius = lg;
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object2.backgroundColor = MOBILE_ACTIONSHEET_BACKGROUND;
object.root = object2;
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object.content = {'flex': 1, 'paddingHorizontal': null, 'justifyContent': 'center', 'alignItems': 'center',
paddingHorizontal: PX_24};
object.centeredCopy = {'alignItems': 'center', 'width': '100%'};
object.orbsBackground = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'height': '40%', 'zIndex': 1};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object.headerLabel = {paddingBottom: PX_4, textTransform: 'uppercase'};
const object5 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center'};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object5.paddingBottom = PX_24;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.gap = PX_8;
object.titleRow = object5;
const object6 = {position: 'absolute'};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object6.left = PX_24;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object6.right = PX_24;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.gap = PX_12;
object.actions = object6;
const object7 = {};
const value = 6;
object7.marginTop = require(dependencyMap[value]).isIOS() ? value : 0;
object7.lineHeight = 46;
object.orbAmount = object7;
return object;
}
function BountiesScrollRecapPage({orbAmount, onClose, style}) { // fn#102928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13736:1520, offset: 0x0224fbc4, size: 1017 bytes, params: 2, frame: 41
const styles = useStyles();
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const items2 = [styles.root, style];
const viewBinding2Props = {style: StyleSheet.absoluteFillObject, pointerEvents: 'none'};
const VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
const view = <View {...viewBinding2Props}><VideoComponent source={{uri: importDefault(13549) /* metro dependency 13549: starfield_bgMp4 */}} style={StyleSheet.absoluteFillObject} resizeMode="cover" paused={useReducedMotion} disableFocus preventsDisplaySleepDuringVideoPlayback={false} importantForAccessibility="no-hide-descendants" /><BountiesRecapOrbsBackground style={styles.orbsBackground} reducedMotion={useReducedMotion} /></View>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const items4 = [<Text variant="text-xs/bold" color="text-brand" style={styles.headerLabel}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.d6Rrn6)}</Text>];
const OrbsIcon = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
items4[1] = <View accessible accessibilityRole="text" accessibilityLabel={'+' + orbAmount}><View style={styles.titleRow}><OrbsIcon size="lg" color="icon-strong" accessible={false} /><Text variant="display-lg" color="text-strong" accessible={false} style={styles.orbAmount}>{'+' + orbAmount}</Text></View></View>;
items4[2] = <Text variant="text-md/medium" color="text-muted" style={{textAlign: 'center'}}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.x0Ffz3)}</Text>;
const view2 = <View style={styles.centeredCopy} pointerEvents="none">{items4}</View>;
const items7 = [styles.actions];
const bottom = value2.bottom;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
items7[1] = {bottom: bottom + PX_8};
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<View style={items2} pointerEvents="box-none">
{view}
<View style={styles.content} pointerEvents="box-none">
{view2}
<View style={items7}>
<Button
grow
variant="primary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.i4jeWR)}
function BountiesScrollRecapPage({orbAmount, onClose, style}) { // fn#102928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13736:1520, offset: 0x0224fbc4, size: 1017 bytes, params: 2, frame: 41
const styles = useStyles();
const value2 = (UseSafeAreaInsetsNative)();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const items2 = [styles.root, style];
const viewBinding2Props = {style: StyleSheet.absoluteFillObject, pointerEvents: 'none'};
const VideoComponent = (VideoModule).VideoComponent;
const view = (
<View {...viewBinding2Props}>
<VideoComponent
source={{uri: Starfield_bgMp4}}
style={StyleSheet.absoluteFillObject}
resizeMode="cover"
paused={useReducedMotion}
disableFocus
preventsDisplaySleepDuringVideoPlayback={false}
importantForAccessibility="no-hide-descendants"
/>
<BountiesRecapOrbsBackground style={styles.orbsBackground} reducedMotion={useReducedMotion} />
</View>
);
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const items4 = [
<Text
variant="text-xs/bold"
color="text-brand"
style={styles.headerLabel}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.d6Rrn6)}
</Text>,
];
const OrbsIcon = (OrbsIconModule).OrbsIcon;
items4[1] = (
<View
accessible
accessibilityRole="text"
accessibilityLabel={'+' + orbAmount}
>
<View style={styles.titleRow}>
<OrbsIcon
size="lg"
onPress={onClose}
color="icon-strong"
accessible={false}
/>
<Text
variant="display-lg"
color="text-strong"
accessible={false}
style={styles.orbAmount}
>
{'+' + orbAmount}
</Text>
</View>
</View>
</View>
);
);
items4[2] = (
<Text
variant="text-md/medium"
color="text-muted"
style={{textAlign: 'center'}}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.x0Ffz3)}
</Text>
);
const view2 = (
<View style={styles.centeredCopy} pointerEvents="none">
{items4}
</View>
);
const items7 = [styles.actions];
const bottom = value2.bottom;
const PX_8 = (Native).space.PX_8;
items7[1] = {bottom: bottom + PX_8};
const Button = (ButtonNativeModule).Button;
return (
<View style={items2} pointerEvents="box-none">
{view}
<View style={styles.content} pointerEvents="box-none">
{view2}
<View style={items7}>
<Button
grow
variant="primary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.i4jeWR)}
size="lg"
onPress={onClose}
/>
</View>
</View>
</View>
);
}
}
global.__d(_fun102925, 13546, [31, 27, 4502, 33, 697, 4501, 477, 7897, 13547, 9543, 13548, 1585, 566, 13549, 4573,
1244, 10076, 4578,
2]) /* metro module 13546, dependencies: [31, 27, 4502, 33, 697, 4501, 477, 7897, 13547, 9543, 13548, 1585, 566, 13549, 4573, 1244, 10076, 4578, 2] */;
@@ -1,481 +1,503 @@
/* Metro module 13522; source: modules/quests/native/BountiesModal/BountiesScrollVideoItem.tsx; dependencies: [5, 57, 31, 27, 10071, 7092, 6528, 33, 13523, 566, 9530, 13533, 9532, 13534, 13536, 13537, 13538, 10183, 7121, 6533, 13543, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import BountyStore from '../../BountyStore.tsx'; /* Metro dependency 7092 */
import VirtualCurrencyStore from '../../../virtual_currency/stores/VirtualCurrencyStore.tsx'; /* Metro dependency 10071 */
import BountiesScrollEndCard from './BountiesScrollEndCard.tsx'; /* Metro dependency 13543 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestContentModule from '../../../../external/discord_common/js/shared/shared-constants/QuestContent.tsx'; /* Metro dependency 6533 */
import * as AdCreativeTypeModule from '../../../../external/discord_common/js/shared/shared-constants/AdCreativeType.tsx'; /* Metro dependency 7121 */
import * as BountiesStage1ExperimentModule from '../../experiments/BountiesStage1Experiment.tsx'; /* Metro dependency 9530 */
import * as QuestContentImpressionTrackerNativeModule from '../QuestContentImpressionTracker.native.tsx'; /* Metro dependency 10183 */
import * as UseBountiesModalTimingModule from './useBountiesModalTiming.tsx'; /* Metro dependency 13533 */
import * as UseBountiesModalVideoAnalyticsModule from './useBountiesModalVideoAnalytics.tsx'; /* Metro dependency 13536 */
import * as UseBountyVideoProgressPersistenceModule from './useBountyVideoProgressPersistence.tsx'; /* Metro dependency 13537 */
import * as BountyVideoModule from './BountyVideo.tsx'; /* Metro dependency 13538 */
function _fun102777(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:6, offset: 0x0224825f, size: 260 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const virtualCurrencyStore = importDefault(10071) /* metro dependency 10071: VirtualCurrencyStore */;
const bountyStore = importDefault(7092) /* metro dependency 7092: BountyStore */;
const env0_9 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollVideoItem.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollVideoItem.tsx');
exports.BountiesScrollVideoItem = BountiesScrollVideoItem;
}
function BountiesScrollVideoItemInner({bounty, sourceQuestContent, width, height, isActive, isRecapPageRevealed, isRecapPageOnTop, isScrollingInBoundsSharedValue}) { // fn#102778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:211, offset: 0x02248363, size: 1184 bytes, params: 2, frame: 44
var currentBalance;
const env0_3 = height;
const env0_4 = isActive;
const env0_5 = isScrollingInBoundsSharedValue;
const value2 = env0_5.useMemo(function() {
return {width: width, height: height};
}, [width, height]);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([BountyStore], function() {
return BountyStore.isBountyCompleted(bounty.id);
});
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
const useConfig = BountiesStage1Experiment.useConfig;
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
const {enabled, loopingEnabled, orbAmount, rewardTimerSeconds} = Reflect.apply(useConfig, BountiesStage1Experiment,
[{location: VIDEO_MODAL_MOBILE}]);
const BountyVideoEndMode = (require(13533) /* metro dependency 13533: useBountiesModalTiming */).BountyVideoEndMode;
const r26 = loopingEnabled ? BountyVideoEndMode.LOOP : BountyVideoEndMode.END_CARD_WITH_CTA;
const r25 = enabled ? 1000 * rewardTimerSeconds : 1000 * bounty.rewardTimerSeconds;
const value8 = env0_5.useRef(null);
const handlePlayerStateChange = useResumeOnActive({isActive: isActive, playerRef: value8}).handlePlayerStateChange;
const [property, property2] = env0_4(env0_5.useState(isActive), 2);
const [property3, property4] = env0_4(env0_5.useState(_fun102784), 2);
const value14 = env0_4(env0_5.useState(0), 2);
const property5 = value14[0];
if (property !== isActive) {
property2(isActive);
if (isActive) {
currentBalance = VirtualCurrencyStore.getCurrentBalance();
property4(currentBalance);
if (currentBalance !== property3) {
value14[1](function(a0) {
return a0 + 1;
});
function BountiesScrollVideoItemInner({bounty, sourceQuestContent, width, height, isActive, isRecapPageRevealed, isRecapPageOnTop, isScrollingInBoundsSharedValue}) { // fn#102778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:211, offset: 0x02248363, size: 1184 bytes, params: 2, frame: 44
var currentBalance;
const height2 = height;
const isActive2 = isActive;
const isScrollingInBoundsSharedValue2 = isScrollingInBoundsSharedValue;
const value2 = isScrollingInBoundsSharedValue2.useMemo(function() {
return {width: width, height: height};
}, [width, height]);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([BountyStore], function() {
return BountyStore.isBountyCompleted(bounty.id);
});
const BountiesStage1Experiment = (BountiesStage1ExperimentModule).BountiesStage1Experiment;
const useConfig = BountiesStage1Experiment.useConfig;
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
const {enabled, loopingEnabled, orbAmount, rewardTimerSeconds} = Reflect.apply(useConfig, BountiesStage1Experiment,
[{location: VIDEO_MODAL_MOBILE}]);
const BountyVideoEndMode = (UseBountiesModalTimingModule).BountyVideoEndMode;
const r26 = loopingEnabled ? BountyVideoEndMode.LOOP : BountyVideoEndMode.END_CARD_WITH_CTA;
const r25 = enabled ? 1000 * rewardTimerSeconds : 1000 * bounty.rewardTimerSeconds;
const value8 = isScrollingInBoundsSharedValue2.useRef(null);
const handlePlayerStateChange = useResumeOnActive({isActive: isActive, playerRef: value8}).handlePlayerStateChange;
const [property, property2] = isActive2(isScrollingInBoundsSharedValue2.useState(isActive), 2);
const [property3, property4] = isActive2(isScrollingInBoundsSharedValue2.useState(_fun102784), 2);
const isActive22 = isActive2(isScrollingInBoundsSharedValue2.useState(0), 2);
const property5 = isActive22[0];
if (property !== isActive) {
property2(isActive);
if (isActive) {
currentBalance = VirtualCurrencyStore.getCurrentBalance();
property4(currentBalance);
if (currentBalance !== property3) {
isActive22[1](function(a0) {
return a0 + 1;
});
}
}
}
const value17 = isScrollingInBoundsSharedValue2.useCallback(height2(_fun102787), [bounty.id, isActive, orbAmount,
sourceQuestContent]);
const {handleVideoProgressAnalytics, handleVideoEndAnalytics, handleVideoLoopedAnalytics,
handleVideoPausedAnalytics,
handleVideoResumedAnalytics} = (UseBountiesModalVideoAnalyticsModule).useBountiesModalVideoAnalytics({bountyId: bounty.id,
sourceQuestContent: sourceQuestContent, rewardDurationMs: r25});
const value19 = (UseBountyVideoProgressPersistenceModule).useBountyVideoProgressPersistence({bountyId: bounty.id,
endMode: r26});
const initialProgress = value19.initialProgress;
const handleProgress = value19.handleProgress;
isScrollingInBoundsSharedValue2.useEffect(function() {
return _fun102790;
}, [value19.flushProgress]);
const value20 = isScrollingInBoundsSharedValue2.useCallback(function(a0, a1, a2) {
handleVideoProgressAnalytics(a0, a1);
handleProgress(a0, a1, a2);
}, [handleVideoProgressAnalytics, handleProgress]);
const useBountiesModalTiming = UseBountiesModalTimingModule.useBountiesModalTiming;
let duration = initialProgress.duration;
duration = duration > 0 ? initialProgress.duration : null;
const value21 = Reflect.apply(useBountiesModalTiming, UseBountiesModalTimingModule, [{endMode: r26,
rewardDurationMs: r25, isCompleted: value3, onRewardEarned: value17, onVideoProgress: value20,
onVideoEnd: handleVideoEndAnalytics, onVideoLooped: handleVideoLoopedAnalytics,
onVideoPaused: handleVideoPausedAnalytics, onVideoResumed: handleVideoResumedAnalytics, playerRef: value8,
initialProgressSec: initialProgress.timestampSec, initialMaxVideoProgressSec: initialProgress.maxTimestampSec,
initialVideoDurationSec: duration}]);
const isCtaVisible = value21.isCtaVisible;
const isEndCardVisible = value21.isEndCardVisible;
const handleVideoEnd = value21.handleVideoEnd;
const handleVideoProgress = value21.handleVideoProgress;
const handleVideoPaused = value21.handleVideoPaused;
const handleVideoResumed = value21.handleVideoResumed;
const env0_12 = value21.handleReplay;
const rewardRemainingSeconds = value21.rewardRemainingSeconds;
const rewardTotalSeconds = value21.rewardTotalSeconds;
const normalizedProgress = value21.normalizedProgress;
const BountyVideo = (BountyVideoModule).BountyVideo;
return (
<View style={value2}>
<BountyVideo
bounty={bounty}
sourceQuestContent={sourceQuestContent}
isCompleted={value3}
isCtaVisible={isCtaVisible}
isEndCardVisible={isEndCardVisible}
isProgressBarVisible={!isRecapPageOnTop}
orbsBalance={property3}
handleVideoEnd={handleVideoEnd}
handleVideoProgress={handleVideoProgress}
handleVideoPaused={handleVideoPaused}
handleVideoResumed={handleVideoResumed}
rewardRemainingSeconds={rewardRemainingSeconds}
rewardTotalSeconds={rewardTotalSeconds}
normalizedProgress={normalizedProgress}
repeat={loopingEnabled}
initialProgress={initialProgress}
isActive={isActive}
isRecapPageRevealed={isRecapPageRevealed}
isScrollingInBoundsSharedValue={isScrollingInBoundsSharedValue}
playerRef={value8}
onPlayerStateChange={handlePlayerStateChange}
balanceWidgetPillResetKey={property5}
renderEndCard={renderEndCard}
/>
</View>
);
function useResumeOnActive({isActive, playerRef}) { // fn#102781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:784, owner: BountiesScrollVideoItemInner.useResumeOnActive, offset: 0x0224883a, size: 137 bytes, params: 2, frame: 17
const env0_2 = env1_5.useRef(true);
const env0_3 = env1_5.useRef(null);
const value2 = env1_5.useCallback(_fun102782, []);
env1_5.useEffect(_fun102783, [isActive, playerRef]);
return {handlePlayerStateChange: value2};
function _fun102782(a0) { // fn#102782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:890, offset: 0x0218936d, size: 20 bytes, params: 2, frame: 2
env0_3.current = a0;
}
function _fun102783() { // fn#102783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:932, offset: 0x022488c3, size: 118 bytes, params: 1, frame: 14
var r1;
var isActiveBinding;
var value2;
let current = env0_2.current;
if (current) {
env0_2.current = false;
} else {
isActiveBinding = isActive;
if (isActiveBinding) {
current = env0_3.current;
value2 = environment.__proto__.__proto__;
r1 = current === (require(13523) /* metro dependency 13523: AdVideoPlayer */).PlayerState.PAUSED;
} else {
r1 = isActiveBinding;
}
if (r1) {
current = playerRef.current;
if (current != null) {
current.play();
}
}
}
}
}
function _fun102784() { // fn#102784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:1186, offset: 0x02248939, size: 31 bytes, params: 1, frame: 10
var r0;
const isActiveBinding = isActive;
let value = null;
if (isActiveBinding) {
value = environment.__proto__;
value = VirtualCurrencyStore.getCurrentBalance();
r0 = value;
} else {
r0 = value;
}
return r0;
}
function* _fun102787() { // fn#102787, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:1378, offset: 0x02248963, size: 167 bytes, params: 1, frame: 15
var environment;
var r2;
var r1;
var binding;
var binding2;
var property;
var value4;
var claimBountyReward;
var id;
var value6;
var value7;
var value8;
var error;
var value9;
if (true) {
value = false;
try {
binding = env2_0;
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
property = binding2[12];
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
claimBountyReward = value4.claimBountyReward;
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
id = require.id;
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
value6 = Reflect.apply(claimBountyReward, value4, [id, importDefault]);
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
if (value8) {
return value7;
}
r2 = true;
if (r2 && env1_4) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
}
function _fun102788(a0) { // fn#102788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:1511, offset: 0x02248a0a, size: 25 bytes, params: 2, frame: 3
var r0;
let value = null;
if (value == a0) {
r0 = value;
} else {
value = environment.__proto__.__proto__;
value = a0 + View;
r0 = value;
}
return r0;
}
}
function _fun102789() { // fn#102789, offset: 0x02248a23, size: 11 bytes, params: 1, frame: 1
return function() {
return flushProgress();
};
function _fun102790() { // fn#102790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:1958, offset: 0x01e42539, size: 15 bytes, params: 1, frame: 9
return flushProgress();
}
}
function renderEndCard() { // fn#102792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:3092, owner: BountiesScrollVideoItemInner.renderEndCard, offset: 0x02248a53, size: 151 bytes, params: 1, frame: 17
const QuestContentImpressionTrackerNative = (QuestContentImpressionTrackerNativeModule).QuestContentImpressionTrackerNative;
const id = bounty.id;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
const QuestContent = (QuestContentModule).QuestContent;
const VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
return (
<QuestContentImpressionTrackerNative
adContentId={id}
adCreativeType={BOUNTY}
questContent={VIDEO_MODAL_END_CARD}
sourceQuestContent={sourceQuestContent}
overrideVisibility={isEndCardVisible}
>
{children_102793}
</QuestContentImpressionTrackerNative>
);
function renderEndCardChildren() { // fn#102793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:3315, owner: BountiesScrollVideoItemInner.renderEndCard.children, offset: 0x02248aea, size: 87 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__;
return ((Component) => <Component bounty={bounty} visible={isEndCardVisible} onReplay={handleReplay} isActive={isActive} isScrollingInBoundsSharedValue={isScrollingInBoundsSharedValue} />)(BountiesScrollEndCard);
}
}
}
const value17 = env0_5.useCallback(env0_3(_fun102787), [bounty.id, isActive, orbAmount, sourceQuestContent]);
const {handleVideoProgressAnalytics, handleVideoEndAnalytics, handleVideoLoopedAnalytics,
handleVideoPausedAnalytics,
handleVideoResumedAnalytics} = (require(13536) /* metro dependency 13536: useBountiesModalVideoAnalytics */).useBountiesModalVideoAnalytics({bountyId: bounty.id,
sourceQuestContent: sourceQuestContent, rewardDurationMs: r25});
const value19 = (require(13537) /* metro dependency 13537: useBountyVideoProgressPersistence */).useBountyVideoProgressPersistence({bountyId: bounty.id,
endMode: r26});
const initialProgress = value19.initialProgress;
const handleProgress = value19.handleProgress;
env0_5.useEffect(function() {
return _fun102790;
}, [value19.flushProgress]);
const value20 = env0_5.useCallback(function(a0, a1, a2) {
handleVideoProgressAnalytics(a0, a1);
handleProgress(a0, a1, a2);
}, [handleVideoProgressAnalytics, handleProgress]);
const useBountiesModalTimingModule = require(13533) /* metro dependency 13533: useBountiesModalTiming */;
const useBountiesModalTiming = useBountiesModalTimingModule.useBountiesModalTiming;
let duration = initialProgress.duration;
duration = duration > 0 ? initialProgress.duration : null;
const value21 = Reflect.apply(useBountiesModalTiming, useBountiesModalTimingModule, [{endMode: r26,
rewardDurationMs: r25, isCompleted: value3, onRewardEarned: value17, onVideoProgress: value20,
onVideoEnd: handleVideoEndAnalytics, onVideoLooped: handleVideoLoopedAnalytics,
onVideoPaused: handleVideoPausedAnalytics, onVideoResumed: handleVideoResumedAnalytics, playerRef: value8,
initialProgressSec: initialProgress.timestampSec, initialMaxVideoProgressSec: initialProgress.maxTimestampSec,
initialVideoDurationSec: duration}]);
const isCtaVisible = value21.isCtaVisible;
const isEndCardVisible = value21.isEndCardVisible;
const handleVideoEnd = value21.handleVideoEnd;
const handleVideoProgress = value21.handleVideoProgress;
const handleVideoPaused = value21.handleVideoPaused;
const handleVideoResumed = value21.handleVideoResumed;
const env0_12 = value21.handleReplay;
const rewardRemainingSeconds = value21.rewardRemainingSeconds;
const rewardTotalSeconds = value21.rewardTotalSeconds;
const normalizedProgress = value21.normalizedProgress;
const BountyVideo = (require(13538) /* metro dependency 13538: BountyVideo */).BountyVideo;
return (
<View style={value2}>
<BountyVideo
bounty={bounty}
function BountiesScrollVideoItem({bounty, sourceQuestContent, width, height, isActive, isRecapPageRevealed, isRecapPageOnTop, isScrollingInBoundsSharedValue}) { // fn#102794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:3539, offset: 0x02248b41, size: 235 bytes, params: 2, frame: 19
isActive = !(isActive === undefined) && isActive;
if (isRecapPageRevealed !== undefined) {
}
if (isRecapPageOnTop !== undefined) {
}
const QuestContentImpressionTrackerNative = (QuestContentImpressionTrackerNativeModule).QuestContentImpressionTrackerNative;
const id = bounty.id;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
const QuestContent = (QuestContentModule).QuestContent;
const VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
return (
<QuestContentImpressionTrackerNative
adContentId={id}
adCreativeType={BOUNTY}
questContent={VIDEO_MODAL_MOBILE}
sourceQuestContent={sourceQuestContent}
isCompleted={value3}
isCtaVisible={isCtaVisible}
isEndCardVisible={isEndCardVisible}
isProgressBarVisible={!isRecapPageOnTop}
orbsBalance={property3}
handleVideoEnd={handleVideoEnd}
handleVideoProgress={handleVideoProgress}
handleVideoPaused={handleVideoPaused}
handleVideoResumed={handleVideoResumed}
rewardRemainingSeconds={rewardRemainingSeconds}
rewardTotalSeconds={rewardTotalSeconds}
normalizedProgress={normalizedProgress}
repeat={loopingEnabled}
initialProgress={initialProgress}
isActive={isActive}
isRecapPageRevealed={isRecapPageRevealed}
isScrollingInBoundsSharedValue={isScrollingInBoundsSharedValue}
playerRef={value8}
onPlayerStateChange={handlePlayerStateChange}
balanceWidgetPillResetKey={property5}
renderEndCard={renderEndCard}
/>
</View>
);
}
overrideVisibility={isActive}
>
{children_102795}
</QuestContentImpressionTrackerNative>
);
function BountiesScrollVideoItemChildren() { // fn#102795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:3939, owner: BountiesScrollVideoItem.children, offset: 0x02248c2c, size: 96 bytes, params: 1, frame: 14
return (
<BountiesScrollVideoItemInner
bounty={bounty}
sourceQuestContent={sourceQuestContent}
width={width}
height={height}
isActive={isActive}
isRecapPageRevealed={isRecapPageRevealed}
isRecapPageOnTop={isRecapPageOnTop}
isScrollingInBoundsSharedValue={isScrollingInBoundsSharedValue}
/>
);
}
function BountiesScrollVideoItem({bounty, sourceQuestContent, width, height, isActive, isRecapPageRevealed, isRecapPageOnTop, isScrollingInBoundsSharedValue}) { // fn#102794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:3539, offset: 0x02248b41, size: 235 bytes, params: 2, frame: 19
isActive = !(isActive === undefined) && isActive;
if (isRecapPageRevealed !== undefined) {
}
if (isRecapPageOnTop !== undefined) {
}
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
const id = bounty.id;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
const VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
return (
<QuestContentImpressionTrackerNative
adContentId={id}
adCreativeType={BOUNTY}
questContent={VIDEO_MODAL_MOBILE}
sourceQuestContent={sourceQuestContent}
overrideVisibility={isActive}
>
{children_102795}
</QuestContentImpressionTrackerNative>
);
}
function useResumeOnActive({isActive, playerRef}) { // fn#102781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:784, owner: BountiesScrollVideoItemInner.useResumeOnActive, offset: 0x0224883a, size: 137 bytes, params: 2, frame: 17
const env0_2 = env1_5.useRef(true);
const env0_3 = env1_5.useRef(null);
const value2 = env1_5.useCallback(_fun102782, []);
env1_5.useEffect(_fun102783, [isActive, playerRef]);
return {handlePlayerStateChange: value2};
}
function _fun102784() { // fn#102784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:1186, offset: 0x02248939, size: 31 bytes, params: 1, frame: 10
var r0;
const isActiveBinding = isActive;
let value = null;
if (isActiveBinding) {
value = environment.__proto__;
value = VirtualCurrencyStore.getCurrentBalance();
r0 = value;
} else {
r0 = value;
}
return r0;
}
function* _fun102787() { // fn#102787, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:1378, offset: 0x02248963, size: 167 bytes, params: 1, frame: 15
var environment;
var r2;
var r1;
var binding;
var binding2;
var property;
var value4;
var claimBountyReward;
var id;
var value6;
var value7;
var value8;
var error;
var value9;
if (true) {
value = false;
try {
binding = env2_0;
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
property = binding2[12];
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
claimBountyReward = value4.claimBountyReward;
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
id = require.id;
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
value6 = Reflect.apply(claimBountyReward, value4, [id, importDefault]);
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
if (value8) {
return value7;
}
r2 = true;
if (r2 && env1_4) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
}
}
function _fun102789() { // fn#102789, offset: 0x02248a23, size: 11 bytes, params: 1, frame: 1
return function() {
return flushProgress();
};
}
function BountiesScrollVideoItemInnerRenderEndCard() { // fn#102792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:3092, owner: BountiesScrollVideoItemInner.renderEndCard, offset: 0x02248a53, size: 151 bytes, params: 1, frame: 17
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
const id = bounty.id;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
const VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
return (
<QuestContentImpressionTrackerNative
adContentId={id}
adCreativeType={BOUNTY}
questContent={VIDEO_MODAL_END_CARD}
sourceQuestContent={sourceQuestContent}
overrideVisibility={isEndCardVisible}
>
{children_102793}
</QuestContentImpressionTrackerNative>
);
}
function BountiesScrollVideoItemChildren() { // fn#102795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:3939, owner: BountiesScrollVideoItem.children, offset: 0x02248c2c, size: 96 bytes, params: 1, frame: 14
return (
<BountiesScrollVideoItemInner
bounty={bounty}
sourceQuestContent={sourceQuestContent}
width={width}
height={height}
isActive={isActive}
isRecapPageRevealed={isRecapPageRevealed}
isRecapPageOnTop={isRecapPageOnTop}
isScrollingInBoundsSharedValue={isScrollingInBoundsSharedValue}
/>
);
}
function _fun102783() { // fn#102783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:932, offset: 0x022488c3, size: 118 bytes, params: 1, frame: 14
var r1;
var isActiveBinding;
var value2;
let current = env0_2.current;
if (current) {
env0_2.current = false;
} else {
isActiveBinding = isActive;
if (isActiveBinding) {
current = env0_3.current;
value2 = environment.__proto__.__proto__;
r1 = current === (require(13523) /* metro dependency 13523: AdVideoPlayer */).PlayerState.PAUSED;
} else {
r1 = isActiveBinding;
}
if (r1) {
current = playerRef.current;
if (current != null) {
current.play();
}
}
}
}
function _fun102788(a0) { // fn#102788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:1511, offset: 0x02248a0a, size: 25 bytes, params: 2, frame: 3
var r0;
let value = null;
if (value == a0) {
r0 = value;
} else {
value = environment.__proto__.__proto__;
value = a0 + View;
r0 = value;
}
return r0;
}
function renderEndCardChildren() { // fn#102793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:3315, owner: BountiesScrollVideoItemInner.renderEndCard.children, offset: 0x02248aea, size: 87 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__;
return ((Component) => <Component bounty={bounty} visible={isEndCardVisible} onReplay={handleReplay} isActive={isActive} isScrollingInBoundsSharedValue={isScrollingInBoundsSharedValue} />)(importDefault(13543) /* metro dependency 13543: BountiesScrollEndCard */);
}
global.__d(_fun102777, 13522, [5, 57, 31, 27, 10071, 7092, 6528, 33, 13523, 566, 9530, 13533, 9532, 13534, 13536,
13537, 13538, 10183, 7121, 6533, 13543,
2]) /* metro module 13522, dependencies: [5, 57, 31, 27, 10071, 7092, 6528, 33, 13523, 566, 9530, 13533, 9532, 13534, 13536, 13537, 13538, 10183, 7121, 6533, 13543, 2] */;
@@ -1,9 +1,11 @@
/* Metro module 13542; source: modules/quests/native/BountiesModal/BountyCtaHelpers.tsx; dependencies: [1244, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun102911(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13732:6, offset: 0x0224ec20, size: 96 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/quests/native/BountiesModal/BountyCtaHelpers.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountyCtaHelpers.tsx');
exports.getBountyCtaInfo = function(a0) {
var object = {label: a0.productName, subtext: a0.cta.buttonLabel};
object.buttonLabel = require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.LLLLPD);
@@ -12,3 +14,4 @@ function _fun102911(global, require, importDefault, importAll, module, exports,
};
}
global.__d(_fun102911, 13542, [1244, 2]) /* metro module 13542, dependencies: [1244, 2] */;
@@ -1,104 +1,152 @@
/* Metro module 13538; source: modules/quests/native/BountiesModal/BountyVideo.tsx; dependencies: [31, 27, 6528, 33, 697, 4501, 13539, 9564, 9530, 4017, 4504, 4507, 13523, 13540, 10124, 13541, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import BountiesModalProgress from './BountiesModalProgress.tsx'; /* Metro dependency 13539 */
import BountiesModalTimer from './BountiesModalTimer.tsx'; /* Metro dependency 13540 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as BountiesStage1ExperimentModule from '../../experiments/BountiesStage1Experiment.tsx'; /* Metro dependency 9530 */
import * as AndroidRNVHttpEngineExperimentModule from '../../../media_uploads/experiments/AndroidRNVHttpEngineExperiment.tsx'; /* Metro dependency 9564 */
import * as BalanceWidgetPillModule from '../../../virtual_currency/native/BalanceWidgetPill.tsx'; /* Metro dependency 10124 */
import * as AdVideoPlayerModule from '../AdVideoPlayer.tsx'; /* Metro dependency 13523 */
import * as BountiesModalProgressModule from './BountiesModalProgress.tsx'; /* Metro dependency 13539 */
function _fun102888(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13728:6, offset: 0x0224cda1, size: 304 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.StyleSheet;
const env0_5 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = value.Fragment;
const env0_9 = {'top': 48, 'bottom': 16, 'left': 16, 'right': 16};
const env0_10 = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102889);
const env0_11 = (CreateStylesModule).createStyles(_fun102889);
object = {code: 'function BountyVideoTsx1(){const{isScrollingInBoundsSharedValue,withTiming,isActive,timingStandard}=this.__closure;var _isScrollingInBoundsS;const isScrollingInBounds=((_isScrollingInBoundsS=isScrollingInBoundsSharedValue)===null||_isScrollingInBoundsS===void 0?void 0:_isScrollingInBoundsS.get())===true;return{opacity:withTiming(isActive&&!isScrollingInBounds?1:0,timingStandard)};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountyVideo.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountyVideo.tsx');
exports.BountyVideo = BountyVideo;
function _fun102889() { // fn#102889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13728:295, offset: 0x0224ced1, size: 215 bytes, params: 1, frame: 18
const object = {};
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['overflow'] = 'hidden';
const lgBinding = lg;
object2['borderRadius'] = lgBinding;
object.videoContainer = object2;
const object3 = {'position': 'absolute', 'top': null, 'left': null, 'flexDirection': 'row', 'alignItems': 'center'};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.top = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.left = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.gap = PX_8;
object.leftRow = object3;
const PROGRESS_BAR_HEIGHT = (BountiesModalProgressModule).PROGRESS_BAR_HEIGHT;
object.progress = {'position': 'absolute', 'bottom': 0, height: PROGRESS_BAR_HEIGHT, left: lgBinding,
right: lgBinding};
return object;
}
function BountyVideo({bounty, sourceQuestContent, isCompleted, isCtaVisible, isEndCardVisible, isProgressBarVisible, orbsBalance, handleVideoEnd, handleVideoProgress, handleVideoPaused, handleVideoResumed, rewardRemainingSeconds, rewardTotalSeconds, normalizedProgress, initialProgress, repeat, isActive, isRecapPageRevealed, isScrollingInBoundsSharedValue, renderEndCard, playerRef, onPlayerStateChange, balanceWidgetPillResetKey}) { // fn#102890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13728:1105, offset: 0x0224cfa8, size: 978 bytes, params: 2, frame: 51
isActive = !(isActive === undefined) && isActive;
isRecapPageRevealed = !(isRecapPageRevealed === undefined) && isRecapPageRevealed;
const styles = useStyles();
const value5 = (AndroidRNVHttpEngineExperimentModule).useRnvHttpEngine();
const BountiesStage1Experiment = (BountiesStage1ExperimentModule).BountiesStage1Experiment;
const useConfig = BountiesStage1Experiment.useConfig;
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
const enabled = Reflect.apply(useConfig, BountiesStage1Experiment, [{location: VIDEO_MODAL_MOBILE}]).enabled;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const BountyVideoL2 = BountyVideoL;
object = {isScrollingInBoundsSharedValue: isScrollingInBoundsSharedValue};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.isActive = isActive;
object.timingStandard = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
BountyVideoL2.__closure = object;
BountyVideoL2.__workletHash = 12287714482150;
BountyVideoL2.__initData = env0_12;
const value6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [BountyVideoL2]);
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const AdVideoPlayer = (AdVideoPlayerModule).AdVideoPlayer;
const r35 = !enabled && undefined;
let r33 = isActive ? isEndCardVisible : !isActive;
r33 = !r33 ? isRecapPageRevealed : r33;
const items3 = [
<AdVideoPlayer
ref={playerRef}
source={{uri: bounty.videoHls ?? ''}}
httpEngine={value5}
automaticallyWaitsToMinimizeStalling={r35}
initialProgress={initialProgress}
isFullscreen={false}
externallyPaused={r33}
style={StyleSheet.absoluteFillObject}
contentInsets={env0_9}
onProgress={handleVideoProgress}
onEnd={handleVideoEnd}
onPausePlayback={handleVideoPaused}
onResumePlayback={handleVideoResumed}
hideControls={isEndCardVisible}
showSkipButtons={false}
repeat={repeat}
bufferingSpinnerPlacement="center"
onPlayerStateChange={onPlayerStateChange}
/>,
];
items3[1] = renderEndCard?.();
const View2 = (ReanimatedRexport).View;
const items2 = [styles.leftRow, value6];
const value12 = ((Component) => <Component isCompleted={isCompleted} totalSeconds={rewardTotalSeconds} remainingSeconds={rewardRemainingSeconds} />)(BountiesModalTimer);
const BalanceWidgetPill = (BalanceWidgetPillModule).BalanceWidgetPill;
items3[2] = (
<View2 style={items2}>
{value12}
<BalanceWidgetPill balance={orbsBalance} key={balanceWidgetPillResetKey} />
</View2>
);
const View3 = (ReanimatedRexport).View;
items3[3] = (
<View3 style={[StyleSheet.absoluteFillObject, value6]} pointerEvents="box-none">
{((Component) => <Component bounty={bounty} visible={isCtaVisible} sourceQuestContent={sourceQuestContent} />)(importDefault(13541) /* metro dependency 13541: BountiesModalAdvertiserCta */)}
</View3>
);
const view = (
<View style={styles.videoContainer}>
{items3}
</View>
);
const View4 = (ReanimatedRexport).View;
return (
<>
{view}
<View4 style={[styles.progress, value6]}>
{((Component) => <Component progress={normalizedProgress} visible={isProgressBarVisible} />)(BountiesModalProgress)}
</View4>
</>
);
function BountyVideoL() { // fn#102891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13728:1728, owner: BountyVideo.L, offset: 0x0224d37a, size: 121 bytes, params: 1, frame: 18
const r7 = isScrollingInBoundsSharedValue?.get();
const object = {};
const withTiming = TimingModule.withTiming;
const isActiveBinding = isActive;
const value = 0;
object.opacity = Reflect.apply(withTiming, TimingModule, [isActiveBinding ? r7 === true ? value : 1 : value,
(require(4507) /* metro dependency 4507: timingPresets */).timingStandard]);
return object;
}
}
}
function _fun102889() { // fn#102889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13728:295, offset: 0x0224ced1, size: 215 bytes, params: 1, frame: 18
const object4 = {};
const object5 = {};
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
object5['overflow'] = 'hidden';
const lgBinding = lg;
object5['borderRadius'] = lgBinding;
object4.videoContainer = object5;
const object6 = {'position': 'absolute', 'top': null, 'left': null, 'flexDirection': 'row', 'alignItems': 'center'};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.top = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.left = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.gap = PX_8;
object4.leftRow = object6;
const PROGRESS_BAR_HEIGHT = (require(13539) /* metro dependency 13539: BountiesModalProgress */).PROGRESS_BAR_HEIGHT;
object4.progress = {'position': 'absolute', 'bottom': 0, height: PROGRESS_BAR_HEIGHT, left: lgBinding,
right: lgBinding};
return object4;
}
function BountyVideo({bounty, sourceQuestContent, isCompleted, isCtaVisible, isEndCardVisible, isProgressBarVisible, orbsBalance, handleVideoEnd, handleVideoProgress, handleVideoPaused, handleVideoResumed, rewardRemainingSeconds, rewardTotalSeconds, normalizedProgress, initialProgress, repeat, isActive, isRecapPageRevealed, isScrollingInBoundsSharedValue, renderEndCard, playerRef, onPlayerStateChange, balanceWidgetPillResetKey}) { // fn#102890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13728:1105, offset: 0x0224cfa8, size: 978 bytes, params: 2, frame: 51
var object2;
isActive = !(isActive === undefined) && isActive;
isRecapPageRevealed = !(isRecapPageRevealed === undefined) && isRecapPageRevealed;
const styles = useStyles();
const value5 = (require(9564) /* metro dependency 9564: AndroidRNVHttpEngineExperiment */).useRnvHttpEngine();
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
const useConfig = BountiesStage1Experiment.useConfig;
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
const enabled = Reflect.apply(useConfig, BountiesStage1Experiment, [{location: VIDEO_MODAL_MOBILE}]).enabled;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = BountyVideoL;
object2 = {isScrollingInBoundsSharedValue: isScrollingInBoundsSharedValue};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.isActive = isActive;
object2.timingStandard = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
closure.__closure = object2;
closure.__workletHash = 12287714482150;
closure.__initData = env0_12;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const AdVideoPlayer = (require(13523) /* metro dependency 13523: AdVideoPlayer */).AdVideoPlayer;
const r35 = !enabled && undefined;
let r33 = isActive ? isEndCardVisible : !isActive;
r33 = !r33 ? isRecapPageRevealed : r33;
const items3 = [<AdVideoPlayer ref={playerRef} source={{uri: bounty.videoHls ?? ''}} httpEngine={value5} automaticallyWaitsToMinimizeStalling={r35} initialProgress={initialProgress} isFullscreen={false} externallyPaused={r33} style={StyleSheet.absoluteFillObject} contentInsets={env0_9} onProgress={handleVideoProgress} onEnd={handleVideoEnd} onPausePlayback={handleVideoPaused} onResumePlayback={handleVideoResumed} hideControls={isEndCardVisible} showSkipButtons={false} repeat={repeat} bufferingSpinnerPlacement="center" onPlayerStateChange={onPlayerStateChange} />];
items3[1] = renderEndCard?.();
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.leftRow, value6];
const value12 = ((Component) => <Component isCompleted={isCompleted} totalSeconds={rewardTotalSeconds} remainingSeconds={rewardRemainingSeconds} />)(importDefault(13540) /* metro dependency 13540: BountiesModalTimer */);
const BalanceWidgetPill = (require(10124) /* metro dependency 10124: BalanceWidgetPill */).BalanceWidgetPill;
items3[2] = <View2 style={items2}>{value12}<BalanceWidgetPill balance={orbsBalance} key={balanceWidgetPillResetKey} /></View2>;
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items3[3] = <View3 style={[StyleSheet.absoluteFillObject,
value6]} pointerEvents="box-none">{((Component) => <Component bounty={bounty} visible={isCtaVisible} sourceQuestContent={sourceQuestContent} />)(importDefault(13541) /* metro dependency 13541: BountiesModalAdvertiserCta */)}</View3>;
const view = <View style={styles.videoContainer}>{items3}</View>;
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<>
{view}
<View4 style={[styles.progress, value6]}>
{((Component) => <Component progress={normalizedProgress} visible={isProgressBarVisible} />)(importDefault(13539) /* metro dependency 13539: BountiesModalProgress */)}
</View4>
</>
);
}
function BountyVideoL() { // fn#102891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13728:1728, owner: BountyVideo.L, offset: 0x0224d37a, size: 121 bytes, params: 1, frame: 18
const r7 = isScrollingInBoundsSharedValue?.get();
const object2 = {};
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const isActiveBinding = isActive;
const value = 0;
object2.opacity = Reflect.apply(withTiming, timingModule, [isActiveBinding ? r7 === true ? value : 1 : value,
(require(4507) /* metro dependency 4507: timingPresets */).timingStandard]);
return object2;
}
global.__d(_fun102888, 13538, [31, 27, 6528, 33, 697, 4501, 13539, 9564, 9530, 4017, 4504, 4507, 13523, 13540,
10124, 13541,
2]) /* metro module 13538, dependencies: [31, 27, 6528, 33, 697, 4501, 13539, 9564, 9530, 4017, 4504, 4507, 13523, 13540, 10124, 13541, 2] */;
@@ -1,12 +1,15 @@
/* Metro module 13534; source: modules/quests/native/BountiesModal/bountyError.tsx; dependencies: [13535, 1244, 3857, 8947, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as BountiesModalConstantsModule from './BountiesModalConstants.tsx'; /* Metro dependency 13535 */
function _fun102863(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13724:6, offset: 0x0224be6f, size: 175 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(13535) /* metro dependency 13535: BountiesModalConstants */).BOUNTY_REWARD_CLAIM_FAILED_TOAST_DURATION_MS;
const Set = global.Set;
const set = new Set([260021]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/bountyError.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/bountyError.tsx');
exports.openBountyRewardClaimErrorToast = function(a0) {
var defaultImport = importDefault(dependencyMap[2]);
var object = {key: 'QUESTS_BOUNTIES_REWARD_CLAIM_FAILED'};
@@ -15,12 +18,14 @@ function _fun102863(global, require, importDefault, importAll, module, exports,
object.toastDurationMs = BOUNTY_REWARD_CLAIM_FAILED_TOAST_DURATION_MS;
defaultImport.open(object);
};
function resolveBountyRewardClaimErrorMessage(a0) { // fn#102864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13724:171, offset: 0x0224bf1e, size: 137 bytes, params: 2, frame: 15
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const value = undefined;
return (a0 == null ? value : a0.code) == null ? intl.string(t.uLjCfn) : env0_4.has(a0.code) && (a0 == null ? value : a0.message) != null ? a0.message : intl.string(t.uLjCfn);
}
}
function resolveBountyRewardClaimErrorMessage(a0) { // fn#102864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13724:171, offset: 0x0224bf1e, size: 137 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value = undefined;
return (a0 == null ? value : a0.code) == null ? intl.string(t.uLjCfn) : env0_4.has(a0.code) && (a0 == null ? value : a0.message) != null ? a0.message : intl.string(t.uLjCfn);
}
global.__d(_fun102863, 13534, [13535, 1244, 3857, 8947,
2]) /* metro module 13534, dependencies: [13535, 1244, 3857, 8947, 2] */;
@@ -1,163 +1,168 @@
/* Metro module 13533; source: modules/quests/native/BountiesModal/useBountiesModalTiming.tsx; dependencies: [57, 31, 6528, 9530, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as BountiesStage1ExperimentModule from '../../experiments/BountiesStage1Experiment.tsx'; /* Metro dependency 9530 */
function _fun102855(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:6, offset: 0x0224b836, size: 197 bytes, params: 8, frame: 18
const env0_0 = require;
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 env0_4 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/useBountiesModalTiming.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/useBountiesModalTiming.tsx');
exports.BountyVideoEndMode = {END_CARD: 'END_CARD', END_CARD_WITH_CTA: 'END_CARD_WITH_CTA', LOOP: 'LOOP'};
exports.useBountiesModalTiming = useBountiesModalTiming;
}
function useBountiesModalTiming({endMode, rewardDurationMs, isCompleted, onRewardEarned, onVideoProgress, onVideoEnd, onVideoLooped, onVideoPaused, onVideoResumed, playerRef, initialProgressSec, initialMaxVideoProgressSec, initialVideoDurationSec}) { // fn#102856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:400, offset: 0x0224b8fb, size: 901 bytes, params: 2, frame: 35
var r7;
var value20;
const onRewardEarned2 = onRewardEarned;
const onVideoProgress2 = onVideoProgress;
const onVideoLooped2 = onVideoLooped;
initialProgressSec = initialProgressSec === undefined ? 0 : initialProgressSec;
initialMaxVideoProgressSec = initialMaxVideoProgressSec === undefined ? 0 : initialMaxVideoProgressSec;
initialVideoDurationSec = initialVideoDurationSec === undefined ? null : initialVideoDurationSec;
let binding = onVideoProgress2;
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding,
[initialVideoDurationSec != null && initialProgressSec >= initialVideoDurationSec - 1 && endMode !== onVideoLooped2.LOOP]);
binding = onRewardEarned2;
const value6 = binding(value5, 2);
const property = value6[0];
const env0_11 = value6[1];
const binding2 = onVideoProgress2;
useState = binding2.useState;
const value8 = binding(Reflect.apply(useState, binding2, [_fun102857]), 2);
const property2 = value8[0];
const env0_12 = value8[1];
useState = binding2.useState;
const value9 = binding(Reflect.apply(useState, binding2, [null]), 2);
const property3 = value9[0];
const env0_13 = value9[1];
useState = binding2.useState;
const value10 = binding(Reflect.apply(useState, binding2, [initialMaxVideoProgressSec]), 2);
const property4 = value10[0];
const env0_14 = value10[1];
useState = binding2.useState;
const value11 = binding(Reflect.apply(useState, binding2, [initialVideoDurationSec]), 2);
const property5 = value11[0];
const env0_15 = value11[1];
const env0_16 = binding2.useRef(isCompleted);
const env0_17 = binding2.useRef(initialMaxVideoProgressSec);
const env0_18 = binding2.useRef(initialVideoDurationSec ?? 0);
binding = onVideoProgress2;
const env0_19 = binding.useRef(0);
const env0_20 = binding.useRef(0);
const value12 = binding.useCallback(_fun102858, [onVideoProgress, onRewardEarned, rewardDurationMs]);
const value13 = binding.useCallback(_fun102859, [endMode, onVideoEnd, onVideoLooped, onRewardEarned]);
const value14 = binding.useCallback(_fun102860, [playerRef]);
const value15 = binding.useCallback(_fun102861, [onVideoPaused]);
const value16 = binding.useCallback(_fun102862, [onVideoResumed]);
const value17 = 1000 * property4;
const value18 = rewardDurationMs / 1000;
let Math = global.Math;
const value19 = Math.max(0, value18 - property4);
if (value17 >= rewardDurationMs) {
r7 = 0;
} else if (property) {
r7 = 0;
} else if (isCompleted) {
r7 = 0;
} else if (property5 == null) {
r7 = value19;
} else if (property5 > 0) {
Math = global.Math;
value20 = Math.min(value18, property5);
Math = global.Math;
r7 = Math.max(0, value20 - property4);
} else {
r7 = value19;
}
const BountiesStage1Experiment = (BountiesStage1ExperimentModule).BountiesStage1Experiment;
const useConfig = BountiesStage1Experiment.useConfig;
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
return {isCtaVisible: (isCompleted || value17 > Reflect.apply(useConfig, BountiesStage1Experiment,
[{location: VIDEO_MODAL_MOBILE}]).ctaTimerMilliSeconds) && !(property && endMode !== onVideoLooped2.END_CARD_WITH_CTA),
isEndCardVisible: property, handleVideoEnd: value13, handleVideoProgress: value12, handleVideoPaused: value15,
handleVideoResumed: value16, handleReplay: value14, rewardRemainingSeconds: r7, rewardTotalSeconds: value18,
normalizedProgress: property3 ?? property2, maxVideoProgressSeconds: property4, videoDuration: property5};
function _fun102857() { // fn#102857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:755, offset: 0x0224bc80, size: 32 bytes, params: 1, frame: 3
return initialVideoDurationSec != null ? initialProgressSec / initialVideoDurationSec : 0;
}
function _fun102858({progress, currentTime, seekableDuration}) { // fn#102858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:1015, offset: 0x0224bca0, size: 191 bytes, params: 2, frame: 18
env0_13(null);
const Math = global.Math;
const value2 = Math.max(currentTime, env0_17.current);
env0_17.current = value2;
env0_18.current = seekableDuration;
env0_20.current = currentTime;
env0_12(progress);
env0_14(value2);
env0_15(seekableDuration);
onVideoProgress(value2, seekableDuration, currentTime);
if (!env0_16.current && 1000 * value2 >= rewardDurationMs) {
env0_16.current = true;
onRewardEarned();
}
}
function _fun102859() { // fn#102859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:1230, offset: 0x0224bd5f, size: 141 bytes, params: 1, frame: 14
var binding;
var onVideoLoopedBinding;
const onVideoEndBinding = onVideoEnd;
let current = env0_17.current;
onVideoEndBinding(current, env0_18.current);
const endModeBinding = endMode;
const LOOP = env1_5.LOOP;
if (endModeBinding === LOOP) {
binding = env0_19;
current = binding.current;
binding.current = current + 1;
onVideoLoopedBinding = onVideoLooped;
current = env0_19.current;
onVideoLoopedBinding(current);
} else {
env0_11(true);
}
if (!env0_16.current) {
env0_16.current = true;
onRewardEarned();
}
}
function _fun102860() { // fn#102860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:1363, offset: 0x0224bdec, size: 73 bytes, params: 1, frame: 14
var r2;
var r3;
var current;
const value2 = playerRef == null;
const value3 = undefined;
if (value2) {
r2 = value2;
r3 = value3;
} else {
current = playerRef.current;
r2 = current == null;
r3 = current;
}
if (!r2) {
r3.seekToStart();
}
env0_13(0);
env0_11(false);
return value3;
}
function _fun102861(a0) { // fn#102861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:1455, offset: 0x0224be35, size: 29 bytes, params: 2, frame: 13
onVideoPaused(env0_20.current, a0);
}
function _fun102862(a0) { // fn#102862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:1498, offset: 0x0224be52, size: 29 bytes, params: 2, frame: 13
onVideoResumed(env0_20.current, a0);
}
function useBountiesModalTiming({endMode, rewardDurationMs, isCompleted, onRewardEarned, onVideoProgress, onVideoEnd, onVideoLooped, onVideoPaused, onVideoResumed, playerRef, initialProgressSec, initialMaxVideoProgressSec, initialVideoDurationSec}) { // fn#102856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:400, offset: 0x0224b8fb, size: 901 bytes, params: 2, frame: 35
var r7;
var value20;
const env0_2 = onRewardEarned;
const env0_3 = onVideoProgress;
const env0_5 = onVideoLooped;
initialProgressSec = initialProgressSec === undefined ? 0 : initialProgressSec;
initialMaxVideoProgressSec = initialMaxVideoProgressSec === undefined ? 0 : initialMaxVideoProgressSec;
initialVideoDurationSec = initialVideoDurationSec === undefined ? null : initialVideoDurationSec;
let binding = env0_3;
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding,
[initialVideoDurationSec != null && initialProgressSec >= initialVideoDurationSec - 1 && endMode !== env0_5.LOOP]);
binding = env0_2;
const value6 = binding(value5, 2);
const property = value6[0];
const env0_11 = value6[1];
const binding2 = env0_3;
useState = binding2.useState;
const value8 = binding(Reflect.apply(useState, binding2, [_fun102857]), 2);
const property2 = value8[0];
const env0_12 = value8[1];
useState = binding2.useState;
const value9 = binding(Reflect.apply(useState, binding2, [null]), 2);
const property3 = value9[0];
const env0_13 = value9[1];
useState = binding2.useState;
const value10 = binding(Reflect.apply(useState, binding2, [initialMaxVideoProgressSec]), 2);
const property4 = value10[0];
const env0_14 = value10[1];
useState = binding2.useState;
const value11 = binding(Reflect.apply(useState, binding2, [initialVideoDurationSec]), 2);
const property5 = value11[0];
const env0_15 = value11[1];
const env0_16 = binding2.useRef(isCompleted);
const env0_17 = binding2.useRef(initialMaxVideoProgressSec);
const env0_18 = binding2.useRef(initialVideoDurationSec ?? 0);
binding = env0_3;
const env0_19 = binding.useRef(0);
const env0_20 = binding.useRef(0);
const value12 = binding.useCallback(_fun102858, [onVideoProgress, onRewardEarned, rewardDurationMs]);
const value13 = binding.useCallback(_fun102859, [endMode, onVideoEnd, onVideoLooped, onRewardEarned]);
const value14 = binding.useCallback(_fun102860, [playerRef]);
const value15 = binding.useCallback(_fun102861, [onVideoPaused]);
const value16 = binding.useCallback(_fun102862, [onVideoResumed]);
const value17 = 1000 * property4;
const value18 = rewardDurationMs / 1000;
let Math = global.Math;
const value19 = Math.max(0, value18 - property4);
if (value17 >= rewardDurationMs) {
r7 = 0;
} else if (property) {
r7 = 0;
} else if (isCompleted) {
r7 = 0;
} else if (property5 == null) {
r7 = value19;
} else if (property5 > 0) {
Math = global.Math;
value20 = Math.min(value18, property5);
Math = global.Math;
r7 = Math.max(0, value20 - property4);
} else {
r7 = value19;
}
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
const useConfig = BountiesStage1Experiment.useConfig;
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
return {isCtaVisible: (isCompleted || value17 > Reflect.apply(useConfig, BountiesStage1Experiment,
[{location: VIDEO_MODAL_MOBILE}]).ctaTimerMilliSeconds) && !(property && endMode !== env0_5.END_CARD_WITH_CTA),
isEndCardVisible: property, handleVideoEnd: value13, handleVideoProgress: value12, handleVideoPaused: value15,
handleVideoResumed: value16, handleReplay: value14, rewardRemainingSeconds: r7, rewardTotalSeconds: value18,
normalizedProgress: property3 ?? property2, maxVideoProgressSeconds: property4, videoDuration: property5};
}
function _fun102857() { // fn#102857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:755, offset: 0x0224bc80, size: 32 bytes, params: 1, frame: 3
return initialVideoDurationSec != null ? initialProgressSec / initialVideoDurationSec : 0;
}
function _fun102858({progress, currentTime, seekableDuration}) { // fn#102858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:1015, offset: 0x0224bca0, size: 191 bytes, params: 2, frame: 18
env0_13(null);
const Math = global.Math;
const value2 = Math.max(currentTime, env0_17.current);
env0_17.current = value2;
env0_18.current = seekableDuration;
env0_20.current = currentTime;
env0_12(progress);
env0_14(value2);
env0_15(seekableDuration);
onVideoProgress(value2, seekableDuration, currentTime);
if (!env0_16.current && 1000 * value2 >= rewardDurationMs) {
env0_16.current = true;
onRewardEarned();
}
}
function _fun102859() { // fn#102859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:1230, offset: 0x0224bd5f, size: 141 bytes, params: 1, frame: 14
var binding;
var onVideoLoopedBinding;
const onVideoEndBinding = onVideoEnd;
let current = env0_17.current;
onVideoEndBinding(current, env0_18.current);
const endModeBinding = endMode;
const LOOP = env1_5.LOOP;
if (endModeBinding === LOOP) {
binding = env0_19;
current = binding.current;
binding.current = current + 1;
onVideoLoopedBinding = onVideoLooped;
current = env0_19.current;
onVideoLoopedBinding(current);
} else {
env0_11(true);
}
if (!env0_16.current) {
env0_16.current = true;
onRewardEarned();
}
}
function _fun102860() { // fn#102860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:1363, offset: 0x0224bdec, size: 73 bytes, params: 1, frame: 14
var r2;
var r3;
var current;
const value2 = playerRef == null;
const value3 = undefined;
if (value2) {
r2 = value2;
r3 = value3;
} else {
current = playerRef.current;
r2 = current == null;
r3 = current;
}
if (!r2) {
r3.seekToStart();
}
env0_13(0);
env0_11(false);
return value3;
}
function _fun102861(a0) { // fn#102861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:1455, offset: 0x0224be35, size: 29 bytes, params: 2, frame: 13
onVideoPaused(env0_20.current, a0);
}
function _fun102862(a0) { // fn#102862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:1498, offset: 0x0224be52, size: 29 bytes, params: 2, frame: 13
onVideoResumed(env0_20.current, a0);
}
global.__d(_fun102855, 13533, [57, 31, 6528, 9530,
2]) /* metro module 13533, dependencies: [57, 31, 6528, 9530, 2] */;
@@ -1,4 +1,13 @@
/* Metro module 13536; source: modules/quests/native/BountiesModal/useBountiesModalVideoAnalytics.tsx; dependencies: [31, 661, 9513, 491, 7110, 7121, 9522, 13523, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as Module00491Module from '../../../../by-id/module-00491.js'; /* Metro dependency 491 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as AnalyticsActionsModule from '../../lib/analytics/AnalyticsActions.tsx'; /* Metro dependency 7110 */
import * as AdCreativeTypeModule from '../../../../external/discord_common/js/shared/shared-constants/AdCreativeType.tsx'; /* Metro dependency 7121 */
import * as ContentImpressionTrackerHooksModule from '../../lib/analytics/ContentImpressionTrackerHooks.tsx'; /* Metro dependency 9513 */
import * as AdVideoPlayerModule from '../AdVideoPlayer.tsx'; /* Metro dependency 13523 */
function _fun102867(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:6, offset: 0x0224c056, size: 172 bytes, params: 8, frame: 18
const env0_0 = require;
const _arrayLikeToArray_102870 = function(a0, a1) {
@@ -46,272 +55,274 @@ function _fun102867(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_4 = [25, 50, 75];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/useBountiesModalVideoAnalytics.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/useBountiesModalVideoAnalytics.tsx');
exports.useBountiesModalVideoAnalytics = useBountiesModalVideoAnalytics;
}
function _createForOfIteratorHelperLoose_102868(a0, a1) { // fn#102868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:137, offset: 0x0224c102, 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)) {
function _createForOfIteratorHelperLoose_102868(a0, a1) { // fn#102868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:137, offset: 0x0224c102, 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);
}
return _fun102869;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_102870(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun102869;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_102870(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_102870(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun102869;
}
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 useBountiesModalVideoAnalytics({bountyId, sourceQuestContent, rewardDurationMs}) { // fn#102871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:1203, offset: 0x0224c276, size: 551 bytes, params: 2, frame: 24
var object2;
const env0_2 = rewardDurationMs;
const value2 = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId();
const binding = env0_2;
const value = binding.useMemo(_fun102872, []);
const useRef = binding.useRef;
const Set = global.Set;
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
const env0_5 = Reflect.apply(useRef, binding, [set instanceof Object ? set : value3]);
const value5 = binding.useCallback(_fun102873, [bountyId, value, value2, sourceQuestContent, rewardDurationMs]);
const value6 = binding.useCallback(_fun102874, [value5]);
const value7 = binding.useCallback(_fun102875, [value5, rewardDurationMs]);
const value8 = binding.useCallback(_fun102876, [value5]);
const value9 = binding.useCallback(_fun102877, [value5, rewardDurationMs]);
object2 = {};
object2.handleVideoProgressAnalytics = binding.useCallback(_fun102878, [value6, value7, value9, rewardDurationMs]);
object2.handleVideoEndAnalytics = binding.useCallback(_fun102879, [value6, value7, value9, value8]);
object2.handleVideoLoopedAnalytics = binding.useCallback(_fun102880, [bountyId, value, value2, sourceQuestContent,
rewardDurationMs]);
object2.handleVideoPausedAnalytics = binding.useCallback(_fun102881, [bountyId, value, value2, sourceQuestContent,
rewardDurationMs]);
object2.handleVideoResumedAnalytics = binding.useCallback(_fun102882, [bountyId, value, value2, sourceQuestContent,
rewardDurationMs]);
return object2;
}
function _fun102872() { // fn#102872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:1348, offset: 0x0224c49d, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(491) /* metro dependency 491 */).v4();
}
function _fun102873({videoTimestampSeconds, progress, thresholdMet}) { // fn#102873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:1408, offset: 0x0224c4c2, size: 185 bytes, params: 2, frame: 20
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackAdContentEvent = analyticsActionsModule.trackAdContentEvent;
const object2 = {};
object2.adContentId = bountyId;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object2.adCreativeType = BOUNTY;
const AD_VIDEO_PROGRESSED = AnalyticEvents.AD_VIDEO_PROGRESSED;
object2.event = AD_VIDEO_PROGRESSED;
object2.properties = {progress: progress, video_timestamp_seconds: videoTimestampSeconds, video_session_id: env0_4,
impression_id: env0_3, threshold_met: thresholdMet, reward_timer_seconds: rewardDurationMs / 1000};
object2.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, analyticsActionsModule, [object2]);
}
function _fun102874() { // fn#102874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:1765, offset: 0x0224c57b, size: 77 bytes, params: 1, frame: 12
const current = env0_5.current;
if (!current.has('start')) {
env0_5.current.add('start');
env0_6({'videoTimestampSeconds': 0, 'progress': 0, 'thresholdMet': false});
}
}
function _fun102875(a0, a1) { // fn#102875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:1899, offset: 0x0224c5c8, size: 159 bytes, params: 3, frame: 15
var Math;
var value2;
var value3;
const current = env0_5.current;
if (!current.has('threshold')) {
env0_5.current.add('threshold');
Math = global.Math;
value2 = Math.max(rewardDurationMs / 1000, a0);
value3 = environment.__proto__;
env0_6({videoTimestampSeconds: value2,
progress: (require(9522) /* metro dependency 9522: VideoQuestUtils */).formatVideoProgressRatio(value2, a1),
thresholdMet: true});
}
}
function _fun102876(a0, a1) { // fn#102876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:2114, offset: 0x0224c667, size: 108 bytes, params: 3, frame: 14
const current = env0_5.current;
if (!current.has('end')) {
env0_5.current.add('end');
env0_6({'videoTimestampSeconds': null, 'progress': 1, 'thresholdMet': true,
videoTimestampSeconds: global.Math.max(a0, a1)});
}
}
function _fun102877(a0, a1) { // fn#102877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:2270, offset: 0x0224c6d3, size: 225 bytes, params: 3, frame: 23
var r1;
var value;
var value2;
var value3;
var done;
var value5;
var value6;
var current;
var has;
var binding;
var value7;
var value8;
if (!(a1 <= 0)) {
value = environment.__proto__;
value2 = (require(9522) /* metro dependency 9522: VideoQuestUtils */).formatVideoProgressRatio(a0, a1);
value = _createForOfIteratorHelperLoose_102868(env1_4);
value3 = value();
done = value3.done;
if (!done) {
r1 = value3;
while (true) {
value5 = r1.value;
value6 = 'p' + value5;
current = env0_5.current;
has = current.has;
if (!Reflect.apply(has, current, [value6])) {
if (value2 < value5 / 100) {
break;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_102870(a0, value);
r6 = value;
} else {
r6 = value;
}
current = env0_5.current;
current.add(value6);
binding = env0_6;
value7 = 1000 * a0;
binding({videoTimestampSeconds: a0, progress: value2, thresholdMet: value7 >= rewardDurationMs});
break;
}
value8 = value();
done = value8.done;
if (done) {
break;
}
r1 = value8;
continue;
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun102869;
}
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 _fun102869() { // fn#102869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:708, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
function useBountiesModalVideoAnalytics({bountyId, sourceQuestContent, rewardDurationMs}) { // fn#102871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:1203, offset: 0x0224c276, size: 551 bytes, params: 2, frame: 24
const rewardDurationMs2 = rewardDurationMs;
const value2 = (ContentImpressionTrackerHooksModule).useQuestImpressionId();
const binding = rewardDurationMs2;
const value = binding.useMemo(_fun102872, []);
const useRef = binding.useRef;
const Set = global.Set;
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
const env0_5 = Reflect.apply(useRef, binding, [set instanceof Object ? set : value3]);
const value5 = binding.useCallback(_fun102873, [bountyId, value, value2, sourceQuestContent, rewardDurationMs]);
const value6 = binding.useCallback(_fun102874, [value5]);
const value7 = binding.useCallback(_fun102875, [value5, rewardDurationMs]);
const value8 = binding.useCallback(_fun102876, [value5]);
const value9 = binding.useCallback(_fun102877, [value5, rewardDurationMs]);
object = {};
object.handleVideoProgressAnalytics = binding.useCallback(_fun102878, [value6, value7, value9, rewardDurationMs]);
object.handleVideoEndAnalytics = binding.useCallback(_fun102879, [value6, value7, value9, value8]);
object.handleVideoLoopedAnalytics = binding.useCallback(_fun102880, [bountyId, value, value2, sourceQuestContent,
rewardDurationMs]);
object.handleVideoPausedAnalytics = binding.useCallback(_fun102881, [bountyId, value, value2, sourceQuestContent,
rewardDurationMs]);
object.handleVideoResumedAnalytics = binding.useCallback(_fun102882, [bountyId, value, value2, sourceQuestContent,
rewardDurationMs]);
return object;
function _fun102872() { // fn#102872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:1348, offset: 0x0224c49d, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (Module00491Module).v4();
}
function _fun102873({videoTimestampSeconds, progress, thresholdMet}) { // fn#102873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:1408, offset: 0x0224c4c2, size: 185 bytes, params: 2, frame: 20
const trackAdContentEvent = AnalyticsActionsModule.trackAdContentEvent;
const object = {};
object.adContentId = bountyId;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object.adCreativeType = BOUNTY;
const AD_VIDEO_PROGRESSED = AnalyticEvents.AD_VIDEO_PROGRESSED;
object.event = AD_VIDEO_PROGRESSED;
object.properties = {progress: progress, video_timestamp_seconds: videoTimestampSeconds, video_session_id: env0_4,
impression_id: ConstantsModule.AnalyticEvents, threshold_met: thresholdMet, reward_timer_seconds: rewardDurationMs / 1000};
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, AnalyticsActionsModule, [object]);
}
function _fun102874() { // fn#102874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:1765, offset: 0x0224c57b, size: 77 bytes, params: 1, frame: 12
const current = env0_5.current;
if (!current.has('start')) {
env0_5.current.add('start');
env0_6({'videoTimestampSeconds': 0, 'progress': 0, 'thresholdMet': false});
}
}
function _fun102875(a0, a1) { // fn#102875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:1899, offset: 0x0224c5c8, size: 159 bytes, params: 3, frame: 15
var Math;
var value2;
var value3;
const current = env0_5.current;
if (!current.has('threshold')) {
env0_5.current.add('threshold');
Math = global.Math;
value2 = Math.max(rewardDurationMs / 1000, a0);
value3 = environment.__proto__;
env0_6({videoTimestampSeconds: value2,
progress: (require(9522) /* metro dependency 9522: VideoQuestUtils */).formatVideoProgressRatio(value2, a1),
thresholdMet: true});
}
}
function _fun102876(a0, a1) { // fn#102876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:2114, offset: 0x0224c667, size: 108 bytes, params: 3, frame: 14
const current = env0_5.current;
if (!current.has('end')) {
env0_5.current.add('end');
env0_6({'videoTimestampSeconds': null, 'progress': 1, 'thresholdMet': true,
videoTimestampSeconds: global.Math.max(a0, a1)});
}
}
function _fun102877(a0, a1) { // fn#102877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:2270, offset: 0x0224c6d3, size: 225 bytes, params: 3, frame: 23
var r1;
var value;
var value2;
var value3;
var done;
var value5;
var value6;
var current;
var has;
var binding;
var value7;
var value8;
if (!(a1 <= 0)) {
value = environment.__proto__;
value2 = (require(9522) /* metro dependency 9522: VideoQuestUtils */).formatVideoProgressRatio(a0, a1);
value = _createForOfIteratorHelperLoose_102868(env1_4);
value3 = value();
done = value3.done;
if (!done) {
r1 = value3;
while (true) {
value5 = r1.value;
value6 = 'p' + value5;
current = env0_5.current;
has = current.has;
if (!Reflect.apply(has, current, [value6])) {
if (value2 < value5 / 100) {
break;
}
current = env0_5.current;
current.add(value6);
binding = env0_6;
value7 = 1000 * a0;
binding({videoTimestampSeconds: a0, progress: value2, thresholdMet: value7 >= rewardDurationMs});
break;
}
value8 = value();
done = value8.done;
if (done) {
break;
}
r1 = value8;
continue;
}
}
}
}
function _fun102878(a0, a1) { // fn#102878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:2588, offset: 0x0224c7b4, size: 59 bytes, params: 3, frame: 15
env0_7();
if (1000 * a0 >= rewardDurationMs) {
env0_8(a0, a1);
}
env0_10(a0, a1);
}
function _fun102879(a0, a1) { // fn#102879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:2676, offset: 0x0224c7ef, size: 51 bytes, params: 3, frame: 14
env0_7();
env0_8(a0, a1);
env0_10(a0, a1);
env0_9(a0, a1);
}
function _fun102880(a0) { // fn#102880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:2764, offset: 0x0224c822, size: 159 bytes, params: 2, frame: 17
const trackAdContentEvent = AnalyticsActionsModule.trackAdContentEvent;
const object = {};
object.adContentId = bountyId;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object.adCreativeType = BOUNTY;
const AD_VIDEO_LOOPED = AnalyticEvents.AD_VIDEO_LOOPED;
object.event = AD_VIDEO_LOOPED;
object.properties = {video_session_id: env0_4, impression_id: ConstantsModule.AnalyticEvents, loop_count: a0,
reward_timer_seconds: rewardDurationMs / 1000};
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, AnalyticsActionsModule, [object]);
}
function _fun102881(a0, a1) { // fn#102881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:3050, offset: 0x0224c8c1, size: 199 bytes, params: 3, frame: 17
var moduleValue;
var trackAdContentEvent;
var object;
const PlaybackTriggerSource = (AdVideoPlayerModule).PlaybackTriggerSource;
const USER_INTERACTION = PlaybackTriggerSource.USER_INTERACTION;
if (a1 === USER_INTERACTION) {
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackAdContentEvent = moduleValue.trackAdContentEvent;
object = {};
object.adContentId = bountyId;
object.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY;
object.event = AnalyticEvents.AD_VIDEO_PAUSED;
object.properties = {video_timestamp_seconds: a0, video_session_id: env0_4, impression_id: ConstantsModule.AnalyticEvents,
reward_timer_seconds: rewardDurationMs / 1000};
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, moduleValue, [object]);
}
}
function _fun102882(a0, a1) { // fn#102882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:3407, offset: 0x0224c988, size: 199 bytes, params: 3, frame: 17
var moduleValue;
var trackAdContentEvent;
var object;
const PlaybackTriggerSource = (AdVideoPlayerModule).PlaybackTriggerSource;
const USER_INTERACTION = PlaybackTriggerSource.USER_INTERACTION;
if (a1 === USER_INTERACTION) {
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackAdContentEvent = moduleValue.trackAdContentEvent;
object = {};
object.adContentId = bountyId;
object.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY;
object.event = AnalyticEvents.AD_VIDEO_RESUMED;
object.properties = {video_timestamp_seconds: a0, video_session_id: env0_4, impression_id: ConstantsModule.AnalyticEvents,
reward_timer_seconds: rewardDurationMs / 1000};
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, moduleValue, [object]);
}
}
}
}
function _fun102878(a0, a1) { // fn#102878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:2588, offset: 0x0224c7b4, size: 59 bytes, params: 3, frame: 15
env0_7();
if (1000 * a0 >= rewardDurationMs) {
env0_8(a0, a1);
}
env0_10(a0, a1);
}
function _fun102879(a0, a1) { // fn#102879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:2676, offset: 0x0224c7ef, size: 51 bytes, params: 3, frame: 14
env0_7();
env0_8(a0, a1);
env0_10(a0, a1);
env0_9(a0, a1);
}
function _fun102880(a0) { // fn#102880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:2764, offset: 0x0224c822, size: 159 bytes, params: 2, frame: 17
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackAdContentEvent = analyticsActionsModule.trackAdContentEvent;
const object2 = {};
object2.adContentId = bountyId;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object2.adCreativeType = BOUNTY;
const AD_VIDEO_LOOPED = AnalyticEvents.AD_VIDEO_LOOPED;
object2.event = AD_VIDEO_LOOPED;
object2.properties = {video_session_id: env0_4, impression_id: env0_3, loop_count: a0,
reward_timer_seconds: rewardDurationMs / 1000};
object2.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, analyticsActionsModule, [object2]);
}
function _fun102881(a0, a1) { // fn#102881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:3050, offset: 0x0224c8c1, size: 199 bytes, params: 3, frame: 17
var moduleValue;
var trackAdContentEvent;
var object2;
const PlaybackTriggerSource = (require(13523) /* metro dependency 13523: AdVideoPlayer */).PlaybackTriggerSource;
const USER_INTERACTION = PlaybackTriggerSource.USER_INTERACTION;
if (a1 === USER_INTERACTION) {
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackAdContentEvent = moduleValue.trackAdContentEvent;
object2 = {};
object2.adContentId = bountyId;
object2.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY;
object2.event = AnalyticEvents.AD_VIDEO_PAUSED;
object2.properties = {video_timestamp_seconds: a0, video_session_id: env0_4, impression_id: env0_3,
reward_timer_seconds: rewardDurationMs / 1000};
object2.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, moduleValue, [object2]);
}
}
function _fun102882(a0, a1) { // fn#102882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:3407, offset: 0x0224c988, size: 199 bytes, params: 3, frame: 17
var moduleValue;
var trackAdContentEvent;
var object2;
const PlaybackTriggerSource = (require(13523) /* metro dependency 13523: AdVideoPlayer */).PlaybackTriggerSource;
const USER_INTERACTION = PlaybackTriggerSource.USER_INTERACTION;
if (a1 === USER_INTERACTION) {
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackAdContentEvent = moduleValue.trackAdContentEvent;
object2 = {};
object2.adContentId = bountyId;
object2.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY;
object2.event = AnalyticEvents.AD_VIDEO_RESUMED;
object2.properties = {video_timestamp_seconds: a0, video_session_id: env0_4, impression_id: env0_3,
reward_timer_seconds: rewardDurationMs / 1000};
object2.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, moduleValue, [object2]);
}
}
global.__d(_fun102867, 13536, [31, 661, 9513, 491, 7110, 7121, 9522, 13523,
2]) /* metro module 13536, dependencies: [31, 661, 9513, 491, 7110, 7121, 9522, 13523, 2] */;
@@ -1,123 +1,128 @@
/* Metro module 13521; source: modules/quests/native/BountiesModal/useBountiesRecapOrbCount.tsx; dependencies: [57, 31, 4017, 13520, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as UseBountiesRecapScrollModule from './useBountiesRecapScroll.tsx'; /* Metro dependency 13520 */
function _fun102768(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:6, offset: 0x02247e54, size: 202 bytes, params: 8, frame: 18
const env0_0 = require;
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 */;
object = {code: 'function getRecapOrbCountFromPullProgress_useBountiesRecapOrbCountTsx1(progress,targetOrbAmount){if(targetOrbAmount<=0||!Number.isFinite(targetOrbAmount)){return 0;}const clampedProgress=Math.min(1,Math.max(0,progress));return Math.round(clampedProgress*targetOrbAmount);}'};
const value = _fun102769();
object = {code: 'function useBountiesRecapOrbCountTsx2(){const{enabled,recapRevealHeight,getRevealProgress,scrollY,lastBountyScrollOffset,RECAP_ORB_COUNT_REACHES_TARGET_AT_PROGRESS,getRecapOrbCountFromPullProgress,targetOrbAmount}=this.__closure;if(!enabled||recapRevealHeight<=0){return{count:0,revealed:false};}const pullProgress=getRevealProgress(scrollY.get(),lastBountyScrollOffset,recapRevealHeight)/RECAP_ORB_COUNT_REACHES_TARGET_AT_PROGRESS;if(pullProgress<=0.1){return{count:0,revealed:false};}return{count:getRecapOrbCountFromPullProgress(pullProgress,targetOrbAmount),revealed:true};}'};
object = {code: 'function useBountiesRecapOrbCountTsx3({count:count,revealed:revealed}){const{runOnJS,resetDisplayCount,setDisplayCountMonotonic}=this.__closure;if(!revealed){runOnJS(resetDisplayCount)();return;}runOnJS(setDisplayCountMonotonic)(count);}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/useBountiesRecapOrbCount.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/useBountiesRecapOrbCount.tsx');
exports.getRecapOrbCountFromPullProgress = value;
exports.useBountiesRecapOrbCount = useBountiesRecapOrbCount;
}
function _fun102769() { // fn#102769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:402, offset: 0x02247f1e, size: 48 bytes, params: 1, frame: 2
const closure = function(a0, a1) {
var value;
if (!(a1 <= 0)) {
var property = global.Number;
if (property.isFinite(a1)) {
property = global.Math;
value = global.Math.max(0, a0);
value = property.min(1, value);
property = global.Math;
return property.round(value * a1);
function _fun102769() { // fn#102769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:402, offset: 0x02247f1e, size: 48 bytes, params: 1, frame: 2
const closure = function(a0, a1) {
var value;
if (!(a1 <= 0)) {
var property = global.Number;
if (property.isFinite(a1)) {
property = global.Math;
value = global.Math.max(0, a0);
value = property.min(1, value);
property = global.Math;
return property.round(value * a1);
}
}
return 0;
};
closure.__closure = {};
closure.__workletHash = 14295638108053;
closure.__initData = env0_4;
return closure;
}
function useBountiesRecapOrbCount({scrollY, lastBountyScrollOffset, recapRevealHeight, targetOrbAmount, enabled}) { // fn#102771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:1755, offset: 0x02247fad, size: 373 bytes, params: 2, frame: 27
const recapRevealHeight2 = recapRevealHeight;
const binding = targetOrbAmount;
const [property, env0_5] = recapRevealHeight2(binding.useState(0), 2);
let closure = _fun102772;
const value4 = binding.useCallback(closure, []);
const env0_6 = value4;
const value5 = binding.useCallback(_fun102774, []);
const env0_7 = value5;
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = useBountiesRecapOrbCountB;
let object = {enabled: enabled, recapRevealHeight: recapRevealHeight};
const getRevealProgress = (UseBountiesRecapScrollModule).getRevealProgress;
object.getRevealProgress = getRevealProgress;
object.scrollY = scrollY;
object.lastBountyScrollOffset = lastBountyScrollOffset;
object.RECAP_ORB_COUNT_REACHES_TARGET_AT_PROGRESS = 0.95;
object.getRecapOrbCountFromPullProgress = env0_5;
object.targetOrbAmount = targetOrbAmount;
closure.__closure = object;
closure.__workletHash = 2855285055570;
closure.__initData = env0_6;
const useBountiesRecapOrbCountP2 = useBountiesRecapOrbCountP;
object = {};
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.resetDisplayCount = value5;
object.setDisplayCountMonotonic = value4;
useBountiesRecapOrbCountP2.__closure = object;
useBountiesRecapOrbCountP2.__workletHash = 12006414940221;
useBountiesRecapOrbCountP2.__initData = env0_7;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, useBountiesRecapOrbCountP2]);
return property;
function _fun102772(a0) { // fn#102772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:1939, offset: 0x02248122, size: 32 bytes, params: 2, frame: 11
const env0_0 = a0;
env0_5(_fun102773);
function _fun102773(a0) { // fn#102773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:1946, offset: 0x02248142, size: 20 bytes, params: 2, frame: 3
const value = a0;
return env0_0 > value ? env0_0 : value;
}
}
return 0;
};
closure.__closure = {};
closure.__workletHash = 14295638108053;
closure.__initData = env0_4;
return closure;
}
function useBountiesRecapOrbCount({scrollY, lastBountyScrollOffset, recapRevealHeight, targetOrbAmount, enabled}) { // fn#102771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:1755, offset: 0x02247fad, size: 373 bytes, params: 2, frame: 27
const env0_2 = recapRevealHeight;
const binding = targetOrbAmount;
const [property, env0_5] = env0_2(binding.useState(0), 2);
let closure = _fun102772;
const value4 = binding.useCallback(closure, []);
const env0_6 = value4;
const value5 = binding.useCallback(_fun102774, []);
const env0_7 = value5;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
closure = useBountiesRecapOrbCountB;
let object2 = {enabled: enabled, recapRevealHeight: recapRevealHeight};
const getRevealProgress = (require(13520) /* metro dependency 13520: useBountiesRecapScroll */).getRevealProgress;
object2.getRevealProgress = getRevealProgress;
object2.scrollY = scrollY;
object2.lastBountyScrollOffset = lastBountyScrollOffset;
object2.RECAP_ORB_COUNT_REACHES_TARGET_AT_PROGRESS = 0.95;
object2.getRecapOrbCountFromPullProgress = env0_5;
object2.targetOrbAmount = targetOrbAmount;
closure.__closure = object2;
closure.__workletHash = 2855285055570;
closure.__initData = env0_6;
const closure2 = useBountiesRecapOrbCountP;
object2 = {};
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.resetDisplayCount = value5;
object2.setDisplayCountMonotonic = value4;
closure2.__closure = object2;
closure2.__workletHash = 12006414940221;
closure2.__initData = env0_7;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
return property;
}
function _fun102774() { // fn#102774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:1982, offset: 0x02248156, size: 18 bytes, params: 1, frame: 11
env0_5(0);
}
function _fun102772(a0) { // fn#102772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:1939, offset: 0x02248122, size: 32 bytes, params: 2, frame: 11
const env0_0 = a0;
env0_5(_fun102773);
}
function _fun102774() { // fn#102774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:1982, offset: 0x02248156, size: 18 bytes, params: 1, frame: 11
env0_5(0);
}
function useBountiesRecapOrbCountB() { // fn#102775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:2037, owner: useBountiesRecapOrbCount.b, offset: 0x02248168, size: 166 bytes, params: 1, frame: 18
var r0;
var value2;
var moduleValue;
var value5;
var object2;
if (enabled) {
if (recapRevealHeight <= 0) {
function useBountiesRecapOrbCountB() { // fn#102775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:2037, owner: useBountiesRecapOrbCount.b, offset: 0x02248168, size: 166 bytes, params: 1, frame: 18
var r0;
var value2;
var moduleValue;
var value5;
var object;
if (enabled) {
if (recapRevealHeight <= 0) {
return {'count': 0, 'revealed': false};
}
value2 = environment.__proto__;
moduleValue = require(13520) /* metro dependency 13520: useBountiesRecapScroll */;
value5 = moduleValue.getRevealProgress(scrollY.get(), lastBountyScrollOffset, recapRevealHeight) / 0.95;
if (value5 <= 0.1) {
r0 = {'count': 0, 'revealed': false};
} else {
object = {};
object.count = env1_5(value5, targetOrbAmount);
object.revealed = true;
r0 = object;
}
return r0;
}
return {'count': 0, 'revealed': false};
}
value2 = environment.__proto__;
moduleValue = require(13520) /* metro dependency 13520: useBountiesRecapScroll */;
value5 = moduleValue.getRevealProgress(scrollY.get(), lastBountyScrollOffset, recapRevealHeight) / 0.95;
if (value5 <= 0.1) {
r0 = {'count': 0, 'revealed': false};
} else {
object2 = {};
object2.count = env1_5(value5, targetOrbAmount);
object2.revealed = true;
r0 = object2;
function useBountiesRecapOrbCountP({count, revealed}) { // fn#102776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:2474, owner: useBountiesRecapOrbCount.p, offset: 0x0224820e, size: 81 bytes, params: 2, frame: 14
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const runOnJS = value.runOnJS;
if (revealed) {
Reflect.apply(runOnJS, value, [env0_6])(count);
} else {
Reflect.apply(runOnJS, value, [env0_7])();
}
}
return r0;
}
return {'count': 0, 'revealed': false};
}
function useBountiesRecapOrbCountP({count, revealed}) { // fn#102776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:2474, owner: useBountiesRecapOrbCount.p, offset: 0x0224820e, size: 81 bytes, params: 2, frame: 14
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const runOnJS = value.runOnJS;
if (revealed) {
Reflect.apply(runOnJS, value, [env0_6])(count);
} else {
Reflect.apply(runOnJS, value, [env0_7])();
}
}
function _fun102773(a0) { // fn#102773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:1946, offset: 0x02248142, size: 20 bytes, params: 2, frame: 3
const value = a0;
return env0_0 > value ? env0_0 : value;
}
global.__d(_fun102768, 13521, [57, 31, 4017, 13520,
2]) /* metro module 13521, dependencies: [57, 31, 4017, 13520, 2] */;
@@ -1,69 +1,72 @@
/* Metro module 13520; source: modules/quests/native/BountiesModal/useBountiesRecapScroll.tsx; dependencies: [31, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun102760(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:6, offset: 0x02247b91, size: 152 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importAll(31) /* metro dependency 31 */;
object = {code: 'function getRevealProgress_useBountiesRecapScrollTsx1(scrollOffset,startOffset,revealHeight){if(revealHeight<=0){return 0;}return(scrollOffset-startOffset)/revealHeight;}'};
const value = _fun102761();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/useBountiesRecapScroll.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/useBountiesRecapScroll.tsx');
exports.RECAP_SNAP_EPSILON = 2;
exports.getRevealProgress = value;
exports.useBountiesRecapScroll = useBountiesRecapScroll;
}
function _fun102761() { // fn#102761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:290, offset: 0x02247c29, size: 48 bytes, params: 1, frame: 2
const closure = function(a0, a1, a2) {
var value = 0;
return a2 <= value ? value : (a0 - a1) / a2;
};
closure.__closure = {};
closure.__workletHash = 9769647749947;
closure.__initData = env0_1;
return closure;
}
function _fun102761() { // fn#102761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:290, offset: 0x02247c29, size: 48 bytes, params: 1, frame: 2
const closure = function(a0, a1, a2) {
var value = 0;
return a2 <= value ? value : (a0 - a1) / a2;
};
closure.__closure = {};
closure.__workletHash = 9769647749947;
closure.__initData = env0_1;
return closure;
}
function useBountiesRecapScroll({listRef, enabled, offsets}) { // fn#102763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:664, offset: 0x02247c75, size: 217 bytes, params: 2, frame: 18
const binding = listRef;
let useCallback = binding.useCallback;
let value = Reflect.apply(useCallback, binding, [function(a0) {
if (listRef.current != null) {
listRef.current.scrollToOffset({offset: a0, animated: true});
function useBountiesRecapScroll({listRef, enabled, offsets}) { // fn#102763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:664, offset: 0x02247c75, size: 217 bytes, params: 2, frame: 18
const binding = listRef;
let useCallback = binding.useCallback;
let value = Reflect.apply(useCallback, binding, [function(a0) {
if (listRef.current != null) {
listRef.current.scrollToOffset({offset: a0, animated: true});
}
}, [listRef]]);
const value2 = binding.useCallback(_fun102765, [offsets.lastBounty, value]);
value = binding.useCallback(_fun102766, [enabled, offsets.fullRecap, offsets.lastBounty, offsets.revealHeight,
value]);
useCallback = binding.useCallback;
return {scrollToLastBounty: value2, handleRecapMomentumEnd: Reflect.apply(useCallback, binding, [_fun102767,
[enabled, value]])};
function _fun102765() { // fn#102765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:844, offset: 0x02247d89, size: 26 bytes, params: 1, frame: 11
env0_3(offsets.lastBounty);
}
}, [listRef]]);
const value2 = binding.useCallback(_fun102765, [offsets.lastBounty, value]);
value = binding.useCallback(_fun102766, [enabled, offsets.fullRecap, offsets.lastBounty, offsets.revealHeight,
value]);
useCallback = binding.useCallback;
return {scrollToLastBounty: value2, handleRecapMomentumEnd: Reflect.apply(useCallback, binding, [_fun102767,
[enabled, value]])};
}
function _fun102765() { // fn#102765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:844, offset: 0x02247d89, size: 26 bytes, params: 1, frame: 11
env0_3(offsets.lastBounty);
}
function _fun102766(a0) { // fn#102766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:902, offset: 0x02247da3, size: 138 bytes, params: 2, frame: 16
var r1;
var offsetsBinding;
var value2;
var binding;
if (enabled) {
if (!(a0 <= offsets.lastBounty)) {
value2 = environment.__proto__;
binding = env1_2;
offsetsBinding = offsets;
r1 = binding(a0, offsetsBinding.lastBounty,
offsetsBinding.revealHeight) >= 0.25 ? offsets.fullRecap : offsets.lastBounty;
if (!(global.Math.abs(a0 - r1) < 2)) {
env0_3(r1);
function _fun102766(a0) { // fn#102766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:902, offset: 0x02247da3, size: 138 bytes, params: 2, frame: 16
var r1;
var offsetsBinding;
var value2;
var binding;
if (enabled) {
if (!(a0 <= offsets.lastBounty)) {
value2 = environment.__proto__;
binding = env1_2;
offsetsBinding = offsets;
r1 = binding(a0, offsetsBinding.lastBounty,
offsetsBinding.revealHeight) >= 0.25 ? offsets.fullRecap : offsets.lastBounty;
if (!(global.Math.abs(a0 - r1) < 2)) {
env0_3(r1);
}
}
}
}
function _fun102767(a0) { // fn#102767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:1139, offset: 0x02247e2d, size: 39 bytes, params: 2, frame: 11
if (enabled) {
env0_4(a0.contentOffset.y);
}
}
}
}
function _fun102767(a0) { // fn#102767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:1139, offset: 0x02247e2d, size: 39 bytes, params: 2, frame: 11
if (enabled) {
env0_4(a0.contentOffset.y);
}
}
global.__d(_fun102760, 13520, [31, 2]) /* metro module 13520, dependencies: [31, 2] */;
@@ -1,79 +1,85 @@
/* Metro module 13537; source: modules/quests/native/BountiesModal/useBountyVideoProgressPersistence.tsx; dependencies: [57, 31, 7092, 6528, 9530, 13533, 9532, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import BountyStore from '../../BountyStore.tsx'; /* Metro dependency 7092 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as BountiesStage1ExperimentModule from '../../experiments/BountiesStage1Experiment.tsx'; /* Metro dependency 9530 */
function _fun102883(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13727:6, offset: 0x0224ca4f, size: 189 bytes, params: 8, frame: 19
const env0_0 = require;
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 bountyStore = importDefault(7092) /* metro dependency 7092: BountyStore */;
const env0_5 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
const env0_6 = {'timestampSec': 0, 'maxTimestampSec': 0, 'duration': 0};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/useBountyVideoProgressPersistence.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/useBountyVideoProgressPersistence.tsx');
exports.useBountyVideoProgressPersistence = useBountyVideoProgressPersistence;
}
function useBountyVideoProgressPersistence({bountyId, endMode}) { // fn#102884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13727:353, offset: 0x0224cb0c, size: 284 bytes, params: 2, frame: 17
const BountiesStage1Experiment = (BountiesStage1ExperimentModule).BountiesStage1Experiment;
const useConfig = BountiesStage1Experiment.useConfig;
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
const enabled = Reflect.apply(useConfig, BountiesStage1Experiment, [{location: VIDEO_MODAL_MOBILE}]).enabled;
const enabled2 = enabled;
const binding = env0_3;
const property = enabled2(binding.useState(_fun102885), 1)[0];
var env0_3 = binding.useRef(0);
const env0_4 = binding.useRef(property.timestampSec);
const env0_5 = binding.useRef(property.maxTimestampSec);
const env0_6 = binding.useRef(property.duration);
object = {initialProgress: property};
object.handleProgress = binding.useCallback(_fun102886, [enabled, bountyId]);
object.flushProgress = binding.useCallback(_fun102887, [enabled, bountyId]);
return object;
function _fun102885() { // fn#102885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13727:524, offset: 0x0224cc28, size: 136 bytes, params: 1, frame: 15
var bountyStoreBinding;
var value3;
if (enabled) {
bountyStoreBinding = BountyStore;
value3 = bountyStoreBinding.getBountyVideoProgress(bountyId);
return value3 == null ? env1_6 : endMode !== (require(13533) /* metro dependency 13533: useBountiesModalTiming */).BountyVideoEndMode.LOOP ? value3.timestampSec <= 5 ? env1_6 : value3 : value3.duration > 0 && value3.maxTimestampSec >= value3.duration - 1 || value3.timestampSec <= 5 ? env1_6 : value3;
}
return env1_6;
}
function useBountyVideoProgressPersistence({bountyId, endMode}) { // fn#102884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13727:353, offset: 0x0224cb0c, size: 284 bytes, params: 2, frame: 17
var object2;
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
const useConfig = BountiesStage1Experiment.useConfig;
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
const enabled = Reflect.apply(useConfig, BountiesStage1Experiment, [{location: VIDEO_MODAL_MOBILE}]).enabled;
const env0_2 = enabled;
const binding = env0_3;
const property = env0_2(binding.useState(_fun102885), 1)[0];
var env0_3 = binding.useRef(0);
const env0_4 = binding.useRef(property.timestampSec);
const env0_5 = binding.useRef(property.maxTimestampSec);
const env0_6 = binding.useRef(property.duration);
object2 = {initialProgress: property};
object2.handleProgress = binding.useCallback(_fun102886, [enabled, bountyId]);
object2.flushProgress = binding.useCallback(_fun102887, [enabled, bountyId]);
return object2;
}
function _fun102886(a0, a1, a2) { // fn#102886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13727:902, offset: 0x0224ccb0, size: 143 bytes, params: 4, frame: 16
var value3;
var moduleValue;
env0_4.current = a2;
env0_5.current = a0;
env0_6.current = a1;
if (enabled && a2 >= env0_3.current) {
env0_3.current = a2 + 1;
value3 = environment.__proto__;
moduleValue = require(9532) /* metro dependency 9532: BountyActionCreators */;
moduleValue.setBountyVideoProgress(bountyId, {timestampSec: a2, maxTimestampSec: a0, duration: a1});
}
}
function _fun102885() { // fn#102885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13727:524, offset: 0x0224cc28, size: 136 bytes, params: 1, frame: 15
var value3;
if (enabled) {
value3 = BountyStore.getBountyVideoProgress(bountyId);
return value3 == null ? env1_6 : endMode !== (require(13533) /* metro dependency 13533: useBountiesModalTiming */).BountyVideoEndMode.LOOP ? value3.timestampSec <= 5 ? env1_6 : value3 : value3.duration > 0 && value3.maxTimestampSec >= value3.duration - 1 || value3.timestampSec <= 5 ? env1_6 : value3;
}
return env1_6;
}
function _fun102887() { // fn#102887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13727:1099, offset: 0x0224cd3f, size: 98 bytes, params: 1, frame: 15
var value2;
var moduleValue;
var setBountyVideoProgress;
var bountyIdBinding;
var object;
var current;
if (enabled) {
value2 = environment.__proto__;
moduleValue = require(9532) /* metro dependency 9532: BountyActionCreators */;
setBountyVideoProgress = moduleValue.setBountyVideoProgress;
bountyIdBinding = bountyId;
object = {};
current = env0_4.current;
object.timestampSec = current;
current = env0_5.current;
object.maxTimestampSec = current;
current = env0_6.current;
object.duration = current;
Reflect.apply(setBountyVideoProgress, moduleValue, [bountyIdBinding, object]);
}
}
function _fun102886(a0, a1, a2) { // fn#102886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13727:902, offset: 0x0224ccb0, size: 143 bytes, params: 4, frame: 16
var value3;
var moduleValue;
env0_4.current = a2;
env0_5.current = a0;
env0_6.current = a1;
if (enabled && a2 >= env0_3.current) {
env0_3.current = a2 + 1;
value3 = environment.__proto__;
moduleValue = require(9532) /* metro dependency 9532: BountyActionCreators */;
moduleValue.setBountyVideoProgress(bountyId, {timestampSec: a2, maxTimestampSec: a0, duration: a1});
}
}
function _fun102887() { // fn#102887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13727:1099, offset: 0x0224cd3f, size: 98 bytes, params: 1, frame: 15
var value2;
var moduleValue;
var setBountyVideoProgress;
var bountyIdBinding;
var object2;
var current;
if (enabled) {
value2 = environment.__proto__;
moduleValue = require(9532) /* metro dependency 9532: BountyActionCreators */;
setBountyVideoProgress = moduleValue.setBountyVideoProgress;
bountyIdBinding = bountyId;
object2 = {};
current = env0_4.current;
object2.timestampSec = current;
current = env0_5.current;
object2.maxTimestampSec = current;
current = env0_6.current;
object2.duration = current;
Reflect.apply(setBountyVideoProgress, moduleValue, [bountyIdBinding, object2]);
}
}
global.__d(_fun102883, 13537, [57, 31, 7092, 6528, 9530, 13533, 9532,
2]) /* metro module 13537, dependencies: [57, 31, 7092, 6528, 9530, 13533, 9532, 2] */;
@@ -1,75 +1,83 @@
/* Metro module 13519; source: modules/quests/native/BountiesModal/useVisibilityTransition.tsx; dependencies: [57, 31, 4017, 4504, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TimingModule from '../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
function _fun102755(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13709:6, offset: 0x022478cb, size: 165 bytes, params: 8, frame: 18
const env0_0 = require;
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 */;
object = {code: "function useVisibilityTransitionTsx1(){const{withTiming,visibility,visible,entranceTiming,exitTiming,runOnJS,animationCallbackJSThread}=this.__closure;return{opacity:withTiming(visibility,visible?entranceTiming:exitTiming,'respect-motion-settings',function(){'worklet';runOnJS(animationCallbackJSThread)();})};}"};
object = {code: 'function useVisibilityTransitionTsx2(){const{runOnJS,animationCallbackJSThread}=this.__closure;runOnJS(animationCallbackJSThread)();}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/useVisibilityTransition.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/useVisibilityTransition.tsx');
exports.useVisibilityTransition = useVisibilityTransition;
}
function useVisibilityTransition({visible, entranceTiming, exitTiming}) { // fn#102756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13709:707, offset: 0x02247970, size: 332 bytes, params: 2, frame: 26
const env0_2 = exitTiming;
let binding = env0_3;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_2;
const value3 = binding2(value2, 2);
const property = value3[0];
const property2 = value3[1];
var env0_3 = property2;
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [visible]), 2);
if (value6[0] !== visible) {
value6[1](visible);
if (!visible) {
property2(true);
function useVisibilityTransition({visible, entranceTiming, exitTiming}) { // fn#102756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13709:707, offset: 0x02247970, size: 332 bytes, params: 2, frame: 26
const exitTiming2 = exitTiming;
let binding = property22;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
const binding2 = exitTiming2;
const value3 = binding2(value2, 2);
const property = value3[0];
const property2 = value3[1];
var property22 = property2;
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [visible]), 2);
if (value6[0] !== visible) {
value6[1](visible);
if (!visible) {
property2(true);
}
}
binding = property22;
let closure = _fun102757;
const value7 = binding.useCallback(closure, []);
const env0_4 = value7;
const r15 = visible ? 1 : 0;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = useVisibilityTransitionK;
const object2 = {};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.visibility = r15;
object2.visible = visible;
object2.entranceTiming = entranceTiming;
object2.exitTiming = exitTiming;
object2.runOnJS = ReanimatedRexportModule.runOnJS;
object2.animationCallbackJSThread = value7;
closure.__closure = object2;
closure.__workletHash = 12648900540770;
closure.__initData = env0_4;
return {opacityStyle: Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]),
shouldRender: visible || property};
function _fun102757() { // fn#102757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13709:912, offset: 0x01e44aa8, size: 18 bytes, params: 1, frame: 11
ReactModule(false);
}
function useVisibilityTransitionK() { // fn#102758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13709:986, owner: useVisibilityTransition.k, offset: 0x02247abc, size: 165 bytes, params: 1, frame: 24
const withTiming = TimingModule.withTiming;
const binding = env0_5;
const r3 = visible ? entranceTiming : exitTiming;
const kN2 = kN;
const object2 = {};
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.animationCallbackJSThread = env0_4;
kN2.__closure = object2;
kN2.__workletHash = 11904317879470;
kN2.__initData = env1_5;
return {opacity: Reflect.apply(withTiming, TimingModule, [binding, r3, 'respect-motion-settings', kN2])};
function kN() { // fn#102759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13709:1062, owner: useVisibilityTransition.k.n, offset: 0x02247b61, size: 48 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env1_4)();
}
}
}
binding = env0_3;
let closure = _fun102757;
const value7 = binding.useCallback(closure, []);
const env0_4 = value7;
const r15 = visible ? 1 : 0;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
closure = useVisibilityTransitionK;
const object = {};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.visibility = r15;
object.visible = visible;
object.entranceTiming = entranceTiming;
object.exitTiming = exitTiming;
object.runOnJS = reanimatedRexportModule.runOnJS;
object.animationCallbackJSThread = value7;
closure.__closure = object;
closure.__workletHash = 12648900540770;
closure.__initData = env0_4;
return {opacityStyle: Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]),
shouldRender: visible || property};
}
function useVisibilityTransitionK() { // fn#102758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13709:986, owner: useVisibilityTransition.k, offset: 0x02247abc, size: 165 bytes, params: 1, frame: 24
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const binding = env0_5;
const r3 = visible ? entranceTiming : exitTiming;
const closure = kN;
const object = {};
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.animationCallbackJSThread = env0_4;
closure.__closure = object;
closure.__workletHash = 11904317879470;
closure.__initData = env1_5;
return {opacity: Reflect.apply(withTiming, timingModule, [binding, r3, 'respect-motion-settings', closure])};
}
function kN() { // fn#102759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13709:1062, owner: useVisibilityTransition.k.n, offset: 0x02247b61, size: 48 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env1_4)();
}
global.__d(_fun102755, 13519, [57, 31, 4017, 4504,
2]) /* metro module 13519, dependencies: [57, 31, 4017, 4504, 2] */;
@@ -1,35 +1,55 @@
/* Metro module 13558; source: modules/quests/native/BountiesNuxPromoSheet.tsx; dependencies: [31, 27, 33, 4501, 697, 4080, 13557, 12765, 1244, 5581, 4578, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as BountiesPosterSpotIllustrationNativeModule from '../../../design/components/mana-assets/native/generated/BountiesPosterSpotIllustration.native.tsx'; /* Metro dependency 5581 */
import * as PromoSheetNativeModule from '../../../design/components/Sheet/native/PromoSheet.native.tsx'; /* Metro dependency 12765 */
function _fun102971(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13748:6, offset: 0x022521ce, size: 226 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{illustrationContainer: {paddingTop: PX_12}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesNuxPromoSheet.tsx');
const createStyles = CreateStylesModule.createStyles;
const PX_12 = (Native).space.PX_12;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [{illustrationContainer: {paddingTop: PX_12}}]);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesNuxPromoSheet.tsx');
exports.default = BountiesNuxPromoSheet;
function BountiesNuxPromoSheet() { // fn#102972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13748:308, offset: 0x022522b0, size: 356 bytes, params: 1, frame: 22
const styles = useStyles();
const value2 = ReactModule.useCallback(function() {
importDefault(dependencyMap[5]).hideActionSheet(require(dependencyMap[6]).PROMO_SHEET_KEY);
}, []);
const PromoSheet = (PromoSheetNativeModule).PromoSheet;
const object = {gradientColor: 'purple'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const DDpHZG = (require(1244) /* metro dependency 1244: indexNative */).t.DDpHZG;
object.title = Reflect.apply(string, intl, [DDpHZG]);
object.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['LY+igv']);
const BountiesPosterSpotIllustration = (BountiesPosterSpotIllustrationNativeModule).BountiesPosterSpotIllustration;
object.illustration = (
<View style={styles.illustrationContainer}>
<BountiesPosterSpotIllustration width={273} height={205} />
</View>
);
const Button = (ButtonNativeModule).Button;
object.actions = (
<Button
grow
size="lg"
variant="primary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
onPress={value2}
/>
);
return <PromoSheet {...object} />;
}
}
function BountiesNuxPromoSheet() { // fn#102972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13748:308, offset: 0x022522b0, size: 356 bytes, params: 1, frame: 22
const styles = useStyles();
const value2 = env0_3.useCallback(function() {
importDefault(dependencyMap[5]).hideActionSheet(require(dependencyMap[6]).PROMO_SHEET_KEY);
}, []);
const PromoSheet = (require(12765) /* metro dependency 12765: PromoSheetNative */).PromoSheet;
const object2 = {gradientColor: 'purple'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const DDpHZG = (require(1244) /* metro dependency 1244: indexNative */).t.DDpHZG;
object2.title = Reflect.apply(string, intl, [DDpHZG]);
object2.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['LY+igv']);
const BountiesPosterSpotIllustration = (require(5581) /* metro dependency 5581: BountiesPosterSpotIllustrationNative */).BountiesPosterSpotIllustration;
object2.illustration = <View style={styles.illustrationContainer}><BountiesPosterSpotIllustration width={273} height={205} /></View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
object2.actions = <Button grow size="lg" variant="primary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} onPress={value2} />;
return <PromoSheet {...object2} />;
}
global.__d(_fun102971, 13558, [31, 27, 33, 4501, 697, 4080, 13557, 12765, 1244, 5581, 4578,
2]) /* metro module 13558, dependencies: [31, 27, 33, 4501, 697, 4080, 13557, 12765, 1244, 5581, 4578, 2] */;
+285 -230
View File
@@ -1,248 +1,303 @@
/* Metro module 13560; source: modules/quests/native/BountyCard.tsx; dependencies: [57, 31, 27, 4502, 7092, 33, 4501, 697, 478, 566, 9495, 3860, 6239, 8011, 5475, 8707, 4573, 1244, 4578, 4073, 2] */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import BountyStore from '../BountyStore.tsx'; /* Metro dependency 7092 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../external/discord_common/js/shared/utils/PlatformUtils.tsx'; /* Metro dependency 478 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as CircleCheckIconModule from '../../../design/components/Icon/native/redesign/generated/CircleCheckIcon.tsx'; /* Metro dependency 4073 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as CardNativeModule from '../../../design/components/Card/native/Card.native.tsx'; /* Metro dependency 6239 */
function _fun103013(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:6, offset: 0x02253ab2, size: 370 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = 0;
const env0_3 = importDefault(dependencyMap[value]);
const value2 = importAll(31) /* metro dependency 31 */;
const value3 = require(27) /* metro dependency 27 */;
const env0_5 = value3.AppState;
const env0_6 = value3.StyleSheet;
const env0_7 = value3.View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const bountyStore = importDefault(7092) /* metro dependency 7092: BountyStore */;
const value4 = require(33) /* metro dependency 33 */;
const env0_10 = value4.jsx;
const env0_11 = value4.jsxs;
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun103014);
const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */;
const env0_13 = platformUtilsModule.isAndroid() ? 150 : value;
const env0_14 = platformUtilsModule.isAndroid();
const env0_15 = platformUtilsModule.isAndroid();
value = value2.memo(_fun103015);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountyCard.tsx');
const env0_12 = (CreateStylesModule).createStyles(_fun103014);
const env0_13 = PlatformUtilsModule.isAndroid() ? 150 : value;
const env0_14 = PlatformUtilsModule.isAndroid();
const env0_15 = PlatformUtilsModule.isAndroid();
value = ReactModule.memo(_fun103015);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountyCard.tsx');
exports.default = value;
exports.CARD_WIDTH = 188;
}
function _fun103014() { // fn#103014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:240, offset: 0x02253c24, size: 557 bytes, params: 1, frame: 17
const object = {};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.tile = {gap: PX_12};
object.card = {'width': 188, 'height': 313, 'overflow': 'hidden', 'padding': 0};
const object3 = {};
const value = copyDataProperties(object3, StyleSheet.absoluteFillObject, PX_12);
object.cardImage = object3;
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, value);
object.previewVideo = object4;
const object5 = {position: 'absolute'};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.top = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.left = PX_12;
const CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT;
object5.backgroundColor = CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.paddingHorizontal = PX_8;
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object5.paddingVertical = PX_4;
let CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT;
object5.color = CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT;
object.badge = object5;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object.badgeContent = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_4};
CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT;
object.badgeText = {textTransform: 'uppercase', color: CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT};
const object8 = {position: 'absolute'};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object8.bottom = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object8.left = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object8.right = PX_8;
object.startButton = object8;
object.cardFooter = {'flexDirection': 'column', 'alignItems': 'flex-start', 'maxWidth': 188};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object.advertiserRow = {'flexDirection': 'row', 'gap': null, 'alignItems': 'center', gap: PX_4};
object.advertiserName = {flexShrink: 1};
object.advertiserIcon = {'flexShrink': 0, 'opacity': 0.7};
return object;
}
function _fun103014() { // fn#103014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:240, offset: 0x02253c24, size: 557 bytes, params: 1, frame: 17
const object2 = {};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.tile = {gap: PX_12};
object2.card = {'width': 188, 'height': 313, 'overflow': 'hidden', 'padding': 0};
const object6 = {};
const value = copyDataProperties(object6, StyleSheet.absoluteFillObject, PX_12);
object2.cardImage = object6;
const object7 = {};
copyDataProperties(object7, StyleSheet.absoluteFillObject, value);
object2.previewVideo = object7;
const object9 = {position: 'absolute'};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object9.top = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object9.left = PX_12;
const CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT;
object9.backgroundColor = CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT;
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object9.paddingHorizontal = PX_8;
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object9.paddingVertical = PX_4;
let CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT;
object9.color = CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT;
object2.badge = object9;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.badgeContent = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_4};
CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT;
object2.badgeText = {textTransform: 'uppercase', color: CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT};
const object10 = {position: 'absolute'};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object10.bottom = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object10.left = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object10.right = PX_8;
object2.startButton = object10;
object2.cardFooter = {'flexDirection': 'column', 'alignItems': 'flex-start', 'maxWidth': 188};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.advertiserRow = {'flexDirection': 'row', 'gap': null, 'alignItems': 'center', gap: PX_4};
object2.advertiserName = {flexShrink: 1};
object2.advertiserIcon = {'flexShrink': 0, 'opacity': 0.7};
return object2;
}
function _fun103015({bounty, index, isActive, isModalVisible, onPress}) { // fn#103015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:1310, offset: 0x02253e51, size: 1995 bytes, params: 2, frame: 39
const env0_3 = onPress;
let env0_4 = undefined;
const styles = useStyles();
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([BountyStore], function() {
return BountyStore.isBountyCompleted(bounty.id);
});
let binding = env0_4;
const value4 = binding.useCallback(function() {
onPress(bounty, index);
}, [onPress, bounty, index]);
const videoPreview = bounty.videoPreview;
let r12 = bounty.imagePreview != null ? (require(9495) /* metro dependency 9495: AssetUtils */).getScaledImageUrl({'assetUrl': null,
'width': 188, 'height': 313, assetUrl: bounty.imagePreview}) : null;
r12 = r12 == null && videoPreview != null ? (require(9495) /* metro dependency 9495: AssetUtils */).getScaledFirstFrameImageUrl({'assetUrl': null,
'width': 188, 'height': 313, assetUrl: videoPreview}) : r12;
binding = env0_4;
let useState = binding.useState;
const value10 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_3;
const value11 = binding2(value10, 2);
const property = value11[0];
env0_4 = value11[1];
const value12 = binding.useCallback(_fun103018, []);
useState = binding.useState;
const value13 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value13[0];
const property3 = value13[1];
useState = binding.useState;
const value14 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property4 = value14[0];
const property5 = value14[1];
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const BOUNTY_TILE_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.BOUNTY_TILE_BORDER_RADIUS;
const value15 = Reflect.apply(useToken, useTokenModule, [BOUNTY_TILE_BORDER_RADIUS]);
const env0_8 = binding.useRef(null);
const value16 = binding.useCallback(_fun103020, []);
useState = binding.useState;
const value17 = binding2(Reflect.apply(useState, binding, [isActive]), 2);
if (isActive !== value17[0]) {
value17[1](isActive);
if (isActive) {
if (property2 && !property4) {
property3(false);
function _fun103015({bounty, index, isActive, isModalVisible, onPress}) { // fn#103015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:1310, offset: 0x02253e51, size: 1995 bytes, params: 2, frame: 39
const onPress2 = onPress;
let env0_4 = undefined;
const styles = useStyles();
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([BountyStore], function() {
return BountyStore.isBountyCompleted(bounty.id);
});
let binding = env0_4;
const value4 = binding.useCallback(function() {
onPress(bounty, index);
}, [onPress, bounty, index]);
const videoPreview = bounty.videoPreview;
let r12 = bounty.imagePreview != null ? (require(9495) /* metro dependency 9495: AssetUtils */).getScaledImageUrl({'assetUrl': null,
'width': 188, 'height': 313, assetUrl: bounty.imagePreview}) : null;
r12 = r12 == null && videoPreview != null ? (require(9495) /* metro dependency 9495: AssetUtils */).getScaledFirstFrameImageUrl({'assetUrl': null,
'width': 188, 'height': 313, assetUrl: videoPreview}) : r12;
binding = env0_4;
let useState = binding.useState;
const value10 = Reflect.apply(useState, binding, [false]);
const binding2 = onPress2;
const value11 = binding2(value10, 2);
const property = value11[0];
env0_4 = value11[1];
const value12 = binding.useCallback(_fun103018, []);
useState = binding.useState;
const value13 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value13[0];
const property3 = value13[1];
useState = binding.useState;
const value14 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property4 = value14[0];
const property5 = value14[1];
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const useToken = UseTokenModule.useToken;
const BOUNTY_TILE_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.BOUNTY_TILE_BORDER_RADIUS;
const value15 = Reflect.apply(useToken, UseTokenModule, [BOUNTY_TILE_BORDER_RADIUS]);
const env0_8 = binding.useRef(null);
const value16 = binding.useCallback(_fun103020, []);
useState = binding.useState;
const value17 = binding2(Reflect.apply(useState, binding, [isActive]), 2);
if (isActive !== value17[0]) {
value17[1](isActive);
if (isActive) {
if (property2 && !property4) {
property3(false);
}
if (property4) {
property5(false);
}
} else if (env0_14) {
property5(true);
}
if (property4) {
property5(false);
}
} else if (env0_14) {
property5(true);
}
}
binding = env0_4;
const env0_9 = binding.useRef(null);
binding.useEffect(_fun103022, [property4]);
binding.useEffect(_fun103025, [isActive]);
binding.useEffect(function() {
return _fun103027;
}, []);
useState = binding.useState;
const value20 = env0_3(Reflect.apply(useState, binding, [AppState.currentState === 'active']), 2);
const property8 = value20[0];
const env0_10 = value20[1];
binding.useEffect(function() {
var env0_0 = AppState.addEventListener('change', _fun103029);
return _fun103030;
}, []);
let r7 = (isActive || property4) && videoPreview != null && property;
let r5 = env0_15 && isModalVisible;
r5 = !r5 && !(property4 && !isActive) && r7 && property2;
const value25 = env0_4.useMemo(_fun103031, [r5]);
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
r7 = r7 && ((Component) => <Component accessible={false} importantForAccessibility="no-hide-descendants" accessibilityRole="none" onReadyForDisplay={value16} source={{uri: videoPreview}} style={styles.previewVideo} resizeMode="cover" repeat muted disableFocus paused={property8 ? useReducedMotion : !property8} />)(importDefault(8011) /* metro dependency 8011 */);
const items2 = [r7];
items2[1] = ((Component) => <Component style={[styles.cardImage,
value25]} onLoad={value12} source={{uri: r12 ?? undefined}} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const r9 = value3 && ((CheckmarkSmallBoldIcon) => <CheckmarkSmallBoldIcon size="xxs" color={(importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT} />)((require(8707) /* metro dependency 8707: CheckmarkSmallBoldIcon */).CheckmarkSmallBoldIcon);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
items2[2] = <View style={styles.badge}><View style={styles.badgeContent}>{r9}<Text variant="text-xs/bold" style={styles.badgeText}>{Reflect.apply(string,
intl, [value3 ? t.vlGTLf : t['fFIJ/9']])}</Text></View></View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items2[3] = <View style={styles.startButton}><Button variant="secondary-overlay" text={value3 ? Reflect.apply(string,
intl, [t['9UtZAY']]) : Reflect.apply(string, intl, [t.LhlgY9])} onPress={value4} /></View>;
const card = <Card style={styles.card} radius={value15} onPress={value4} android_ripple={{color: 'transparent'}}>{items2}</Card>;
const text = <Text variant="text-sm/medium" color="text-subtle" lineClamp={1} style={styles.advertiserName}>{bounty.advertiserName ?? ''}</Text>;
const CircleCheckIcon = (require(4073) /* metro dependency 4073: CircleCheckIcon */).CircleCheckIcon;
const ICON_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE;
return (
<View style={styles.tile}>
{card}
<View style={styles.cardFooter}>
<View style={styles.advertiserRow}>
{text}
<CircleCheckIcon
size="xxs"
style={styles.advertiserIcon}
color={ICON_SUBTLE}
/>
binding = env0_4;
const env0_9 = binding.useRef(null);
binding.useEffect(_fun103022, [property4]);
binding.useEffect(_fun103025, [isActive]);
binding.useEffect(function() {
return _fun103027;
}, []);
useState = binding.useState;
const value20 = onPress2(Reflect.apply(useState, binding, [AppState.currentState === 'active']), 2);
const property8 = value20[0];
const env0_10 = value20[1];
binding.useEffect(function() {
var env0_0 = AppState.addEventListener('change', _fun103029);
return _fun103030;
}, []);
let r7 = (isActive || property4) && videoPreview != null && property;
let r5 = env0_15 && isModalVisible;
r5 = !r5 && !(property4 && !isActive) && r7 && property2;
const value25 = env0_4.useMemo(_fun103031, [r5]);
const Card = (CardNativeModule).Card;
r7 = r7 && ((Component) => <Component accessible={false} importantForAccessibility="no-hide-descendants" accessibilityRole="none" onReadyForDisplay={value16} source={{uri: videoPreview}} style={styles.previewVideo} resizeMode="cover" repeat muted disableFocus paused={property8 ? useReducedMotion : !property8} />)(importDefault(8011) /* metro dependency 8011 */);
const items2 = [r7];
items2[1] = ((Component) => <Component style={[styles.cardImage,
value25]} onLoad={value12} source={{uri: r12 ?? undefined}} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const r9 = value3 && ((CheckmarkSmallBoldIcon) => <CheckmarkSmallBoldIcon size="xxs" color={(importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT} />)((require(8707) /* metro dependency 8707: CheckmarkSmallBoldIcon */).CheckmarkSmallBoldIcon);
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
items2[2] = (
<View style={styles.badge}>
<View style={styles.badgeContent}>
{r9}
<Text variant="text-xs/bold" style={styles.badgeText}>
{Reflect.apply(string, intl, [value3 ? t.vlGTLf : t['fFIJ/9']])}
</Text>
</View>
<Text variant="text-sm/medium" color="text-muted">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.o6FLcF)}
</Text>
</View>
</View>
);
}
);
const Button = (ButtonNativeModule).Button;
string = intl.string;
items2[3] = (
<View style={styles.startButton}>
<Button
variant="secondary-overlay"
text={value3 ? Reflect.apply(string, intl, [t['9UtZAY']]) : Reflect.apply(string, intl, [t.LhlgY9])}
onPress={value4}
/>
</View>
);
const card = (
<Card
style={styles.card}
radius={value15}
onPress={value4}
android_ripple={{color: 'transparent'}}
>
{items2}
</Card>
);
const text = (
<Text
variant="text-sm/medium"
color="text-subtle"
lineClamp={1}
style={styles.advertiserName}
>
{bounty.advertiserName ?? ''}
</Text>
);
const CircleCheckIcon = (CircleCheckIconModule).CircleCheckIcon;
const ICON_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE;
return (
<View style={styles.tile}>
{card}
<View style={styles.cardFooter}>
<View style={styles.advertiserRow}>
{text}
<CircleCheckIcon
size="xxs"
style={styles.advertiserIcon}
color={ICON_SUBTLE}
/>
</View>
<Text variant="text-sm/medium" color="text-muted">
{intl.string((IndexNativeModule).t.o6FLcF)}
</Text>
</View>
</View>
);
function _fun103018() { // fn#103018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:1766, offset: 0x0225463c, size: 18 bytes, params: 1, frame: 11
env0_4(true);
}
function _fun103020() { // fn#103020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2026, offset: 0x0225464e, size: 86 bytes, params: 1, frame: 14
if (env0_8.current != null) {
global.clearTimeout(env0_8.current);
}
env0_8.current = global.setTimeout(_fun103021, env1_13);
function _fun103021() { // fn#103021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2094, offset: 0x0202da0c, size: 18 bytes, params: 1, frame: 11
env1_5(true);
}
}
function _fun103022() { // fn#103022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2238, offset: 0x022546a4, size: 57 bytes, params: 1, frame: 15
if (ReactNativeModule.StyleSheet) {
env0_9.current = global.setTimeout(_fun103023, 150);
}
return _fun103024;
function _fun103023() { // fn#103023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2269, offset: 0x022546dd, size: 39 bytes, params: 1, frame: 12
env1_7(false);
env1_5(false);
env1_9.current = null;
}
function _fun103024() { // fn#103024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2309, offset: 0x02254704, size: 56 bytes, params: 1, frame: 13
if (env1_9.current != null) {
global.clearTimeout(env1_9.current);
env1_9.current = null;
}
}
}
function _fun103025() { // fn#103025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2393, offset: 0x0225473c, size: 129 bytes, params: 1, frame: 12
if (isActive && env0_9.current != null) {
global.clearTimeout(env0_9.current);
env0_9.current = null;
}
if (!(isActive || env0_8.current == null)) {
global.clearTimeout(env0_8.current);
env0_8.current = null;
}
}
function _fun103026() { // fn#103026, offset: 0x022547bd, size: 11 bytes, params: 1, frame: 1
return _fun103027;
function _fun103027() { // fn#103027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2544, offset: 0x022547c8, size: 56 bytes, params: 1, frame: 13
if (env1_8.current != null) {
global.clearTimeout(env1_8.current);
env1_8.current = null;
}
}
}
function _fun103028() { // fn#103028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2698, offset: 0x02254800, size: 45 bytes, params: 1, frame: 14
const env0_0 = AppState.addEventListener('change', _fun103029);
return _fun103030;
function _fun103029(a0) { // fn#103029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2738, offset: 0x0217e985, size: 27 bytes, params: 2, frame: 12
env1_10(a0 === 'active');
}
function _fun103030() { // fn#103030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2768, offset: 0x00cd0cb3, size: 21 bytes, params: 1, frame: 9
env0_0.remove();
}
}
function _fun103031() { // fn#103031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2859, offset: 0x0225482d, size: 23 bytes, params: 1, frame: 3
return {opacity: JsxRuntimeModule.jsxs ? 0 : 1};
}
function _fun103020() { // fn#103020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2026, offset: 0x0225464e, size: 86 bytes, params: 1, frame: 14
if (env0_8.current != null) {
global.clearTimeout(env0_8.current);
}
env0_8.current = global.setTimeout(_fun103021, env1_13);
}
function _fun103022() { // fn#103022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2238, offset: 0x022546a4, size: 57 bytes, params: 1, frame: 15
if (env0_6) {
env0_9.current = global.setTimeout(_fun103023, 150);
}
return _fun103024;
}
function _fun103025() { // fn#103025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2393, offset: 0x0225473c, size: 129 bytes, params: 1, frame: 12
if (isActive && env0_9.current != null) {
global.clearTimeout(env0_9.current);
env0_9.current = null;
}
if (!(isActive || env0_8.current == null)) {
global.clearTimeout(env0_8.current);
env0_8.current = null;
}
}
function _fun103026() { // fn#103026, offset: 0x022547bd, size: 11 bytes, params: 1, frame: 1
return _fun103027;
}
function _fun103028() { // fn#103028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2698, offset: 0x02254800, size: 45 bytes, params: 1, frame: 14
const env0_0 = AppState.addEventListener('change', _fun103029);
return _fun103030;
}
function _fun103031() { // fn#103031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2859, offset: 0x0225482d, size: 23 bytes, params: 1, frame: 3
return {opacity: env0_11 ? 0 : 1};
}
function _fun103023() { // fn#103023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2269, offset: 0x022546dd, size: 39 bytes, params: 1, frame: 12
env1_7(false);
env1_5(false);
env1_9.current = null;
}
function _fun103024() { // fn#103024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2309, offset: 0x02254704, size: 56 bytes, params: 1, frame: 13
if (env1_9.current != null) {
global.clearTimeout(env1_9.current);
env1_9.current = null;
}
}
function _fun103027() { // fn#103027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2544, offset: 0x022547c8, size: 56 bytes, params: 1, frame: 13
if (env1_8.current != null) {
global.clearTimeout(env1_8.current);
env1_8.current = null;
}
}
global.__d(_fun103013, 13560, [57, 31, 27, 4502, 7092, 33, 4501, 697, 478, 566, 9495, 3860, 6239, 8011, 5475, 8707,
4573, 1244, 4578, 4073,
2]) /* metro module 13560, dependencies: [57, 31, 27, 4502, 7092, 33, 4501, 697, 478, 566, 9495, 3860, 6239, 8011, 5475, 8707, 4573, 1244, 4578, 4073, 2] */;
@@ -1,16 +1,25 @@
/* Metro module 13634; source: modules/quests/native/PremiumRewardGradient.tsx; dependencies: [31, 27, 33, 4501, 4000, 697, 3860, 4048, 3967, 4589, 5302, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseTheme from '../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import LinearGradient from '../../../by-id/module-04589-LinearGradient.js'; /* Metro dependency 4589 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as SharedModule from '../../../external/discord_common/js/packages/design/shared.tsx'; /* Metro dependency 3967 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun104119(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13831:6, offset: 0x022864fa, size: 521 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.StyleSheet;
const env0_5 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({wrapper: {'position': 'relative',
const env0_8 = (CreateStylesModule).createStyles({wrapper: {'position': 'relative',
'overflow': 'hidden'}, fill: {'position': 'absolute', 'left': 0, 'right': 0, 'bottom': 0, 'height': '100%'},
glow: {'position': 'absolute', 'left': 0, 'right': 0, 'bottom': 0, 'height': '50%'}, glowLight: {opacity: 0.5}});
const env0_9 = {'x': 0, 'y': 0.5};
@@ -19,64 +28,63 @@ function _fun104119(global, require, importDefault, importAll, module, exports,
const env0_12 = {'x': 0.5, 'y': 1};
value = require(4000) /* metro dependency 4000: ColorUtils */;
value = value.hexOpacityToRgba('#000000', 0);
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
const BLACK = (Native).colors.BLACK;
const value3 = (require(4000) /* metro dependency 4000: ColorUtils */).hexOpacityToRgba('#FFFFFF', 0);
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const env0_13 = createStylesModule.createStyleProperties({transparentBlack: value, opaqueBlack: BLACK,
const WHITE = (Native).colors.WHITE;
const env0_13 = CreateStylesModule.createStyleProperties({transparentBlack: value, opaqueBlack: BLACK,
transparentWhite: value3, opaqueWhite: WHITE});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/PremiumRewardGradient.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/PremiumRewardGradient.tsx');
exports.default = _default_104125;
function useGradientColors() { // fn#104120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13831:672, offset: 0x02286703, size: 149 bytes, params: 1, frame: 20
let useToken = UseTokenModule.useToken;
const EXPRESSIVE_GRADIENT_NITRO_PINK_START = (Native).colors.EXPRESSIVE_GRADIENT_NITRO_PINK_START;
const value2 = Reflect.apply(useToken, UseTokenModule, [EXPRESSIVE_GRADIENT_NITRO_PINK_START]);
useToken = UseTokenModule.useToken;
const EXPRESSIVE_GRADIENT_NITRO_PINK_END = (Native).colors.EXPRESSIVE_GRADIENT_NITRO_PINK_END;
return ReactModule.useMemo(_fun104121, [value2, Reflect.apply(useToken, UseTokenModule,
[EXPRESSIVE_GRADIENT_NITRO_PINK_END])]);
function _fun104121() { // fn#104121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13831:865, offset: 0x02286798, size: 25 bytes, params: 1, frame: 3
return [env0_0, env0_1];
}
}
function PremiumRewardFillGradient({children, style}) { // fn#104122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13831:883, offset: 0x022867b1, size: 364 bytes, params: 2, frame: 26
const styles = useStyles();
const value2 = useGradientColors();
const {transparentBlack, opaqueBlack, transparentWhite, opaqueWhite} = env0_13();
return (
<View style={[styles.wrapper, style]}>
{((Component) => <Component style={styles.fill} colors={value2} start={env0_9} end={env0_10} pointerEvents="none" />)(LinearGradient)}
{((Component) => <Component style={styles.fill} colors={opaqueWhite.useMemo(_fun104123, [transparentBlack,
opaqueBlack, transparentWhite, opaqueWhite,
(SharedModule).isThemeDark((UseTheme)())])} start={env0_11} end={env0_12} pointerEvents="none" />)(LinearGradient)}
{children}
</View>
);
function _fun104123() { // fn#104123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13831:1102, offset: 0x0228691d, size: 57 bytes, params: 1, frame: 4
return env0_4 ? [transparentBlack, opaqueBlack] : [transparentWhite, opaqueWhite];
}
}
function PremiumRewardGlowGradient({children, style}) { // fn#104124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13831:1321, offset: 0x02286956, size: 339 bytes, params: 2, frame: 26
const styles = useStyles();
return (
<View style={[styles.wrapper, style]}>
{((Component) => <Component style={[styles.glow,
!(require(3967) /* metro dependency 3967: shared */).isThemeDark((importDefault(4048) /* metro dependency 4048: useTheme */)()) && styles.glowLight]} maskElement={((Component) => <Component style={StyleSheet.absoluteFill} colors={['transparent',
'black']} start={env0_11} end={env0_12} />)(importDefault(4589) /* metro dependency 4589 */)}>{((Component) => <Component style={StyleSheet.absoluteFill} colors={useGradientColors()} start={env0_9} end={env0_10} />)(importDefault(4589) /* metro dependency 4589 */)}</Component>)(importDefault(5302) /* metro dependency 5302 */)}
{children}
</View>
);
}
function _default_104125({visible, style, children, glow}) { // fn#104125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13831:1709, offset: 0x02286aa9, size: 77 bytes, params: 2, frame: 16
return ((Component) => <Component style={style}>{children}</Component>)(visible ? glow ? PremiumRewardGlowGradient : PremiumRewardFillGradient : View);
}
}
function useGradientColors() { // fn#104120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13831:672, offset: 0x02286703, size: 149 bytes, params: 1, frame: 20
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const EXPRESSIVE_GRADIENT_NITRO_PINK_START = (importDefault(697) /* metro dependency 697: native */).colors.EXPRESSIVE_GRADIENT_NITRO_PINK_START;
const value2 = Reflect.apply(useToken, useTokenModule, [EXPRESSIVE_GRADIENT_NITRO_PINK_START]);
const moduleValue2 = useTokenModule;
useToken = moduleValue2.useToken;
const EXPRESSIVE_GRADIENT_NITRO_PINK_END = (importDefault(697) /* metro dependency 697: native */).colors.EXPRESSIVE_GRADIENT_NITRO_PINK_END;
return env0_3.useMemo(_fun104121, [value2, Reflect.apply(useToken, moduleValue2,
[EXPRESSIVE_GRADIENT_NITRO_PINK_END])]);
}
function PremiumRewardFillGradient({children, style}) { // fn#104122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13831:883, offset: 0x022867b1, size: 364 bytes, params: 2, frame: 26
const styles = useStyles();
const value2 = useGradientColors();
const {transparentBlack, opaqueBlack, transparentWhite, opaqueWhite} = env0_13();
return (
<View style={[styles.wrapper, style]}>
{((Component) => <Component style={styles.fill} colors={value2} start={env0_9} end={env0_10} pointerEvents="none" />)(importDefault(4589) /* metro dependency 4589 */)}
{((Component) => <Component style={styles.fill} colors={opaqueWhite.useMemo(_fun104123, [transparentBlack,
opaqueBlack, transparentWhite, opaqueWhite,
(require(3967) /* metro dependency 3967: shared */).isThemeDark((importDefault(4048) /* metro dependency 4048: useTheme */)())])} start={env0_11} end={env0_12} pointerEvents="none" />)(importDefault(4589) /* metro dependency 4589 */)}
{children}
</View>
);
}
function PremiumRewardGlowGradient({children, style}) { // fn#104124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13831:1321, offset: 0x02286956, size: 339 bytes, params: 2, frame: 26
const styles = useStyles();
return (
<View style={[styles.wrapper, style]}>
{((Component) => <Component style={[styles.glow,
!(require(3967) /* metro dependency 3967: shared */).isThemeDark((importDefault(4048) /* metro dependency 4048: useTheme */)()) && styles.glowLight]} maskElement={((Component) => <Component style={StyleSheet.absoluteFill} colors={['transparent',
'black']} start={env0_11} end={env0_12} />)(importDefault(4589) /* metro dependency 4589 */)}>{((Component) => <Component style={StyleSheet.absoluteFill} colors={useGradientColors()} start={env0_9} end={env0_10} />)(importDefault(4589) /* metro dependency 4589 */)}</Component>)(importDefault(5302) /* metro dependency 5302 */)}
{children}
</View>
);
}
function _default_104125({visible, style, children, glow}) { // fn#104125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13831:1709, offset: 0x02286aa9, size: 77 bytes, params: 2, frame: 16
return ((Component) => <Component style={style}>{children}</Component>)(visible ? glow ? PremiumRewardGlowGradient : PremiumRewardFillGradient : View);
}
function _fun104121() { // fn#104121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13831:865, offset: 0x02286798, size: 25 bytes, params: 1, frame: 3
return [env0_0, env0_1];
}
function _fun104123() { // fn#104123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13831:1102, offset: 0x0228691d, size: 57 bytes, params: 1, frame: 4
return env0_4 ? [transparentBlack, opaqueBlack] : [transparentWhite, opaqueWhite];
}
global.__d(_fun104119, 13634, [31, 27, 33, 4501, 4000, 697, 3860, 4048, 3967, 4589, 5302,
2]) /* metro module 13634, dependencies: [31, 27, 33, 4501, 4000, 697, 3860, 4048, 3967, 4589, 5302, 2] */;
@@ -1,283 +1,348 @@
/* Metro module 15386; source: modules/quests/native/QuestActivityUnenrolledModal.tsx; dependencies: [5, 57, 31, 27, 7093, 15385, 6528, 33, 4501, 697, 478, 4048, 3866, 566, 6777, 7116, 9483, 9950, 6531, 1423, 9484, 7120, 5080, 3874, 4572, 5475, 9542, 4573, 1244, 4578, 7974, 5277, 8160, 10183, 10121, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import QuestStore from '../QuestStore.tsx'; /* Metro dependency 7093 */
import Module08160 from '../../../by-id/module-08160.js'; /* Metro dependency 8160 */
import UnenrolledActivityQuestStore from '../UnenrolledActivityQuestStore.tsx'; /* Metro dependency 15385 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as PlatformUtilsModule from '../../../external/discord_common/js/shared/utils/PlatformUtils.tsx'; /* Metro dependency 478 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ThemesModule from '../../../design/utils/shared/themes.tsx'; /* Metro dependency 3866 */
import * as UseA11yRolesNativeModule from '../../../external/discord_common/js/packages/design/hooks/useA11yRolesNative.tsx'; /* Metro dependency 3874 */
import * as UseThemeModule from '../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as StackNativeModule from '../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as HeaderActionButtonNativeModule from '../../../design/components/Navigator/native/HeaderActionButton.native.tsx'; /* Metro dependency 5277 */
import * as QuestConstantsModule from '../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestTypesModule from '../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as UseGetOrFetchApplicationsModule from '../../applications/useGetOrFetchApplications.tsx'; /* Metro dependency 6777 */
import * as QuestTaskUtilsModule from '../utils/QuestTaskUtils.tsx'; /* Metro dependency 7116 */
import * as FormCheckboxNativeModule from '../../../design/components/Forms/native/FormCheckbox.native.tsx'; /* Metro dependency 7974 */
import * as QuestHooksModule from '../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as QuestActionCreatorsModule from '../QuestActionCreators.tsx'; /* Metro dependency 9484 */
import * as QuestCopyHooksModule from '../hooks/QuestCopyHooks.tsx'; /* Metro dependency 9950 */
import * as ModalNativeModule from '../../../design/components/Modal/native/Modal.native.tsx'; /* Metro dependency 10121 */
import * as QuestContentImpressionTrackerNativeModule from './QuestContentImpressionTracker.native.tsx'; /* Metro dependency 10183 */
function _fun117629(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:6, offset: 0x024bb1c2, size: 339 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_6 = value.Pressable;
const env0_7 = value.View;
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
const unenrolledActivityQuestStore = importDefault(15385) /* metro dependency 15385: UnenrolledActivityQuestStore */;
const env0_10 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
value = require(33) /* metro dependency 33 */;
const env0_11 = value.jsx;
const env0_12 = value.jsxs;
object = {MAIN: 'main'};
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun117639);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestActivityUnenrolledModal.tsx');
const env0_14 = (CreateStylesModule).createStyles(_fun117639);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestActivityUnenrolledModal.tsx');
exports.default = QuestActivityUnenrolledModal;
}
function QuestActivityUnenrolledModalInner({quest}) { // fn#117630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:1751, offset: 0x024bb315, size: 1610 bytes, params: 2, frame: 41
var object2;
const value2 = (require(4048) /* metro dependency 4048: useTheme */).useTheme();
const themesModule = require(3866) /* metro dependency 3866: themes */;
const styles = useStyles(themesModule.isThemeDark(value2));
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const [property, env0_2] = env0_4(env0_5.useState(Reflect.apply(useStateFromStores, fluxModule,
[[UnenrolledActivityQuestStore], function() {
return UnenrolledActivityQuestStore.getState().autoEnroll;
}])), 2);
const useGetOrFetchApplicationsModule = require(6777) /* metro dependency 6777: useGetOrFetchApplications */;
const useGetOrFetchApplication = useGetOrFetchApplicationsModule.useGetOrFetchApplication;
const questTaskUtilsModule = require(7116) /* metro dependency 7116: QuestTaskUtils */;
const getActivityApplicationId = questTaskUtilsModule.getActivityApplicationId;
const value5 = Reflect.apply(useGetOrFetchApplication, useGetOrFetchApplicationsModule,
[Reflect.apply(getActivityApplicationId, questTaskUtilsModule, [quest])]);
const env0_3 = value5;
const value6 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
const questCopyHooksModule = require(9950) /* metro dependency 9950: QuestCopyHooks */;
const useQuestsInstructionsToWinReward = questCopyHooksModule.useQuestsInstructionsToWinReward;
object2 = {quest: quest, taskDetails: value6};
let QUEST_ACTIVITY_UNENROLLED_MODAL = QuestsExperimentLocations.QUEST_ACTIVITY_UNENROLLED_MODAL;
object2.location = QUEST_ACTIVITY_UNENROLLED_MODAL;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
QUEST_ACTIVITY_UNENROLLED_MODAL = QuestContent.QUEST_ACTIVITY_UNENROLLED_MODAL;
object2.sourceQuestContent = QUEST_ACTIVITY_UNENROLLED_MODAL;
const value7 = Reflect.apply(useQuestsInstructionsToWinReward, questCopyHooksModule, [object2]);
const value8 = env0_5.useMemo(_fun117632, [value5]);
const value10 = env0_5.useCallback(env0_3(_fun117634), [quest.id]);
const {accessibilityRole,
accessibilityState} = (require(3874) /* metro dependency 3874: useA11yRolesNative */).useCheckboxA11yNative({checked: property});
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const view = <View style={styles.baseShadow}><View style={styles.imagesContainer}>{value8 != null && <View style={styles.appIconContainer}>{((Component) => <Component source={{uri: value8}} style={styles.appIcon} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</View>}<View style={styles.rewardTileContainer}>{((Component) => <Component quest={quest} height={87} width={87} style={styles.questRewardTile} />)(importDefault(9542) /* metro dependency 9542: QuestRewardTile */)}</View></View></View>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const IrNgN4 = (require(1244) /* metro dependency 1244: indexNative */).t.IrNgN4;
const text = <Text variant="heading-xl/bold" color="mobile-text-heading-primary" style={{textAlign: 'center'}}>{Reflect.apply(string,
intl, [IrNgN4])}</Text>;
const format = intl.format;
const V3NSJx = (require(1244) /* metro dependency 1244: indexNative */).t.V3NSJx;
const view2 = <View style={styles.content}>{view}<View style={styles.textContainer}>{text}<Text variant="text-sm/normal" color="text-subtle" style={{textAlign: 'center'}}>{Reflect.apply(format,
intl, [V3NSJx, {questName: quest.config.messages.questName}])}{'\xa0'}{value7}</Text></View></View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const view3 = <View style={styles.buttonsContainer}><Button size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.l7E81v)} onPress={value10} /><Button size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fyT2ol)} onPress={onPress_117635} variant="secondary" /></View>;
const pressableProps = {accessibilityRole: accessibilityRole,
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['931n1T']),
accessibilityState: accessibilityState, onPress: onPress_117636, style: {'alignSelf': 'center',
'flexDirection': 'row', 'alignItems': 'center', 'gap': 8}};
const FormCheckbox = (require(7974) /* metro dependency 7974: FormCheckboxNative */).FormCheckbox;
return (
<Stack
direction="vertical"
align="center"
justify="center"
style={styles.container}
>
{view2}
<View style={styles.footer}>
{view3}
<Pressable {...pressableProps}>
<FormCheckbox checked={property} />
<Text variant="text-sm/normal" color="text-subtle">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['931n1T'])}
</Text>
</Pressable>
</View>
</Stack>
);
}
function CloseButton_117637() { // fn#117637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:4284, offset: 0x024bbb21, size: 129 bytes, params: 1, frame: 18
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const headerActionButtonProps = {source: importDefault(8160) /* metro dependency 8160 */, onPress: onPress_117638};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq);
return <HeaderActionButton {...headerActionButtonProps} />;
}
function _fun117639(a0) { // fn#117639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:311, offset: 0x024bbbc7, size: 783 bytes, params: 2, frame: 22
var r12;
var items;
var r3;
var object3;
const object5 = {};
const object6 = {flex: 1};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object6.paddingHorizontal = PX_24;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingVertical = PX_16;
const PX_48 = (importDefault(697) /* metro dependency 697: native */).space.PX_48;
object6.paddingBottom = PX_48;
object5.container = object6;
object5.content = {marginTop: 'auto'};
const object7 = {'flexDirection': 'row', 'justifyContent': 'center', 'alignItems': 'center'};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object7.marginBottom = PX_32;
const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */;
if (platformUtilsModule.isIOS()) {
r3 = a0 ? {'shadowColor': 'rgb(144, 144, 251)', 'shadowOffset': null, 'shadowOpacity': 0.6, 'shadowRadius': 85,
shadowOffset: {'width': 0, 'height': 0}} : {};
} else {
if (a0) {
object3 = {'standardDeviation': '85px', 'color': 'rgba(144, 144, 250, 0.41)', 'offsetX': 0, 'offsetY': 0};
items = [{dropShadow: {'standardDeviation': '85px', 'color': 'rgba(144, 144, 251, 0.65)', 'offsetX': 0,
'offsetY': 0}}, {dropShadow: object3}];
r12 = object3;
} else {
items = [];
}
r3 = {filter: items};
}
copyDataProperties(object7, r3, r12);
object5.imagesContainer = object7;
const isIOS2 = platformUtilsModule.isIOS();
const object9 = {};
if (isIOS2) {
copyDataProperties(object9, a0 ? {'shadowColor': 'rgb(144, 144, 250)', 'shadowOffset': null,
'shadowOpacity': 0.4,
'shadowRadius': 85, shadowOffset: {'width': 0, 'height': 16}} : {}, r12);
}
object5.baseShadow = object9;
const object10 = {'borderRadius': null, 'borderWidth': 2.18, 'borderColor': 'rgba(151, 151, 159, 0.24)',
'borderStyle': 'solid', 'transform': null, 'overflow': 'hidden'};
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object10.transform = [{rotate: '-12.41deg'}];
object5.appIconContainer = object10;
const object12 = {'width': 87, 'height': 87};
object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl - 2.18;
object5.appIcon = object12;
const object13 = {'borderWidth': 2.18, 'borderColor': 'rgba(151, 151, 159, 0.24)', 'borderRadius': null,
'borderStyle': 'solid', 'transform': null, 'overflow': 'hidden'};
object13.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object13.transform = [{translateX: -10}, {rotate: '7.81deg'}];
object5.rewardTileContainer = object13;
const object15 = {};
object15.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl - 2.18;
object5.questRewardTile = object15;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.textContainer = {alignItems: 'center', gap: PX_8};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.buttonsContainer = {'flexDirection': 'column', 'gap': null, 'marginBottom': 20, gap: PX_8};
object5.footer = {'flexDirection': 'column', 'width': '100%', 'marginTop': 'auto'};
return object5;
}
function QuestActivityUnenrolledModal({questId}) { // fn#117640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:4548, offset: 0x024bbed6, size: 202 bytes, params: 2, frame: 18
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [QuestStore];
if (Reflect.apply(useStateFromStores, fluxModule, [object, function() {
return QuestStore.getQuest(questId);
}]) == null) {
return null;
}
object = {};
const binding = env0_13;
let MAIN = binding.MAIN;
object[MAIN] = {headerLeft: CloseButton_117637, headerRight: function() {
return null;
}, headerTitle: headerTitle_117643, render: render_117644};
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
MAIN = binding.MAIN;
return <Modal screens={object} initialRouteName={MAIN} />;
}
function _fun117632() { // fn#117632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:2270, offset: 0x024bb978, size: 85 bytes, params: 1, frame: 14
var r0;
var value3;
var defaultImport;
var getApplicationIconURL;
var binding;
const value2 = null;
if (value2 == env0_3) {
r0 = value2;
} else {
value3 = environment.__proto__;
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getApplicationIconURL = defaultImport.getApplicationIconURL;
binding = env0_3;
r0 = Reflect.apply(getApplicationIconURL, defaultImport, [{id: binding.id, icon: binding.icon, size: 87}]);
}
return r0;
}
function* _fun117634() { // fn#117634, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:2374, offset: 0x024bb9d8, size: 194 bytes, params: 1, frame: 20
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var binding2 = env2_2;
var value3 = binding(binding2[20]);
var enrollInQuest = value3.enrollInQuest;
var id = require.id;
var object2 = {};
var QuestContent = binding(binding2[18]).QuestContent;
var QUEST_ACTIVITY_UNENROLLED_MODAL = QuestContent.QUEST_ACTIVITY_UNENROLLED_MODAL;
object2.questContent = QUEST_ACTIVITY_UNENROLLED_MODAL;
var QuestContentCTA = binding(binding2[21]).QuestContentCTA;
var START_QUEST = QuestContentCTA.START_QUEST;
object2.questContentCTA = START_QUEST;
QuestContent = binding(binding2[18]).QuestContent;
function QuestActivityUnenrolledModalInner({quest}) { // fn#117630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:1751, offset: 0x024bb315, size: 1610 bytes, params: 2, frame: 41
const value2 = (UseThemeModule).useTheme();
const styles = useStyles(ThemesModule.isThemeDark(value2));
const useStateFromStores = FluxModule.useStateFromStores;
const [property, env0_2] = Module00057(ReactModule.useState(Reflect.apply(useStateFromStores, FluxModule,
[[UnenrolledActivityQuestStore], function() {
return UnenrolledActivityQuestStore.getState().autoEnroll;
}])), 2);
const useGetOrFetchApplication = UseGetOrFetchApplicationsModule.useGetOrFetchApplication;
const getActivityApplicationId = QuestTaskUtilsModule.getActivityApplicationId;
const value5 = Reflect.apply(useGetOrFetchApplication, UseGetOrFetchApplicationsModule,
[Reflect.apply(getActivityApplicationId, QuestTaskUtilsModule, [quest])]);
const env0_3 = value5;
const value6 = (QuestHooksModule).useQuestTaskDetails(quest);
const useQuestsInstructionsToWinReward = QuestCopyHooksModule.useQuestsInstructionsToWinReward;
object = {quest: quest, taskDetails: value6};
let QUEST_ACTIVITY_UNENROLLED_MODAL = QuestsExperimentLocations.QUEST_ACTIVITY_UNENROLLED_MODAL;
object.location = QUEST_ACTIVITY_UNENROLLED_MODAL;
const QuestContent = (QuestTypesModule).QuestContent;
QUEST_ACTIVITY_UNENROLLED_MODAL = QuestContent.QUEST_ACTIVITY_UNENROLLED_MODAL;
object2.sourceQuestContent = QUEST_ACTIVITY_UNENROLLED_MODAL;
yield Reflect.apply(enrollInQuest, value3, [id, object2]);
if (false) {
return undefined;
object.sourceQuestContent = QUEST_ACTIVITY_UNENROLLED_MODAL;
const value7 = Reflect.apply(useQuestsInstructionsToWinReward, QuestCopyHooksModule, [object]);
const value8 = ReactModule.useMemo(_fun117632, [value5]);
const value10 = ReactModule.useCallback(env0_3(_fun117634), [quest.id]);
const {accessibilityRole,
accessibilityState} = (UseA11yRolesNativeModule).useCheckboxA11yNative({checked: property});
const Stack = (StackNativeModule).Stack;
const view = (
<View style={styles.baseShadow}>
<View style={styles.imagesContainer}>
{value8 != null && <View style={styles.appIconContainer}>{((Component) => <Component source={{uri: value8}} style={styles.appIcon} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</View>}
<View style={styles.rewardTileContainer}>
{((Component) => <Component quest={quest} height={87} width={87} style={styles.questRewardTile} />)(importDefault(9542) /* metro dependency 9542: QuestRewardTile */)}
</View>
</View>
</View>
);
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const IrNgN4 = (IndexNativeModule).t.IrNgN4;
const text = (
<Text
variant="heading-xl/bold"
color="mobile-text-heading-primary"
style={{textAlign: 'center'}}
>
{Reflect.apply(string, intl, [IrNgN4])}
</Text>
);
const format = intl.format;
const V3NSJx = (IndexNativeModule).t.V3NSJx;
const view2 = (
<View style={styles.content}>
{view}
<View style={styles.textContainer}>
{text}
<Text
variant="text-sm/normal"
color="text-subtle"
style={{textAlign: 'center'}}
>
{Reflect.apply(format, intl, [V3NSJx, {questName: quest.config.messages.questName}])}
{'\xa0'}
{value7}
</Text>
</View>
</View>
);
const Button = (ButtonNativeModule).Button;
const view3 = (
<View style={styles.buttonsContainer}>
<Button
size="lg"
text={intl.string((IndexNativeModule).t.l7E81v)}
onPress={value10}
/>
<Button
size="lg"
text={intl.string((IndexNativeModule).t.fyT2ol)}
onPress={onPress_117635}
variant="secondary"
/>
</View>
);
const pressableProps = {accessibilityRole: accessibilityRole,
accessibilityLabel: intl.string((IndexNativeModule).t['931n1T']),
accessibilityState: accessibilityState, onPress: onPress_117636, style: {'alignSelf': 'center',
'flexDirection': 'row', 'alignItems': 'center', 'gap': 8}};
const FormCheckbox = (FormCheckboxNativeModule).FormCheckbox;
return (
<Stack
direction="vertical"
align="center"
justify="center"
style={styles.container}
>
{view2}
<View style={styles.footer}>
{view3}
<Pressable {...pressableProps}>
<FormCheckbox checked={property} />
<Text variant="text-sm/normal" color="text-subtle">
{intl.string((IndexNativeModule).t['931n1T'])}
</Text>
</Pressable>
</View>
</Stack>
);
function _fun117632() { // fn#117632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:2270, offset: 0x024bb978, size: 85 bytes, params: 1, frame: 14
var r0;
var value3;
var defaultImport;
var getApplicationIconURL;
var binding;
const value2 = null;
if (value2 == env0_3) {
r0 = value2;
} else {
value3 = environment.__proto__;
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getApplicationIconURL = defaultImport.getApplicationIconURL;
binding = env0_3;
r0 = Reflect.apply(getApplicationIconURL, defaultImport, [{id: binding.id, icon: binding.icon, size: 87}]);
}
return r0;
}
env2_1(env2_2[22]).pop();
function* _fun117634() { // fn#117634, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:2374, offset: 0x024bb9d8, size: 194 bytes, params: 1, frame: 20
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var binding2 = env2_2;
var value3 = binding(binding2[20]);
var enrollInQuest = value3.enrollInQuest;
var id = require.id;
var object = {};
var QuestContent = binding(binding2[18]).QuestContent;
var QUEST_ACTIVITY_UNENROLLED_MODAL = QuestContent.QUEST_ACTIVITY_UNENROLLED_MODAL;
object.questContent = QUEST_ACTIVITY_UNENROLLED_MODAL;
var QuestContentCTA = binding(binding2[21]).QuestContentCTA;
var START_QUEST = QuestContentCTA.START_QUEST;
object.questContentCTA = START_QUEST;
QuestContent = binding(binding2[18]).QuestContent;
QUEST_ACTIVITY_UNENROLLED_MODAL = QuestContent.QUEST_ACTIVITY_UNENROLLED_MODAL;
object.sourceQuestContent = QUEST_ACTIVITY_UNENROLLED_MODAL;
yield Reflect.apply(enrollInQuest, value3, [id, object]);
if (false) {
return undefined;
}
env2_1(env2_2[22]).pop();
}
}
function QuestActivityUnenrolledModalInnerOnPress() { // fn#117635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:3778, owner: QuestActivityUnenrolledModalInner.onPress, offset: 0x024bba9a, size: 76 bytes, params: 1, frame: 14
const value = environment.__proto__;
QuestActionCreatorsModule.dismissQuestActivityModal(quest.id);
(ModalActionCreators).pop();
}
function QuestActivityUnenrolledModalInnerOnPress_117636() { // fn#117636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:3981, owner: QuestActivityUnenrolledModalInner.onPress, offset: 0x024bbae6, size: 59 bytes, params: 1, frame: 13
const binding = env0_2;
const value = !env0_1;
binding(value);
(QuestActionCreatorsModule).setAutoEnroll(value);
}
}
function CloseButton_117637() { // fn#117637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:4284, offset: 0x024bbb21, size: 129 bytes, params: 1, frame: 18
const HeaderActionButton = (HeaderActionButtonNativeModule).HeaderActionButton;
const headerActionButtonProps = {source: Module08160, onPress: onPress_117638};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq);
return <HeaderActionButton {...headerActionButtonProps} />;
function CloseButton_117637OnPress() { // fn#117638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:4369, owner: CloseButton_117637.onPress, offset: 0x024bbba2, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (ModalActionCreators).pop();
}
}
function _fun117639(a0) { // fn#117639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:311, offset: 0x024bbbc7, size: 783 bytes, params: 2, frame: 22
var r12;
var items2;
var r3;
var object;
const object2 = {};
const object4 = {flex: 1};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.paddingHorizontal = PX_24;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingVertical = PX_16;
const PX_48 = (importDefault(697) /* metro dependency 697: native */).space.PX_48;
object4.paddingBottom = PX_48;
object2.container = object4;
object2.content = {marginTop: 'auto'};
const object8 = {'flexDirection': 'row', 'justifyContent': 'center', 'alignItems': 'center'};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object8.marginBottom = PX_32;
if (PlatformUtilsModule.isIOS()) {
r3 = a0 ? {'shadowColor': 'rgb(144, 144, 251)', 'shadowOffset': null, 'shadowOpacity': 0.6, 'shadowRadius': 85,
shadowOffset: {'width': 0, 'height': 0}} : {};
} else {
if (a0) {
object = {'standardDeviation': '85px', 'color': 'rgba(144, 144, 250, 0.41)', 'offsetX': 0, 'offsetY': 0};
items2 = [{dropShadow: {'standardDeviation': '85px', 'color': 'rgba(144, 144, 251, 0.65)', 'offsetX': 0,
'offsetY': 0}}, {dropShadow: object}];
r12 = object;
} else {
items2 = [];
}
r3 = {filter: items2};
}
copyDataProperties(object8, r3, r12);
object2.imagesContainer = object8;
const isIOS2 = PlatformUtilsModule.isIOS();
const object11 = {};
if (isIOS2) {
copyDataProperties(object11, a0 ? {'shadowColor': 'rgb(144, 144, 250)', 'shadowOffset': null,
'shadowOpacity': 0.4,
'shadowRadius': 85, shadowOffset: {'width': 0, 'height': 16}} : {}, r12);
}
object2.baseShadow = object11;
const object14 = {'borderRadius': null, 'borderWidth': 2.18, 'borderColor': 'rgba(151, 151, 159, 0.24)',
'borderStyle': 'solid', 'transform': null, 'overflow': 'hidden'};
object14.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object14.transform = [{rotate: '-12.41deg'}];
object2.appIconContainer = object14;
const object16 = {'width': 87, 'height': 87};
object16.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl - 2.18;
object2.appIcon = object16;
const object17 = {'borderWidth': 2.18, 'borderColor': 'rgba(151, 151, 159, 0.24)', 'borderRadius': null,
'borderStyle': 'solid', 'transform': null, 'overflow': 'hidden'};
object17.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object17.transform = [{translateX: -10}, {rotate: '7.81deg'}];
object2.rewardTileContainer = object17;
const object18 = {};
object18.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl - 2.18;
object2.questRewardTile = object18;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.textContainer = {alignItems: 'center', gap: PX_8};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.buttonsContainer = {'flexDirection': 'column', 'gap': null, 'marginBottom': 20, gap: PX_8};
object2.footer = {'flexDirection': 'column', 'width': '100%', 'marginTop': 'auto'};
return object2;
}
function QuestActivityUnenrolledModal({questId}) { // fn#117640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:4548, offset: 0x024bbed6, size: 202 bytes, params: 2, frame: 18
const useStateFromStores = FluxModule.useStateFromStores;
let object = [QuestStore];
if (Reflect.apply(useStateFromStores, FluxModule, [object, function() {
return QuestStore.getQuest(questId);
}]) == null) {
return null;
}
object = {};
const binding = env0_13;
let MAIN = binding.MAIN;
object[MAIN] = {headerLeft: CloseButton_117637, headerRight: function() {
return null;
}, headerTitle: headerTitle_117643, render: render_117644};
const Modal = (ModalNativeModule).Modal;
MAIN = binding.MAIN;
return <Modal screens={object} initialRouteName={MAIN} />;
function QuestActivityUnenrolledModalHeaderTitle() { // fn#117643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:4754, owner: QuestActivityUnenrolledModal.headerTitle, offset: 0x024bbfbb, size: 107 bytes, params: 1, frame: 18
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<Text variant="redesign/heading-18/bold" color="mobile-text-heading-primary">
{intl.string((IndexNativeModule).t.l7E81v)}
</Text>
);
}
function QuestActivityUnenrolledModalRender() { // fn#117644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:4904, owner: QuestActivityUnenrolledModal.render, offset: 0x024bc026, size: 125 bytes, params: 1, frame: 17
const QuestContentImpressionTrackerNative = (QuestContentImpressionTrackerNativeModule).QuestContentImpressionTrackerNative;
const questContentImpressionTrackerNativeProps = {questOrQuests: quest};
const QuestContent = (QuestTypesModule).QuestContent;
let QUEST_ACTIVITY_UNENROLLED_MODAL = QuestContent.QUEST_ACTIVITY_UNENROLLED_MODAL;
questContentImpressionTrackerNativeProps.questContent = QUEST_ACTIVITY_UNENROLLED_MODAL;
QUEST_ACTIVITY_UNENROLLED_MODAL = QuestContent.QUEST_ACTIVITY_UNENROLLED_MODAL;
questContentImpressionTrackerNativeProps.sourceQuestContent = QUEST_ACTIVITY_UNENROLLED_MODAL;
return (
<QuestContentImpressionTrackerNative {...questContentImpressionTrackerNativeProps}>
{children_117645}
</QuestContentImpressionTrackerNative>
);
function renderChildren() { // fn#117645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:5121, owner: QuestActivityUnenrolledModal.render.children, offset: 0x024bc0a3, size: 35 bytes, params: 1, frame: 13
return <QuestActivityUnenrolledModalInner quest={quest} />;
}
}
}
}
function QuestActivityUnenrolledModalInnerOnPress() { // fn#117635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:3778, owner: QuestActivityUnenrolledModalInner.onPress, offset: 0x024bba9a, size: 76 bytes, params: 1, frame: 14
const value = environment.__proto__;
const questActionCreatorsModule = require(9484) /* metro dependency 9484: QuestActionCreators */;
questActionCreatorsModule.dismissQuestActivityModal(quest.id);
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
}
function QuestActivityUnenrolledModalInnerOnPress_117636() { // fn#117636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:3981, owner: QuestActivityUnenrolledModalInner.onPress, offset: 0x024bbae6, size: 59 bytes, params: 1, frame: 13
const binding = env0_2;
const value = !env0_1;
binding(value);
(require(9484) /* metro dependency 9484: QuestActionCreators */).setAutoEnroll(value);
}
function CloseButton_117637OnPress() { // fn#117638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:4369, owner: CloseButton_117637.onPress, offset: 0x024bbba2, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
}
function QuestActivityUnenrolledModalHeaderTitle() { // fn#117643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:4754, owner: QuestActivityUnenrolledModal.headerTitle, offset: 0x024bbfbb, size: 107 bytes, params: 1, frame: 18
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Text variant="redesign/heading-18/bold" color="mobile-text-heading-primary">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.l7E81v)}
</Text>
);
}
function QuestActivityUnenrolledModalRender() { // fn#117644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:4904, owner: QuestActivityUnenrolledModal.render, offset: 0x024bc026, size: 125 bytes, params: 1, frame: 17
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
const questContentImpressionTrackerNativeProps = {questOrQuests: quest};
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
let QUEST_ACTIVITY_UNENROLLED_MODAL = QuestContent.QUEST_ACTIVITY_UNENROLLED_MODAL;
questContentImpressionTrackerNativeProps.questContent = QUEST_ACTIVITY_UNENROLLED_MODAL;
QUEST_ACTIVITY_UNENROLLED_MODAL = QuestContent.QUEST_ACTIVITY_UNENROLLED_MODAL;
questContentImpressionTrackerNativeProps.sourceQuestContent = QUEST_ACTIVITY_UNENROLLED_MODAL;
return (
<QuestContentImpressionTrackerNative {...questContentImpressionTrackerNativeProps}>
{children_117645}
</QuestContentImpressionTrackerNative>
);
}
function renderChildren() { // fn#117645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:5121, owner: QuestActivityUnenrolledModal.render.children, offset: 0x024bc0a3, size: 35 bytes, params: 1, frame: 13
return <QuestActivityUnenrolledModalInner quest={quest} />;
}
global.__d(_fun117629, 15386, [5, 57, 31, 27, 7093, 15385, 6528, 33, 4501, 697, 478, 4048, 3866, 566, 6777, 7116,
9483, 9950, 6531, 1423, 9484, 7120, 5080, 3874, 4572, 5475, 9542, 4573, 1244, 4578, 7974, 5277, 8160, 10183,
10121,
2]) /* metro module 15386, dependencies: [5, 57, 31, 27, 7093, 15385, 6528, 33, 4501, 697, 478, 4048, 3866, 566, 6777, 7116, 9483, 9950, 6531, 1423, 9484, 7120, 5080, 3874, 4572, 5475, 9542, 4573, 1244, 4578, 7974, 5277, 8160, 10183, 10121, 2] */;
@@ -1,424 +1,498 @@
/* 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] */
import React from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ToastActionCreators from '../../../toast/native/ToastActionCreators.tsx'; /* Metro dependency 3857 */
import QuestStore from '../../QuestStore.tsx'; /* Metro dependency 7093 */
import QuestBottomSheetHeader from './QuestBottomSheetHeader.tsx'; /* Metro dependency 13592 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as BottomSheetNativeModule from '../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestTypesModule from '../../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as GetQuestLoggerModule from '../../lib/getQuestLogger.tsx'; /* Metro dependency 7099 */
import * as QuestTaskUtilsModule from '../../utils/QuestTaskUtils.tsx'; /* Metro dependency 7116 */
import * as AnalyticsTypesModule from '../../lib/analytics/AnalyticsTypes.tsx'; /* Metro dependency 7120 */
import * as WarningIconModule from '../../../../design/components/Icon/native/redesign/generated/WarningIcon.tsx'; /* Metro dependency 8129 */
import * as QuestHooksModule from '../../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as QuestActionCreatorsModule from '../../QuestActionCreators.tsx'; /* Metro dependency 9484 */
import * as ContentImpressionTrackerHooksModule from '../../lib/analytics/ContentImpressionTrackerHooks.tsx'; /* Metro dependency 9513 */
import * as AdAnalyticsInterfaceExperimentModule from '../../experiments/AdAnalyticsInterfaceExperiment.tsx'; /* Metro dependency 9519 */
import * as AnalyticsHooksModule from '../../lib/analytics/AnalyticsHooks.tsx'; /* Metro dependency 9949 */
import * as QuestHooksNativeModule from '../QuestHooks.native.tsx'; /* Metro dependency 13568 */
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 useEnrolledQuestContentProps2 = useEnrolledQuestContentProps;
const QuestBottomSheetContent2 = 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 value = React;
const createStyles = CreateStylesModule.createStyles;
const object2 = {};
const object3 = {display: 'flex'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingHorizontal = PX_16;
object3.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'};
object3.gap = PX_24;
object2.contentContainer = object3;
const object4 = {display: 'flex'};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.gap = PX_8;
object4.gap = PX_8;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginHorizontal = -PX_16;
object4.marginHorizontal = -PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingHorizontal = PX_16;
object4.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginTop = PX_16;
object4.marginTop = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingTop = PX_16;
object6.borderTopWidth = 1;
object4.paddingTop = PX_16;
object4.borderTopWidth = 1;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object6.borderTopColor = BORDER_SUBTLE;
object.microphoneUnit = object6;
object4.borderTopColor = BORDER_SUBTLE;
object2.microphoneUnit = object4;
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]);
object2.microphoneUnitHeader = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', gap: PX_8};
const env0_14 = Reflect.apply(createStyles, CreateStylesModule, [object2]);
value = value.createContext({isInQuestBottomSheet: false});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheet.tsx');
(FileImportTrackerModule).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.useEnrolledQuestContentProps = useEnrolledQuestContentProps2;
exports.QuestBottomSheetContent = QuestBottomSheetContent2;
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 = (QuestHooksNativeModule).useHasWatchVideoOnMobileTasks(quest.config);
const hasWatchVideoTasks2 = (QuestTaskUtilsModule).hasWatchVideoTasks(quest);
const isInGameQuest2 = (QuestTaskUtilsModule).isInGameQuest(quest);
const [property, env0_0] = Module00057(useState(0), 2);
const value7 = env0_4.useMemo(function() {
return {isInQuestBottomSheet: true};
}, []);
const Provider = env0_15.Provider;
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const object2 = {};
QUEST_HOME_MOBILE = QuestsExperimentLocations.QUEST_HOME_MOBILE;
object2.header = (
<QuestBottomSheetHeader
quest={quest}
step={step}
location={QUEST_HOME_MOBILE}
/>
);
object2.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 */)
)
);
object2.startExpanded = true;
const TASK_SELECT = env0_13.TASK_SELECT;
QUEST_HOME_MOBILE = QuestsExperimentLocations.QUEST_HOME_MOBILE;
return (
<Provider value={value7}>
<BottomSheet {...object2}>
<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 QuestBottomSheetOnLayout({nativeEvent}) { // fn#103259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:1556, owner: QuestBottomSheet.onLayout, offset: 0x01dff69d, size: 36 bytes, params: 2, frame: 11
env0_0(nativeEvent.layout.height);
}
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;
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 = (AnalyticsHooksModule).useTrackQuestContentClickedWithImpression();
const env0_3 = (ContentImpressionTrackerHooksModule).useQuestImpressionId();
const value3 = (QuestHooksModule).useQuestTaskDetails(quest);
const value4 = (QuestHooksModule).useIsQuestProgressing(quest);
const value6 = env0_3((QuestHooksModule).useTaskPlatformScreen(quest, value3),
3);
const property = value6[0];
const env0_4 = value6[2];
const value7 = (QuestHooksNativeModule).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 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 = (QuestTypesModule).TaskPlatformScreen;
const userStatus = quest.userStatus;
const value2 = userStatus?.completedAt != null;
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 = (QuestHooksNativeModule).useHasWatchVideoOnMobileTasks(quest.config);
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 _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 _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 _fun103264({type}) { // fn#103264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:2517, offset: 0x0108b18c, size: 21 bytes, params: 2, frame: 2
return type === env0_0;
}
}
}
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
(0, ReactNativeModule.View)(false);
env0_4(null);
}
function showConsoleSelect() { // fn#103266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:2956, owner: useEnrolledQuestContentProps.useSteps.showConsoleSelect, offset: 0x0225f36a, size: 18 bytes, params: 1, frame: 11
return (0, ReactNativeModule.View)(true);
}
function hideConsoleSelect() { // fn#103267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:2984, owner: useEnrolledQuestContentProps.useSteps.hideConsoleSelect, offset: 0x0225f37c, size: 18 bytes, params: 1, frame: 11
return (0, ReactNativeModule.View)(false);
}
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: ReactModule.useState, 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 object = {};
const TASK_SELECT = env2_13.TASK_SELECT;
object.type = TASK_SELECT;
let binding = env0_2;
const value3 = undefined;
const TaskPlatformScreen = (QuestTypesModule).TaskPlatformScreen;
const SELECT = TaskPlatformScreen.SELECT;
object.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 [object, {type: CONSOLE_CONNECT, shouldShow: binding === CONSOLE && ReactModule.useState, onBack: QuestConstantsModule.QuestsExperimentLocations,
onNext: hideConsoleSelect}, {type: TASK_STATUS, shouldShow: true,
onBack: env0_7 ? value3 : env0_2 === TaskPlatformScreen.CONSOLE ? showConsoleSelect : QuestConstantsModule.QuestsExperimentLocations}];
}
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 ? JsxRuntimeModule.jsxs : env0_3.length === 1 && env0_3.includes(QuestTaskPlatform.CONSOLE) ? JsxRuntimeModule.Fragment : env0_13;
return r2.find(function(a0) {
return a0.shouldShow;
}) ?? r2.at(-1);
}
}
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 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 _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);
let value = QuestActionCreatorsModule.manuallyStartConsoleQuest(env0_0.id);
value = value.then(_fun103275);
value = value.catch(_fun103276);
value.finally(_fun103277);
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 = ToastActionCreators;
const open = defaultImport.open;
const object = {key: 'START_DEFIBRILLATOR_ERROR'};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const CKsXk3 = (IndexNativeModule).t.CKsXk3;
object.content = Reflect.apply(string, intl, [CKsXk3]);
object.icon = importDefault(8947) /* metro dependency 8947 */;
Reflect.apply(open, defaultImport, [object]);
}
function _fun103277() { // fn#103277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:4427, offset: 0x01ef13d1, size: 18 bytes, params: 1, frame: 11
return env1_3(false);
}
}
}
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 = (AnalyticsTypesModule).QuestContentCTA;
var object;
const QuestContent = (QuestTypesModule).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 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;
object = {};
object.type = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType.CLICK_INTERNAL;
object.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
object.adCreativeId = quest.id;
object.questContentCTA = r6;
object.surfaceId = QuestContent.QUEST_BOTTOM_SHEET;
object.sourceQuestContent = sourceQuestContent;
object.impressionId = env0_3;
Reflect.apply(captureAdUserAction, value, [object]);
} else {
env0_2({questId: quest.id, questContent: QuestContent.QUEST_BOTTOM_SHEET, questContentCTA: r6,
sourceQuestContent: sourceQuestContent});
}
env0_4(a0);
}
}
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 = (QuestHooksNativeModule).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 _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 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 items3;
var value7;
var value8;
const styles = useStyles();
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;
});
items3 = [];
value8 = arraySpread(items3, value7, 0, undefined);
items3[value8] = message;
value8 + 1;
r7 = items3;
} 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})];
}
} 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;
const WarningIcon = (WarningIconModule).WarningIcon;
const warningIcon = <WarningIcon color={value4 ? 'text-feedback-critical' : 'text-feedback-warning'} />;
const Text = (TextModule).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 (
<QuestContentImpressionTrackerNative
overrideVisibility
questOrQuests={quest}
questContent={(require(6531) /* metro dependency 6531: QuestTypes */).QuestContent.QUEST_BOTTOM_SHEET}
questContentPosition={questContentPosition}
sourceQuestContent={sourceQuestContent}
>
{children_103286}
</QuestContentImpressionTrackerNative>
<View style={styles.microphoneUnit}>
{items2}
</View>
);
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 = (TextModule).Text;
return <Text {...{variant: 'text-sm/normal', children: a0}} key={a1} />;
}
}
}
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);
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 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}
/>
);
}
}
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]);
}
global.__d(_fun103256, 13591, [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]) /* metro module 13591, 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] */;
@@ -1,176 +1,204 @@
/* Metro module 13633; source: modules/quests/native/QuestBottomSheet/QuestBottomSheetConsoleConnect.tsx; dependencies: [31, 27, 661, 33, 697, 4501, 9483, 9949, 9513, 9520, 4080, 7007, 13591, 1962, 9519, 9517, 9518, 7121, 7120, 6531, 9354, 6231, 6238, 10162, 1244, 9986, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as TableRowGroupNativeModule from '../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as QuestTypesModule from '../../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as AnalyticsTypesModule from '../../lib/analytics/AnalyticsTypes.tsx'; /* Metro dependency 7120 */
import * as AdCreativeTypeModule from '../../../../external/discord_common/js/shared/shared-constants/AdCreativeType.tsx'; /* Metro dependency 7121 */
import * as QuestHooksModule from '../../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as ContentImpressionTrackerHooksModule from '../../lib/analytics/ContentImpressionTrackerHooks.tsx'; /* Metro dependency 9513 */
import * as CaptureAdUserActionTypesModule from '../../../ads/analytics/captureAdUserActionTypes.tsx'; /* Metro dependency 9518 */
import * as AnalyticsHooksModule from '../../lib/analytics/AnalyticsHooks.tsx'; /* Metro dependency 9949 */
function _fun104107(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:6, offset: 0x02285bd7, size: 358 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
(require(27) /* metro dependency 27 */).View;
let value = require(661) /* metro dependency 661: Constants */;
(ReactNativeModule).View;
let value = ConstantsModule;
const env0_4 = value.PlatformTypes;
const env0_5 = value.UserSettingsSections;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
value.jsxs;
value.Fragment;
(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_XBOX;
(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_PLAYSTATION;
(Native).unsafe_rawColors.PLATFORM_XBOX;
(Native).unsafe_rawColors.PLATFORM_PLAYSTATION;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const PX_16 = (Native).space.PX_16;
Reflect.apply(createStyles, value, [{platformButtonsContainer: {'display': 'flex', 'flexDirection': 'row',
'gap': null, 'justifyContent': 'space-between', gap: PX_16}, platformButton: {'flex': 1, 'display': 'flex',
'justifyContent': 'center', 'alignItems': 'center'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheetConsoleConnect.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheetConsoleConnect.tsx');
exports.default = QuestBottomSheetConsoleConnect;
}
function NonInlineConsoleConnection({consoles, onConsoleSelect}) { // fn#104108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:521, offset: 0x02285d3d, size: 94 bytes, params: 2, frame: 16
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<TableRowGroup hasIcons>
{consoles.map(_fun104109)}
</TableRowGroup>
);
}
function ConsoleRow(a0) { // fn#104110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:695, offset: 0x02285dd5, size: 518 bytes, params: 2, frame: 24
var value3;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value4;
const env0_0 = a0.onPress;
let value = Object.create(null);
value.onPress = 0;
value = copyDataProperties({}, a0, value, undefined);
const type = value.type;
const PLAYSTATION = PlatformTypes.PLAYSTATION;
if (PLAYSTATION === type) {
value4 = undefined;
function NonInlineConsoleConnection({consoles, onConsoleSelect}) { // fn#104108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:521, offset: 0x02285d3d, size: 94 bytes, params: 2, frame: 16
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
return (
<TableRow
arrow
icon={((PlaystationNeutralIcon) => <PlaystationNeutralIcon />)((require(10162) /* metro dependency 10162: PlaystationNeutralIcon */).PlaystationNeutralIcon)}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.JafL6p)}
subLabel={value.account != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['u30/ut']) : value4}
onPress={onPress_104111}
<TableRowGroup hasIcons>
{consoles.map(_fun104109)}
</TableRowGroup>
);
function _fun104109(a0) { // fn#104109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:650, offset: 0x02285d9b, size: 58 bytes, params: 2, frame: 16
return (
<ConsoleRow
{...a0}
{...{['onPress']: onConsoleSelect}}
key={a0.type}
/>
);
}
}
function ConsoleRow(a0) { // fn#104110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:695, offset: 0x02285dd5, size: 518 bytes, params: 2, frame: 24
var value3;
const TableRow = (TableRowNativeModule).TableRow;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value4;
const env0_0 = a0.onPress;
let value = Object.create(null);
value.onPress = 0;
value = copyDataProperties({}, a0, value, undefined);
const type = value.type;
const PLAYSTATION = PlatformTypes.PLAYSTATION;
if (PLAYSTATION === type) {
value4 = undefined;
return (
<TableRow
arrow
icon={((PlaystationNeutralIcon) => <PlaystationNeutralIcon />)((require(10162) /* metro dependency 10162: PlaystationNeutralIcon */).PlaystationNeutralIcon)}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.JafL6p)}
subLabel={value.account != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['u30/ut']) : value4}
onPress={onPress_104111}
/>
);
}
const XBOX = PlatformTypes.XBOX;
if (XBOX === type) {
value3 = undefined;
return (
<TableRow
arrow
icon={((XboxNeutralIcon) => <XboxNeutralIcon />)((require(9986) /* metro dependency 9986: XboxNeutralIcon */).XboxNeutralIcon)}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Nfvo72)}
subLabel={value.account != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['u30/ut']) : value3}
onPress={onPress_104112}
/>
);
}
return null;
function ConsoleRowOnPress() { // fn#104111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:976, owner: ConsoleRow.onPress, offset: 0x00c950e6, size: 20 bytes, params: 1, frame: 11
return onPress(env0_1);
}
function ConsoleRowOnPress_104112() { // fn#104112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:1201, owner: ConsoleRow.onPress, offset: 0x00c950e6, size: 20 bytes, params: 1, frame: 11
return onPress(env0_1);
}
}
function QuestBottomSheetConsoleConnect({quest, step, sourceQuestContent}) { // fn#104113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:1351, offset: 0x02285fdb, size: 212 bytes, params: 2, frame: 18
const useConnectedAccounts = QuestHooksModule.useConnectedAccounts;
const xboxAndPlaystationAccounts = Reflect.apply(useConnectedAccounts, QuestHooksModule,
[]).xboxAndPlaystationAccounts;
const xboxAndPlaystationAccounts2 = xboxAndPlaystationAccounts;
const env0_4 = (AnalyticsHooksModule).useTrackQuestContentClickedWithImpression();
const env0_5 = (ContentImpressionTrackerHooksModule).useQuestImpressionId();
return (
<NonInlineConsoleConnection
consoles={xboxAndPlaystationAccounts2.useMemo(_fun104114, [quest, xboxAndPlaystationAccounts])}
onConsoleSelect={onConsoleSelect}
/>
);
}
const XBOX = PlatformTypes.XBOX;
if (XBOX === type) {
value3 = undefined;
return (
<TableRow
arrow
icon={((XboxNeutralIcon) => <XboxNeutralIcon />)((require(9986) /* metro dependency 9986: XboxNeutralIcon */).XboxNeutralIcon)}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Nfvo72)}
subLabel={value.account != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['u30/ut']) : value3}
onPress={onPress_104112}
/>
);
}
return null;
}
function _fun104114() { // fn#104114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:1594, offset: 0x022860af, size: 64 bytes, params: 1, frame: 11
var environment;
let value = environment.__proto__;
value = Reflect.apply((require(9520) /* metro dependency 9520: QuestPlatformUtils */).supportedConsoles, value,
[quest]);
return value.map(function(a0) {
var env0_0 = a0;
var object = {type: a0};
object.account = xboxAndPlaystationAccounts.find(_fun104116);
return object;
});
function _fun104115(a0) { // fn#104115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:1632, offset: 0x022860ef, size: 47 bytes, params: 2, frame: 12
const env0_0 = a0;
const object = {type: a0};
object.account = xboxAndPlaystationAccounts.find(_fun104116);
return object;
function _fun104116({type}) { // fn#104116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:1660, offset: 0x0108b18c, size: 21 bytes, params: 2, frame: 2
return type === env0_0;
}
function QuestBottomSheetConsoleConnect({quest, step, sourceQuestContent}) { // fn#104113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:1351, offset: 0x02285fdb, size: 212 bytes, params: 2, frame: 18
const questHooksModule = require(9483) /* metro dependency 9483: QuestHooks */;
const useConnectedAccounts = questHooksModule.useConnectedAccounts;
const xboxAndPlaystationAccounts = Reflect.apply(useConnectedAccounts, questHooksModule,
[]).xboxAndPlaystationAccounts;
const env0_3 = xboxAndPlaystationAccounts;
const env0_4 = (require(9949) /* metro dependency 9949: AnalyticsHooks */).useTrackQuestContentClickedWithImpression();
const env0_5 = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId();
return (
<NonInlineConsoleConnection
consoles={env0_3.useMemo(_fun104114, [quest, xboxAndPlaystationAccounts])}
onConsoleSelect={onConsoleSelect}
/>
);
}
}
function _fun104109(a0) { // fn#104109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:650, offset: 0x02285d9b, size: 58 bytes, params: 2, frame: 16
return (
<ConsoleRow
{...a0}
{...{['onPress']: onConsoleSelect}}
key={a0.type}
/>
);
}
function _fun104114() { // fn#104114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:1594, offset: 0x022860af, size: 64 bytes, params: 1, frame: 11
var environment;
let value = environment.__proto__;
value = Reflect.apply((require(9520) /* metro dependency 9520: QuestPlatformUtils */).supportedConsoles, value,
[quest]);
return value.map(function(a0) {
var env0_0 = a0;
var object = {type: a0};
object.account = xboxAndPlaystationAccounts.find(_fun104116);
return object;
});
}
function openQuestBottomSheet() { // fn#104117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:1709, owner: QuestBottomSheetConsoleConnect.openQuestBottomSheet, offset: 0x0228611e, size: 117 bytes, params: 1, frame: 17
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[10]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[13]);
value = value(dependencyMap[12], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'QuestBottomSheet', {questId: quest.id, initialStep: step,
sourceQuestContent: sourceQuestContent}]);
}
function onConsoleSelect(a0) { // fn#104118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:1891, owner: QuestBottomSheetConsoleConnect.onConsoleSelect, offset: 0x02286193, size: 871 bytes, params: 2, frame: 19
var value;
const AdAnalyticsInterfaceExperimentStep = (require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */).AdAnalyticsInterfaceExperimentStep;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
const AdUserActionType = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
var moduleValue3;
if (a0.account != null) {
value = environment.__proto__;
moduleValue3 = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
if (moduleValue3.shouldMigrateToAdAnalyticsInterface(AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL,
'quest_bottom_sheet_console_connect')) {
(require(9517) /* metro dependency 9517: captureAdUserAction */).captureAdUserAction({type: AdUserActionType.CLICK_INTERNAL,
adCreativeType: AdCreativeType.QUEST, adCreativeId: quest.id,
questContentCTA: QuestContentCTA.VIEW_CONSOLE_CONNECTIONS, surfaceId: QuestContent.QUEST_BOTTOM_SHEET,
sourceQuestContent: sourceQuestContent, impressionId: env0_5});
} else {
env0_4({questId: quest.id, questContent: QuestContent.QUEST_BOTTOM_SHEET,
questContentCTA: QuestContentCTA.VIEW_CONSOLE_CONNECTIONS, sourceQuestContent: sourceQuestContent});
}
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(require(7007) /* metro dependency 7007: openUserSettings */).openUserSettings({screen: UserSettingsSections.CONNECTIONS});
} else {
value = environment.__proto__;
var moduleValue = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
if (moduleValue.shouldMigrateToAdAnalyticsInterface(AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL,
'quest_bottom_sheet_console_connect')) {
(require(9517) /* metro dependency 9517: captureAdUserAction */).captureAdUserAction({type: AdUserActionType.CLICK_INTERNAL,
adCreativeType: AdCreativeType.QUEST, adCreativeId: quest.id,
questContentCTA: QuestContentCTA.CONNECT_CONSOLE,
surfaceId: QuestContent.QUEST_BOTTOM_SHEET, sourceQuestContent: sourceQuestContent,
impressionId: env0_5});
} else {
env0_4({questId: quest.id, questContent: QuestContent.QUEST_BOTTOM_SHEET,
questContentCTA: QuestContentCTA.CONNECT_CONSOLE, sourceQuestContent: sourceQuestContent});
function openQuestBottomSheet() { // fn#104117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:1709, owner: QuestBottomSheetConsoleConnect.openQuestBottomSheet, offset: 0x0228611e, size: 117 bytes, params: 1, frame: 17
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[10]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[13]);
value = value(dependencyMap[12], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'QuestBottomSheet', {questId: quest.id, initialStep: step,
sourceQuestContent: sourceQuestContent}]);
}
value = importDefault(9354) /* metro dependency 9354: authorizeConnectionNative */;
value({platformType: a0.type, location: 'quests', onClose: openQuestBottomSheet});
function onConsoleSelect(a0) { // fn#104118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:1891, owner: QuestBottomSheetConsoleConnect.onConsoleSelect, offset: 0x02286193, size: 871 bytes, params: 2, frame: 19
var value;
const AdAnalyticsInterfaceExperimentStep = (require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */).AdAnalyticsInterfaceExperimentStep;
const QuestContent = (QuestTypesModule).QuestContent;
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
const AdUserActionType = (CaptureAdUserActionTypesModule).AdUserActionType;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
var moduleValue3;
if (a0.account != null) {
value = environment.__proto__;
moduleValue3 = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
if (moduleValue3.shouldMigrateToAdAnalyticsInterface(AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL,
'quest_bottom_sheet_console_connect')) {
(require(9517) /* metro dependency 9517: captureAdUserAction */).captureAdUserAction({type: AdUserActionType.CLICK_INTERNAL,
adCreativeType: AdCreativeType.QUEST, adCreativeId: quest.id,
questContentCTA: QuestContentCTA.VIEW_CONSOLE_CONNECTIONS, surfaceId: QuestContent.QUEST_BOTTOM_SHEET,
sourceQuestContent: sourceQuestContent, impressionId: env0_5});
} else {
env0_4({questId: quest.id, questContent: QuestContent.QUEST_BOTTOM_SHEET,
questContentCTA: QuestContentCTA.VIEW_CONSOLE_CONNECTIONS, sourceQuestContent: sourceQuestContent});
}
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(require(7007) /* metro dependency 7007: openUserSettings */).openUserSettings({screen: UserSettingsSections.CONNECTIONS});
} else {
value = environment.__proto__;
var moduleValue = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
if (moduleValue.shouldMigrateToAdAnalyticsInterface(AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL,
'quest_bottom_sheet_console_connect')) {
(require(9517) /* metro dependency 9517: captureAdUserAction */).captureAdUserAction({type: AdUserActionType.CLICK_INTERNAL,
adCreativeType: AdCreativeType.QUEST, adCreativeId: quest.id,
questContentCTA: QuestContentCTA.CONNECT_CONSOLE,
surfaceId: QuestContent.QUEST_BOTTOM_SHEET, sourceQuestContent: sourceQuestContent,
impressionId: env0_5});
} else {
env0_4({questId: quest.id, questContent: QuestContent.QUEST_BOTTOM_SHEET,
questContentCTA: QuestContentCTA.CONNECT_CONSOLE, sourceQuestContent: sourceQuestContent});
}
value = importDefault(9354) /* metro dependency 9354: authorizeConnectionNative */;
value({platformType: a0.type, location: 'quests', onClose: openQuestBottomSheet});
}
}
}
}
function _fun104115(a0) { // fn#104115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:1632, offset: 0x022860ef, size: 47 bytes, params: 2, frame: 12
const env0_0 = a0;
const object2 = {type: a0};
object2.account = xboxAndPlaystationAccounts.find(_fun104116);
return object2;
}
global.__d(_fun104107, 13633, [31, 27, 661, 33, 697, 4501, 9483, 9949, 9513, 9520, 4080, 7007, 13591, 1962, 9519,
9517, 9518, 7121, 7120, 6531, 9354, 6231, 6238, 10162, 1244, 9986,
2]) /* metro module 13633, dependencies: [31, 27, 661, 33, 697, 4501, 9483, 9949, 9513, 9520, 4080, 7007, 13591, 1962, 9519, 9517, 9518, 7121, 7120, 6531, 9354, 6231, 6238, 10162, 1244, 9986, 2] */;
@@ -1,17 +1,44 @@
/* Metro module 13593; source: modules/quests/native/QuestBottomSheet/QuestBottomSheetFooter.tsx; dependencies: [57, 31, 27, 4502, 1878, 7093, 6276, 33, 697, 4501, 6531, 9483, 9500, 9505, 8461, 566, 3860, 5132, 9480, 13594, 4578, 9523, 9520, 13568, 9950, 13591, 8341, 1244, 5284, 9949, 9513, 13127, 9519, 9517, 9518, 7121, 7120, 1585, 1478, 4017, 4504, 4582, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import QuestStore from '../../QuestStore.tsx'; /* Metro dependency 7093 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TimingModule from '../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as ButtonConstantsNativeModule from '../../../../design/components/Button/native/ButtonConstants.native.tsx'; /* Metro dependency 4582 */
import * as ActionSheetConstantsModule from '../../../action_sheet/native/ActionSheetConstants.tsx'; /* Metro dependency 6276 */
import * as QuestTypesModule from '../../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as AnalyticsTypesModule from '../../lib/analytics/AnalyticsTypes.tsx'; /* Metro dependency 7120 */
import * as UseFetchCollectiblesProductModule from '../../../collectibles/hooks/useFetchCollectiblesProduct.tsx'; /* Metro dependency 8461 */
import * as QuestUtilsNativeModule from '../QuestUtils.native.tsx'; /* Metro dependency 9480 */
import * as QuestHooksModule from '../../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as QuestRewardUtilsModule from '../../utils/QuestRewardUtils.tsx'; /* Metro dependency 9500 */
import * as ContentImpressionTrackerHooksModule from '../../lib/analytics/ContentImpressionTrackerHooks.tsx'; /* Metro dependency 9513 */
import * as AdAnalyticsInterfaceExperimentModule from '../../experiments/AdAnalyticsInterfaceExperiment.tsx'; /* Metro dependency 9519 */
import * as MobileQuestVideoWatchCtaCopyModule from '../../utils/MobileQuestVideoWatchCtaCopy.tsx'; /* Metro dependency 9523 */
import * as AnalyticsHooksModule from '../../lib/analytics/AnalyticsHooks.tsx'; /* Metro dependency 9949 */
import * as QuestCopyHooksModule from '../../hooks/QuestCopyHooks.tsx'; /* Metro dependency 9950 */
import * as RefreshIconModule from '../../../../design/components/Icon/native/redesign/generated/RefreshIcon.tsx'; /* Metro dependency 13127 */
import * as QuestHooksNativeModule from '../QuestHooks.native.tsx'; /* Metro dependency 13568 */
import * as QuestBottomSheetHooksModule from './QuestBottomSheetHooks.tsx'; /* Metro dependency 13594 */
function _fun103294(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:6, offset: 0x02260909, size: 457 bytes, params: 8, frame: 22
const env0_0 = require;
const closure = useQuestRewardClaimHandler;
const useQuestRewardClaimHandler2 = useQuestRewardClaimHandler;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
const env0_9 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_MINIMUM_BOTTOM_PADDING;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
@@ -22,368 +49,381 @@ function _fun103294(global, require, importDefault, importAll, module, exports,
paddingHorizontal: PX_16}}]);
object = {code: "function QuestBottomSheetFooterTsx1(){const{animation,H_PADDING_PX}=this.__closure;return{opacity:animation.get(),position:'absolute',top:0,left:0,transform:[{translateX:H_PADDING_PX}]};}"};
object = {code: "function QuestBottomSheetFooterTsx2(){const{interpolate,animation,windowWidth,H_PADDING_PX,ICON_SIZE_PX}=this.__closure;return{width:interpolate(animation.get(),[0,1],[windowWidth-H_PADDING_PX*2,windowWidth-H_PADDING_PX*2.5-ICON_SIZE_PX]),alignSelf:'flex-end'};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheetFooter.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheetFooter.tsx');
exports.default = QuestBottomSheetFooter;
exports.useQuestRewardClaimHandler = closure;
}
function useQuestRewardClaimHandler({quest, hideActionSheet, questContent, onSuccess, sourceQuestContent}) { // fn#103295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:375, offset: 0x02260ad2, size: 852 bytes, params: 2, frame: 32
var r13;
var styles;
hideActionSheet = hideActionSheet === undefined || hideActionSheet;
const r7 = questContent !== undefined ? questContent : (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent.QUEST_BOTTOM_SHEET;
const env0_4 = sourceQuestContent;
const value5 = (require(9483) /* metro dependency 9483: QuestHooks */).useProgressState(quest);
const questRewardUtilsModule = require(9500) /* metro dependency 9500: QuestRewardUtils */;
const hasCollectiblesQuestReward2 = questRewardUtilsModule.hasCollectiblesQuestReward(quest.config);
let binding = env0_4;
const useMemo = binding.useMemo;
let object = [quest.config];
const value6 = Reflect.apply(useMemo, binding, [_fun103296, object]);
const useFetchCollectiblesProductModule = require(8461) /* metro dependency 8461: useFetchCollectiblesProduct */;
const useFetchCollectiblesProduct = useFetchCollectiblesProductModule.useFetchCollectiblesProduct;
const QuestProgressState = (require(9483) /* metro dependency 9483: QuestHooks */).QuestProgressState;
const COMPLETED = QuestProgressState.COMPLETED;
const {product, isFetching} = Reflect.apply(useFetchCollectiblesProduct, useFetchCollectiblesProductModule,
[value5 !== COMPLETED ? null : hasCollectiblesQuestReward2 ? value6 : null]);
const {isClaimingReward,
isFetchingRewardCode} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([QuestStore],
function() {
var object = {};
var questBinding = quest;
object.isFetchingRewardCode = QuestStore.isFetchingRewardCode(questBinding.id);
object.isClaimingReward = QuestStore.isClaimingReward(questBinding.id);
return object;
});
const value10 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun103298);
const value11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun103299);
const value12 = env0_4.useMemo(function() {
return isFetching || isFetchingRewardCode;
}, [isFetching, isFetchingRewardCode]);
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
const value13 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOWER]);
const moduleValue8 = useTokenModule;
useToken = moduleValue8.useToken;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const value14 = Reflect.apply(useToken, moduleValue8, [BACKGROUND_BASE_LOW]);
const moduleValue9 = useTokenModule;
useToken = moduleValue9.useToken;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
if (product != null) {
object = {};
styles = product.styles;
r13 = styles?.buttonColors ?? [];
object.buttonColors = r13;
styles = product.styles;
r13 = styles?.confettiColors ?? [];
object.confettiColors = r13;
object.backgroundColors = [(importDefault(5132) /* metro dependency 5132 */)(value14),
(importDefault(5132) /* metro dependency 5132 */)(value13),
(importDefault(5132) /* metro dependency 5132 */)(Reflect.apply(useToken, moduleValue9,
[BACKGROUND_BASE_LOWEST]))];
product.styles = object;
}
binding = env0_4;
const useCallback = binding.useCallback;
return {isLoading: value12, isClaiming: isClaimingReward, claim: Reflect.apply(useCallback, binding, [_fun103301,
[quest, product, value10, value11, hideActionSheet, r7, onSuccess, sourceQuestContent]])};
}
function WatchTaskButton({questId, sourceQuestContent, taskDetails}) { // fn#103302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:1915, offset: 0x02260f6b, size: 143 bytes, params: 2, frame: 19
const value2 = (require(13594) /* metro dependency 13594: QuestBottomSheetHooks */).useWatchTaskPressHandler({questId: questId,
sourceQuestContent: sourceQuestContent});
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<Button
grow
size="lg"
onPress={value2}
text={(require(9523) /* metro dependency 9523: MobileQuestVideoWatchCtaCopy */).getVideoQuestWatchCtaText(taskDetails)}
/>
);
}
function NextButton({onPress, disabled}) { // fn#103303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:2167, offset: 0x02260ffa, size: 130 bytes, params: 2, frame: 18
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Button
grow
size="lg"
onPress={onPress}
disabled={disabled}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a9OfTN)}
/>
);
}
function DefibButton({questId, loading, disabled, onPress, sourceQuestContent}) { // fn#103304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:2323, offset: 0x0226107c, size: 269 bytes, params: 2, frame: 19
const env0_3 = (require(9949) /* metro dependency 9949: AnalyticsHooks */).useTrackQuestContentClickedWithImpression();
const env0_4 = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId();
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const buttonProps = {'grow': true, 'size': 'lg', 'variant': 'secondary', loading: loading, disabled: disabled};
const RefreshIcon = (require(13127) /* metro dependency 13127: RefreshIcon */).RefreshIcon;
buttonProps.icon = <RefreshIcon />;
buttonProps.iconPosition = 'end';
buttonProps.onPress = onPress_103305;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
buttonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nPThNb);
return <Button {...buttonProps} />;
}
function ClaimButton({questId, disabled, loading, onPress, sourceQuestContent}) { // fn#103306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:3279, offset: 0x02261300, size: 224 bytes, params: 2, frame: 18
const env0_3 = (require(9949) /* metro dependency 9949: AnalyticsHooks */).useTrackQuestContentClickedWithImpression();
const env0_4 = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId();
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const buttonProps = {'grow': true, 'size': 'lg', disabled: disabled, loading: loading, onPress: onPress_103307};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
buttonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cfY4PE);
return <Button {...buttonProps} />;
}
function AnimatedFooter({onLayout, ctaButton, backButton, style, withSafeArea}) { // fn#103308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:4630, offset: 0x02261549, size: 618 bytes, params: 2, frame: 29
var object2;
withSafeArea = withSafeArea === undefined || withSafeArea;
const r16 = backButton != null && backButton !== false;
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const styles = useStyles();
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const value2 = (() => (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
_fun103310))();
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(r16 ? 1 : 0);
env0_4.useEffect(_fun103311, [r16, value2, value5]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = AnimatedFooterY;
closure.__closure = {animation: value5, H_PADDING_PX: PX_16};
closure.__workletHash = 7564903336036;
closure.__initData = env0_14;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue3 = reanimatedRexportModule;
useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = AnimatedFooterB;
object2 = {interpolate: reanimatedRexportModule.interpolate, animation: value5, windowWidth: width,
H_PADDING_PX: PX_16};
const LARGE_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).LARGE_BUTTON_HEIGHT;
object2.ICON_SIZE_PX = LARGE_BUTTON_HEIGHT;
closure.__closure = object2;
closure.__workletHash = 9095621288509;
closure.__initData = env0_15;
const value7 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const Math = global.Math;
const value8 = Math.max(bottom, ACTION_SHEET_MINIMUM_BOTTOM_PADDING);
const items2 = [styles.container];
items2[1] = withSafeArea && ({paddingBottom: value8});
items2[2] = style;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const view = <View2 style={value6}>{backButton}</View2>;
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={items2} onLayout={onLayout}>
{view}
<View3 style={value7}>
{ctaButton}
</View3>
</View>
);
}
function QuestBottomSheetFooter({quest, onLayout, step, isDefibrilating, onConnectConsoleNext, onBack, onDefib, style, withSafeArea, sourceQuestContent}) { // fn#103314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:5820, offset: 0x02261934, size: 1145 bytes, params: 2, frame: 40
var r7;
var r0;
var value23;
var IconButton;
var intl;
isDefibrilating = !(isDefibrilating === undefined) && isDefibrilating;
const object2 = {quest: quest, sourceQuestContent: sourceQuestContent};
const value4 = useQuestRewardClaimHandler(object2);
const value5 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
const value6 = (require(9483) /* metro dependency 9483: QuestHooks */).useIsQuestProgressing(quest);
const property = env0_3((require(9483) /* metro dependency 9483: QuestHooks */).useTaskPlatformScreen(quest,
value5), 1)[0];
const questHooksModule = require(9483) /* metro dependency 9483: QuestHooks */;
const useConnectedAccounts = questHooksModule.useConnectedAccounts;
const value9 = env0_4.useMemo(_fun103315, [quest, Reflect.apply(useConnectedAccounts, questHooksModule,
[]).xboxAndPlaystationAccounts]);
const value10 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useHasWatchVideoOnMobileTasks(quest.config);
const {isMobileActivityQuest, launchMobileActivity,
questApplication} = (require(13568) /* metro dependency 13568: QuestHooksNative */).useMobileActivityQuest(quest);
const value12 = (require(9950) /* metro dependency 9950: QuestCopyHooks */).usePrimaryCtaCopy({quest: quest,
application: questApplication});
const value13 = (require(13594) /* metro dependency 13594: QuestBottomSheetHooks */).useMobileActivityPressHandler({questId: quest.id,
sourceQuestContent: sourceQuestContent, launchMobileActivity: launchMobileActivity});
let userStatus = quest.userStatus;
const value15 = userStatus?.completedAt != null;
userStatus = quest.userStatus;
const value16 = userStatus?.claimedAt != null;
const QuestBottomSheetStep = (require(13591) /* metro dependency 13591: QuestBottomSheet */).QuestBottomSheetStep;
const TASK_SELECT = QuestBottomSheetStep.TASK_SELECT;
if (step === TASK_SELECT) {
r0 = null;
} else {
var animatedFooterProps = {onLayout: onLayout,
ctaButton: (require(13591) /* metro dependency 13591: QuestBottomSheet */).QuestBottomSheetStep.CONSOLE_CONNECT === step ? <NextButton onPress={onConnectConsoleNext} disabled={value9.length === 0} /> : (require(13591) /* metro dependency 13591: QuestBottomSheet */).QuestBottomSheetStep.TASK_STATUS !== step ? null : value15 ? <ClaimButton questId={quest.id} onPress={value4.claim} disabled={value16} loading={value4.isLoading || value4.isClaiming} sourceQuestContent={sourceQuestContent} /> : value10 ? <WatchTaskButton questId={quest.id} taskDetails={value5} sourceQuestContent={sourceQuestContent} /> : isMobileActivityQuest ? ((Button) => <Button grow size="lg" onPress={value13} text={value12} icon={(require(9480) /* metro dependency 9480: QuestUtilsNative */).getPrimaryCtaIcon(quest)} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button) : property !== (require(6531) /* metro dependency 6531: QuestTypes */).TaskPlatformScreen.CONSOLE || value6 ? <ClaimButton questId={quest.id} onPress={value4.claim} disabled sourceQuestContent={sourceQuestContent} /> : <DefibButton questId={quest.id} loading={isDefibrilating} disabled={isDefibrilating} onPress={onDefib} sourceQuestContent={sourceQuestContent} />};
value23 = onBack != null;
if (value23) {
IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r7 = <IconButton accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])} variant="secondary" icon={((ArrowLargeLeftIcon) => <ArrowLargeLeftIcon />)((require(5284) /* metro dependency 5284: ArrowLargeLeftIcon */).ArrowLargeLeftIcon)} onPress={onBack} size="lg" />;
} else {
r7 = value23;
exports.useQuestRewardClaimHandler = useQuestRewardClaimHandler2;
function useQuestRewardClaimHandler({quest, hideActionSheet, questContent, onSuccess, sourceQuestContent}) { // fn#103295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:375, offset: 0x02260ad2, size: 852 bytes, params: 2, frame: 32
var r13;
var styles;
hideActionSheet = hideActionSheet === undefined || hideActionSheet;
const r7 = questContent !== undefined ? questContent : (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent.QUEST_BOTTOM_SHEET;
const sourceQuestContent2 = sourceQuestContent;
const value5 = (QuestHooksModule).useProgressState(quest);
const hasCollectiblesQuestReward2 = QuestRewardUtilsModule.hasCollectiblesQuestReward(quest.config);
let binding = sourceQuestContent2;
const useMemo = binding.useMemo;
let object = [quest.config];
const value6 = Reflect.apply(useMemo, binding, [_fun103296, object]);
const useFetchCollectiblesProduct = UseFetchCollectiblesProductModule.useFetchCollectiblesProduct;
const QuestProgressState = (QuestHooksModule).QuestProgressState;
const COMPLETED = QuestProgressState.COMPLETED;
const {product, isFetching} = Reflect.apply(useFetchCollectiblesProduct, UseFetchCollectiblesProductModule,
[value5 !== COMPLETED ? null : hasCollectiblesQuestReward2 ? value6 : null]);
const {isClaimingReward,
isFetchingRewardCode} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([QuestStore],
function() {
var object = {};
var questStoreBinding = QuestStore;
var questBinding = quest;
object.isFetchingRewardCode = questStoreBinding.isFetchingRewardCode(questBinding.id);
object.isClaimingReward = QuestStore.isClaimingReward(questBinding.id);
return object;
});
const value10 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun103298);
const value11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun103299);
const value12 = sourceQuestContent2.useMemo(function() {
return isFetching || isFetchingRewardCode;
}, [isFetching, isFetchingRewardCode]);
let useToken = UseTokenModule.useToken;
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
const value13 = Reflect.apply(useToken, UseTokenModule, [BACKGROUND_BASE_LOWER]);
useToken = UseTokenModule.useToken;
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
const value14 = Reflect.apply(useToken, UseTokenModule, [BACKGROUND_BASE_LOW]);
useToken = UseTokenModule.useToken;
const BACKGROUND_BASE_LOWEST = (Native).colors.BACKGROUND_BASE_LOWEST;
if (product != null) {
object = {};
styles = product.styles;
r13 = styles?.buttonColors ?? [];
object.buttonColors = r13;
styles = product.styles;
r13 = styles?.confettiColors ?? [];
object.confettiColors = r13;
object.backgroundColors = [(importDefault(5132) /* metro dependency 5132 */)(value14),
(importDefault(5132) /* metro dependency 5132 */)(value13),
(importDefault(5132) /* metro dependency 5132 */)(Reflect.apply(useToken, UseTokenModule,
[BACKGROUND_BASE_LOWEST]))];
product.styles = object;
}
animatedFooterProps.backButton = r7;
animatedFooterProps.style = style;
animatedFooterProps.withSafeArea = withSafeArea;
r0 = <AnimatedFooter {...animatedFooterProps} />;
binding = sourceQuestContent2;
const useCallback = binding.useCallback;
return {isLoading: value12, isClaiming: isClaimingReward, claim: Reflect.apply(useCallback, binding, [_fun103301,
[quest, product, value10, value11, hideActionSheet, r7, onSuccess, sourceQuestContent]])};
function _fun103296() { // fn#103296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:636, offset: 0x02260e26, size: 56 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(9505) /* metro dependency 9505: QuestCopyUtils */;
const getDefaultReward = value.getDefaultReward;
return Reflect.apply(getDefaultReward, value, [quest.config]).skuId;
}
function _fun103298() { // fn#103298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:1038, offset: 0x02260e9e, size: 39 bytes, params: 1, frame: 10
var r0;
let value = environment.__proto__;
value = UserStore.getCurrentUser();
if (value == null) {
r0 = undefined;
} else {
value = value.hasVerifiedEmailOrPhone();
r0 = value;
}
return r0;
}
function _fun103299() { // fn#103299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:1158, offset: 0x02260ec5, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return UserStore.getCurrentUser()?.verified;
}
function _fun103301() { // fn#103301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:1701, offset: 0x02260ef8, size: 115 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (QuestUtilsNativeModule).handleRewardClaimThenView({quest: quest,
product: product, hideActionSheet: hideActionSheet, questContent: env0_2,
currentUserHasVerifiedEmailOrPhone: env0_8, currentUserHasVerifiedEmail: ActionSheetConstantsModule.ACTION_SHEET_MINIMUM_BOTTOM_PADDING, onSuccess: onSuccess,
sourceQuestContent: sourceQuestContent});
}
}
return r0;
}
function _fun103296() { // fn#103296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:636, offset: 0x02260e26, size: 56 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(9505) /* metro dependency 9505: QuestCopyUtils */;
const getDefaultReward = value.getDefaultReward;
return Reflect.apply(getDefaultReward, value, [quest.config]).skuId;
}
function _fun103298() { // fn#103298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:1038, offset: 0x02260e9e, size: 39 bytes, params: 1, frame: 10
var r0;
let value = environment.__proto__;
value = UserStore.getCurrentUser();
if (value == null) {
r0 = undefined;
} else {
value = value.hasVerifiedEmailOrPhone();
r0 = value;
function WatchTaskButton({questId, sourceQuestContent, taskDetails}) { // fn#103302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:1915, offset: 0x02260f6b, size: 143 bytes, params: 2, frame: 19
const value2 = (QuestBottomSheetHooksModule).useWatchTaskPressHandler({questId: questId,
sourceQuestContent: sourceQuestContent});
const Button = (ButtonNativeModule).Button;
return (
<Button
grow
size="lg"
onPress={value2}
text={(MobileQuestVideoWatchCtaCopyModule).getVideoQuestWatchCtaText(taskDetails)}
/>
);
}
return r0;
}
function _fun103299() { // fn#103299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:1158, offset: 0x02260ec5, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return UserStore.getCurrentUser()?.verified;
}
function _fun103301() { // fn#103301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:1701, offset: 0x02260ef8, size: 115 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (require(9480) /* metro dependency 9480: QuestUtilsNative */).handleRewardClaimThenView({quest: quest,
product: product, hideActionSheet: hideActionSheet, questContent: env0_2,
currentUserHasVerifiedEmailOrPhone: env0_8, currentUserHasVerifiedEmail: env0_9, onSuccess: onSuccess,
sourceQuestContent: sourceQuestContent});
}
function DefibButtonOnPress(a0) { // fn#103305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:2646, owner: DefibButton.onPress, offset: 0x02261189, size: 375 bytes, params: 2, frame: 17
var object2;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
var captureAdUserAction;
let value = environment.__proto__;
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_footer'])) {
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 = questId;
object2.questContentCTA = QuestContentCTA.DEFIBRILLATOR;
object2.surfaceId = QuestContent.QUEST_BOTTOM_SHEET;
object2.sourceQuestContent = sourceQuestContent;
object2.impressionId = env0_4;
Reflect.apply(captureAdUserAction, value, [object2]);
} else {
env0_3({questId: questId, questContent: QuestContent.QUEST_BOTTOM_SHEET,
questContentCTA: QuestContentCTA.DEFIBRILLATOR, sourceQuestContent: sourceQuestContent});
function NextButton({onPress, disabled}) { // fn#103303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:2167, offset: 0x02260ffa, size: 130 bytes, params: 2, frame: 18
const Button = (ButtonNativeModule).Button;
const intl = (IndexNativeModule).intl;
return (
<Button
grow
size="lg"
onPress={onPress}
disabled={disabled}
text={intl.string((IndexNativeModule).t.a9OfTN)}
/>
);
}
if (onPress != null) {
onPress(a0);
function DefibButton({questId, loading, disabled, onPress, sourceQuestContent}) { // fn#103304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:2323, offset: 0x0226107c, size: 269 bytes, params: 2, frame: 19
const env0_3 = (AnalyticsHooksModule).useTrackQuestContentClickedWithImpression();
const env0_4 = (ContentImpressionTrackerHooksModule).useQuestImpressionId();
const Button = (ButtonNativeModule).Button;
const buttonProps = {'grow': true, 'size': 'lg', 'variant': 'secondary', loading: loading, disabled: disabled};
const RefreshIcon = (RefreshIconModule).RefreshIcon;
buttonProps.icon = <RefreshIcon />;
buttonProps.iconPosition = 'end';
buttonProps.onPress = onPress_103305;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
buttonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nPThNb);
return <Button {...buttonProps} />;
function DefibButtonOnPress(a0) { // fn#103305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:2646, owner: DefibButton.onPress, offset: 0x02261189, size: 375 bytes, params: 2, frame: 17
var object;
const QuestContent = (QuestTypesModule).QuestContent;
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
var captureAdUserAction;
let value = environment.__proto__;
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_footer'])) {
value = require(9517) /* metro dependency 9517: captureAdUserAction */;
captureAdUserAction = value.captureAdUserAction;
object = {};
object.type = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType.CLICK_INTERNAL;
object.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
object.adCreativeId = questId;
object.questContentCTA = QuestContentCTA.DEFIBRILLATOR;
object.surfaceId = QuestContent.QUEST_BOTTOM_SHEET;
object.sourceQuestContent = sourceQuestContent;
object.impressionId = env0_4;
Reflect.apply(captureAdUserAction, value, [object]);
} else {
env0_3({questId: questId, questContent: QuestContent.QUEST_BOTTOM_SHEET,
questContentCTA: QuestContentCTA.DEFIBRILLATOR, sourceQuestContent: sourceQuestContent});
}
if (onPress != null) {
onPress(a0);
}
}
}
}
function ClaimButtonOnPress() { // fn#103307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:3531, owner: ClaimButton.onPress, offset: 0x022613e0, size: 361 bytes, params: 1, frame: 17
var object2;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
var captureAdUserAction;
let value = environment.__proto__;
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_footer'])) {
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 = questId;
object2.questContentCTA = QuestContentCTA.CLAIM_REWARD;
object2.surfaceId = QuestContent.QUEST_BOTTOM_SHEET;
object2.sourceQuestContent = sourceQuestContent;
object2.impressionId = env0_4;
Reflect.apply(captureAdUserAction, value, [object2]);
} else {
env0_3({questId: questId, questContent: QuestContent.QUEST_BOTTOM_SHEET,
questContentCTA: QuestContentCTA.CLAIM_REWARD, sourceQuestContent: sourceQuestContent});
function ClaimButton({questId, disabled, loading, onPress, sourceQuestContent}) { // fn#103306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:3279, offset: 0x02261300, size: 224 bytes, params: 2, frame: 18
const env0_3 = (AnalyticsHooksModule).useTrackQuestContentClickedWithImpression();
const env0_4 = (ContentImpressionTrackerHooksModule).useQuestImpressionId();
const Button = (ButtonNativeModule).Button;
const buttonProps = {'grow': true, 'size': 'lg', disabled: disabled, loading: loading, onPress: onPress_103307};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
buttonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cfY4PE);
return <Button {...buttonProps} />;
function ClaimButtonOnPress() { // fn#103307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:3531, owner: ClaimButton.onPress, offset: 0x022613e0, size: 361 bytes, params: 1, frame: 17
var object;
const QuestContent = (QuestTypesModule).QuestContent;
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
var captureAdUserAction;
let value = environment.__proto__;
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_footer'])) {
value = require(9517) /* metro dependency 9517: captureAdUserAction */;
captureAdUserAction = value.captureAdUserAction;
object = {};
object.type = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType.CLICK_INTERNAL;
object.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
object.adCreativeId = questId;
object.questContentCTA = QuestContentCTA.CLAIM_REWARD;
object.surfaceId = QuestContent.QUEST_BOTTOM_SHEET;
object.sourceQuestContent = sourceQuestContent;
object.impressionId = env0_4;
Reflect.apply(captureAdUserAction, value, [object]);
} else {
env0_3({questId: questId, questContent: QuestContent.QUEST_BOTTOM_SHEET,
questContentCTA: QuestContentCTA.CLAIM_REWARD, sourceQuestContent: sourceQuestContent});
}
onPress();
}
}
onPress();
}
function AnimatedFooterUseReducedMotion() { // fn#103309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:4788, owner: AnimatedFooter.useReducedMotion, offset: 0x022617b3, size: 59 bytes, params: 1, frame: 13
return (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.useReducedMotion;
});
}
function _fun103311() { // fn#103311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:4930, offset: 0x022617fd, size: 85 bytes, params: 1, frame: 19
const binding = env0_3;
const set = binding.set;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const value3 = 0;
Reflect.apply(set, binding, [Reflect.apply(withTiming, timingModule, [env0_0 ? 1 : value3,
{duration: env0_2 ? value3 : 200}])]);
}
function AnimatedFooterY() { // fn#103312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:5039, owner: AnimatedFooter.y, offset: 0x02261852, size: 64 bytes, params: 1, frame: 10
const object2 = {'opacity': null, 'position': 'absolute', 'top': 0, 'left': 0};
object2.opacity = env0_3.get();
object2.transform = [{translateX: PX_16}];
return object2;
}
function AnimatedFooterB() { // fn#103313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:5244, owner: AnimatedFooter.B, offset: 0x02261892, size: 162 bytes, params: 1, frame: 22
let value = environment.__proto__;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = reanimatedRexportModule.interpolate;
const value3 = env0_3.get();
const items2 = [width - 2 * PX_16];
value = width - 2.5 * PX_16;
const LARGE_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).LARGE_BUTTON_HEIGHT;
items2[1] = value - LARGE_BUTTON_HEIGHT;
return {width: Reflect.apply(interpolate, reanimatedRexportModule, [value3, [0, 1], items2]), alignSelf: 'flex-end'};
}
function _fun103315() { // fn#103315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:6251, offset: 0x02261dad, size: 64 bytes, params: 1, frame: 11
var environment;
let value = environment.__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(_fun103317);
});
}
function _fun103316(a0) { // fn#103316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:6293, offset: 0x02261ded, size: 36 bytes, params: 2, frame: 11
const env0_0 = a0;
return xboxAndPlaystationAccounts.find(_fun103317);
function AnimatedFooter({onLayout, ctaButton, backButton, style, withSafeArea}) { // fn#103308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:4630, offset: 0x02261549, size: 618 bytes, params: 2, frame: 29
withSafeArea = withSafeArea === undefined || withSafeArea;
const r16 = backButton != null && backButton !== false;
const bottom = (UseSafeAreaInsetsNative)().bottom;
const styles = useStyles();
const width = (UseWindowDimensionsNative)().width;
const value2 = (() => (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
_fun103310))();
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(r16 ? 1 : 0);
ReactModule.useEffect(_fun103311, [r16, value2, value5]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = AnimatedFooterY;
closure.__closure = {animation: value5, H_PADDING_PX: PX_16};
closure.__workletHash = 7564903336036;
closure.__initData = env0_14;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue3 = reanimatedRexportModule;
useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = AnimatedFooterB;
object = {interpolate: reanimatedRexportModule.interpolate, animation: value5, windowWidth: width,
H_PADDING_PX: PX_16};
const LARGE_BUTTON_HEIGHT = (ButtonConstantsNativeModule).LARGE_BUTTON_HEIGHT;
object.ICON_SIZE_PX = LARGE_BUTTON_HEIGHT;
closure.__closure = object;
closure.__workletHash = 9095621288509;
closure.__initData = env0_15;
const value7 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const Math = global.Math;
const value8 = Math.max(bottom, ACTION_SHEET_MINIMUM_BOTTOM_PADDING);
const items2 = [styles.container];
items2[1] = withSafeArea && ({paddingBottom: value8});
items2[2] = style;
const View2 = (ReanimatedRexport).View;
const view = (
<View2 style={value6}>
{backButton}
</View2>
);
const View3 = (ReanimatedRexport).View;
return (
<View style={items2} onLayout={onLayout}>
{view}
<View3 style={value7}>
{ctaButton}
</View3>
</View>
);
function AnimatedFooterUseReducedMotion() { // fn#103309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:4788, owner: AnimatedFooter.useReducedMotion, offset: 0x022617b3, size: 59 bytes, params: 1, frame: 13
return (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.useReducedMotion;
});
function _fun103310() { // fn#103310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:4856, offset: 0x022617ee, size: 15 bytes, params: 1, frame: 1
return AccessibilityStore.useReducedMotion;
}
}
function _fun103311() { // fn#103311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:4930, offset: 0x022617fd, size: 85 bytes, params: 1, frame: 19
const set = Module00057.set;
const withTiming = TimingModule.withTiming;
const value3 = 0;
Reflect.apply(set, Module00057, [Reflect.apply(withTiming, TimingModule, [env0_0 ? 1 : value3,
{duration: env0_2 ? value3 : 200}])]);
}
function AnimatedFooterY() { // fn#103312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:5039, owner: AnimatedFooter.y, offset: 0x02261852, size: 64 bytes, params: 1, frame: 10
const object = {'opacity': null, 'position': 'absolute', 'top': 0, 'left': 0};
object.opacity = Module00057.get();
object.transform = [{translateX: PX_16}];
return object;
}
function AnimatedFooterB() { // fn#103313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:5244, owner: AnimatedFooter.B, offset: 0x02261892, size: 162 bytes, params: 1, frame: 22
let value = environment.__proto__;
const interpolate = ReanimatedRexportModule.interpolate;
const value3 = Module00057.get();
const items2 = [width - 2 * PX_16];
value = width - 2.5 * PX_16;
const LARGE_BUTTON_HEIGHT = (ButtonConstantsNativeModule).LARGE_BUTTON_HEIGHT;
items2[1] = value - LARGE_BUTTON_HEIGHT;
return {width: Reflect.apply(interpolate, ReanimatedRexportModule, [value3, [0, 1], items2]), alignSelf: 'flex-end'};
}
}
function QuestBottomSheetFooter({quest, onLayout, step, isDefibrilating, onConnectConsoleNext, onBack, onDefib, style, withSafeArea, sourceQuestContent}) { // fn#103314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:5820, offset: 0x02261934, size: 1145 bytes, params: 2, frame: 40
var r7;
var r0;
var value23;
var IconButton;
var intl;
isDefibrilating = !(isDefibrilating === undefined) && isDefibrilating;
const object = {quest: quest, sourceQuestContent: sourceQuestContent};
const value4 = useQuestRewardClaimHandler(object);
const value5 = (QuestHooksModule).useQuestTaskDetails(quest);
const value6 = (QuestHooksModule).useIsQuestProgressing(quest);
const property = Module00057((QuestHooksModule).useTaskPlatformScreen(quest,
value5), 1)[0];
const useConnectedAccounts = QuestHooksModule.useConnectedAccounts;
const value9 = ReactModule.useMemo(_fun103315, [quest, Reflect.apply(useConnectedAccounts, QuestHooksModule,
[]).xboxAndPlaystationAccounts]);
const value10 = (QuestHooksNativeModule).useHasWatchVideoOnMobileTasks(quest.config);
const {isMobileActivityQuest, launchMobileActivity,
questApplication} = (QuestHooksNativeModule).useMobileActivityQuest(quest);
const value12 = (QuestCopyHooksModule).usePrimaryCtaCopy({quest: quest,
application: questApplication});
const value13 = (QuestBottomSheetHooksModule).useMobileActivityPressHandler({questId: quest.id,
sourceQuestContent: sourceQuestContent, launchMobileActivity: launchMobileActivity});
let userStatus = quest.userStatus;
const value15 = userStatus?.completedAt != null;
userStatus = quest.userStatus;
const value16 = userStatus?.claimedAt != null;
const QuestBottomSheetStep = (require(13591) /* metro dependency 13591: QuestBottomSheet */).QuestBottomSheetStep;
const TASK_SELECT = QuestBottomSheetStep.TASK_SELECT;
if (step === TASK_SELECT) {
r0 = null;
} else {
var animatedFooterProps = {onLayout: onLayout,
ctaButton: (require(13591) /* metro dependency 13591: QuestBottomSheet */).QuestBottomSheetStep.CONSOLE_CONNECT === step ? <NextButton onPress={onConnectConsoleNext} disabled={value9.length === 0} /> : (require(13591) /* metro dependency 13591: QuestBottomSheet */).QuestBottomSheetStep.TASK_STATUS !== step ? null : value15 ? <ClaimButton questId={quest.id} onPress={value4.claim} disabled={value16} loading={value4.isLoading || value4.isClaiming} sourceQuestContent={sourceQuestContent} /> : value10 ? <WatchTaskButton questId={quest.id} taskDetails={value5} sourceQuestContent={sourceQuestContent} /> : isMobileActivityQuest ? ((Button) => <Button grow size="lg" onPress={value13} text={value12} icon={(require(9480) /* metro dependency 9480: QuestUtilsNative */).getPrimaryCtaIcon(quest)} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button) : property !== (require(6531) /* metro dependency 6531: QuestTypes */).TaskPlatformScreen.CONSOLE || value6 ? <ClaimButton questId={quest.id} onPress={value4.claim} disabled sourceQuestContent={sourceQuestContent} /> : <DefibButton questId={quest.id} loading={isDefibrilating} disabled={isDefibrilating} onPress={onDefib} sourceQuestContent={sourceQuestContent} />};
value23 = onBack != null;
if (value23) {
IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r7 = (
<IconButton
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
variant="secondary"
icon={((ArrowLargeLeftIcon) => <ArrowLargeLeftIcon />)((require(5284) /* metro dependency 5284: ArrowLargeLeftIcon */).ArrowLargeLeftIcon)}
onPress={onBack}
size="lg"
/>
);
} else {
r7 = value23;
}
animatedFooterProps.backButton = r7;
animatedFooterProps.style = style;
animatedFooterProps.withSafeArea = withSafeArea;
r0 = <AnimatedFooter {...animatedFooterProps} />;
}
return r0;
function _fun103315() { // fn#103315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:6251, offset: 0x02261dad, size: 64 bytes, params: 1, frame: 11
var environment;
let value = environment.__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(_fun103317);
});
function _fun103316(a0) { // fn#103316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:6293, offset: 0x02261ded, size: 36 bytes, params: 2, frame: 11
const env0_0 = a0;
return xboxAndPlaystationAccounts.find(_fun103317);
function _fun103317({type}) { // fn#103317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:6304, offset: 0x0108b18c, size: 21 bytes, params: 2, frame: 2
return type === env0_0;
}
}
}
}
}
global.__d(_fun103294, 13593, [57, 31, 27, 4502, 1878, 7093, 6276, 33, 697, 4501, 6531, 9483, 9500, 9505, 8461, 566,
3860, 5132, 9480, 13594, 4578, 9523, 9520, 13568, 9950, 13591, 8341, 1244, 5284, 9949, 9513, 13127, 9519, 9517,
9518, 7121, 7120, 1585, 1478, 4017, 4504, 4582,
2]) /* metro module 13593, dependencies: [57, 31, 27, 4502, 1878, 7093, 6276, 33, 697, 4501, 6531, 9483, 9500, 9505, 8461, 566, 3860, 5132, 9480, 13594, 4578, 9523, 9520, 13568, 9950, 13591, 8341, 1244, 5284, 9949, 9513, 13127, 9519, 9517, 9518, 7121, 7120, 1585, 1478, 4017, 4504, 4582, 2] */;
@@ -1,149 +1,170 @@
/* Metro module 13592; source: modules/quests/native/QuestBottomSheet/QuestBottomSheetHeader.tsx; dependencies: [57, 31, 27, 1878, 33, 4501, 697, 9483, 7116, 13568, 566, 9500, 7114, 1244, 13591, 6531, 13569, 4559, 4570, 4573, 5278, 8638, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseIsScreenReaderEnabledNativeModule from '../../../a11y/native/useIsScreenReaderEnabled.native.tsx'; /* Metro dependency 4559 */
import * as QuestTaskUtilsModule from '../../utils/QuestTaskUtils.tsx'; /* Metro dependency 7116 */
import * as QuestHooksModule from '../../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as QuestRewardUtilsModule from '../../utils/QuestRewardUtils.tsx'; /* Metro dependency 9500 */
import * as QuestHooksNativeModule from '../QuestHooks.native.tsx'; /* Metro dependency 13568 */
import * as QuestDockHooksModule from '../QuestDock/QuestDockHooks.tsx'; /* Metro dependency 13569 */
import * as QuestBottomSheetModule from './QuestBottomSheet.tsx'; /* Metro dependency 13591 */
function _fun103287(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13782:6, offset: 0x0225ffd8, size: 390 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {'display': 'flex', 'gap': 6};
object = {};
const object2 = {'display': 'flex', 'gap': 6};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
object2.paddingHorizontal = PX_16;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.paddingTop = PX_8;
object3.container = object4;
object2.paddingTop = PX_8;
object.container = object2;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.containerWithActionSheet = {'alignItems': 'center', 'flexDirection': 'row', paddingHorizontal: PX_8};
object3.title = {textAlign: 'center'};
object3.titleWithActionSheet = {'textAlign': 'left', 'flex': 1};
object3.actionSheetButton = {'flexGrow': 0, 'flexShrink': 0};
const env0_9 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheetHeader.tsx');
object.containerWithActionSheet = {'alignItems': 'center', 'flexDirection': 'row', paddingHorizontal: PX_8};
object.title = {textAlign: 'center'};
object.titleWithActionSheet = {'textAlign': 'left', 'flex': 1};
object.actionSheetButton = {'flexGrow': 0, 'flexShrink': 0};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheetHeader.tsx');
exports.default = QuestBottomSheetHeader;
}
function QuestBottomSheetHeader({quest, step, withActionSheet, location}) { // fn#103288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13782:627, offset: 0x0226015e, size: 530 bytes, params: 2, frame: 26
var r5;
var PressableOpacity;
var intl;
withActionSheet = !(withActionSheet === undefined) && withActionSheet;
const styles = useStyles();
const value2 = (require(13569) /* metro dependency 13569: QuestDockHooks */).useActionSheetPressHandler(quest);
const value3 = useHeaderCopy({quest: quest, step: step, location: location});
const value4 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
const binding = env0_4;
const value5 = binding.useRef(null);
binding.useEffect(_fun103293, [value4]);
const items2 = [styles.container];
items2[1] = withActionSheet && styles.containerWithActionSheet;
const r6 = value3 != null && ((Text) => <Text ref={value5} variant="redesign/heading-18/bold" color="mobile-text-heading-primary" accessibilityRole="header" style={[styles.title,
withActionSheet && styles.titleWithActionSheet]}>{value3}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
if (withActionSheet) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['UKOtz+'])} onPress={value2} style={styles.actionSheetButton}>{((MoreHorizontalIcon) => <MoreHorizontalIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon)}</PressableOpacity>;
} else {
r5 = withActionSheet;
}
return (
<View style={items2}>
{r6}
{r5}
</View>
);
}
function useHeaderCopy({quest, step}) { // fn#103289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13782:762, owner: QuestBottomSheetHeader.useHeaderCopy, offset: 0x02260370, size: 507 bytes, params: 2, frame: 28
let value = undefined;
const userStatus = quest.userStatus;
const value2 = (userStatus == null ? value : userStatus.completedAt) != null;
const gameTitle = quest.config.messages.gameTitle;
const value4 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
const hasWatchVideoTasks2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).hasWatchVideoTasks(quest);
const isInGameQuest2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).isInGameQuest(quest);
const property = env1_3((require(9483) /* metro dependency 9483: QuestHooks */).useTaskPlatformScreen(quest,
value4), 1)[0];
const targetMinutes = value4.targetMinutes;
const binding = env1_4;
const value7 = binding.useMemo(_fun103290, [quest]);
const value8 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useHasWatchVideoOnMobileTasks(quest.config);
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const defaultRewardNameWithArticle = (require(9500) /* metro dependency 9500: QuestRewardUtils */).getDefaultRewardNameWithArticle(quest.config,
currentUser);
value = require(7114) /* metro dependency 7114: QuestUtils */;
value = value.isSponsoredPlayQuest(quest);
return binding.useMemo(_fun103292, [value2, hasWatchVideoTasks2, step, property, value7, gameTitle,
defaultRewardNameWithArticle, targetMinutes, value8, isInGameQuest2, value, quest.config]);
}
function _fun103293() { // fn#103293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13782:2327, offset: 0x022608b3, size: 86 bytes, params: 1, frame: 12
var value3;
var moduleValue;
if (env0_0 && env0_1.current != null) {
value3 = environment.__proto__;
moduleValue = require(4570) /* metro dependency 4570: setAccessibilityFocusAndroid */;
moduleValue.setAccessibilityFocus({ref: env0_1, delay: 100});
}
}
function _fun103290() { // fn#103290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13782:1065, offset: 0x0226056b, size: 52 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
return (require(7116) /* metro dependency 7116: QuestTaskUtils */).hasStreamOnDesktopTask({quest: quest});
}
function _fun103292() { // fn#103292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13782:1335, offset: 0x0226059f, size: 788 bytes, params: 1, frame: 19
var value2;
var moduleValue;
var value3;
var stepBinding;
var value4;
var binding;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value5;
var value;
if (env0_2) {
value = environment.__proto__.__proto__;
return intl.string(t['ij5E/5']);
}
if (env0_4) {
binding = env0_9;
value5 = environment.__proto__.__proto__;
formatToPlainString = intl.formatToPlainString;
return binding ? Reflect.apply(formatToPlainString, intl, [t.ttFsLj,
{reward: env0_10}]) : Reflect.apply(formatToPlainString, intl, [t.IpoqqA, {questReward: env0_10}]);
}
if (env0_5) {
value2 = environment.__proto__.__proto__;
moduleValue = require(7116) /* metro dependency 7116: QuestTaskUtils */;
value3 = moduleValue.getDefaultInGameTask(quest.config);
if (value3 != null) {
return value3.messages.taskDescription;
function QuestBottomSheetHeader({quest, step, withActionSheet, location}) { // fn#103288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13782:627, offset: 0x0226015e, size: 530 bytes, params: 2, frame: 26
var r5;
var PressableOpacity;
var intl;
withActionSheet = !(withActionSheet === undefined) && withActionSheet;
const styles = useStyles();
const value2 = (QuestDockHooksModule).useActionSheetPressHandler(quest);
const value3 = useHeaderCopy({quest: quest, step: step, location: location});
const value4 = (UseIsScreenReaderEnabledNativeModule).useIsScreenReaderEnabled();
const value5 = ReactModule.useRef(null);
ReactModule.useEffect(_fun103293, [value4]);
const items2 = [styles.container];
items2[1] = withActionSheet && styles.containerWithActionSheet;
const r6 = value3 != null && ((Text) => <Text ref={value5} variant="redesign/heading-18/bold" color="mobile-text-heading-primary" accessibilityRole="header" style={[styles.title,
withActionSheet && styles.titleWithActionSheet]}>{value3}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
if (withActionSheet) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = (
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['UKOtz+'])}
onPress={value2}
style={styles.actionSheetButton}
>
{((MoreHorizontalIcon) => <MoreHorizontalIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon)}
</PressableOpacity>
);
} else {
r5 = withActionSheet;
}
stepBinding = step;
value4 = environment.__proto__.__proto__;
} else {
stepBinding = step;
return (
<View style={items2}>
{r6}
{r5}
</View>
);
function useHeaderCopy({quest, step}) { // fn#103289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13782:762, owner: QuestBottomSheetHeader.useHeaderCopy, offset: 0x02260370, size: 507 bytes, params: 2, frame: 28
let value = undefined;
const userStatus = quest.userStatus;
const value2 = (userStatus == null ? value : userStatus.completedAt) != null;
const gameTitle = quest.config.messages.gameTitle;
const value4 = (QuestHooksModule).useQuestTaskDetails(quest);
const hasWatchVideoTasks2 = (QuestTaskUtilsModule).hasWatchVideoTasks(quest);
const isInGameQuest2 = (QuestTaskUtilsModule).isInGameQuest(quest);
const property = env1_3((QuestHooksModule).useTaskPlatformScreen(quest,
value4), 1)[0];
const targetMinutes = value4.targetMinutes;
const binding = env1_4;
const value7 = binding.useMemo(_fun103290, [quest]);
const value8 = (QuestHooksNativeModule).useHasWatchVideoOnMobileTasks(quest.config);
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const defaultRewardNameWithArticle = (QuestRewardUtilsModule).getDefaultRewardNameWithArticle(quest.config,
currentUser);
value = require(7114) /* metro dependency 7114: QuestUtils */;
value = value.isSponsoredPlayQuest(quest);
return binding.useMemo(_fun103292, [value2, hasWatchVideoTasks2, step, property, value7, gameTitle,
defaultRewardNameWithArticle, targetMinutes, value8, isInGameQuest2, value, quest.config]);
function _fun103290() { // fn#103290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13782:1065, offset: 0x0226056b, size: 52 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
return (QuestTaskUtilsModule).hasStreamOnDesktopTask({quest: quest});
}
function _fun103292() { // fn#103292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13782:1335, offset: 0x0226059f, size: 788 bytes, params: 1, frame: 19
var value2;
var moduleValue;
var value3;
var stepBinding;
var value4;
var binding;
const intl = (IndexNativeModule).intl;
var formatToPlainString;
const t = (IndexNativeModule).t;
var value5;
var value;
if (env0_2) {
value = environment.__proto__.__proto__;
return intl.string(t['ij5E/5']);
}
if (ReactModule) {
binding = env0_9;
value5 = environment.__proto__.__proto__;
formatToPlainString = intl.formatToPlainString;
return binding ? Reflect.apply(formatToPlainString, intl, [t.ttFsLj,
{reward: env0_10}]) : Reflect.apply(formatToPlainString, intl, [t.IpoqqA, {questReward: env0_10}]);
}
if (ReactNativeModule.View) {
value2 = environment.__proto__.__proto__;
moduleValue = require(7116) /* metro dependency 7116: QuestTaskUtils */;
value3 = moduleValue.getDefaultInGameTask(quest.config);
if (value3 != null) {
return value3.messages.taskDescription;
}
stepBinding = step;
value4 = environment.__proto__.__proto__;
} else {
stepBinding = step;
}
const QuestBottomSheetStep = (QuestBottomSheetModule).QuestBottomSheetStep;
const TASK_SELECT = QuestBottomSheetStep.TASK_SELECT;
return stepBinding === TASK_SELECT ? intl.string(t.drVw4T) : step === QuestBottomSheetStep.CONSOLE_CONNECT ? intl.string(t.svdwbA) : env0_11 ? intl.formatToPlainString(t['2GJLK2'],
{targetMinutes: targetMinutes,
rewardNameWithArticle: env0_10}) : env0_6 !== (require(6531) /* metro dependency 6531: QuestTypes */).TaskPlatformScreen.DESKTOP ? intl.formatToPlainString(t.NIimTt,
{gameTitle: gameTitle, rewardNameWithArticle: env0_10,
targetMinutes: targetMinutes}) : env0_8 ? intl.formatToPlainString(t['hkJ+Gs'], {gameTitle: gameTitle,
questReward: env0_10, streamingDurationRequirement: targetMinutes}) : intl.formatToPlainString(t.NIimTt,
{gameTitle: gameTitle, rewardNameWithArticle: env0_10, targetMinutes: targetMinutes});
}
}
function _fun103293() { // fn#103293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13782:2327, offset: 0x022608b3, size: 86 bytes, params: 1, frame: 12
var value3;
var moduleValue;
if (env0_0 && env0_1.current != null) {
value3 = environment.__proto__;
moduleValue = require(4570) /* metro dependency 4570: setAccessibilityFocusAndroid */;
moduleValue.setAccessibilityFocus({ref: env0_1, delay: 100});
}
}
}
const QuestBottomSheetStep = (require(13591) /* metro dependency 13591: QuestBottomSheet */).QuestBottomSheetStep;
const TASK_SELECT = QuestBottomSheetStep.TASK_SELECT;
return stepBinding === TASK_SELECT ? intl.string(t.drVw4T) : step === QuestBottomSheetStep.CONSOLE_CONNECT ? intl.string(t.svdwbA) : env0_11 ? intl.formatToPlainString(t['2GJLK2'],
{targetMinutes: targetMinutes,
rewardNameWithArticle: env0_10}) : env0_6 !== (require(6531) /* metro dependency 6531: QuestTypes */).TaskPlatformScreen.DESKTOP ? intl.formatToPlainString(t.NIimTt,
{gameTitle: gameTitle, rewardNameWithArticle: env0_10,
targetMinutes: targetMinutes}) : env0_8 ? intl.formatToPlainString(t['hkJ+Gs'], {gameTitle: gameTitle,
questReward: env0_10, streamingDurationRequirement: targetMinutes}) : intl.formatToPlainString(t.NIimTt,
{gameTitle: gameTitle, rewardNameWithArticle: env0_10, targetMinutes: targetMinutes});
}
global.__d(_fun103287, 13592, [57, 31, 27, 1878, 33, 4501, 697, 9483, 7116, 13568, 566, 9500, 7114, 1244, 13591,
6531, 13569, 4559, 4570, 4573, 5278, 8638,
2]) /* metro module 13592, dependencies: [57, 31, 27, 1878, 33, 4501, 697, 9483, 7116, 13568, 566, 9500, 7114, 1244, 13591, 6531, 13569, 4559, 4570, 4573, 5278, 8638, 2] */;
@@ -1,159 +1,170 @@
/* Metro module 13594; source: modules/quests/native/QuestBottomSheet/QuestBottomSheetHooks.tsx; dependencies: [5, 31, 6528, 13576, 13591, 4080, 9513, 13595, 9519, 9517, 9518, 7121, 7120, 6531, 7110, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import OpenVideoQuestModal from '../VideoQuestModal/openVideoQuestModal.tsx'; /* Metro dependency 13595 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestTypesModule from '../../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as AnalyticsTypesModule from '../../lib/analytics/AnalyticsTypes.tsx'; /* Metro dependency 7120 */
import * as ContentImpressionTrackerHooksModule from '../../lib/analytics/ContentImpressionTrackerHooks.tsx'; /* Metro dependency 9513 */
import * as AdAnalyticsInterfaceExperimentModule from '../../experiments/AdAnalyticsInterfaceExperiment.tsx'; /* Metro dependency 9519 */
import * as QuestDockExternalCoordinationContextModule from '../QuestDock/QuestDockExternalCoordinationContext.tsx'; /* Metro dependency 13576 */
import * as QuestBottomSheetModule from './QuestBottomSheet.tsx'; /* Metro dependency 13591 */
function _fun103318(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13784:6, offset: 0x02261e11, size: 183 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheetHooks.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheetHooks.tsx');
exports.useWatchTaskPressHandler = useWatchTaskPressHandler;
exports.useMobileActivityPressHandler = useMobileActivityPressHandler;
}
function useDismissSheetOrCollapseDock() { // fn#103319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13784:140, offset: 0x02261ec8, size: 137 bytes, params: 1, frame: 18
let binding = ReactModule;
let useContext = binding.useContext;
const QuestDockExternalCoordinationContext = (QuestDockExternalCoordinationContextModule).QuestDockExternalCoordinationContext;
const setRestingQuestDockMode = Reflect.apply(useContext, binding,
[QuestDockExternalCoordinationContext]).setRestingQuestDockMode;
binding = ReactModule;
useContext = binding.useContext;
const QuestBottomSheetContext = (QuestBottomSheetModule).QuestBottomSheetContext;
return ReactModule.useCallback(_fun103320, [Reflect.apply(useContext, binding,
[QuestBottomSheetContext]).isInQuestBottomSheet, setRestingQuestDockMode]);
function _fun103320() { // fn#103320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13784:361, offset: 0x02261f51, size: 79 bytes, params: 1, frame: 12
if (isInQuestBottomSheet) {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('QuestBottomSheet');
} else {
setRestingQuestDockMode(QuestDockMode.COLLAPSED);
}
}
function useDismissSheetOrCollapseDock() { // fn#103319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13784:140, offset: 0x02261ec8, size: 137 bytes, params: 1, frame: 18
let binding = env0_4;
let useContext = binding.useContext;
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
const setRestingQuestDockMode = Reflect.apply(useContext, binding,
[QuestDockExternalCoordinationContext]).setRestingQuestDockMode;
binding = env0_4;
useContext = binding.useContext;
const QuestBottomSheetContext = (require(13591) /* metro dependency 13591: QuestBottomSheet */).QuestBottomSheetContext;
return env0_4.useCallback(_fun103320, [Reflect.apply(useContext, binding,
[QuestBottomSheetContext]).isInQuestBottomSheet, setRestingQuestDockMode]);
}
function useWatchTaskPressHandler({questId, sourceQuestContent}) { // fn#103321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13784:562, offset: 0x02261fa0, size: 120 bytes, params: 2, frame: 18
return env0_4.useCallback(_fun103322, [questId, useDismissSheetOrCollapseDock(),
(require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpression(),
sourceQuestContent]);
}
function useMobileActivityPressHandler({questId, sourceQuestContent, launchMobileActivity}) { // fn#103323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13784:1671, offset: 0x0226224a, size: 143 bytes, params: 2, frame: 19
const value2 = useDismissSheetOrCollapseDock();
const env0_3 = value2;
const value3 = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpression();
return value3.useCallback(env0_3(_fun103325), [questId, value2, launchMobileActivity, value3, sourceQuestContent]);
}
function _fun103320() { // fn#103320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13784:361, offset: 0x02261f51, size: 79 bytes, params: 1, frame: 12
if (isInQuestBottomSheet) {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('QuestBottomSheet');
} else {
setRestingQuestDockMode(QuestDockMode.COLLAPSED);
}
function useWatchTaskPressHandler({questId, sourceQuestContent}) { // fn#103321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13784:562, offset: 0x02261fa0, size: 120 bytes, params: 2, frame: 18
return ReactModule.useCallback(_fun103322, [questId, useDismissSheetOrCollapseDock(),
(ContentImpressionTrackerHooksModule).useQuestImpression(),
sourceQuestContent]);
function _fun103322() { // fn#103322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13784:725, offset: 0x02262018, size: 562 bytes, params: 1, frame: 20
var r4;
var moduleValue2;
var trackQuestContentClicked;
const QuestContent = (QuestTypesModule).QuestContent;
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
var moduleValue3;
var captureAdUserAction;
const value2 = undefined;
env0_2();
const defaultImport = OpenVideoQuestModal;
let object = {};
object.questId = questId;
object.questContentPosition = Module00005 == null ? value2 : Module00005.getQuestContentPosition();
object.sourceQuestContent = sourceQuestContent;
defaultImport(object);
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_watch_task'])) {
moduleValue3 = require(9517) /* metro dependency 9517: captureAdUserAction */;
captureAdUserAction = moduleValue3.captureAdUserAction;
object = {};
object.type = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType.CLICK_INTERNAL;
object.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
object.adCreativeId = questId;
object.questContentCTA = QuestContentCTA.WATCH_VIDEO;
object.surfaceId = QuestContent.QUEST_BOTTOM_SHEET;
object.sourceQuestContent = sourceQuestContent;
r4 = Module00005 == null ? value2 : Module00005.getId();
object.impressionId = r4;
r4 = Module00005 == null ? value2 : Module00005.getQuestContentPosition();
object.questContentPosition = r4;
Reflect.apply(captureAdUserAction, moduleValue3, [object]);
} else {
moduleValue2 = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackQuestContentClicked = moduleValue2.trackQuestContentClicked;
object = {};
object.questId = questId;
object.questContent = QuestContent.QUEST_BOTTOM_SHEET;
object.questContentCTA = QuestContentCTA.WATCH_VIDEO;
r4 = Module00005 == null ? value2 : Module00005.getQuestContentPosition();
object.questContentPosition = r4;
r4 = Module00005 == null ? value2 : Module00005.getId();
object.impressionId = r4;
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestContentClicked, moduleValue2, [object]);
}
return value2;
}
}
function useMobileActivityPressHandler({questId, sourceQuestContent, launchMobileActivity}) { // fn#103323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13784:1671, offset: 0x0226224a, size: 143 bytes, params: 2, frame: 19
const value2 = useDismissSheetOrCollapseDock();
const env0_3 = value2;
const value3 = (ContentImpressionTrackerHooksModule).useQuestImpression();
return value3.useCallback(env0_3(_fun103325), [questId, value2, launchMobileActivity, value3, sourceQuestContent]);
function* _fun103325() { // fn#103325, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13784:1866, offset: 0x022622e4, size: 525 bytes, params: 1, frame: 22
var r6;
var value8;
var trackQuestContentClicked;
var object;
var value11;
var captureAdUserAction;
if (false) {
return undefined;
}
value = environment.__proto__;
const value3 = undefined;
env1_3();
yield dependencyMap();
if (false) {
return undefined;
}
let binding = env2_0;
const binding2 = env2_2;
const value7 = binding(binding2[8]);
const shouldMigrateToAdAnalyticsInterface = value7.shouldMigrateToAdAnalyticsInterface;
const AdAnalyticsInterfaceExperimentStep = binding(binding2[8]).AdAnalyticsInterfaceExperimentStep;
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
const shouldMigrateToAdAnalyticsInterface2 = Reflect.apply(shouldMigrateToAdAnalyticsInterface, value7,
[STEP_2_CLICKED_INTERNAL, 'quest_bottom_sheet_mobile_activity']);
binding = env2_0;
const binding3 = env2_2;
if (shouldMigrateToAdAnalyticsInterface2) {
value11 = binding(binding3[9]);
captureAdUserAction = value11.captureAdUserAction;
object = {};
object.type = binding(binding3[10]).AdUserActionType.CLICK_INTERNAL;
object.adCreativeType = binding(binding3[11]).AdCreativeType.QUEST;
object.adCreativeId = require;
object.questContentCTA = binding(binding3[12]).QuestContentCTA.LAUNCH_MOBILE_ACTIVITY;
object.surfaceId = binding(binding3[13]).QuestContent.QUEST_BOTTOM_SHEET;
object.sourceQuestContent = importDefault;
r6 = env1_4 == null ? value3 : env1_4.getId();
object.impressionId = r6;
r6 = env1_4 == null ? value3 : env1_4.getQuestContentPosition();
object.questContentPosition = r6;
Reflect.apply(captureAdUserAction, value11, [object]);
} else {
value8 = binding(binding3[14]);
trackQuestContentClicked = value8.trackQuestContentClicked;
object = {};
object.questId = require;
object.questContent = binding(binding3[13]).QuestContent.QUEST_BOTTOM_SHEET;
object.questContentCTA = binding(binding3[12]).QuestContentCTA.LAUNCH_MOBILE_ACTIVITY;
r6 = env1_4 == null ? value3 : env1_4.getQuestContentPosition();
object.questContentPosition = r6;
r6 = env1_4 == null ? value3 : env1_4.getId();
object.impressionId = r6;
object.sourceQuestContent = importDefault;
Reflect.apply(trackQuestContentClicked, value8, [object]);
}
return value3;
}
}
}
function _fun103322() { // fn#103322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13784:725, offset: 0x02262018, size: 562 bytes, params: 1, frame: 20
var r4;
var moduleValue2;
var trackQuestContentClicked;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
var moduleValue3;
var captureAdUserAction;
const value2 = undefined;
env0_2();
const defaultImport = importDefault(13595) /* metro dependency 13595: openVideoQuestModal */;
let object2 = {};
object2.questId = questId;
object2.questContentPosition = env0_3 == null ? value2 : env0_3.getQuestContentPosition();
object2.sourceQuestContent = sourceQuestContent;
defaultImport(object2);
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_watch_task'])) {
moduleValue3 = require(9517) /* metro dependency 9517: captureAdUserAction */;
captureAdUserAction = moduleValue3.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 = questId;
object2.questContentCTA = QuestContentCTA.WATCH_VIDEO;
object2.surfaceId = QuestContent.QUEST_BOTTOM_SHEET;
object2.sourceQuestContent = sourceQuestContent;
r4 = env0_3 == null ? value2 : env0_3.getId();
object2.impressionId = r4;
r4 = env0_3 == null ? value2 : env0_3.getQuestContentPosition();
object2.questContentPosition = r4;
Reflect.apply(captureAdUserAction, moduleValue3, [object2]);
} else {
moduleValue2 = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackQuestContentClicked = moduleValue2.trackQuestContentClicked;
object2 = {};
object2.questId = questId;
object2.questContent = QuestContent.QUEST_BOTTOM_SHEET;
object2.questContentCTA = QuestContentCTA.WATCH_VIDEO;
r4 = env0_3 == null ? value2 : env0_3.getQuestContentPosition();
object2.questContentPosition = r4;
r4 = env0_3 == null ? value2 : env0_3.getId();
object2.impressionId = r4;
object2.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestContentClicked, moduleValue2, [object2]);
}
return value2;
}
function* _fun103325() { // fn#103325, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13784:1866, offset: 0x022622e4, size: 525 bytes, params: 1, frame: 22
var r6;
var value8;
var trackQuestContentClicked;
var object2;
var value11;
var captureAdUserAction;
if (false) {
return undefined;
}
value = environment.__proto__;
const value3 = undefined;
env1_3();
yield dependencyMap();
if (false) {
return undefined;
}
let binding = env2_0;
const binding2 = env2_2;
const value7 = binding(binding2[8]);
const shouldMigrateToAdAnalyticsInterface = value7.shouldMigrateToAdAnalyticsInterface;
const AdAnalyticsInterfaceExperimentStep = binding(binding2[8]).AdAnalyticsInterfaceExperimentStep;
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
const shouldMigrateToAdAnalyticsInterface2 = Reflect.apply(shouldMigrateToAdAnalyticsInterface, value7,
[STEP_2_CLICKED_INTERNAL, 'quest_bottom_sheet_mobile_activity']);
binding = env2_0;
const binding3 = env2_2;
if (shouldMigrateToAdAnalyticsInterface2) {
value11 = binding(binding3[9]);
captureAdUserAction = value11.captureAdUserAction;
object2 = {};
object2.type = binding(binding3[10]).AdUserActionType.CLICK_INTERNAL;
object2.adCreativeType = binding(binding3[11]).AdCreativeType.QUEST;
object2.adCreativeId = require;
object2.questContentCTA = binding(binding3[12]).QuestContentCTA.LAUNCH_MOBILE_ACTIVITY;
object2.surfaceId = binding(binding3[13]).QuestContent.QUEST_BOTTOM_SHEET;
object2.sourceQuestContent = importDefault;
r6 = env1_4 == null ? value3 : env1_4.getId();
object2.impressionId = r6;
r6 = env1_4 == null ? value3 : env1_4.getQuestContentPosition();
object2.questContentPosition = r6;
Reflect.apply(captureAdUserAction, value11, [object2]);
} else {
value8 = binding(binding3[14]);
trackQuestContentClicked = value8.trackQuestContentClicked;
object2 = {};
object2.questId = require;
object2.questContent = binding(binding3[13]).QuestContent.QUEST_BOTTOM_SHEET;
object2.questContentCTA = binding(binding3[12]).QuestContentCTA.LAUNCH_MOBILE_ACTIVITY;
r6 = env1_4 == null ? value3 : env1_4.getQuestContentPosition();
object2.questContentPosition = r6;
r6 = env1_4 == null ? value3 : env1_4.getId();
object2.impressionId = r6;
object2.sourceQuestContent = importDefault;
Reflect.apply(trackQuestContentClicked, value8, [object2]);
}
return value3;
}
global.__d(_fun103318, 13594, [5, 31, 6528, 13576, 13591, 4080, 9513, 13595, 9519, 9517, 9518, 7121, 7120, 6531,
7110,
2]) /* metro module 13594, dependencies: [5, 31, 6528, 13576, 13591, 4080, 9513, 13595, 9519, 9517, 9518, 7121, 7120, 6531, 7110, 2] */;
@@ -1,184 +1,166 @@
/* Metro module 13630; source: modules/quests/native/QuestBottomSheet/QuestBottomSheetProgressCard.tsx; dependencies: [31, 27, 1878, 33, 4501, 697, 9483, 9520, 566, 9500, 7114, 1244, 4573, 6535, 6239, 13620, 9495, 13594, 9480, 5278, 9543, 4589, 5475, 13631, 9376, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import QuestDockBlurredContentBackground from '../QuestDock/QuestDockBlurredContentBackground.tsx'; /* Metro dependency 13631 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as CardNativeModule from '../../../../design/components/Card/native/Card.native.tsx'; /* Metro dependency 6239 */
import * as FirstPartyQuestTaskTypesModule from '../../../../external/discord_common/js/shared/shared-constants/FirstPartyQuestTaskTypes.tsx'; /* Metro dependency 6535 */
import * as QuestUtilsModule from '../../utils/QuestUtils.tsx'; /* Metro dependency 7114 */
import * as PlayIconModule from '../../../../design/components/Icon/native/redesign/generated/PlayIcon.tsx'; /* Metro dependency 9376 */
import * as QuestHooksModule from '../../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as QuestRewardUtilsModule from '../../utils/QuestRewardUtils.tsx'; /* Metro dependency 9500 */
import * as QuestPlatformUtilsModule from '../../utils/QuestPlatformUtils.tsx'; /* Metro dependency 9520 */
import * as QuestBottomSheetHooksModule from './QuestBottomSheetHooks.tsx'; /* Metro dependency 13594 */
function _fun104088(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:6, offset: 0x02284837, size: 676 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.View;
const StyleSheet = value.StyleSheet;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.card = {padding: 0};
object2.cardWatchTask = {'justifyContent': 'flex-end', 'height': 210};
object = {};
object.card = {padding: 0};
object.cardWatchTask = {'justifyContent': 'flex-end', 'height': 210};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.content = {padding: PX_16};
object2.contentWatchTask = {alignItems: 'flex-end'};
const object3 = {'padding': 12, 'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'center',
object.content = {padding: PX_16};
object.contentWatchTask = {alignItems: 'flex-end'};
const object5 = {'padding': 12, 'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'center',
'alignItems': 'center'};
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object3.backgroundColor = BACKGROUND_MOD_MUTED;
object5.backgroundColor = BACKGROUND_MOD_MUTED;
let CARD_DEFAULT_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CARD_DEFAULT_RADIUS;
object3.borderBottomLeftRadius = CARD_DEFAULT_RADIUS;
object5.borderBottomLeftRadius = CARD_DEFAULT_RADIUS;
CARD_DEFAULT_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CARD_DEFAULT_RADIUS;
object3.borderBottomRightRadius = CARD_DEFAULT_RADIUS;
object3.borderWidth = 1;
object5.borderBottomRightRadius = CARD_DEFAULT_RADIUS;
object5.borderWidth = 1;
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object3.borderColor = BORDER_MUTED;
object2.footer = object3;
object5.borderColor = BORDER_MUTED;
object.footer = object5;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.instructionsText = {marginTop: PX_12, textAlign: 'center'};
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
object.instructionsText = {marginTop: PX_12, textAlign: 'center'};
const object7 = {};
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
CARD_DEFAULT_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CARD_DEFAULT_RADIUS;
object4['borderRadius'] = CARD_DEFAULT_RADIUS;
object4['overflow'] = 'hidden';
object2.videoPreviewWrapper = object4;
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object2.videoPreview = object6;
const object10 = {'alignItems': 'center', 'justifyContent': 'center', 'borderRadius': null, 'position': 'absolute',
object7['borderRadius'] = CARD_DEFAULT_RADIUS;
object7['overflow'] = 'hidden';
object.videoPreviewWrapper = object7;
const object8 = {};
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
object.videoPreview = object8;
const object9 = {'alignItems': 'center', 'justifyContent': 'center', 'borderRadius': null, 'position': 'absolute',
'left': '50%', 'overflow': 'hidden', 'top': '50%', 'width': 60, 'height': 60};
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object10.transform = [{translateX: -30}, {translateY: -30}];
object2.playVideoIconWrapper = object10;
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheetProgressCard.tsx');
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object9.transform = [{translateX: -30}, {translateY: -30}];
object.playVideoIconWrapper = object9;
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheetProgressCard.tsx');
exports.QuestBottomSheetProgressCardPlayStreamTask = QuestBottomSheetProgressCardPlayStreamTask;
exports.QuestBottomSheetProgressCardWatchTask = QuestBottomSheetProgressCardWatchTask;
exports.QuestBottomSheetProgressCardInGameTask = QuestBottomSheetProgressCardInGameTask;
}
function QuestBottomSheetProgressCardPlayStreamTask({quest}) { // fn#104089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:1292, offset: 0x02284adb, size: 846 bytes, params: 2, frame: 30
var r5;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var intl;
const styles = useStyles();
const value3 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
const value4 = (require(9483) /* metro dependency 9483: QuestHooks */).useIsQuestProgressing(quest);
let userStatus = quest.userStatus;
const value5 = userStatus?.completedAt != null;
userStatus = quest.userStatus;
const value6 = userStatus?.claimedAt != null;
const env0_3 = value6;
const value7 = (require(9520) /* metro dependency 9520: QuestPlatformUtils */).supportedTaskPlatforms(quest);
const value8 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestFormattedDate(quest.config.rewardsConfig.rewardsExpireAt);
const gameTitle = quest.config.messages.gameTitle;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const value10 = env0_3.useMemo(_fun104091, [value3, value5, value6, gameTitle,
(require(9500) /* metro dependency 9500: QuestRewardUtils */).getDefaultRewardName(quest.config, currentUser),
value4, value7, value8, (require(7114) /* metro dependency 7114: QuestUtils */).isSponsoredPlayQuest(quest)]);
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
const view = <View style={styles.content}>{((Component) => <Component quest={quest} size="lg" progress={value3.percentComplete} loading={!(value5 || value4)} hasConfetti />)(importDefault(13620) /* metro dependency 13620: QuestProgressIndicator */)}{value10 != null && <Text style={styles.instructionsText} variant="text-sm/semibold" color="text-subtle">{value10}</Text>}</View>;
if (value4) {
var viewBindingProps = {style: styles.footer};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = <View {...viewBindingProps}><Text color="text-feedback-positive" variant="text-sm/semibold">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.lIFg6I,
{gameName: quest.config.messages.gameTitle})}</Text></View>;
} else {
r5 = value4;
}
return (
<Card style={styles.card} border="subtle">
{view}
{r5}
</Card>
);
}
function QuestBottomSheetProgressCardWatchTask({quest, sourceQuestContent}) { // fn#104094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:3305, offset: 0x022851c0, size: 1165 bytes, params: 2, frame: 34
var url;
var VideoComponent;
const styles = useStyles();
const value3 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
const binding = env0_3;
const value4 = binding.useMemo(_fun104095, [quest]);
const value5 = binding.useMemo(_fun104096, [quest]);
const value6 = binding.useMemo(_fun104097, [quest]);
const value7 = (require(13594) /* metro dependency 13594: QuestBottomSheetHooks */).useWatchTaskPressHandler({questId: quest.id,
sourceQuestContent: sourceQuestContent});
let r8 = value4 != null && (require(9480) /* metro dependency 9480: QuestUtilsNative */).isHeroVideoSupported(value4);
const userStatus = quest.userStatus;
let r10 = userStatus?.completedAt != null ? (require(1244) /* metro dependency 1244: indexNative */).t.YsCuyF : (require(1244) /* metro dependency 1244: indexNative */).t['74KqrR'];
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {onPress: value7, accessibilityRole: 'button',
accessibilityLabel: (require(1244) /* metro dependency 1244: indexNative */).intl.string(r10)};
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
const items2 = [styles.card];
items2[1] = styles.cardWatchTask;
if (r8) {
var viewBindingProps = {style: styles.videoPreviewWrapper};
VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
var videoProps = {'style': null, 'poster': null, 'posterResizeMode': 'cover', 'source': null,
'resizeMode': 'cover',
'muted': true, 'disableFocus': true, 'preventsDisplaySleepDuringVideoPlayback': false,
style: styles.videoPreview};
url = value5?.url;
videoProps.poster = url;
url = value4.url;
videoProps.source = {uri: url};
r10 = <View {...viewBindingProps}><VideoComponent {...videoProps} />{((Component) => <Component start={{'x': 0.5,
'y': 0.5}} end={{'x': 1, 'y': 1}} style={StyleSheet.absoluteFill} colors={['rgba(0, 0, 0, 0)',
'rgba(0, 0, 0, 1)']} />)(importDefault(4589) /* metro dependency 4589 */)}</View>;
} else {
r10 = r8;
}
const items3 = [r10];
r8 = !r8 && value6 != null && <View style={styles.videoPreviewWrapper}>{((Component) => <Component style={styles.videoPreview} source={{uri: value6.url}} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}{((Component) => <Component start={{'x': 0.5,
'y': 0.5}} end={{'x': 1, 'y': 1}} style={StyleSheet.absoluteFill} colors={['rgba(0, 0, 0, 0)',
'rgba(0, 0, 0, 1)']} />)(importDefault(4589) /* metro dependency 4589 */)}</View>;
items3[1] = r8;
const value15 = ((Component) => <Component blurTheme="light" />)(importDefault(13631) /* metro dependency 13631: QuestDockBlurredContentBackground */);
const PlayIcon = (require(9376) /* metro dependency 9376: PlayIcon */).PlayIcon;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
items3[2] = <View style={styles.playVideoIconWrapper}>{value15}<PlayIcon color={WHITE} /></View>;
items3[3] = <View style={[styles.content,
styles.contentWatchTask]}>{((Component) => <Component quest={quest} size="x-sm" progress={value3.percentComplete} hasConfetti />)(importDefault(13620) /* metro dependency 13620: QuestProgressIndicator */)}</View>;
return (
<PressableOpacity {...pressableOpacityProps}>
<Card style={items2} border="subtle">
{items3}
</Card>
</PressableOpacity>
);
}
function QuestBottomSheetProgressCardInGameTask({quest}) { // fn#104098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:5055, offset: 0x0228571e, size: 213 bytes, params: 2, frame: 21
const styles = useStyles();
const value3 = (require(9483) /* metro dependency 9483: QuestHooks */).useThirdPartyTaskDetails(quest);
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
return (
<Card style={styles.card} border="subtle">
function QuestBottomSheetProgressCardPlayStreamTask({quest}) { // fn#104089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:1292, offset: 0x02284adb, size: 846 bytes, params: 2, frame: 30
var r5;
const Text = (TextModule).Text;
var intl;
const styles = useStyles();
const value3 = (QuestHooksModule).useQuestTaskDetails(quest);
const value4 = (QuestHooksModule).useIsQuestProgressing(quest);
let userStatus = quest.userStatus;
const value5 = userStatus?.completedAt != null;
userStatus = quest.userStatus;
const value6 = userStatus?.claimedAt != null;
const env0_3 = value6;
const value7 = (QuestPlatformUtilsModule).supportedTaskPlatforms(quest);
const value8 = (QuestHooksModule).useQuestFormattedDate(quest.config.rewardsConfig.rewardsExpireAt);
const gameTitle = quest.config.messages.gameTitle;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const value10 = env0_3.useMemo(_fun104091, [value3, value5, value6, gameTitle,
(QuestRewardUtilsModule).getDefaultRewardName(quest.config, currentUser),
value4, value7, value8, (QuestUtilsModule).isSponsoredPlayQuest(quest)]);
const Card = (CardNativeModule).Card;
const view = (
<View style={styles.content}>
{((Component) => <Component quest={quest} size="lg" progress={value3?.percentComplete ?? 0} hasConfetti />)(importDefault(13620) /* metro dependency 13620: QuestProgressIndicator */)}
{((Component) => <Component quest={quest} size="lg" progress={value3.percentComplete} loading={!(value5 || value4)} hasConfetti />)(importDefault(13620) /* metro dependency 13620: QuestProgressIndicator */)}
{value10 != null && <Text style={styles.instructionsText} variant="text-sm/semibold" color="text-subtle">{value10}</Text>}
</View>
</Card>
);
}
function _fun104091() { // fn#104091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:1831, offset: 0x02284e29, size: 789 bytes, params: 1, frame: 19
var environment;
var r1;
var value2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const FirstPartyQuestTaskTypes = (require(6535) /* metro dependency 6535: FirstPartyQuestTaskTypes */).FirstPartyQuestTaskTypes;
const FirstPartyQuestTaskTypesSets = (require(6535) /* metro dependency 6535: FirstPartyQuestTaskTypes */).FirstPartyQuestTaskTypesSets;
var binding;
var value7;
var value;
if (env0_2) {
if (env0_3) {
);
if (value4) {
var viewBindingProps = {style: styles.footer};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = (
<View {...viewBindingProps}>
<Text color="text-feedback-positive" variant="text-sm/semibold">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.lIFg6I,
{gameName: quest.config.messages.gameTitle})}
</Text>
</View>
);
} else {
r5 = value4;
}
return (
<Card style={styles.card} border="subtle">
{view}
{r5}
</Card>
);
function _fun104091() { // fn#104091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:1831, offset: 0x02284e29, size: 789 bytes, params: 1, frame: 19
var environment;
var r1;
var value2;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const FirstPartyQuestTaskTypes = (FirstPartyQuestTaskTypesModule).FirstPartyQuestTaskTypes;
const FirstPartyQuestTaskTypesSets = (FirstPartyQuestTaskTypesModule).FirstPartyQuestTaskTypesSets;
var binding;
var value7;
var value;
if (env0_2) {
if (env0_3) {
if (env0_1) {
binding = env0_0;
value = binding.targetSeconds - binding.progressSeconds;
value = global.Math.ceil(value / 60);
value7 = environment.__proto__;
return intl.format(t.aFaRso, {minutesLeft: value, minutesHook: minutesHook});
}
if (env0_8) {
value = environment.__proto__;
value = intl.string(t['04ateG']);
r1 = value;
} else {
r1 = env0_4.length > 1 ? intl.formatToPlainString(t.E2R8VX,
{gameName: gameTitle}) : env0_0.taskType === FirstPartyQuestTaskTypes.STREAM_ON_DESKTOP ? intl.formatToPlainString(t.boMftC,
{gameName: gameTitle}) : env0_0.taskType === FirstPartyQuestTaskTypes.PLAY_ON_DESKTOP ? intl.formatToPlainString(t['9Peldf'],
{gameName: gameTitle}) : FirstPartyQuestTaskTypesSets.CONSOLE.has(env0_0.taskType) ? intl.formatToPlainString(t['+8JB6Y'],
{gameTitle: gameTitle}) : null;
}
return r1;
}
value2 = environment.__proto__;
return intl.format(t.e3OlfB, {rewardHook: rewardHook, date: env0_5});
}
if (env0_1) {
binding = env0_0;
value = binding.targetSeconds - binding.progressSeconds;
@@ -194,92 +176,149 @@ function _fun104091() { // fn#104091, source: /ci/build/discord/discord/discord_
r1 = env0_4.length > 1 ? intl.formatToPlainString(t.E2R8VX,
{gameName: gameTitle}) : env0_0.taskType === FirstPartyQuestTaskTypes.STREAM_ON_DESKTOP ? intl.formatToPlainString(t.boMftC,
{gameName: gameTitle}) : env0_0.taskType === FirstPartyQuestTaskTypes.PLAY_ON_DESKTOP ? intl.formatToPlainString(t['9Peldf'],
{gameName: gameTitle}) : FirstPartyQuestTaskTypesSets.CONSOLE.has(env0_0.taskType) ? intl.formatToPlainString(t['+8JB6Y'],
{gameTitle: gameTitle}) : null;
}
return r1;
function rewardHook() { // fn#104092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:1903, offset: 0x0228513e, size: 67 bytes, params: 1, frame: 14
const Text = (TextModule).Text;
return (
<Text variant="text-sm/semibold" color="text-strong">
{env1_7}
</Text>
);
}
function minutesHook(a0) { // fn#104093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:2130, offset: 0x02285181, size: 63 bytes, params: 2, frame: 14
const Text = (TextModule).Text;
return (
<Text variant="text-sm/semibold" color="text-strong">
{a0}
</Text>
);
}
}
value2 = environment.__proto__;
return intl.format(t.e3OlfB, {rewardHook: rewardHook, date: env0_5});
}
if (env0_1) {
binding = env0_0;
value = binding.targetSeconds - binding.progressSeconds;
value = global.Math.ceil(value / 60);
value7 = environment.__proto__;
return intl.format(t.aFaRso, {minutesLeft: value, minutesHook: minutesHook});
function QuestBottomSheetProgressCardWatchTask({quest, sourceQuestContent}) { // fn#104094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:3305, offset: 0x022851c0, size: 1165 bytes, params: 2, frame: 34
var url;
var VideoComponent;
const styles = useStyles();
const value3 = (QuestHooksModule).useQuestTaskDetails(quest);
const value4 = ReactModule.useMemo(_fun104095, [quest]);
const value5 = ReactModule.useMemo(_fun104096, [quest]);
const value6 = ReactModule.useMemo(_fun104097, [quest]);
const value7 = (QuestBottomSheetHooksModule).useWatchTaskPressHandler({questId: quest.id,
sourceQuestContent: sourceQuestContent});
let r8 = value4 != null && (require(9480) /* metro dependency 9480: QuestUtilsNative */).isHeroVideoSupported(value4);
const userStatus = quest.userStatus;
let r10 = userStatus?.completedAt != null ? (require(1244) /* metro dependency 1244: indexNative */).t.YsCuyF : (require(1244) /* metro dependency 1244: indexNative */).t['74KqrR'];
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {onPress: value7, accessibilityRole: 'button',
accessibilityLabel: (require(1244) /* metro dependency 1244: indexNative */).intl.string(r10)};
const Card = (CardNativeModule).Card;
const items2 = [styles.card];
items2[1] = styles.cardWatchTask;
if (r8) {
var viewBindingProps = {style: styles.videoPreviewWrapper};
VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
var videoProps = {'style': null, 'poster': null, 'posterResizeMode': 'cover', 'source': null,
'resizeMode': 'cover',
'muted': true, 'disableFocus': true, 'preventsDisplaySleepDuringVideoPlayback': false,
style: styles.videoPreview};
url = value5?.url;
videoProps.poster = url;
url = value4.url;
videoProps.source = {uri: url};
r10 = (
<View {...viewBindingProps}>
<VideoComponent {...videoProps} />
{((Component) => <Component start={{'x': 0.5, 'y': 0.5}} end={{'x': 1,
'y': 1}} style={StyleSheet.absoluteFill} colors={['rgba(0, 0, 0, 0)',
'rgba(0, 0, 0, 1)']} />)(importDefault(4589) /* metro dependency 4589 */)}
</View>
);
} else {
r10 = r8;
}
const items3 = [r10];
r8 = !r8 && value6 != null && <View style={styles.videoPreviewWrapper}>{((Component) => <Component style={styles.videoPreview} source={{uri: value6.url}} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}{((Component) => <Component start={{'x': 0.5,
'y': 0.5}} end={{'x': 1, 'y': 1}} style={StyleSheet.absoluteFill} colors={['rgba(0, 0, 0, 0)',
'rgba(0, 0, 0, 1)']} />)(importDefault(4589) /* metro dependency 4589 */)}</View>;
items3[1] = r8;
const value15 = ((Component) => <Component blurTheme="light" />)(QuestDockBlurredContentBackground);
const PlayIcon = (PlayIconModule).PlayIcon;
const WHITE = (Native).colors.WHITE;
items3[2] = (
<View style={styles.playVideoIconWrapper}>
{value15}
<PlayIcon color={WHITE} />
</View>
);
items3[3] = (
<View style={[styles.content, styles.contentWatchTask]}>
{((Component) => <Component quest={quest} size="x-sm" progress={value3.percentComplete} hasConfetti />)(importDefault(13620) /* metro dependency 13620: QuestProgressIndicator */)}
</View>
);
return (
<PressableOpacity {...pressableOpacityProps}>
<Card style={items2} border="subtle">
{items3}
</Card>
</PressableOpacity>
);
function _fun104095() { // fn#104095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:3442, offset: 0x0228564d, size: 67 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const QUEST_BAR_HERO_VIDEO = QuestAssetType.QUEST_BAR_HERO_VIDEO;
return Reflect.apply(getQuestAsset, value, [questBinding, QUEST_BAR_HERO_VIDEO]);
}
function _fun104096() { // fn#104096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:3536, offset: 0x02285690, size: 75 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const VIDEO_PLAYER_THUMBNAIL = QuestAssetType.VIDEO_PLAYER_THUMBNAIL;
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_THUMBNAIL, undefined, true]);
}
function _fun104097() { // fn#104097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:3642, offset: 0x022856db, size: 67 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const QUEST_BAR_HERO_IMAGE = QuestAssetType.QUEST_BAR_HERO_IMAGE;
return Reflect.apply(getQuestAsset, value, [questBinding, QUEST_BAR_HERO_IMAGE]);
}
}
if (env0_8) {
value = environment.__proto__;
value = intl.string(t['04ateG']);
r1 = value;
} else {
r1 = env0_4.length > 1 ? intl.formatToPlainString(t.E2R8VX,
{gameName: gameTitle}) : env0_0.taskType === FirstPartyQuestTaskTypes.STREAM_ON_DESKTOP ? intl.formatToPlainString(t.boMftC,
{gameName: gameTitle}) : env0_0.taskType === FirstPartyQuestTaskTypes.PLAY_ON_DESKTOP ? intl.formatToPlainString(t['9Peldf'],
{gameName: gameTitle}) : FirstPartyQuestTaskTypesSets.CONSOLE.has(env0_0.taskType) ? intl.formatToPlainString(t['+8JB6Y'],
{gameTitle: gameTitle}) : null;
function QuestBottomSheetProgressCardInGameTask({quest}) { // fn#104098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:5055, offset: 0x0228571e, size: 213 bytes, params: 2, frame: 21
const styles = useStyles();
const value3 = (QuestHooksModule).useThirdPartyTaskDetails(quest);
const Card = (CardNativeModule).Card;
return (
<Card style={styles.card} border="subtle">
<View style={styles.content}>
{((Component) => <Component quest={quest} size="lg" progress={value3?.percentComplete ?? 0} hasConfetti />)(importDefault(13620) /* metro dependency 13620: QuestProgressIndicator */)}
</View>
</Card>
);
}
return r1;
}
function _fun104095() { // fn#104095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:3442, offset: 0x0228564d, size: 67 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const QUEST_BAR_HERO_VIDEO = QuestAssetType.QUEST_BAR_HERO_VIDEO;
return Reflect.apply(getQuestAsset, value, [questBinding, QUEST_BAR_HERO_VIDEO]);
}
function _fun104096() { // fn#104096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:3536, offset: 0x02285690, size: 75 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const VIDEO_PLAYER_THUMBNAIL = QuestAssetType.VIDEO_PLAYER_THUMBNAIL;
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_THUMBNAIL, undefined, true]);
}
function _fun104097() { // fn#104097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:3642, offset: 0x022856db, size: 67 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const QUEST_BAR_HERO_IMAGE = QuestAssetType.QUEST_BAR_HERO_IMAGE;
return Reflect.apply(getQuestAsset, value, [questBinding, QUEST_BAR_HERO_IMAGE]);
}
function rewardHook() { // fn#104092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:1903, offset: 0x0228513e, size: 67 bytes, params: 1, frame: 14
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text variant="text-sm/semibold" color="text-strong">
{env1_7}
</Text>
);
}
function minutesHook(a0) { // fn#104093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:2130, offset: 0x02285181, size: 63 bytes, params: 2, frame: 14
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text variant="text-sm/semibold" color="text-strong">
{a0}
</Text>
);
}
global.__d(_fun104088, 13630, [31, 27, 1878, 33, 4501, 697, 9483, 9520, 566, 9500, 7114, 1244, 4573, 6535, 6239,
13620, 9495, 13594, 9480, 5278, 9543, 4589, 5475, 13631, 9376,
2]) /* metro module 13630, dependencies: [31, 27, 1878, 33, 4501, 697, 9483, 9520, 566, 9500, 7114, 1244, 4573, 6535, 6239, 13620, 9495, 13594, 9480, 5278, 9543, 4589, 5475, 13631, 9376, 2] */;
@@ -1,68 +1,75 @@
/* Metro module 13632; source: modules/quests/native/QuestBottomSheet/QuestBottomSheetTaskSelect.tsx; dependencies: [31, 6528, 33, 6231, 6238, 10160, 1244, 8658, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as TableRowGroupNativeModule from '../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as GameControllerIconModule from '../../../../design/components/Icon/native/redesign/generated/GameControllerIcon.tsx'; /* Metro dependency 8658 */
import * as ScreenIconModule from '../../../../design/components/Icon/native/redesign/generated/ScreenIcon.tsx'; /* Metro dependency 10160 */
function _fun104103(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13829:6, offset: 0x02285992, size: 162 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestTaskPlatform;
const value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheetTaskSelect.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheetTaskSelect.tsx');
exports.default = QuestBottomSheetTaskSelect;
}
function QuestBottomSheetTaskSelect({onTaskSelect}) { // fn#104104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13829:272, offset: 0x02285a34, size: 331 bytes, params: 2, frame: 25
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
const object2 = {arrow: true};
const ScreenIcon = (ScreenIconModule).ScreenIcon;
object2.icon = <ScreenIcon />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['QXc01+']);
object2.onPress = onPress_104105;
const tableRow = <TableRow {...object2} />;
const GameControllerIcon = (GameControllerIconModule).GameControllerIcon;
return (
<TableRowGroup hasIcons>
{tableRow}
<TableRow
arrow
icon={<GameControllerIcon />}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8lAfuB'])}
onPress={onPress_104106}
/>
</TableRowGroup>
);
function QuestBottomSheetTaskSelectOnPress() { // fn#104105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13829:494, owner: QuestBottomSheetTaskSelect.onPress, offset: 0x02285b7f, size: 44 bytes, params: 1, frame: 12
var r0;
var value;
let onTaskSelectBinding = onTaskSelect;
if (onTaskSelectBinding == null) {
r0 = undefined;
} else {
onTaskSelectBinding = onTaskSelect;
value = environment.__proto__;
value = onTaskSelectBinding(QuestTaskPlatform.DESKTOP);
r0 = value;
}
return r0;
}
function QuestBottomSheetTaskSelect({onTaskSelect}) { // fn#104104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13829:272, offset: 0x02285a34, size: 331 bytes, params: 2, frame: 25
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object = {arrow: true};
const ScreenIcon = (require(10160) /* metro dependency 10160: ScreenIcon */).ScreenIcon;
object.icon = <ScreenIcon />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['QXc01+']);
object.onPress = onPress_104105;
const tableRow = <TableRow {...object} />;
const GameControllerIcon = (require(8658) /* metro dependency 8658: GameControllerIcon */).GameControllerIcon;
return (
<TableRowGroup hasIcons>
{tableRow}
<TableRow
arrow
icon={<GameControllerIcon />}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8lAfuB'])}
onPress={onPress_104106}
/>
</TableRowGroup>
);
}
function QuestBottomSheetTaskSelectOnPress_104106() { // fn#104106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13829:650, owner: QuestBottomSheetTaskSelect.onPress, offset: 0x02285bab, size: 44 bytes, params: 1, frame: 12
var r0;
var value;
let onTaskSelectBinding = onTaskSelect;
if (onTaskSelectBinding == null) {
r0 = undefined;
} else {
onTaskSelectBinding = onTaskSelect;
value = environment.__proto__;
value = onTaskSelectBinding(QuestTaskPlatform.CONSOLE);
r0 = value;
}
return r0;
}
function QuestBottomSheetTaskSelectOnPress() { // fn#104105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13829:494, owner: QuestBottomSheetTaskSelect.onPress, offset: 0x02285b7f, size: 44 bytes, params: 1, frame: 12
var r0;
var value;
let onTaskSelectBinding = onTaskSelect;
if (onTaskSelectBinding == null) {
r0 = undefined;
} else {
onTaskSelectBinding = onTaskSelect;
value = environment.__proto__;
value = onTaskSelectBinding(QuestTaskPlatform.DESKTOP);
r0 = value;
}
return r0;
}
function QuestBottomSheetTaskSelectOnPress_104106() { // fn#104106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13829:650, owner: QuestBottomSheetTaskSelect.onPress, offset: 0x02285bab, size: 44 bytes, params: 1, frame: 12
var r0;
var value;
let onTaskSelectBinding = onTaskSelect;
if (onTaskSelectBinding == null) {
r0 = undefined;
} else {
onTaskSelectBinding = onTaskSelect;
value = environment.__proto__;
value = onTaskSelectBinding(QuestTaskPlatform.CONSOLE);
r0 = value;
}
return r0;
}
global.__d(_fun104103, 13632, [31, 6528, 33, 6231, 6238, 10160, 1244, 8658,
2]) /* metro module 13632, dependencies: [31, 6528, 33, 6231, 6238, 10160, 1244, 8658, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,4 +1,14 @@
/* Metro module 10183; source: modules/quests/native/QuestContentImpressionTracker.native.tsx; dependencies: [57, 31, 7030, 9515, 661, 6266, 566, 9513, 9514, 7121, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UsePrevious from '../../../hooks/usePrevious.tsx'; /* Metro dependency 6266 */
import AppStateStore from '../../../stores/native/AppStateStore.tsx'; /* Metro dependency 7030 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ContentImpressionTrackerHooksModule from '../lib/analytics/ContentImpressionTrackerHooks.tsx'; /* Metro dependency 9513 */
import * as ContentImpressionTrackerModule from '../lib/analytics/ContentImpressionTracker.tsx'; /* Metro dependency 9514 */
import * as ContentImpressionTrackerConstantsModule from '../lib/analytics/ContentImpressionTrackerConstants.tsx'; /* Metro dependency 9515 */
function _fun79242(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:6, offset: 0x01e4a496, size: 260 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_79245 = function(a0, a1) {
@@ -46,84 +56,182 @@ function _fun79242(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const appStateStore = importDefault(7030) /* metro dependency 7030: AppStateStore */;
const env0_6 = (require(9515) /* metro dependency 9515: ContentImpressionTrackerConstants */).MIN_QUEST_CONTENT_VISIBILITY_PERCENTAGE;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AppStates;
const env0_8 = (require(31) /* metro dependency 31 */).createElement;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestContentImpressionTracker.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestContentImpressionTracker.native.tsx');
exports.QuestContentImpressionTrackerNative = QuestContentImpressionTrackerNative;
}
function _createForOfIteratorHelperLoose_79243(a0, a1) { // fn#79243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:228, offset: 0x01e4a59a, 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)) {
function _createForOfIteratorHelperLoose_79243(a0, a1) { // fn#79243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:228, offset: 0x01e4a59a, 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);
}
return _fun79244;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_79245(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun79244;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_79245(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_79245(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_79245(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun79244;
}
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 _fun79244() { // fn#79244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:799, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
return _fun79244;
}
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 useVisibilityData({adContentIds, visibilityRef, overrideVisibility}) { // fn#79246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:2034, offset: 0x01e4a70e, size: 175 bytes, params: 2, frame: 20
var object2;
const [property, property2] = env0_3(env0_4.useState(0), 2);
env0_4.useEffect(_fun79247, [adContentIds, property2, visibilityRef]);
const r2 = overrideVisibility ?? property >= MIN_QUEST_CONTENT_VISIBILITY_PERCENTAGE;
object2 = {visible: r2};
object2.visibleChanged = r2 !== (importDefault(6266) /* metro dependency 6266: usePrevious */)(r2);
return object2;
}
function useVisibilityData({adContentIds, visibilityRef, overrideVisibility}) { // fn#79246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:2034, offset: 0x01e4a70e, size: 175 bytes, params: 2, frame: 20
const [property, property2] = Module00057(ReactModule.useState(0), 2);
ReactModule.useEffect(_fun79247, [adContentIds, property2, visibilityRef]);
const r2 = overrideVisibility ?? property >= MIN_QUEST_CONTENT_VISIBILITY_PERCENTAGE;
object = {visible: r2};
object.visibleChanged = r2 !== (importDefault(6266) /* metro dependency 6266: usePrevious */)(r2);
return object;
function _fun79247() { // fn#79247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:2172, offset: 0x01e4a7bd, size: 50 bytes, params: 1, frame: 11
initHandlers({adContentIds: adContentIds, setVisibilityPercentage: env0_2, visibilityRef: visibilityRef});
function initHandlers({adContentIds, setVisibilityPercentage, visibilityRef}) { // fn#79248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:2178, offset: 0x01e4a7ef, size: 99 bytes, params: 2, frame: 14
var environment;
var r1;
var closure;
var value;
var value2;
var done;
var value3;
var value4;
reducibleJoin3: while (true) {
if (visibilityRef == null) {
break reducibleJoin3;
}
closure = function(a0) {
var env0_0 = a0;
var visibilityRefBinding = visibilityRef;
var children = visibilityRefBinding.current.children;
var object = {};
var children2 = visibilityRefBinding.current.children;
copyDataProperties(object, children2[a0], children2);
object['calculateVisibility'] = _fun79250;
children[a0] = object;
};
value = environment.__proto__.__proto__;
value = _createForOfIteratorHelperLoose_79243(adContentIds);
value2 = value();
done = value2.done;
if (done) {
break reducibleJoin3;
}
r1 = value2;
reducibleLoop2: while (true) {
value3 = r1.value;
closure(value3);
value4 = value();
done = value4.done;
if (done) {
break reducibleJoin3;
}
r1 = value4;
continue reducibleLoop2;
}
}
function initHandlers_loop(a0) { // fn#79249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:2287, owner: initHandlers._loop, offset: 0x01e4a852, size: 73 bytes, params: 2, frame: 14
const env0_0 = a0;
const visibilityRefBinding = visibilityRef;
const children = visibilityRefBinding.current.children;
const object = {};
const children2 = visibilityRefBinding.current.children;
copyDataProperties(object, children2[a0], children2);
object['calculateVisibility'] = calculateVisibility;
children[a0] = object;
function calculateVisibility() { // fn#79250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:2367, owner: initHandlers._loop.calculateVisibility, offset: 0x01e4a89b, size: 51 bytes, params: 1, frame: 12
setVisibilityPercentage(calculateVisibilityPercentage({visibilityRef: visibilityRef, entityId: env0_0}));
}
}
}
}
}
function QuestContentImpressionTrackerNative(a0) { // fn#79252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:2809, offset: 0x01e4ab58, size: 370 bytes, params: 2, frame: 23
const state = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore], function() {
return AppStateStore.getState();
});
const ACTIVE = AppStates.ACTIVE;
const value2 = state === ACTIVE;
const value3 = ReactModule.useRef(null);
const value4 = (UsePrevious)(value2);
const {key,
adContentIds} = (ContentImpressionTrackerHooksModule).useAdContentImpressionTrackerProps(a0);
object = {};
copyDataProperties(object, a0, undefined);
object['adContentIds'] = adContentIds;
const value6 = useVisibilityData(object);
object = {};
const value7 = copyDataProperties(object, a0, undefined);
copyDataProperties(object, value6, value7);
object['focused'] = value2;
object['focusedChanged'] = value2 !== value4;
object['reference'] = value3;
object['isFocused'] = value2;
const createElementBinding = createElement;
const QuestContentImpressionTracker = (ContentImpressionTrackerModule).QuestContentImpressionTracker;
const value8 = 'questOrQuests' in a0;
const object2 = {};
copyDataProperties(object2, object, value7);
object2['key'] = key;
object2['adContentIds'] = adContentIds;
if (value8) {
object2['adCreativeType'] = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
} else {
object2['adCreativeType'] = a0.adCreativeType;
}
return createElementBinding(QuestContentImpressionTracker, object2);
}
}
function calculateVisibilityPercentage({visibilityRef, entityId}) { // fn#79251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:1172, offset: 0x01e4a8ce, size: 650 bytes, params: 2, frame: 19
@@ -243,104 +351,5 @@ function calculateVisibilityPercentage({visibilityRef, entityId}) { // fn#79251,
return Math.min(value / r4, 1);
}
function QuestContentImpressionTrackerNative(a0) { // fn#79252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:2809, offset: 0x01e4ab58, size: 370 bytes, params: 2, frame: 23
var object3;
const state = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore], function() {
return AppStateStore.getState();
});
const ACTIVE = AppStates.ACTIVE;
const value2 = state === ACTIVE;
const value3 = env0_4.useRef(null);
const value4 = (importDefault(6266) /* metro dependency 6266: usePrevious */)(value2);
const {key,
adContentIds} = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useAdContentImpressionTrackerProps(a0);
object3 = {};
copyDataProperties(object3, a0, undefined);
object3['adContentIds'] = adContentIds;
const value6 = useVisibilityData(object3);
object3 = {};
const value7 = copyDataProperties(object3, a0, undefined);
copyDataProperties(object3, value6, value7);
object3['focused'] = value2;
object3['focusedChanged'] = value2 !== value4;
object3['reference'] = value3;
object3['isFocused'] = value2;
const createElementBinding = createElement;
const QuestContentImpressionTracker = (require(9514) /* metro dependency 9514: ContentImpressionTracker */).QuestContentImpressionTracker;
const value8 = 'questOrQuests' in a0;
const object4 = {};
copyDataProperties(object4, object3, value7);
object4['key'] = key;
object4['adContentIds'] = adContentIds;
if (value8) {
object4['adCreativeType'] = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
} else {
object4['adCreativeType'] = a0.adCreativeType;
}
return createElementBinding(QuestContentImpressionTracker, object4);
}
function _fun79247() { // fn#79247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:2172, offset: 0x01e4a7bd, size: 50 bytes, params: 1, frame: 11
initHandlers({adContentIds: adContentIds, setVisibilityPercentage: env0_2, visibilityRef: visibilityRef});
}
function initHandlers({adContentIds, setVisibilityPercentage, visibilityRef}) { // fn#79248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:2178, offset: 0x01e4a7ef, size: 99 bytes, params: 2, frame: 14
var environment;
var r1;
var closure;
var value;
var value2;
var done;
var value3;
var value4;
reducibleJoin3: while (true) {
if (visibilityRef == null) {
break reducibleJoin3;
}
closure = function(a0) {
var env0_0 = a0;
var visibilityRefBinding = visibilityRef;
var children = visibilityRefBinding.current.children;
var object = {};
var children2 = visibilityRefBinding.current.children;
copyDataProperties(object, children2[a0], children2);
object['calculateVisibility'] = _fun79250;
children[a0] = object;
};
value = environment.__proto__.__proto__;
value = _createForOfIteratorHelperLoose_79243(adContentIds);
value2 = value();
done = value2.done;
if (done) {
break reducibleJoin3;
}
r1 = value2;
reducibleLoop2: while (true) {
value3 = r1.value;
closure(value3);
value4 = value();
done = value4.done;
if (done) {
break reducibleJoin3;
}
r1 = value4;
continue reducibleLoop2;
}
}
}
function initHandlers_loop(a0) { // fn#79249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:2287, owner: initHandlers._loop, offset: 0x01e4a852, size: 73 bytes, params: 2, frame: 14
const env0_0 = a0;
const visibilityRefBinding = visibilityRef;
const children = visibilityRefBinding.current.children;
const object2 = {};
const children2 = visibilityRefBinding.current.children;
copyDataProperties(object2, children2[a0], children2);
object2['calculateVisibility'] = calculateVisibility;
children[a0] = object2;
}
function calculateVisibility() { // fn#79250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:2367, owner: initHandlers._loop.calculateVisibility, offset: 0x01e4a89b, size: 51 bytes, params: 1, frame: 12
setVisibilityPercentage(calculateVisibilityPercentage({visibilityRef: visibilityRef, entityId: env0_0}));
}
global.__d(_fun79242, 10183, [57, 31, 7030, 9515, 661, 6266, 566, 9513, 9514, 7121,
2]) /* metro module 10183, dependencies: [57, 31, 7030, 9515, 661, 6266, 566, 9513, 9514, 7121, 2] */;
+296 -277
View File
@@ -1,291 +1,310 @@
/* Metro module 13623; source: modules/quests/native/QuestContextMenu.tsx; dependencies: [29, 31, 7093, 661, 33, 8341, 8639, 1244, 9483, 566, 6531, 9949, 9513, 9505, 7114, 477, 4093, 9480, 9520, 7120, 3869, 13580, 9484, 6249, 13624, 4060, 7116, 6797, 4064, 9519, 9517, 9518, 7121, 8811, 2] */
import ObjectWithoutProperties from '../../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import QuestStore from '../QuestStore.tsx'; /* Metro dependency 7093 */
import QuestDisclosureModalActionCreators from './QuestDisclosureModal/QuestDisclosureModalActionCreators.tsx'; /* Metro dependency 13580 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as LinkExternalSmallIconModule from '../../../design/components/Icon/native/redesign/generated/LinkExternalSmallIcon.tsx'; /* Metro dependency 6249 */
import * as QuestTypesModule from '../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as AnalyticsTypesModule from '../lib/analytics/AnalyticsTypes.tsx'; /* Metro dependency 7120 */
import * as IconButtonNativeModule from '../../../design/components/Button/native/IconButton.native.tsx'; /* Metro dependency 8341 */
import * as ContextMenuNativeModule from '../../../design/components/ContextMenu/native/ContextMenu.native.tsx'; /* Metro dependency 8811 */
import * as QuestHooksModule from '../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as QuestCopyUtilsModule from '../utils/QuestCopyUtils.tsx'; /* Metro dependency 9505 */
import * as ContentImpressionTrackerHooksModule from '../lib/analytics/ContentImpressionTrackerHooks.tsx'; /* Metro dependency 9513 */
import * as AdAnalyticsInterfaceExperimentModule from '../experiments/AdAnalyticsInterfaceExperiment.tsx'; /* Metro dependency 9519 */
import * as AnalyticsHooksModule from '../lib/analytics/AnalyticsHooks.tsx'; /* Metro dependency 9949 */
function _fun104044(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:6, offset: 0x02281fe8, size: 231 bytes, params: 8, frame: 19
const env0_0 = require;
const env0_3 = ['ref'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(29) /* metro dependency 29 */;
let value = importAll(31) /* metro dependency 31 */;
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).LinkingTypes;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(_fun104046);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestContextMenu.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestContextMenu.tsx');
exports.default = value;
}
function renderDefaultButton(a0) { // fn#104045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:177, offset: 0x022820cf, size: 229 bytes, params: 2, frame: 19
const ref = a0.ref;
const value2 = env0_4(a0, env0_3);
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const iconButtonProps = {ref: ref, ...value2};
iconButtonProps['icon'] = importDefault(8639) /* metro dependency 8639 */;
iconButtonProps['variant'] = 'secondary';
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const CAgr1w = (require(1244) /* metro dependency 1244: indexNative */).t.CAgr1w;
iconButtonProps['accessibilityLabel'] = Reflect.apply(string, intl, [CAgr1w]);
iconButtonProps['accessibilityHint'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hd0b7t);
return <IconButton {...iconButtonProps} />;
}
function _fun104046({children = renderDefaultButton, quest, showShareLink, additionalItems = [], sourceQuestContent}) { // fn#104046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:432, offset: 0x022821b4, size: 1019 bytes, params: 2, frame: 37
var r23;
var moduleValue6;
showShareLink = !(showShareLink === undefined) && showShareLink;
const value5 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestPreviewActions(quest.id);
const handleComplete = value5.handleComplete;
const handleProgress = value5.handleProgress;
const handleResetDismissibilityClick = value5.handleResetDismissibilityClick;
const env0_5 = handleResetDismissibilityClick;
const handleResetStatusClick = value5.handleResetStatusClick;
const handleOverridePreviewClick = value5.handleOverridePreviewClick;
const handleResetHasBeenSeenClick = value5.handleResetHasBeenSeenClick;
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore], function() {
return QuestStore.getQuestPreviewOverride(require(dependencyMap[10]).QuestContent.QUEST_BAR_MOBILE);
}, []);
const value7 = (require(9949) /* metro dependency 9949: AnalyticsHooks */).useTrackQuestContentClickedWithImpression();
const value8 = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId();
const externalCtaLabel = (require(9505) /* metro dependency 9505: QuestCopyUtils */).getExternalCtaLabel(quest);
if (showShareLink) {
moduleValue6 = require(7114) /* metro dependency 7114: QuestUtils */;
r23 = moduleValue6.isShareableQuest(quest.config);
} else {
r23 = showShareLink;
function renderDefaultButton(a0) { // fn#104045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:177, offset: 0x022820cf, size: 229 bytes, params: 2, frame: 19
const ref = a0.ref;
const value2 = ObjectWithoutProperties(a0, env0_3);
const IconButton = (IconButtonNativeModule).IconButton;
const iconButtonProps = {ref: ref, ...value2};
iconButtonProps['icon'] = importDefault(8639) /* metro dependency 8639 */;
iconButtonProps['variant'] = 'secondary';
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const CAgr1w = (require(1244) /* metro dependency 1244: indexNative */).t.CAgr1w;
iconButtonProps['accessibilityLabel'] = Reflect.apply(string, intl, [CAgr1w]);
iconButtonProps['accessibilityHint'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hd0b7t);
return <IconButton {...iconButtonProps} />;
}
let binding = env0_5;
const value10 = binding.useCallback(_fun104048, [quest, value8, sourceQuestContent]);
const value11 = binding.useCallback(_fun104049, [r23, quest.id, value8, sourceQuestContent]);
const value12 = binding.useCallback(_fun104050, [quest, sourceQuestContent]);
const value13 = binding.useCallback(_fun104051, [quest.id]);
const value14 = binding.useCallback(_fun104052, [quest.id]);
const value15 = binding.useMemo(_fun104053, [externalCtaLabel, value10, value12, r23, value11]);
const value17 = binding.useMemo(_fun104055, [binding.useMemo(_fun104054, [quest, value13, value14]), handleComplete,
handleResetDismissibilityClick, handleProgress, handleResetStatusClick, handleResetHasBeenSeenClick, quest.id]);
const value18 = (require(9483) /* metro dependency 9483: QuestHooks */).useShouldShowQuestPreviewOverrides(quest);
const value19 = binding.useMemo(_fun104058, [handleOverridePreviewClick, quest.id, value6?.id]);
binding = env0_5;
const value20 = binding.useMemo(_fun104060, [value15, value17, quest.preview, value18, value19, additionalItems]);
const value21 = binding.useCallback(_fun104061, [quest.id, value7, value8, sourceQuestContent]);
const ContextMenu = (require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu;
return (
<ContextMenu
items={value20}
onOpen={value21}
triggerOnTap
>
{children}
</ContextMenu>
);
}
function _fun104048() { // fn#104048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:1040, offset: 0x022825e5, size: 279 bytes, params: 1, frame: 18
var r2;
var defaultImport;
var moduleValue2;
let value = environment.__proto__;
const isIOS2 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS();
if (isIOS2) {
defaultImport = importDefault(4093) /* metro dependency 4093: parseURL */;
moduleValue2 = require(9505) /* metro dependency 9505: QuestCopyUtils */;
r2 = defaultImport(moduleValue2.getCtaLink(quest.config)).payload.type === LinkingTypes.INVITE;
} else {
r2 = isIOS2;
function _fun104046({children = renderDefaultButton, quest, showShareLink, additionalItems = [], sourceQuestContent}) { // fn#104046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:432, offset: 0x022821b4, size: 1019 bytes, params: 2, frame: 37
var r23;
var moduleValue6;
showShareLink = !(showShareLink === undefined) && showShareLink;
const value5 = (QuestHooksModule).useQuestPreviewActions(quest.id);
const handleComplete = value5.handleComplete;
const handleProgress = value5.handleProgress;
const handleResetDismissibilityClick = value5.handleResetDismissibilityClick;
const handleResetDismissibilityClick2 = handleResetDismissibilityClick;
const handleResetStatusClick = value5.handleResetStatusClick;
const handleOverridePreviewClick = value5.handleOverridePreviewClick;
const handleResetHasBeenSeenClick = value5.handleResetHasBeenSeenClick;
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore], function() {
return QuestStore.getQuestPreviewOverride(require(dependencyMap[10]).QuestContent.QUEST_BAR_MOBILE);
}, []);
const value7 = (AnalyticsHooksModule).useTrackQuestContentClickedWithImpression();
const value8 = (ContentImpressionTrackerHooksModule).useQuestImpressionId();
const externalCtaLabel = (QuestCopyUtilsModule).getExternalCtaLabel(quest);
if (showShareLink) {
moduleValue6 = require(7114) /* metro dependency 7114: QuestUtils */;
r23 = moduleValue6.isShareableQuest(quest.config);
} else {
r23 = showShareLink;
}
let binding = handleResetDismissibilityClick2;
const value10 = binding.useCallback(_fun104048, [quest, value8, sourceQuestContent]);
const value11 = binding.useCallback(_fun104049, [r23, quest.id, value8, sourceQuestContent]);
const value12 = binding.useCallback(_fun104050, [quest, sourceQuestContent]);
const value13 = binding.useCallback(_fun104051, [quest.id]);
const value14 = binding.useCallback(_fun104052, [quest.id]);
const value15 = binding.useMemo(_fun104053, [externalCtaLabel, value10, value12, r23, value11]);
const value17 = binding.useMemo(_fun104055, [binding.useMemo(_fun104054, [quest, value13, value14]), handleComplete,
handleResetDismissibilityClick, handleProgress, handleResetStatusClick, handleResetHasBeenSeenClick, quest.id]);
const value18 = (QuestHooksModule).useShouldShowQuestPreviewOverrides(quest);
const value19 = binding.useMemo(_fun104058, [handleOverridePreviewClick, quest.id, value6?.id]);
binding = handleResetDismissibilityClick2;
const value20 = binding.useMemo(_fun104060, [value15, value17, quest.preview, value18, value19, additionalItems]);
const value21 = binding.useCallback(_fun104061, [quest.id, value7, value8, sourceQuestContent]);
const ContextMenu = (ContextMenuNativeModule).ContextMenu;
return (
<ContextMenu
items={value20}
onOpen={value21}
triggerOnTap
>
{children}
</ContextMenu>
);
function _fun104048() { // fn#104048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:1040, offset: 0x022825e5, size: 279 bytes, params: 1, frame: 18
var r2;
var defaultImport;
var moduleValue2;
let value = environment.__proto__;
const isIOS2 = (PlatformUtilsModule).isIOS();
if (isIOS2) {
defaultImport = importDefault(4093) /* metro dependency 4093: parseURL */;
moduleValue2 = require(9505) /* metro dependency 9505: QuestCopyUtils */;
r2 = defaultImport(moduleValue2.getCtaLink(quest.config)).payload.type === LinkingTypes.INVITE;
} else {
r2 = isIOS2;
}
if (r2) {
(require(9480) /* metro dependency 9480: QuestUtilsNative */).dismissOverlayScreens();
}
value = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
const openGameLinkDirectly = value.openGameLinkDirectly;
const questBinding = quest;
const object = {};
const QuestContent = (QuestTypesModule).QuestContent;
const QUEST_HOME_MOBILE = QuestContent.QUEST_HOME_MOBILE;
object.content = QUEST_HOME_MOBILE;
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
const CONTEXT_MENU_OPEN_GAME_LINK = QuestContentCTA.CONTEXT_MENU_OPEN_GAME_LINK;
object.ctaContent = CONTEXT_MENU_OPEN_GAME_LINK;
object.impressionId = env0_11;
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(openGameLinkDirectly, value, [questBinding, object]);
}
function _fun104049() { // fn#104049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:1372, offset: 0x022826fc, size: 216 bytes, params: 1, frame: 18
var value2;
var moduleValue;
var copyShareLink;
var id;
var object;
var AccessibilityAnnouncer;
var announce;
var intl;
if (env0_13) {
value2 = environment.__proto__;
moduleValue = require(9505) /* metro dependency 9505: QuestCopyUtils */;
copyShareLink = moduleValue.copyShareLink;
id = quest.id;
object = {};
object.content = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent.QUEST_HOME_MOBILE;
object.ctaContent = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA.CONTEXT_MENU_COPY_LINK;
object.impressionId = env0_11;
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(copyShareLink, moduleValue, [id, object]);
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+5kSoW'])]);
}
}
function _fun104050() { // fn#104050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:1672, offset: 0x022827d4, size: 136 bytes, params: 1, frame: 17
const defaultImport = QuestDisclosureModalActionCreators;
const showModal = defaultImport.showModal;
const object = {};
object.quest = quest;
object.isTargetedDisclosure = false;
const object2 = {};
const QuestContent = (QuestTypesModule).QuestContent;
const QUEST_HOME_MOBILE = QuestContent.QUEST_HOME_MOBILE;
object2.content = QUEST_HOME_MOBILE;
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
const CONTEXT_MENU_OPEN_DISCLOSURE = QuestContentCTA.CONTEXT_MENU_OPEN_DISCLOSURE;
object2.ctaContent = CONTEXT_MENU_OPEN_DISCLOSURE;
object2.sourceQuestContent = sourceQuestContent;
object.trackingCtx = object2;
Reflect.apply(showModal, defaultImport, [object]);
}
function _fun104051() { // fn#104051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:1905, offset: 0x0228285c, size: 53 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(9484) /* metro dependency 9484: QuestActionCreators */;
return value.manuallyStartConsoleQuest(quest.id, true);
}
function _fun104052() { // fn#104052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:1979, offset: 0x02282891, size: 50 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(9484) /* metro dependency 9484: QuestActionCreators */;
return value.manualStopConsoleQuest(quest.id);
}
function _fun104053() { // fn#104053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:2043, offset: 0x022828c3, size: 285 bytes, params: 1, frame: 21
var items2;
let object = {};
object.label = env0_12;
const LinkExternalSmallIcon = (LinkExternalSmallIconModule).LinkExternalSmallIcon;
object.IconComponent = LinkExternalSmallIcon;
object.action = env0_14;
object.accessibilityRole = 'link';
const items3 = [object];
object = {};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const GcsZKJ = t.GcsZKJ;
object.label = Reflect.apply(string, intl, [GcsZKJ]);
object.action = env0_16;
object.iconSource = importDefault(13624) /* metro dependency 13624 */;
items3[1] = object;
if (env0_13) {
object = {};
object.label = intl.string(t.WqhZss);
object.IconComponent = (require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon;
object.action = env0_15;
items2 = [object];
} else {
items2 = [];
}
arraySpread(items3, items2, 2, require);
return items3;
}
function _fun104054() { // fn#104054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:2337, offset: 0x022829e0, size: 109 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(7116) /* metro dependency 7116: QuestTaskUtils */;
return value.isConsoleQuest(quest) ? [{label: 'Start Console Heartbeat', action: env0_17},
{label: 'Stop Console Heartbeat', action: env0_18}] : [];
}
function _fun104055() { // fn#104055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:2481, offset: 0x02282a4d, size: 183 bytes, params: 1, frame: 15
const items2 = [{label: 'Set Random Quest Progress', action: action_104056}];
items2[1] = {label: 'Complete Quest', action: handleComplete};
items2[2] = {label: 'Reset Quest', action: handleResetStatusClick};
items2[3] = {label: 'Reset Dismissibility', action: handleResetDismissibilityClick};
const handleResetHasBeenSeenClickBinding = handleResetHasBeenSeenClick;
items2[4] = {label: 'Reset Quest Seen', action: handleResetHasBeenSeenClickBinding};
const value = arraySpread(items2, env0_20, 5, handleResetHasBeenSeenClickBinding);
items2[value] = {label: 'Copy Quest ID', action: action_104057};
value + 1;
return items2;
function action_104056() { // fn#104056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:2528, offset: 0x02282b04, size: 62 bytes, params: 1, frame: 12
const value = environment.__proto__;
const handleProgressBinding = handleProgress;
const Math = global.Math;
return handleProgressBinding(0.9 * Math.random() + 0.03);
}
function action_104057() { // fn#104057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:2733, offset: 0x02282b42, size: 50 bytes, params: 1, frame: 11
let value = environment.__proto__.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
return value.copy(quest.id);
}
}
function _fun104058() { // fn#104058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:2841, offset: 0x02282b74, size: 104 bytes, params: 1, frame: 14
const value2 = undefined;
const CheckmarkLargeIcon = (env0_9 == null ? value2 : env0_9.id) !== quest.id ? value2 : (require(4064) /* metro dependency 4064: CheckmarkLargeIcon */).CheckmarkLargeIcon;
return {label: 'Show in Quest Bar', action: function() {
return handleOverridePreviewClick(require(dependencyMap[10]).QuestContent.QUEST_BAR_MOBILE);
}, IconComponent: CheckmarkLargeIcon};
}
function _fun104060() { // fn#104060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:3050, offset: 0x02282c0f, size: 132 bytes, params: 1, frame: 15
var r0;
var items2;
var value2;
const r4 = env0_1 != null ? [env0_19, env0_1] : [env0_19];
if (env0_22) {
r4.push([env0_23]);
}
if (quest.preview) {
items2 = [];
value2 = arraySpread(items2, r4, 0, r4);
items2[value2] = env0_21;
value2 + 1;
r0 = items2;
} else {
r0 = r4;
}
return r0;
}
function _fun104061() { // fn#104061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:3164, offset: 0x02282c93, size: 360 bytes, params: 1, frame: 17
var object;
const QuestContent = (QuestTypesModule).QuestContent;
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
var captureAdUserAction;
let value = environment.__proto__;
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_context_menu'])) {
value = require(9517) /* metro dependency 9517: captureAdUserAction */;
captureAdUserAction = value.captureAdUserAction;
object = {};
object.type = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType.CLICK_INTERNAL;
object.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
object.adCreativeId = quest.id;
object.questContentCTA = QuestContentCTA.OPEN_CONTEXT_MENU;
object.surfaceId = QuestContent.QUEST_HOME_MOBILE;
object.sourceQuestContent = sourceQuestContent;
object.impressionId = env0_11;
Reflect.apply(captureAdUserAction, value, [object]);
} else {
env0_10({questId: quest.id, questContent: QuestContent.QUEST_HOME_MOBILE,
questContentCTA: QuestContentCTA.OPEN_CONTEXT_MENU, sourceQuestContent: sourceQuestContent});
}
}
}
if (r2) {
(require(9480) /* metro dependency 9480: QuestUtilsNative */).dismissOverlayScreens();
}
value = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
const openGameLinkDirectly = value.openGameLinkDirectly;
const questBinding = quest;
const object2 = {};
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const QUEST_HOME_MOBILE = QuestContent.QUEST_HOME_MOBILE;
object2.content = QUEST_HOME_MOBILE;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
const CONTEXT_MENU_OPEN_GAME_LINK = QuestContentCTA.CONTEXT_MENU_OPEN_GAME_LINK;
object2.ctaContent = CONTEXT_MENU_OPEN_GAME_LINK;
object2.impressionId = env0_11;
object2.sourceQuestContent = sourceQuestContent;
Reflect.apply(openGameLinkDirectly, value, [questBinding, object2]);
}
function _fun104049() { // fn#104049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:1372, offset: 0x022826fc, size: 216 bytes, params: 1, frame: 18
var value2;
var moduleValue;
var copyShareLink;
var id;
var object2;
var AccessibilityAnnouncer;
var announce;
var intl;
if (env0_13) {
value2 = environment.__proto__;
moduleValue = require(9505) /* metro dependency 9505: QuestCopyUtils */;
copyShareLink = moduleValue.copyShareLink;
id = quest.id;
object2 = {};
object2.content = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent.QUEST_HOME_MOBILE;
object2.ctaContent = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA.CONTEXT_MENU_COPY_LINK;
object2.impressionId = env0_11;
object2.sourceQuestContent = sourceQuestContent;
Reflect.apply(copyShareLink, moduleValue, [id, object2]);
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+5kSoW'])]);
}
}
function _fun104050() { // fn#104050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:1672, offset: 0x022827d4, size: 136 bytes, params: 1, frame: 17
const defaultImport = importDefault(13580) /* metro dependency 13580: QuestDisclosureModalActionCreators */;
const showModal = defaultImport.showModal;
const object3 = {};
object3.quest = quest;
object3.isTargetedDisclosure = false;
const object4 = {};
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const QUEST_HOME_MOBILE = QuestContent.QUEST_HOME_MOBILE;
object4.content = QUEST_HOME_MOBILE;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
const CONTEXT_MENU_OPEN_DISCLOSURE = QuestContentCTA.CONTEXT_MENU_OPEN_DISCLOSURE;
object4.ctaContent = CONTEXT_MENU_OPEN_DISCLOSURE;
object4.sourceQuestContent = sourceQuestContent;
object3.trackingCtx = object4;
Reflect.apply(showModal, defaultImport, [object3]);
}
function _fun104051() { // fn#104051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:1905, offset: 0x0228285c, size: 53 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(9484) /* metro dependency 9484: QuestActionCreators */;
return value.manuallyStartConsoleQuest(quest.id, true);
}
function _fun104052() { // fn#104052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:1979, offset: 0x02282891, size: 50 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(9484) /* metro dependency 9484: QuestActionCreators */;
return value.manualStopConsoleQuest(quest.id);
}
function _fun104053() { // fn#104053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:2043, offset: 0x022828c3, size: 285 bytes, params: 1, frame: 21
var items2;
let object2 = {};
object2.label = env0_12;
const LinkExternalSmallIcon = (require(6249) /* metro dependency 6249: LinkExternalSmallIcon */).LinkExternalSmallIcon;
object2.IconComponent = LinkExternalSmallIcon;
object2.action = env0_14;
object2.accessibilityRole = 'link';
const items3 = [object2];
object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const GcsZKJ = t.GcsZKJ;
object2.label = Reflect.apply(string, intl, [GcsZKJ]);
object2.action = env0_16;
object2.iconSource = importDefault(13624) /* metro dependency 13624 */;
items3[1] = object2;
if (env0_13) {
object2 = {};
object2.label = intl.string(t.WqhZss);
object2.IconComponent = (require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon;
object2.action = env0_15;
items2 = [object2];
} else {
items2 = [];
}
arraySpread(items3, items2, 2, require);
return items3;
}
function _fun104054() { // fn#104054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:2337, offset: 0x022829e0, size: 109 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(7116) /* metro dependency 7116: QuestTaskUtils */;
return value.isConsoleQuest(quest) ? [{label: 'Start Console Heartbeat', action: env0_17},
{label: 'Stop Console Heartbeat', action: env0_18}] : [];
}
function _fun104055() { // fn#104055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:2481, offset: 0x02282a4d, size: 183 bytes, params: 1, frame: 15
const items2 = [{label: 'Set Random Quest Progress', action: action_104056}];
items2[1] = {label: 'Complete Quest', action: handleComplete};
items2[2] = {label: 'Reset Quest', action: handleResetStatusClick};
items2[3] = {label: 'Reset Dismissibility', action: handleResetDismissibilityClick};
const handleResetHasBeenSeenClickBinding = handleResetHasBeenSeenClick;
items2[4] = {label: 'Reset Quest Seen', action: handleResetHasBeenSeenClickBinding};
const value = arraySpread(items2, env0_20, 5, handleResetHasBeenSeenClickBinding);
items2[value] = {label: 'Copy Quest ID', action: action_104057};
value + 1;
return items2;
}
function _fun104058() { // fn#104058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:2841, offset: 0x02282b74, size: 104 bytes, params: 1, frame: 14
const value2 = undefined;
const CheckmarkLargeIcon = (env0_9 == null ? value2 : env0_9.id) !== quest.id ? value2 : (require(4064) /* metro dependency 4064: CheckmarkLargeIcon */).CheckmarkLargeIcon;
return {label: 'Show in Quest Bar', action: function() {
return handleOverridePreviewClick(require(dependencyMap[10]).QuestContent.QUEST_BAR_MOBILE);
}, IconComponent: CheckmarkLargeIcon};
}
function _fun104060() { // fn#104060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:3050, offset: 0x02282c0f, size: 132 bytes, params: 1, frame: 15
var r0;
var items2;
var value2;
const r4 = env0_1 != null ? [env0_19, env0_1] : [env0_19];
if (env0_22) {
r4.push([env0_23]);
}
if (quest.preview) {
items2 = [];
value2 = arraySpread(items2, r4, 0, r4);
items2[value2] = env0_21;
value2 + 1;
r0 = items2;
} else {
r0 = r4;
}
return r0;
}
function _fun104061() { // fn#104061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:3164, offset: 0x02282c93, size: 360 bytes, params: 1, frame: 17
var object2;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
var captureAdUserAction;
let value = environment.__proto__;
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_context_menu'])) {
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 = QuestContentCTA.OPEN_CONTEXT_MENU;
object2.surfaceId = QuestContent.QUEST_HOME_MOBILE;
object2.sourceQuestContent = sourceQuestContent;
object2.impressionId = env0_11;
Reflect.apply(captureAdUserAction, value, [object2]);
} else {
env0_10({questId: quest.id, questContent: QuestContent.QUEST_HOME_MOBILE,
questContentCTA: QuestContentCTA.OPEN_CONTEXT_MENU, sourceQuestContent: sourceQuestContent});
}
}
function action_104056() { // fn#104056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:2528, offset: 0x02282b04, size: 62 bytes, params: 1, frame: 12
const value = environment.__proto__;
const handleProgressBinding = handleProgress;
const Math = global.Math;
return handleProgressBinding(0.9 * Math.random() + 0.03);
}
function action_104057() { // fn#104057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:2733, offset: 0x02282b42, size: 50 bytes, params: 1, frame: 11
let value = environment.__proto__.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
return value.copy(quest.id);
}
global.__d(_fun104044, 13623, [29, 31, 7093, 661, 33, 8341, 8639, 1244, 9483, 566, 6531, 9949, 9513, 9505, 7114,
477, 4093, 9480, 9520, 7120, 3869, 13580, 9484, 6249, 13624, 4060, 7116, 6797, 4064, 9519, 9517, 9518, 7121,
8811,
2]) /* metro module 13623, dependencies: [29, 31, 7093, 661, 33, 8341, 8639, 1244, 9483, 566, 6531, 9949, 9513, 9505, 7114, 477, 4093, 9480, 9520, 7120, 3869, 13580, 9484, 6249, 13624, 4060, 7116, 6797, 4064, 9519, 9517, 9518, 7121, 8811, 2] */;
@@ -1,56 +1,72 @@
/* Metro module 13581; source: modules/quests/native/QuestDisclosureModal/QuestDisclosureModal.tsx; dependencies: [33, 5277, 8160, 13580, 1244, 5282, 13582, 5280, 2] */
import Module08160 from '../../../../by-id/module-08160.js'; /* Metro dependency 8160 */
import QuestDisclosureModalActionCreators from './QuestDisclosureModalActionCreators.tsx'; /* Metro dependency 13580 */
import QuestDisclosureModalInner from './QuestDisclosureModalInner.tsx'; /* Metro dependency 13582 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as HeaderActionButtonNativeModule from '../../../../design/components/Navigator/native/HeaderActionButton.native.tsx'; /* Metro dependency 5277 */
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as NavigatorHeaderNativeModule from '../../../../design/components/Navigator/native/NavigatorHeader.native.tsx'; /* Metro dependency 5282 */
function _fun103223(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13771:6, offset: 0x0225d5cd, size: 150 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
object = {DISCLOSURE: 'disclosure'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDisclosureModal/QuestDisclosureModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDisclosureModal/QuestDisclosureModal.tsx');
exports.default = QuestDisclosureModal;
function CloseButton_103224() { // fn#103224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13771:167, offset: 0x0225d663, size: 129 bytes, params: 1, frame: 18
const HeaderActionButton = (HeaderActionButtonNativeModule).HeaderActionButton;
const headerActionButtonProps = {source: Module08160, onPress: onPress_103225};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq);
return <HeaderActionButton {...headerActionButtonProps} />;
function CloseButton_103224OnPress() { // fn#103225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13771:250, owner: CloseButton_103224.onPress, offset: 0x0225d6e4, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (QuestDisclosureModalActionCreators).hideModal();
}
}
function QuestDisclosureModal({isTargetedDisclosure, gamePublisher, gameTitle, cosponsorName, isVideoQuest}) { // fn#103226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13771:444, offset: 0x0225d709, size: 243 bytes, params: 2, frame: 18
const object = {};
const binding = isVideoQuest;
let DISCLOSURE = binding.DISCLOSURE;
object[DISCLOSURE] = {headerLeft: CloseButton_103224, headerRight: function() {
return null;
}, headerTitle: headerTitle_103229, render: render_103230};
const Navigator = (NavigatorNativeModule).Navigator;
DISCLOSURE = binding.DISCLOSURE;
const intl = (IndexNativeModule).intl;
return (
<Navigator
screens={object}
initialRouteName={DISCLOSURE}
headerBackTitle={intl.string((IndexNativeModule).t['13/7kX'])}
/>
);
function QuestDisclosureModalOnClose() { // fn#103227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13771:571, owner: QuestDisclosureModal.onClose, offset: 0x0225d6e4, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (QuestDisclosureModalActionCreators).hideModal();
}
function QuestDisclosureModalHeaderTitle() { // fn#103229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13771:670, owner: QuestDisclosureModal.headerTitle, offset: 0x0225d7fc, size: 96 bytes, params: 1, frame: 18
const NavigatorHeader = (NavigatorHeaderNativeModule).NavigatorHeader;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const GcsZKJ = (IndexNativeModule).t.GcsZKJ;
return <NavigatorHeader title={Reflect.apply(string, intl, [GcsZKJ])} />;
}
function QuestDisclosureModalRender() { // fn#103230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13771:754, owner: QuestDisclosureModal.render, offset: 0x0225d85c, size: 96 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component isTargetedDisclosure={isTargetedDisclosure} gamePublisher={gamePublisher} gameTitle={gameTitle} onClose={QuestDisclosureModalOnClose} cosponsorName={cosponsorName} isVideoQuest={isVideoQuest} />)(QuestDisclosureModalInner);
}
}
}
function CloseButton_103224() { // fn#103224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13771:167, offset: 0x0225d663, size: 129 bytes, params: 1, frame: 18
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const headerActionButtonProps = {source: importDefault(8160) /* metro dependency 8160 */, onPress: onPress_103225};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq);
return <HeaderActionButton {...headerActionButtonProps} />;
}
function QuestDisclosureModal({isTargetedDisclosure, gamePublisher, gameTitle, cosponsorName, isVideoQuest}) { // fn#103226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13771:444, offset: 0x0225d709, size: 243 bytes, params: 2, frame: 18
const object2 = {};
const binding = isVideoQuest;
let DISCLOSURE = binding.DISCLOSURE;
object2[DISCLOSURE] = {headerLeft: CloseButton_103224, headerRight: function() {
return null;
}, headerTitle: headerTitle_103229, render: render_103230};
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
DISCLOSURE = binding.DISCLOSURE;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Navigator
screens={object2}
initialRouteName={DISCLOSURE}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
/>
);
}
function CloseButton_103224OnPress() { // fn#103225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13771:250, owner: CloseButton_103224.onPress, offset: 0x0225d6e4, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(13580) /* metro dependency 13580: QuestDisclosureModalActionCreators */).hideModal();
}
function QuestDisclosureModalHeaderTitle() { // fn#103229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13771:670, owner: QuestDisclosureModal.headerTitle, offset: 0x0225d7fc, size: 96 bytes, params: 1, frame: 18
const NavigatorHeader = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).NavigatorHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const GcsZKJ = (require(1244) /* metro dependency 1244: indexNative */).t.GcsZKJ;
return <NavigatorHeader title={Reflect.apply(string, intl, [GcsZKJ])} />;
}
function QuestDisclosureModalRender() { // fn#103230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13771:754, owner: QuestDisclosureModal.render, offset: 0x0225d85c, size: 96 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component isTargetedDisclosure={isTargetedDisclosure} gamePublisher={gamePublisher} gameTitle={gameTitle} onClose={QuestDisclosureModalOnClose} cosponsorName={cosponsorName} isVideoQuest={isVideoQuest} />)(importDefault(13582) /* metro dependency 13582: QuestDisclosureModalInner */);
}
global.__d(_fun103223, 13581, [33, 5277, 8160, 13580, 1244, 5282, 13582, 5280,
2]) /* metro module 13581, dependencies: [33, 5277, 8160, 13580, 1244, 5282, 13582, 5280, 2] */;
@@ -1,52 +1,56 @@
/* Metro module 13580; source: modules/quests/native/QuestDisclosureModal/QuestDisclosureModalActionCreators.tsx; dependencies: [7116, 9519, 9517, 9518, 7121, 7110, 5080, 13581, 1962, 2] */
import ModalActionCreators from '../../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun103220(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13770:6, offset: 0x0225d33f, size: 122 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {showModal: showModal_103221, hideModal: hideModal_103222};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDisclosureModal/QuestDisclosureModalActionCreators.tsx');
exports.default = object2;
}
object = {showModal: showModal_103221, hideModal: hideModal_103222};
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDisclosureModal/QuestDisclosureModalActionCreators.tsx');
exports.default = object;
function showModal_103221({quest, isTargetedDisclosure, trackingCtx}) { // fn#103221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13770:126, offset: 0x0225d3b9, size: 488 bytes, params: 2, frame: 24
var object;
var moduleValue4;
var captureAdUserAction;
const {gamePublisher, gameTitle} = quest.config.messages;
const hasWatchVideoTasks2 = require(dependencyMap[0]).hasWatchVideoTasks(quest);
const moduleValue2 = require(dependencyMap[1]);
const shouldMigrateToAdAnalyticsInterface = moduleValue2.shouldMigrateToAdAnalyticsInterface;
const AdAnalyticsInterfaceExperimentStep = require(dependencyMap[1]).AdAnalyticsInterfaceExperimentStep;
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
if (Reflect.apply(shouldMigrateToAdAnalyticsInterface, moduleValue2, [STEP_2_CLICKED_INTERNAL,
'quest_disclosure_modal'])) {
moduleValue4 = require(dependencyMap[2]);
captureAdUserAction = moduleValue4.captureAdUserAction;
object = {};
object.type = require(dependencyMap[3]).AdUserActionType.CLICK_INTERNAL;
object.adCreativeType = require(dependencyMap[4]).AdCreativeType.QUEST;
object.adCreativeId = quest.id;
object.questContentCTA = trackingCtx.ctaContent;
object.surfaceId = trackingCtx.content;
object.sourceQuestContent = trackingCtx.sourceQuestContent;
object.questContentPosition = trackingCtx.position;
Reflect.apply(captureAdUserAction, moduleValue4, [object]);
} else {
require(dependencyMap[5]).trackQuestContentClicked({questId: quest.id, questContent: trackingCtx.content,
questContentCTA: trackingCtx.ctaContent, questContentPosition: trackingCtx.position,
sourceQuestContent: trackingCtx.sourceQuestContent});
}
const defaultImport = importDefault(dependencyMap[6]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[8]);
value = value(dependencyMap[7], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {gamePublisher: gamePublisher, gameTitle: gameTitle,
isTargetedDisclosure: isTargetedDisclosure, cosponsorName: quest.config.cosponsorMetadata?.name,
isVideoQuest: hasWatchVideoTasks2}, 'QUEST_DISCLOSURE_MODAL']);
}
function showModal_103221({quest, isTargetedDisclosure, trackingCtx}) { // fn#103221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13770:126, offset: 0x0225d3b9, size: 488 bytes, params: 2, frame: 24
var object2;
var moduleValue4;
var captureAdUserAction;
const {gamePublisher, gameTitle} = quest.config.messages;
const hasWatchVideoTasks2 = require(dependencyMap[0]).hasWatchVideoTasks(quest);
const moduleValue2 = require(dependencyMap[1]);
const shouldMigrateToAdAnalyticsInterface = moduleValue2.shouldMigrateToAdAnalyticsInterface;
const AdAnalyticsInterfaceExperimentStep = require(dependencyMap[1]).AdAnalyticsInterfaceExperimentStep;
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
if (Reflect.apply(shouldMigrateToAdAnalyticsInterface, moduleValue2, [STEP_2_CLICKED_INTERNAL,
'quest_disclosure_modal'])) {
moduleValue4 = require(dependencyMap[2]);
captureAdUserAction = moduleValue4.captureAdUserAction;
object2 = {};
object2.type = require(dependencyMap[3]).AdUserActionType.CLICK_INTERNAL;
object2.adCreativeType = require(dependencyMap[4]).AdCreativeType.QUEST;
object2.adCreativeId = quest.id;
object2.questContentCTA = trackingCtx.ctaContent;
object2.surfaceId = trackingCtx.content;
object2.sourceQuestContent = trackingCtx.sourceQuestContent;
object2.questContentPosition = trackingCtx.position;
Reflect.apply(captureAdUserAction, moduleValue4, [object2]);
} else {
require(dependencyMap[5]).trackQuestContentClicked({questId: quest.id, questContent: trackingCtx.content,
questContentCTA: trackingCtx.ctaContent, questContentPosition: trackingCtx.position,
sourceQuestContent: trackingCtx.sourceQuestContent});
function hideModal_103222() { // fn#103222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13770:1019, offset: 0x0225d5a1, size: 44 bytes, params: 1, frame: 12
(ModalActionCreators).popWithKey('QUEST_DISCLOSURE_MODAL');
}
const defaultImport = importDefault(dependencyMap[6]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[8]);
value = value(dependencyMap[7], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {gamePublisher: gamePublisher, gameTitle: gameTitle,
isTargetedDisclosure: isTargetedDisclosure, cosponsorName: quest.config.cosponsorMetadata?.name,
isVideoQuest: hasWatchVideoTasks2}, 'QUEST_DISCLOSURE_MODAL']);
}
function hideModal_103222() { // fn#103222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13770:1019, offset: 0x0225d5a1, size: 44 bytes, params: 1, frame: 12
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('QUEST_DISCLOSURE_MODAL');
}
global.__d(_fun103220, 13580, [7116, 9519, 9517, 9518, 7121, 7110, 5080, 13581, 1962,
2]) /* metro module 13580, dependencies: [7116, 9519, 9517, 9518, 7121, 7110, 5080, 13581, 1962, 2] */;
@@ -1,121 +1,152 @@
/* Metro module 13582; source: modules/quests/native/QuestDisclosureModal/QuestDisclosureModalInner.tsx; dependencies: [27, 661, 33, 4501, 697, 3829, 9390, 1244, 9404, 11441, 8658, 5473, 4573, 9505, 6239, 6766, 1948, 4578, 2] */
import HelpdeskUtils from '../../../../utils/HelpdeskUtils.tsx'; /* Metro dependency 1948 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as UserSettingsModule from '../../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NativeModule from '../../../../design/assets/native.tsx'; /* Metro dependency 5473 */
import * as TextWithIOSLinkWorkaroundModule from '../../../a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */
import * as QuestCopyUtilsModule from '../../utils/QuestCopyUtils.tsx'; /* Metro dependency 9505 */
function _fun103231(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13772:6, offset: 0x0225d8bc, size: 534 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object5 = {flex: 1};
object = {};
const object2 = {flex: 1};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object5.padding = PX_24;
object2.padding = PX_24;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.gap = PX_16;
object5.maxWidth = 480;
object3.container = object5;
object2.gap = PX_16;
object2.maxWidth = 480;
object.container = object2;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.illustration = {alignSelf: 'center', marginBottom: PX_8};
const object7 = {marginTop: 'auto'};
object.illustration = {alignSelf: 'center', marginBottom: PX_8};
const object4 = {marginTop: 'auto'};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object7.paddingHorizontal = PX_8;
object4.paddingHorizontal = PX_8;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object7.marginBottom = PX_24;
object3.closeButton = object7;
object3.targetList = {padding: 0};
const object9 = {'flexDirection': 'row', 'flexWrap': 'nowrap', 'alignItems': 'center'};
object4.marginBottom = PX_24;
object.closeButton = object4;
object.targetList = {padding: 0};
const object6 = {'flexDirection': 'row', 'flexWrap': 'nowrap', 'alignItems': 'center'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object9.paddingLeft = PX_16;
object6.paddingLeft = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object9.gap = PX_16;
object3.targetItem = object9;
object3.lastTargetItem = {borderBottomWidth: 0};
const object10 = {'flex': 1, 'paddingVertical': null, 'borderBottomWidth': 1};
object6.gap = PX_16;
object.targetItem = object6;
object.lastTargetItem = {borderBottomWidth: 0};
const object8 = {'flex': 1, 'paddingVertical': null, 'borderBottomWidth': 1};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object10.paddingVertical = PX_12;
object8.paddingVertical = PX_12;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object10.borderBottomColor = BORDER_SUBTLE;
object3.disclosureText = object10;
const env0_7 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDisclosureModal/QuestDisclosureModalInner.tsx');
object8.borderBottomColor = BORDER_SUBTLE;
object.disclosureText = object8;
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDisclosureModal/QuestDisclosureModalInner.tsx');
exports.default = QuestDisclosureModalInner;
}
function QuestDisclosureModalInner({isTargetedDisclosure, gamePublisher, gameTitle, isVideoQuest, onClose, cosponsorName}) { // fn#103232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13772:873, offset: 0x0225dad2, size: 1061 bytes, params: 2, frame: 31
var r14;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
const styles = useStyles();
const DropsOptedOut = (require(3829) /* metro dependency 3829: UserSettings */).DropsOptedOut;
const value2 = DropsOptedOut.useSetting();
let object2 = {};
if (value2) {
object2.icon = ((ServerIcon) => <ServerIcon size="xs" />)((require(9390) /* metro dependency 9390: ServerIcon */).ServerIcon);
object2.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2bL0wT']);
r14 = [object2];
} else {
object2.icon = ((GlobeEarthIcon) => <GlobeEarthIcon size="xs" />)((require(9404) /* metro dependency 9404: GlobeEarthIcon */).GlobeEarthIcon);
object2.text = intl.string(t.xQSdPv);
items2 = [object2];
object2 = {};
object2.icon = ((UserIcon) => <UserIcon size="xs" />)((require(11441) /* metro dependency 11441: UserIcon */).UserIcon);
object2.text = intl.string(t.mYt7hQ);
items2[1] = object2;
object2 = {};
object2.icon = ((GameControllerIcon) => <GameControllerIcon size="xs" />)((require(8658) /* metro dependency 8658: GameControllerIcon */).GameControllerIcon);
object2.text = intl.string(t.XAsWxQ);
items2[2] = object2;
r14 = items2;
}
const WumpusCouchSpotIllustration = (require(5473) /* metro dependency 5473: native */).WumpusCouchSpotIllustration;
const items3 = [<View style={styles.illustration}><WumpusCouchSpotIllustration /></View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const questCopyUtilsModule = require(9505) /* metro dependency 9505: QuestCopyUtils */;
const getDisclosureText = questCopyUtilsModule.getDisclosureText;
items3[1] = <Text variant="text-md/normal" color="mobile-text-heading-primary">{Reflect.apply(getDisclosureText,
questCopyUtilsModule, [{gamePublisher: gamePublisher, gameTitle: gameTitle,
isTargetedDisclosure: isTargetedDisclosure, isContextualDisclosure: value2, cosponsorName: cosponsorName,
isVideoQuest: isVideoQuest}])}</Text>;
items3[2] = isTargetedDisclosure && ((Card) => <Card radius={16} style={styles.targetList}>{r14.map(_fun103233)}</Card>)((require(6239) /* metro dependency 6239: CardNative */).Card);
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
const format = intl.format;
const tzq9Wa = (require(1244) /* metro dependency 1244: indexNative */).t.tzq9Wa;
const defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
const getArticleURL = defaultImport.getArticleURL;
const QUESTS_PRIVACY_CONTROLS = HelpdeskArticles.QUESTS_PRIVACY_CONTROLS;
items3[3] = <TextWithIOSLinkWorkaround variant="text-md/medium" color="mobile-text-heading-primary">{Reflect.apply(format,
intl, [tzq9Wa, {privacySettingsUrl: Reflect.apply(getArticleURL, defaultImport,
[QUESTS_PRIVACY_CONTROLS])}])}</TextWithIOSLinkWorkaround>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items3[4] = <View style={styles.closeButton}><Button variant="primary" grow size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} onPress={onClose} /></View>;
return (
<View style={styles.container}>
{items3}
</View>
);
}
function _fun103233({icon, text}, a1) { // fn#103233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13772:1819, offset: 0x0225def7, size: 193 bytes, params: 3, frame: 23
const stylesBinding = styles;
const targetItem = stylesBinding.targetItem;
const items2 = [stylesBinding.disclosureText];
items2[1] = a1 === env0_1.length - 1 && styles.lastTargetItem;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={targetItem} key={a1}>
{icon}
<View style={items2}>
<Text variant="text-md/semibold">
{text}
</Text>
function QuestDisclosureModalInner({isTargetedDisclosure, gamePublisher, gameTitle, isVideoQuest, onClose, cosponsorName}) { // fn#103232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13772:873, offset: 0x0225dad2, size: 1061 bytes, params: 2, frame: 31
var r14;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
const styles = useStyles();
const DropsOptedOut = (UserSettingsModule).DropsOptedOut;
const value2 = DropsOptedOut.useSetting();
let object = {};
if (value2) {
object.icon = ((ServerIcon) => <ServerIcon size="xs" />)((require(9390) /* metro dependency 9390: ServerIcon */).ServerIcon);
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2bL0wT']);
r14 = [object];
} else {
object.icon = ((GlobeEarthIcon) => <GlobeEarthIcon size="xs" />)((require(9404) /* metro dependency 9404: GlobeEarthIcon */).GlobeEarthIcon);
object.text = intl.string(t.xQSdPv);
items2 = [object];
object = {};
object.icon = ((UserIcon) => <UserIcon size="xs" />)((require(11441) /* metro dependency 11441: UserIcon */).UserIcon);
object.text = intl.string(t.mYt7hQ);
items2[1] = object;
object = {};
object.icon = ((GameControllerIcon) => <GameControllerIcon size="xs" />)((require(8658) /* metro dependency 8658: GameControllerIcon */).GameControllerIcon);
object.text = intl.string(t.XAsWxQ);
items2[2] = object;
r14 = items2;
}
const WumpusCouchSpotIllustration = (NativeModule).WumpusCouchSpotIllustration;
const items3 = [
<View style={styles.illustration}>
<WumpusCouchSpotIllustration />
</View>,
];
const Text = (TextModule).Text;
const getDisclosureText = QuestCopyUtilsModule.getDisclosureText;
items3[1] = (
<Text variant="text-md/normal" color="mobile-text-heading-primary">
{Reflect.apply(getDisclosureText, QuestCopyUtilsModule, [{gamePublisher: gamePublisher,
gameTitle: gameTitle, isTargetedDisclosure: isTargetedDisclosure, isContextualDisclosure: value2,
cosponsorName: cosponsorName, isVideoQuest: isVideoQuest}])}
</Text>
);
items3[2] = isTargetedDisclosure && ((Card) => <Card radius={16} style={styles.targetList}>{r14.map(_fun103233)}</Card>)((require(6239) /* metro dependency 6239: CardNative */).Card);
const TextWithIOSLinkWorkaround = (TextWithIOSLinkWorkaroundModule).TextWithIOSLinkWorkaround;
const format = intl.format;
const tzq9Wa = (require(1244) /* metro dependency 1244: indexNative */).t.tzq9Wa;
const defaultImport = HelpdeskUtils;
const getArticleURL = defaultImport.getArticleURL;
const QUESTS_PRIVACY_CONTROLS = HelpdeskArticles.QUESTS_PRIVACY_CONTROLS;
items3[3] = (
<TextWithIOSLinkWorkaround variant="text-md/medium" color="mobile-text-heading-primary">
{Reflect.apply(format, intl, [tzq9Wa, {privacySettingsUrl: Reflect.apply(getArticleURL, defaultImport,
[QUESTS_PRIVACY_CONTROLS])}])}
</TextWithIOSLinkWorkaround>
);
const Button = (ButtonNativeModule).Button;
items3[4] = (
<View style={styles.closeButton}>
<Button
variant="primary"
grow
size="lg"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
onPress={onClose}
/>
</View>
</View>
);
);
return (
<View style={styles.container}>
{items3}
</View>
);
function _fun103233({icon, text}, a1) { // fn#103233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13772:1819, offset: 0x0225def7, size: 193 bytes, params: 3, frame: 23
const stylesBinding = styles;
const targetItem = stylesBinding.targetItem;
const items2 = [stylesBinding.disclosureText];
items2[1] = a1 === env0_1.length - 1 && styles.lastTargetItem;
const Text = (TextModule).Text;
return (
<View style={targetItem} key={a1}>
{icon}
<View style={items2}>
<Text variant="text-md/semibold">
{text}
</Text>
</View>
</View>
);
}
}
}
global.__d(_fun103231, 13582, [27, 661, 33, 4501, 697, 3829, 9390, 1244, 9404, 11441, 8658, 5473, 4573, 9505, 6239,
6766, 1948, 4578,
2]) /* metro module 13582, dependencies: [27, 661, 33, 4501, 697, 3829, 9390, 1244, 9404, 11441, 8658, 5473, 4573, 9505, 6239, 6766, 1948, 4578, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,29 +1,34 @@
/* Metro module 13631; source: modules/quests/native/QuestDock/QuestDockBlurredContentBackground.tsx; dependencies: [31, 27, 33, 4563, 2] */
import VisualEffectViewAnimated from '../../../visual_effect_view/native/VisualEffectViewAnimated.tsx'; /* Metro dependency 4563 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun104099(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13828:6, offset: 0x022857f3, size: 170 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).StyleSheet;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(QuestDockBlurredContentBackground);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockBlurredContentBackground.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockBlurredContentBackground.tsx');
exports.default = value;
function QuestDockBlurredContentBackground({animatedStyle, animatedLayout, blurTheme}) { // fn#104100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13828:155, offset: 0x0228589d, size: 187 bytes, params: 2, frame: 19
const r9 = blurTheme === undefined ? 'dark' : blurTheme;
const binding = env0_2;
return ((Component) => <Component nativeID="quest-dock-blurred-background" blurTintRgba={binding.useMemo(_fun104102,
[r9])} blurAmount={0.5} blurTheme="dark" android_fallbackColor={binding.useMemo(_fun104101,
[r9])} style={[StyleSheet.absoluteFillObject,
animatedStyle]} layout={animatedLayout} />)(VisualEffectViewAnimated);
function _fun104101() { // fn#104101, offset: 0x02285958, size: 29 bytes, params: 1, frame: 3
return env0_0 !== 'dark' ? 'rgba(255, 255, 255, 0.1)' : 'rgba(38, 39, 50, 0.65)';
}
function _fun104102() { // fn#104102, offset: 0x02285975, size: 29 bytes, params: 1, frame: 3
return env0_0 !== 'dark' ? 'rgba(255, 255, 255, 0.1)' : 'rgba(38, 39, 50, 0.1)';
}
}
}
function QuestDockBlurredContentBackground({animatedStyle, animatedLayout, blurTheme}) { // fn#104100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13828:155, offset: 0x0228589d, size: 187 bytes, params: 2, frame: 19
const r9 = blurTheme === undefined ? 'dark' : blurTheme;
const binding = env0_2;
return ((Component) => <Component nativeID="quest-dock-blurred-background" blurTintRgba={binding.useMemo(_fun104102,
[r9])} blurAmount={0.5} blurTheme="dark" android_fallbackColor={binding.useMemo(_fun104101,
[r9])} style={[StyleSheet.absoluteFillObject,
animatedStyle]} layout={animatedLayout} />)(importDefault(4563) /* metro dependency 4563: VisualEffectViewAnimated */);
}
function _fun104101() { // fn#104101, offset: 0x02285958, size: 29 bytes, params: 1, frame: 3
return env0_0 !== 'dark' ? 'rgba(255, 255, 255, 0.1)' : 'rgba(38, 39, 50, 0.65)';
}
function _fun104102() { // fn#104102, offset: 0x02285975, size: 29 bytes, params: 1, frame: 3
return env0_0 !== 'dark' ? 'rgba(255, 255, 255, 0.1)' : 'rgba(38, 39, 50, 0.1)';
}
global.__d(_fun104099, 13631, [31, 27, 33, 4563, 2]) /* metro module 13631, dependencies: [31, 27, 33, 4563, 2] */;
@@ -1,85 +1,88 @@
/* Metro module 13656; source: modules/quests/native/QuestDock/QuestDockBlurredHeaderPlaceholder.tsx; dependencies: [31, 27, 6528, 13572, 33, 4501, 13573, 13657, 4017, 2] */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestDockConstantsModule from './QuestDockConstants.tsx'; /* Metro dependency 13572 */
import * as QuestDockGestureContextModule from './QuestDockGestureContext.tsx'; /* Metro dependency 13573 */
function _fun104309(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13853:6, offset: 0x022902c3, size: 373 bytes, params: 8, frame: 25
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const StyleSheet = value2.StyleSheet;
const env0_4 = value2.View;
const env0_5 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const {QUEST_DOCK_EXPANDED_HEIGHT,
QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED} = require(13572) /* metro dependency 13572: QuestDockConstants */;
const value4 = require(33) /* metro dependency 33 */;
const env0_7 = value4.jsx;
const env0_8 = value4.Fragment;
const env0_9 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {};
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
object5['height'] = QUEST_DOCK_EXPANDED_HEIGHT;
object5['top'] = -QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
object4.image = object5;
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object6['backgroundColor'] = 'rgba(38, 39, 50, 0.3)';
object6['height'] = QUEST_DOCK_EXPANDED_HEIGHT;
object4.overlay = object6;
const env0_10 = Reflect.apply(createStyles, createStylesModule, [object4]);
object4 = {code: 'function QuestDockBlurredHeaderPlaceholderTsx1(){const{activeQuestDockMode,QuestDockMode,QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,questDockWrapperSpecs}=this.__closure;return{left:activeQuestDockMode.get()===QuestDockMode.EXPANDED?-QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED:0,width:questDockWrapperSpecs.get().width+QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED};}'};
value = value.memo(QuestDockBlurredContentBackground_104310);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockBlurredHeaderPlaceholder.tsx');
exports.default = value;
}
function QuestDockBlurredContentBackground_104310({animatedLayout, animatedStyle, placeholder}) { // fn#104310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13853:843, offset: 0x02290438, size: 341 bytes, params: 2, frame: 23
const binding = env0_3;
const useContext = binding.useContext;
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
const {questDockWrapperSpecs, activeQuestDockMode} = Reflect.apply(useContext, binding, [QuestDockGestureContext]);
const value3 = binding.useMemo(_fun104311, [placeholder]);
const styles = useStyles();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var object = {};
object.left = activeQuestDockMode.get() !== QuestDockMode.EXPANDED ? 0 : -QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
object.width = questDockWrapperSpecs.get().width + QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
return object;
};
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED: QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,
questDockWrapperSpecs: questDockWrapperSpecs};
closure.__workletHash = 11176778421725;
closure.__initData = env0_11;
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const Image = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).Image;
return (
<>
<Image
source={value3}
style={[styles.image, animatedStyle, value4]}
layout={animatedLayout}
/>
<View style={styles.overlay} />
</>
);
}
function _fun104311() { // fn#104311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13853:1059, offset: 0x0229058d, size: 90 bytes, params: 1, frame: 17
var environment;
QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED} = QuestDockConstantsModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {};
let value = environment.__proto__;
value = require(13657) /* metro dependency 13657 */;
const thumbHashToDataURL = value.thumbHashToDataURL;
const Uint8Array = global.Uint8Array;
object2.uri = Reflect.apply(thumbHashToDataURL, value, [Uint8Array.from(global.atob(placeholder), function(a0) {
return a0.charCodeAt(0);
})]);
return object2;
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['height'] = QUEST_DOCK_EXPANDED_HEIGHT;
object2['top'] = -QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
object.image = object2;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['backgroundColor'] = 'rgba(38, 39, 50, 0.3)';
object3['height'] = QUEST_DOCK_EXPANDED_HEIGHT;
object.overlay = object3;
const env0_10 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: 'function QuestDockBlurredHeaderPlaceholderTsx1(){const{activeQuestDockMode,QuestDockMode,QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,questDockWrapperSpecs}=this.__closure;return{left:activeQuestDockMode.get()===QuestDockMode.EXPANDED?-QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED:0,width:questDockWrapperSpecs.get().width+QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED};}'};
value = value.memo(QuestDockBlurredContentBackground_104310);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockBlurredHeaderPlaceholder.tsx');
exports.default = value;
function QuestDockBlurredContentBackground_104310({animatedLayout, animatedStyle, placeholder}) { // fn#104310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13853:843, offset: 0x02290438, size: 341 bytes, params: 2, frame: 23
const binding = env0_3;
const useContext = binding.useContext;
const QuestDockGestureContext = (QuestDockGestureContextModule).QuestDockGestureContext;
const {questDockWrapperSpecs, activeQuestDockMode} = Reflect.apply(useContext, binding, [QuestDockGestureContext]);
const value3 = binding.useMemo(_fun104311, [placeholder]);
const styles = useStyles();
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var object = {};
object.left = activeQuestDockMode.get() !== QuestDockMode.EXPANDED ? 0 : -QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
object.width = questDockWrapperSpecs.get().width + QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
return object;
};
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED: QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,
questDockWrapperSpecs: questDockWrapperSpecs};
closure.__workletHash = 11176778421725;
closure.__initData = env0_11;
const value4 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const Image = (ReanimatedRexport).Image;
return (
<>
<Image
source={value3}
style={[styles.image, animatedStyle, value4]}
layout={animatedLayout}
/>
<View style={styles.overlay} />
</>
);
function _fun104311() { // fn#104311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13853:1059, offset: 0x0229058d, size: 90 bytes, params: 1, frame: 17
var environment;
const object = {};
let value = environment.__proto__;
value = require(13657) /* metro dependency 13657 */;
const thumbHashToDataURL = value.thumbHashToDataURL;
const Uint8Array = global.Uint8Array;
object.uri = Reflect.apply(thumbHashToDataURL, value, [Uint8Array.from(global.atob(placeholder), function(a0) {
return a0.charCodeAt(0);
})]);
return object;
}
}
}
global.__d(_fun104309, 13656, [31, 27, 6528, 13572, 33, 4501, 13573, 13657, 4017,
2]) /* metro module 13656, dependencies: [31, 27, 6528, 13572, 33, 4501, 13573, 13657, 4017, 2] */;
@@ -1,17 +1,19 @@
/* Metro module 13572; source: modules/quests/native/QuestDock/QuestDockConstants.tsx; dependencies: [697, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun103169(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13762:6, offset: 0x0225ac14, size: 450 bytes, params: 8, frame: 22
var object3;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3 = {'mass': 0.5, 'damping': 80, 'stiffness': 320};
const object4 = {};
copyDataProperties(object4, object3, undefined);
object4['overshootClamping'] = true;
const lg = (importDefault(697) /* metro dependency 697: native */).radii.lg;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockConstants.tsx');
const PX_16 = (Native).space.PX_16;
const PX_12 = (Native).space.PX_12;
const PX_8 = (Native).space.PX_8;
object = {'mass': 0.5, 'damping': 80, 'stiffness': 320};
const object2 = {};
copyDataProperties(object2, object, undefined);
object2['overshootClamping'] = true;
const lg = (Native).radii.lg;
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockConstants.tsx');
exports.QUEST_DOCK_COLLAPSED_HEIGHT = 56;
exports.QUEST_DOCK_CLOSED_HEIGHT = 22;
exports.QUEST_DOCK_EXPANDED_HEIGHT = 400;
@@ -40,8 +42,9 @@ function _fun103169(global, require, importDefault, importAll, module, exports,
exports.QUEST_DOCK_EXTERNAL_OFFSET_EXPANDED_WITH_YOU_BAR = 56;
exports.QUEST_DOCK_EXTERNAL_OFFSET_CLOSED = 22;
exports.QUEST_DOCK_EXPANDED_CONTENT_PADDING_VERTICAL = 16;
exports.QUEST_DOCK_MODE_CHANGE_PHYSICS = object3;
exports.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED = object4;
exports.QUEST_DOCK_MODE_CHANGE_PHYSICS = object;
exports.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED = object2;
exports.QUEST_DOCK_CONTENT_BORDER_RADII = lg;
}
global.__d(_fun103169, 13572, [697, 2]) /* metro module 13572, dependencies: [697, 2] */;
@@ -1,80 +1,85 @@
/* Metro module 13654; source: modules/quests/native/QuestDock/QuestDockContentCollapsed.tsx; dependencies: [31, 27, 6528, 13572, 33, 4501, 13650, 13573, 4017, 4577, 8141, 13655, 13660, 2] */
import QuestDockContext from './QuestDockContext.tsx'; /* Metro dependency 13650 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestDockConstantsModule from './QuestDockConstants.tsx'; /* Metro dependency 13572 */
import * as QuestDockGestureContextModule from './QuestDockGestureContext.tsx'; /* Metro dependency 13573 */
function _fun104291(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13851:6, offset: 0x0228ecdb, size: 321 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
const env0_4 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
const env0_5 = (require(13572) /* metro dependency 13572: QuestDockConstants */).QUEST_DOCK_MODE_CHANGE_PHYSICS;
const value2 = require(33) /* metro dependency 33 */;
const env0_6 = value2.jsx;
const env0_7 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['bottom'] = undefined;
object3['zIndex'] = 2;
const env0_8 = Reflect.apply(createStyles, createStylesModule, [{questDockContentCollapsed: object3}]);
let value = ReactModule;
const StyleSheet = (ReactNativeModule).StyleSheet;
const createStyles = CreateStylesModule.createStyles;
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['bottom'] = undefined;
object2['zIndex'] = 2;
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [{questDockContentCollapsed: object2}]);
object = {code: 'function QuestDockContentCollapsedTsx1(){const{withSpring,activeQuestDockMode,QuestDockMode,hideOnExpand,QUEST_DOCK_MODE_CHANGE_PHYSICS}=this.__closure;return{opacity:withSpring(activeQuestDockMode.get()===QuestDockMode.COLLAPSED||!hideOnExpand?1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS)};}'};
object = {code: "function QuestDockContentCollapsedTsx2(){const{activeQuestDockMode,QuestDockMode,hideOnExpand}=this.__closure;return{pointerEvents:activeQuestDockMode.get()===QuestDockMode.COLLAPSED||!hideOnExpand?'auto':'none'};}"};
value = value.memo(QuestDockContentCollapsed);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockContentCollapsed.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockContentCollapsed.tsx');
exports.default = value;
function QuestDockContentCollapsed({hideOnExpand}) { // fn#104292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13851:855, offset: 0x0228ee1c, size: 492 bytes, params: 2, frame: 25
const r10 = hideOnExpand === undefined || hideOnExpand;
let binding = env0_3;
let useContext = binding.useContext;
const quest = Reflect.apply(useContext, binding,
[QuestDockContext]).quest;
const styles = useStyles();
const userStatus = quest.userStatus;
const value4 = userStatus?.enrolledAt != null;
binding = env0_3;
useContext = binding.useContext;
const QuestDockGestureContext = (QuestDockGestureContextModule).QuestDockGestureContext;
const activeQuestDockMode = Reflect.apply(useContext, binding, [QuestDockGestureContext]).activeQuestDockMode;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = QuestDockContentCollapsedP;
const object = {};
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.activeQuestDockMode = activeQuestDockMode;
object.QuestDockMode = QuestDockMode;
object.hideOnExpand = r10;
object.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS;
closure.__closure = object;
closure.__workletHash = 13361221764426;
closure.__initData = env0_9;
const value5 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const useAnimatedProps = ReanimatedRexportModule.useAnimatedProps;
closure = QuestDockContentCollapsedS;
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode, hideOnExpand: r10};
closure.__workletHash = 14339269503421;
closure.__initData = env0_10;
return ((Component) => <Component style={[styles.questDockContentCollapsed,
value5]} animatedProps={Reflect.apply(useAnimatedProps, ReanimatedRexportModule,
[closure])}>{!value4 && ((Component) => <Component />)(importDefault(13655) /* metro dependency 13655: QuestDockUnenrolledHeader */)}{value4 && ((Component) => <Component />)(importDefault(13660) /* metro dependency 13660: QuestDockEnrolledHeader */)}</Component>)(importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */);
function QuestDockContentCollapsedP() { // fn#104293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13851:1124, owner: QuestDockContentCollapsed.p, offset: 0x0228f008, size: 96 bytes, params: 1, frame: 18
const withSpring = SpringModule.withSpring;
const value3 = activeQuestDockMode.get();
const COLLAPSED = QuestDockMode.COLLAPSED;
const value4 = 1;
return {opacity: Reflect.apply(withSpring, SpringModule, [value3 === COLLAPSED ? value4 : env0_0 ? 0 : value4,
QUEST_DOCK_MODE_CHANGE_PHYSICS])};
}
function QuestDockContentCollapsedS() { // fn#104294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13851:1400, owner: QuestDockContentCollapsed.S, offset: 0x0228f068, size: 63 bytes, params: 1, frame: 13
const value2 = activeQuestDockMode.get();
const COLLAPSED = QuestDockMode.COLLAPSED;
const value4 = 'auto';
return {pointerEvents: value2 === COLLAPSED ? value4 : env0_0 ? 'none' : value4};
}
}
}
function QuestDockContentCollapsed({hideOnExpand}) { // fn#104292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13851:855, offset: 0x0228ee1c, size: 492 bytes, params: 2, frame: 25
const r10 = hideOnExpand === undefined || hideOnExpand;
let binding = env0_3;
let useContext = binding.useContext;
const quest = Reflect.apply(useContext, binding,
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
const styles = useStyles();
const userStatus = quest.userStatus;
const value4 = userStatus?.enrolledAt != null;
binding = env0_3;
useContext = binding.useContext;
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
const activeQuestDockMode = Reflect.apply(useContext, binding, [QuestDockGestureContext]).activeQuestDockMode;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = QuestDockContentCollapsedP;
const object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.activeQuestDockMode = activeQuestDockMode;
object2.QuestDockMode = QuestDockMode;
object2.hideOnExpand = r10;
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS;
closure.__closure = object2;
closure.__workletHash = 13361221764426;
closure.__initData = env0_9;
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue2 = reanimatedRexportModule;
const useAnimatedProps = moduleValue2.useAnimatedProps;
closure = QuestDockContentCollapsedS;
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode, hideOnExpand: r10};
closure.__workletHash = 14339269503421;
closure.__initData = env0_10;
return ((Component) => <Component style={[styles.questDockContentCollapsed,
value5]} animatedProps={Reflect.apply(useAnimatedProps, moduleValue2,
[closure])}>{!value4 && ((Component) => <Component />)(importDefault(13655) /* metro dependency 13655: QuestDockUnenrolledHeader */)}{value4 && ((Component) => <Component />)(importDefault(13660) /* metro dependency 13660: QuestDockEnrolledHeader */)}</Component>)(importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */);
}
function QuestDockContentCollapsedP() { // fn#104293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13851:1124, owner: QuestDockContentCollapsed.p, offset: 0x0228f008, size: 96 bytes, params: 1, frame: 18
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const value3 = activeQuestDockMode.get();
const COLLAPSED = QuestDockMode.COLLAPSED;
const value4 = 1;
return {opacity: Reflect.apply(withSpring, springModule, [value3 === COLLAPSED ? value4 : env0_0 ? 0 : value4,
QUEST_DOCK_MODE_CHANGE_PHYSICS])};
}
function QuestDockContentCollapsedS() { // fn#104294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13851:1400, owner: QuestDockContentCollapsed.S, offset: 0x0228f068, size: 63 bytes, params: 1, frame: 13
const value2 = activeQuestDockMode.get();
const COLLAPSED = QuestDockMode.COLLAPSED;
const value4 = 'auto';
return {pointerEvents: value2 === COLLAPSED ? value4 : env0_0 ? 'none' : value4};
}
global.__d(_fun104291, 13654, [31, 27, 6528, 13572, 33, 4501, 13650, 13573, 4017, 4577, 8141, 13655, 13660,
2]) /* metro module 13654, dependencies: [31, 27, 6528, 13572, 33, 4501, 13650, 13573, 4017, 4577, 8141, 13655, 13660, 2] */;
@@ -1,102 +1,105 @@
/* Metro module 13661; source: modules/quests/native/QuestDock/QuestDockContentExpanded.tsx; dependencies: [31, 27, 6528, 13572, 33, 4501, 13650, 13573, 4017, 4577, 8141, 13662, 13663, 2] */
import ReanimatedNativeView from '../../../core/native/ReanimatedNativeView.tsx'; /* Metro dependency 8141 */
import QuestDockContext from './QuestDockContext.tsx'; /* Metro dependency 13650 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestDockConstantsModule from './QuestDockConstants.tsx'; /* Metro dependency 13572 */
import * as QuestDockGestureContextModule from './QuestDockGestureContext.tsx'; /* Metro dependency 13573 */
function _fun104327(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13858:6, offset: 0x02291c5a, size: 328 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
const env0_4 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
const env0_5 = questDockConstantsModule.QUEST_DOCK_MODE_CHANGE_PHYSICS;
const env0_6 = questDockConstantsModule.QUEST_DOCK_EXPANDED_HEIGHT;
const value3 = require(33) /* metro dependency 33 */;
const env0_7 = value3.jsx;
const env0_8 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['bottom'] = undefined;
object3['display'] = 'flex';
object3['zIndex'] = 1;
const env0_9 = Reflect.apply(createStyles, createStylesModule, [{wrapper: object3}]);
let value = ReactModule;
const StyleSheet = (ReactNativeModule).StyleSheet;
const createStyles = CreateStylesModule.createStyles;
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['bottom'] = undefined;
object2['display'] = 'flex';
object2['zIndex'] = 1;
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [{wrapper: object2}]);
object = {code: 'function QuestDockContentExpandedTsx1(){const{isEnrolled,QUEST_DOCK_EXPANDED_HEIGHT,windowDimensions,withSpring,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS,questDockWrapperSpecs}=this.__closure;return{height:isEnrolled?undefined:QUEST_DOCK_EXPANDED_HEIGHT,width:windowDimensions.get().width,opacity:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS),transform:[{translateX:withSpring((questDockWrapperSpecs.get().width-windowDimensions.get().width)/2,QUEST_DOCK_MODE_CHANGE_PHYSICS)}]};}'};
value = value.memo(QuestDockContentExpanded);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockContentExpanded.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockContentExpanded.tsx');
exports.default = value;
}
function QuestDockContentExpanded() { // fn#104328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13858:933, offset: 0x02291da2, size: 436 bytes, params: 1, frame: 24
var r5;
var value;
const binding = env0_3;
let useContext = binding.useContext;
const value2 = undefined;
const quest = Reflect.apply(useContext, binding,
[QuestDockContext]).quest;
const styles = useStyles();
useContext = binding.useContext;
const QuestDockGestureContext = (QuestDockGestureContextModule).QuestDockGestureContext;
const {activeQuestDockMode, questDockWrapperSpecs, windowDimensions} = Reflect.apply(useContext, binding,
[QuestDockGestureContext]);
const userStatus = quest.userStatus;
const value4 = (userStatus == null ? value2 : userStatus.enrolledAt) != null;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const QuestDockContentExpandedN2 = QuestDockContentExpandedN;
const object = {isEnrolled: value4};
object.QUEST_DOCK_EXPANDED_HEIGHT = QUEST_DOCK_EXPANDED_HEIGHT;
object.windowDimensions = windowDimensions;
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.activeQuestDockMode = activeQuestDockMode;
object.QuestDockMode = QuestDockMode;
object.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS;
object.questDockWrapperSpecs = questDockWrapperSpecs;
QuestDockContentExpandedN2.__closure = object;
QuestDockContentExpandedN2.__workletHash = 17161265612101;
QuestDockContentExpandedN2.__initData = env0_10;
const value5 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [QuestDockContentExpandedN2]);
const items2 = [styles.wrapper, value5];
const r7 = !value4 && ((Component) => <Component />)(importDefault(13662) /* metro dependency 13662: QuestDockUnenrolledBody */);
if (value4) {
value = importDefault(13663) /* metro dependency 13663: QuestDockEnrolledBody */;
value = ((Component) => <Component quest={quest} />)(value);
r5 = value;
} else {
r5 = value4;
}
return (
<ReanimatedNativeView style={items2}>
{r7}
{r5}
</ReanimatedNativeView>
);
function QuestDockContentExpandedN() { // fn#104329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13858:1216, owner: QuestDockContentExpanded.n, offset: 0x02291f56, size: 219 bytes, params: 1, frame: 19
const object = {};
const QUEST_DOCK_EXPANDED_HEIGHT2 = result ? undefined : QUEST_DOCK_EXPANDED_HEIGHT;
object.height = QUEST_DOCK_EXPANDED_HEIGHT2;
let windowDimensionsBinding = windowDimensions;
let get = windowDimensionsBinding.get;
let width = Reflect.apply(get, windowDimensionsBinding, []).width;
object.width = width;
let withSpring = SpringModule.withSpring;
const value5 = activeQuestDockMode.get();
const EXPANDED = QuestDockMode.EXPANDED;
object.opacity = Reflect.apply(withSpring, SpringModule, [value5 !== EXPANDED ? 0 : 1,
QUEST_DOCK_MODE_CHANGE_PHYSICS]);
withSpring = SpringModule.withSpring;
const questDockWrapperSpecsBinding = questDockWrapperSpecs;
get = questDockWrapperSpecsBinding.get;
width = Reflect.apply(get, questDockWrapperSpecsBinding, []).width;
windowDimensionsBinding = windowDimensions;
get = windowDimensionsBinding.get;
object.transform = [{translateX: Reflect.apply(withSpring, SpringModule, [(width - Reflect.apply(get,
windowDimensionsBinding, []).width) / 2, QUEST_DOCK_MODE_CHANGE_PHYSICS])}];
return object;
}
function QuestDockContentExpanded() { // fn#104328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13858:933, offset: 0x02291da2, size: 436 bytes, params: 1, frame: 24
var r5;
var value;
const binding = env0_3;
let useContext = binding.useContext;
const value2 = undefined;
const quest = Reflect.apply(useContext, binding,
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
const styles = useStyles();
useContext = binding.useContext;
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
const {activeQuestDockMode, questDockWrapperSpecs, windowDimensions} = Reflect.apply(useContext, binding,
[QuestDockGestureContext]);
const userStatus = quest.userStatus;
const value4 = (userStatus == null ? value2 : userStatus.enrolledAt) != null;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = QuestDockContentExpandedN;
const object2 = {isEnrolled: value4};
object2.QUEST_DOCK_EXPANDED_HEIGHT = QUEST_DOCK_EXPANDED_HEIGHT;
object2.windowDimensions = windowDimensions;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.activeQuestDockMode = activeQuestDockMode;
object2.QuestDockMode = QuestDockMode;
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS;
object2.questDockWrapperSpecs = questDockWrapperSpecs;
closure.__closure = object2;
closure.__workletHash = 17161265612101;
closure.__initData = env0_10;
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
const items2 = [styles.wrapper, value5];
const r7 = !value4 && ((Component) => <Component />)(importDefault(13662) /* metro dependency 13662: QuestDockUnenrolledBody */);
if (value4) {
value = importDefault(13663) /* metro dependency 13663: QuestDockEnrolledBody */;
value = ((Component) => <Component quest={quest} />)(value);
r5 = value;
} else {
r5 = value4;
}
return (
<ReanimatedNativeView style={items2}>
{r7}
{r5}
</ReanimatedNativeView>
);
}
function QuestDockContentExpandedN() { // fn#104329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13858:1216, owner: QuestDockContentExpanded.n, offset: 0x02291f56, size: 219 bytes, params: 1, frame: 19
const object2 = {};
const QUEST_DOCK_EXPANDED_HEIGHT2 = result ? undefined : QUEST_DOCK_EXPANDED_HEIGHT;
object2.height = QUEST_DOCK_EXPANDED_HEIGHT2;
let windowDimensionsBinding = windowDimensions;
let get = windowDimensionsBinding.get;
let width = Reflect.apply(get, windowDimensionsBinding, []).width;
object2.width = width;
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
const value5 = activeQuestDockMode.get();
const EXPANDED = QuestDockMode.EXPANDED;
object2.opacity = Reflect.apply(withSpring, springModule, [value5 !== EXPANDED ? 0 : 1,
QUEST_DOCK_MODE_CHANGE_PHYSICS]);
const moduleValue2 = springModule;
withSpring = moduleValue2.withSpring;
const questDockWrapperSpecsBinding = questDockWrapperSpecs;
get = questDockWrapperSpecsBinding.get;
width = Reflect.apply(get, questDockWrapperSpecsBinding, []).width;
windowDimensionsBinding = windowDimensions;
get = windowDimensionsBinding.get;
object2.transform = [{translateX: Reflect.apply(withSpring, moduleValue2, [(width - Reflect.apply(get,
windowDimensionsBinding, []).width) / 2, QUEST_DOCK_MODE_CHANGE_PHYSICS])}];
return object2;
}
global.__d(_fun104327, 13661, [31, 27, 6528, 13572, 33, 4501, 13650, 13573, 4017, 4577, 8141, 13662, 13663,
2]) /* metro module 13661, dependencies: [31, 27, 6528, 13572, 33, 4501, 13650, 13573, 4017, 4577, 8141, 13662, 13663, 2] */;
@@ -1,10 +1,14 @@
/* Metro module 13650; source: modules/quests/native/QuestDock/QuestDockContext.tsx; dependencies: [31, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun104238(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13847:6, offset: 0x0228b7e7, size: 124 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
let value = ReactModule;
value = value.createContext({'quest': null, 'isRendered': false, 'isVisibleToUser': false, quest: undefined});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockContext.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockContext.tsx');
exports.default = value;
}
global.__d(_fun104238, 13650, [31, 2]) /* metro module 13650, dependencies: [31, 2] */;
@@ -1,377 +1,415 @@
/* Metro module 13577; source: modules/quests/native/QuestDock/QuestDockContextMenuActionSheet.tsx; dependencies: [5, 31, 661, 33, 7114, 9483, 9505, 6805, 6807, 10638, 7972, 9520, 6531, 7120, 4080, 4060, 1244, 13578, 9519, 9517, 9518, 7121, 7110, 9480, 10139, 13580, 5312, 9484, 13583, 8653, 13584, 13586, 13588, 8999, 7007, 6797, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import ActionSheetActionCreators from '../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import QuestDisclosureModalActionCreators from '../QuestDisclosureModal/QuestDisclosureModalActionCreators.tsx'; /* Metro dependency 13580 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as XSmallIconModule from '../../../../design/components/Icon/native/redesign/generated/XSmallIcon.tsx'; /* Metro dependency 5312 */
import * as QuestTypesModule from '../../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as ClipboardUtilsNativeModule from '../../../../utils/ClipboardUtils.native.tsx'; /* Metro dependency 6797 */
import * as ActionSheetNativeModule from '../../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
import * as OpenUserSettingsModule from '../../../user_settings/core/native/openUserSettings.tsx'; /* Metro dependency 7007 */
import * as QuestUtilsModule from '../../utils/QuestUtils.tsx'; /* Metro dependency 7114 */
import * as AnalyticsTypesModule from '../../lib/analytics/AnalyticsTypes.tsx'; /* Metro dependency 7120 */
import * as AdCreativeTypeModule from '../../../../external/discord_common/js/shared/shared-constants/AdCreativeType.tsx'; /* Metro dependency 7121 */
import * as NativeModule from '../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as EyeIconModule from '../../../../design/components/Icon/native/redesign/generated/EyeIcon.tsx'; /* Metro dependency 8999 */
import * as QuestUtilsNativeModule from '../QuestUtils.native.tsx'; /* Metro dependency 9480 */
import * as QuestHooksModule from '../../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as QuestActionCreatorsModule from '../../QuestActionCreators.tsx'; /* Metro dependency 9484 */
import * as QuestCopyUtilsModule from '../../utils/QuestCopyUtils.tsx'; /* Metro dependency 9505 */
import * as AdAnalyticsInterfaceExperimentModule from '../../experiments/AdAnalyticsInterfaceExperiment.tsx'; /* Metro dependency 9519 */
import * as QuestPlatformUtilsModule from '../../utils/QuestPlatformUtils.tsx'; /* Metro dependency 9520 */
import * as CircleQuestionIconModule from '../../../../design/components/Icon/native/redesign/generated/CircleQuestionIcon.tsx'; /* Metro dependency 10139 */
import * as LinkExternalMediumIconModule from '../../../../design/components/Icon/native/redesign/generated/LinkExternalMediumIcon.tsx'; /* Metro dependency 10638 */
function _fun103202(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:6, offset: 0x0225bf63, size: 185 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
importAll(31) /* metro dependency 31 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
const value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockContextMenuActionSheet.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockContextMenuActionSheet.tsx');
exports.default = QuestDockContextMenuActionSheet;
}
function QuestDockContextMenuActionSheet({quest}) { // fn#103203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:180, offset: 0x0225c01c, size: 2479 bytes, params: 2, frame: 35
var r8;
var r5;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object19;
var object;
var items4;
var object2;
var object4;
var object5;
var object6;
const EyeIcon = (require(8999) /* metro dependency 8999: EyeIcon */).EyeIcon;
var object7;
var object8;
var value;
const questUtilsModule = require(7114) /* metro dependency 7114: QuestUtils */;
const isShareableQuest2 = questUtilsModule.isShareableQuest(quest.config);
const value2 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestPreviewActions(quest.id);
const env0_1 = value2.handleComplete;
const env0_2 = value2.handleProgress;
const env0_3 = value2.handleResetDismissibilityClick;
const env0_4 = value2.handleResetStatusClick;
const externalCtaLabel = (require(9505) /* metro dependency 9505: QuestCopyUtils */).getExternalCtaLabel(quest);
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
let Group = ActionSheetRow.Group;
const object9 = {};
const ActionSheetRow2 = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
let Icon = ActionSheetRow2.Icon;
const LinkExternalMediumIcon = (require(10638) /* metro dependency 10638: LinkExternalMediumIcon */).LinkExternalMediumIcon;
object9.icon = <Icon IconComponent={LinkExternalMediumIcon} />;
const FormLabel = (require(7972) /* metro dependency 7972: native */).FormLabel;
object9.label = <FormLabel text={externalCtaLabel} />;
object9.onPress = onPress_103204;
const actionSheetRow = <ActionSheetRow {...object9} />;
if (isShareableQuest2) {
r8 = <ActionSheetRow icon={((Icon) => <Icon IconComponent={(require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon} />)((require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon)} label={<FormLabel text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WqhZss)} />} onPress={onPress_103205} />;
} else {
r8 = isShareableQuest2;
}
const items2 = [<Group hasIcons>{actionSheetRow}{r8}</Group>];
Group = ActionSheetRow.Group;
const object11 = {};
const ActionSheetRow4 = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
Icon = ActionSheetRow4.Icon;
object11.icon = <Icon IconComponent={importDefault(13578) /* metro dependency 13578: WreathIcon */} />;
let string = intl.string;
const LLLLPD = (require(1244) /* metro dependency 1244: indexNative */).t.LLLLPD;
object11.label = <FormLabel text={Reflect.apply(string, intl, [LLLLPD])} />;
object11.onPress = onPress_103206;
const items3 = [<ActionSheetRow {...object11} />];
const object12 = {};
const ActionSheetRow5 = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
Icon = ActionSheetRow5.Icon;
const CircleQuestionIcon = (require(10139) /* metro dependency 10139: CircleQuestionIcon */).CircleQuestionIcon;
object12.icon = <Icon IconComponent={CircleQuestionIcon} />;
string = intl.string;
const GcsZKJ = (require(1244) /* metro dependency 1244: indexNative */).t.GcsZKJ;
object12.label = <FormLabel text={Reflect.apply(string, intl, [GcsZKJ])} />;
object12.onPress = onPress_103207;
items3[1] = <ActionSheetRow {...object12} />;
const object14 = {};
const ActionSheetRow6 = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
Icon = ActionSheetRow6.Icon;
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
object14.icon = <Icon IconComponent={XSmallIcon} />;
string = intl.string;
const NN79E9 = (require(1244) /* metro dependency 1244: indexNative */).t.NN79E9;
object14.label = <FormLabel text={Reflect.apply(string, intl, [NN79E9])} />;
string = intl.string;
const V6htN5 = (require(1244) /* metro dependency 1244: indexNative */).t.V6htN5;
object14.subLabel = Reflect.apply(string, intl, [V6htN5]);
object14.onPress = env0_3(_fun103209);
items3[2] = <ActionSheetRow {...object14} />;
items2[1] = <Group hasIcons>{items3}</Group>;
const preview = quest.preview;
if (preview) {
Group = ActionSheetRow.Group;
var groupProps = {title: intl.string(t['Ape+mm']), hasIcons: true};
object = {};
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
object.icon = <Icon IconComponent={(require(8653) /* metro dependency 8653: TrophyIcon */).TrophyIcon} />;
string = intl.string;
object.label = <FormLabel text={Reflect.apply(string, intl, [t.jQEfRT])} />;
object.onPress = onPress_103210;
value = <ActionSheetRow {...object} />;
items4 = [value];
object2 = {};
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
object2.icon = <Icon IconComponent={(require(13584) /* metro dependency 13584: RedoIcon */).RedoIcon} />;
string = intl.string;
object2.label = <FormLabel text={Reflect.apply(string, intl, [t.cKSLr4])} />;
object2.onPress = onPress_103211;
items4[1] = <ActionSheetRow {...object2} />;
object4 = {};
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
object4.icon = <Icon IconComponent={(require(13586) /* metro dependency 13586: UndoIcon */).UndoIcon} />;
string = intl.string;
object4.label = <FormLabel text={Reflect.apply(string, intl, [t.taqkwK])} />;
object4.onPress = onPress_103212;
items4[2] = <ActionSheetRow {...object4} />;
object5 = {};
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
object5.icon = <Icon IconComponent={(require(13588) /* metro dependency 13588: UnsendIcon */).UnsendIcon} />;
string = intl.string;
object5.label = <FormLabel text={Reflect.apply(string, intl, [t.JF6W66])} />;
object5.onPress = onPress_103213;
items4[3] = <ActionSheetRow {...object5} />;
object6 = {};
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
object6.icon = <Icon IconComponent={EyeIcon} />;
string = intl.string;
object6.label = <FormLabel text={Reflect.apply(string, intl, [t['lL6/zF']])} />;
object6.onPress = onPress_103214;
items4[4] = <ActionSheetRow {...object6} />;
object7 = {};
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
object7.icon = <Icon IconComponent={EyeIcon} />;
string = intl.string;
object7.label = <FormLabel text={Reflect.apply(string, intl, [t.tx5Ax5])} />;
object7.onPress = onPress_103215;
items4[5] = <ActionSheetRow {...object7} />;
object8 = {};
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
object8.icon = <Icon IconComponent={(require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon} />;
string = intl.string;
object8.label = <FormLabel text={Reflect.apply(string, intl, [t.oisrFi])} />;
object8.onPress = onPress_103216;
items4[6] = <ActionSheetRow {...object8} />;
value = <Group {...groupProps}>{items4}</Group>;
r5 = value;
} else {
r5 = preview;
}
items2[2] = r5;
return (
<ActionSheet>
{items2}
</ActionSheet>
);
}
function QuestDockContextMenuActionSheetOnPress() { // fn#103204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:693, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225c9cb, size: 157 bytes, params: 1, frame: 19
const value = environment.__proto__;
const questPlatformUtilsModule = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
const openGameLinkDirectly = questPlatformUtilsModule.openGameLinkDirectly;
const questBinding = quest;
const object2 = {};
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.content = QUEST_BAR_MOBILE;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
const CONTEXT_MENU_OPEN_GAME_LINK = QuestContentCTA.CONTEXT_MENU_OPEN_GAME_LINK;
object2.ctaContent = CONTEXT_MENU_OPEN_GAME_LINK;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.sourceQuestContent = QUEST_BAR_MOBILE;
Reflect.apply(openGameLinkDirectly, questPlatformUtilsModule, [questBinding, object2]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function QuestDockContextMenuActionSheetOnPress_103205() { // fn#103205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:1114, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225ca68, size: 162 bytes, params: 1, frame: 19
const value = environment.__proto__;
const questCopyUtilsModule = require(9505) /* metro dependency 9505: QuestCopyUtils */;
const copyShareLink = questCopyUtilsModule.copyShareLink;
const id = quest.id;
const object2 = {};
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.content = QUEST_BAR_MOBILE;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
const CONTEXT_MENU_COPY_LINK = QuestContentCTA.CONTEXT_MENU_COPY_LINK;
object2.ctaContent = CONTEXT_MENU_COPY_LINK;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.sourceQuestContent = QUEST_BAR_MOBILE;
Reflect.apply(copyShareLink, questCopyUtilsModule, [id, object2]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function QuestDockContextMenuActionSheetOnPress_103206() { // fn#103206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:1570, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225cb0a, size: 499 bytes, params: 1, frame: 18
var moduleValue2;
var trackQuestContentClicked;
var object2;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
var QUEST_BAR_MOBILE;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
var moduleValue3;
var captureAdUserAction;
const value = environment.__proto__;
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_dock_context_menu'])) {
moduleValue3 = require(9517) /* metro dependency 9517: captureAdUserAction */;
captureAdUserAction = moduleValue3.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 = QuestContentCTA.CONTEXT_MENU_LEARN_MORE;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.surfaceId = QUEST_BAR_MOBILE;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.sourceQuestContent = QUEST_BAR_MOBILE;
Reflect.apply(captureAdUserAction, moduleValue3, [object2]);
} else {
moduleValue2 = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackQuestContentClicked = moduleValue2.trackQuestContentClicked;
object2 = {};
object2.questId = quest.id;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.questContent = QUEST_BAR_MOBILE;
object2.questContentCTA = QuestContentCTA.CONTEXT_MENU_LEARN_MORE;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.sourceQuestContent = QUEST_BAR_MOBILE;
Reflect.apply(trackQuestContentClicked, moduleValue2, [object2]);
}
const questUtilsNativeModule = require(9480) /* metro dependency 9480: QuestUtilsNative */;
const openQuestHome = questUtilsNativeModule.openQuestHome;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
Reflect.apply(openQuestHome, questUtilsNativeModule, [{scrollToQuestId: quest.id, fromContent: QUEST_BAR_MOBILE}]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function QuestDockContextMenuActionSheetOnPress_103207() { // fn#103207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:2570, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225ccfd, size: 175 bytes, params: 1, frame: 18
const value = environment.__proto__;
const defaultImport = importDefault(13580) /* metro dependency 13580: QuestDisclosureModalActionCreators */;
const showModal = defaultImport.showModal;
const object3 = {};
object3.quest = quest;
object3.isTargetedDisclosure = true;
const object4 = {};
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object4.content = QUEST_BAR_MOBILE;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
const CONTEXT_MENU_OPEN_DISCLOSURE = QuestContentCTA.CONTEXT_MENU_OPEN_DISCLOSURE;
object4.ctaContent = CONTEXT_MENU_OPEN_DISCLOSURE;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object4.sourceQuestContent = QUEST_BAR_MOBILE;
object3.trackingCtx = object4;
Reflect.apply(showModal, defaultImport, [object3]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function* _fun103209() { // fn#103209, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:3076, offset: 0x0225cdb7, size: 525 bytes, params: 1, frame: 21
var value8;
var trackQuestContentClicked;
var object2;
var value9;
var captureAdUserAction;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var binding2 = env2_2;
var value3 = binding(binding2[27]);
var dismissQuestContent = value3.dismissQuestContent;
var id = require.id;
var QuestContent = binding(binding2[12]).QuestContent;
var QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
var value5 = Reflect.apply(dismissQuestContent, value3, [id, QUEST_BAR_MOBILE]);
env2_1(binding2[14]).hideActionSheet();
var value7 = binding(binding2[18]);
var shouldMigrateToAdAnalyticsInterface = value7.shouldMigrateToAdAnalyticsInterface;
var AdAnalyticsInterfaceExperimentStep = binding(binding2[18]).AdAnalyticsInterfaceExperimentStep;
var STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
var shouldMigrateToAdAnalyticsInterface2 = Reflect.apply(shouldMigrateToAdAnalyticsInterface, value7,
[STEP_2_CLICKED_INTERNAL, 'quest_dock_context_menu']);
binding = env2_0;
var binding4 = env2_2;
if (shouldMigrateToAdAnalyticsInterface2) {
value9 = binding(binding4[19]);
captureAdUserAction = value9.captureAdUserAction;
object2 = {};
object2.type = binding(binding4[20]).AdUserActionType.CLICK_INTERNAL;
object2.adCreativeType = binding(binding4[21]).AdCreativeType.QUEST;
object2.adCreativeId = require.id;
object2.questContentCTA = binding(binding4[13]).QuestContentCTA.CONTEXT_MENU_HIDE_CONTENT;
QuestContent = binding(binding4[12]).QuestContent;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.surfaceId = QUEST_BAR_MOBILE;
QuestContent = binding(binding4[12]).QuestContent;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.sourceQuestContent = QUEST_BAR_MOBILE;
Reflect.apply(captureAdUserAction, value9, [object2]);
function QuestDockContextMenuActionSheet({quest}) { // fn#103203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:180, offset: 0x0225c01c, size: 2479 bytes, params: 2, frame: 35
var r8;
var r5;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object;
var object3;
var items4;
var object10;
var object13;
var object16;
var object17;
const EyeIcon = (EyeIconModule).EyeIcon;
var object18;
var object19;
var value;
const isShareableQuest2 = QuestUtilsModule.isShareableQuest(quest.config);
const value2 = (QuestHooksModule).useQuestPreviewActions(quest.id);
const env0_1 = value2.handleComplete;
const env0_2 = value2.handleProgress;
const handleResetDismissibilityClick = value2.handleResetDismissibilityClick;
const env0_4 = value2.handleResetStatusClick;
const externalCtaLabel = (QuestCopyUtilsModule).getExternalCtaLabel(quest);
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
let Group = ActionSheetRow.Group;
const object20 = {};
const ActionSheetRow2 = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
let Icon = ActionSheetRow2.Icon;
const LinkExternalMediumIcon = (LinkExternalMediumIconModule).LinkExternalMediumIcon;
object20.icon = <Icon IconComponent={LinkExternalMediumIcon} />;
const FormLabel = (NativeModule).FormLabel;
object20.label = <FormLabel text={externalCtaLabel} />;
object20.onPress = onPress_103204;
const actionSheetRow = <ActionSheetRow {...object20} />;
if (isShareableQuest2) {
r8 = (
<ActionSheetRow
icon={((Icon) => <Icon IconComponent={(require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon} />)((require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon)}
label={<FormLabel text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WqhZss)} />}
onPress={onPress_103205}
/>
);
} else {
value8 = binding(binding4[22]);
trackQuestContentClicked = value8.trackQuestContentClicked;
object2 = {};
object2.questId = require.id;
QuestContent = binding(binding4[12]).QuestContent;
r8 = isShareableQuest2;
}
const items2 = [
<Group hasIcons>
{actionSheetRow}
{r8}
</Group>,
];
Group = ActionSheetRow.Group;
const object21 = {};
const ActionSheetRow4 = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
Icon = ActionSheetRow4.Icon;
object21.icon = <Icon IconComponent={importDefault(13578) /* metro dependency 13578: WreathIcon */} />;
let string = intl.string;
const LLLLPD = (require(1244) /* metro dependency 1244: indexNative */).t.LLLLPD;
object21.label = <FormLabel text={Reflect.apply(string, intl, [LLLLPD])} />;
object21.onPress = onPress_103206;
const items3 = [
<ActionSheetRow {...object21} />,
];
const object22 = {};
const ActionSheetRow5 = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
Icon = ActionSheetRow5.Icon;
const CircleQuestionIcon = (CircleQuestionIconModule).CircleQuestionIcon;
object22.icon = <Icon IconComponent={CircleQuestionIcon} />;
string = intl.string;
const GcsZKJ = (require(1244) /* metro dependency 1244: indexNative */).t.GcsZKJ;
object22.label = <FormLabel text={Reflect.apply(string, intl, [GcsZKJ])} />;
object22.onPress = onPress_103207;
items3[1] = <ActionSheetRow {...object22} />;
const object23 = {};
const ActionSheetRow6 = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
Icon = ActionSheetRow6.Icon;
const XSmallIcon = (XSmallIconModule).XSmallIcon;
object23.icon = <Icon IconComponent={XSmallIcon} />;
string = intl.string;
const NN79E9 = (require(1244) /* metro dependency 1244: indexNative */).t.NN79E9;
object23.label = <FormLabel text={Reflect.apply(string, intl, [NN79E9])} />;
string = intl.string;
const V6htN5 = (require(1244) /* metro dependency 1244: indexNative */).t.V6htN5;
object23.subLabel = Reflect.apply(string, intl, [V6htN5]);
object23.onPress = handleResetDismissibilityClick(_fun103209);
items3[2] = <ActionSheetRow {...object23} />;
items2[1] = (
<Group hasIcons>
{items3}
</Group>
);
const preview = quest.preview;
if (preview) {
Group = ActionSheetRow.Group;
var groupProps = {title: intl.string(t['Ape+mm']), hasIcons: true};
object3 = {};
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
object3.icon = <Icon IconComponent={(require(8653) /* metro dependency 8653: TrophyIcon */).TrophyIcon} />;
string = intl.string;
object3.label = <FormLabel text={Reflect.apply(string, intl, [t.jQEfRT])} />;
object3.onPress = onPress_103210;
value = <ActionSheetRow {...object3} />;
items4 = [value];
object10 = {};
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
object10.icon = <Icon IconComponent={(require(13584) /* metro dependency 13584: RedoIcon */).RedoIcon} />;
string = intl.string;
object10.label = <FormLabel text={Reflect.apply(string, intl, [t.cKSLr4])} />;
object10.onPress = onPress_103211;
items4[1] = <ActionSheetRow {...object10} />;
object13 = {};
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
object13.icon = <Icon IconComponent={(require(13586) /* metro dependency 13586: UndoIcon */).UndoIcon} />;
string = intl.string;
object13.label = <FormLabel text={Reflect.apply(string, intl, [t.taqkwK])} />;
object13.onPress = onPress_103212;
items4[2] = <ActionSheetRow {...object13} />;
object16 = {};
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
object16.icon = <Icon IconComponent={(require(13588) /* metro dependency 13588: UnsendIcon */).UnsendIcon} />;
string = intl.string;
object16.label = <FormLabel text={Reflect.apply(string, intl, [t.JF6W66])} />;
object16.onPress = onPress_103213;
items4[3] = <ActionSheetRow {...object16} />;
object17 = {};
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
object17.icon = <Icon IconComponent={EyeIcon} />;
string = intl.string;
object17.label = <FormLabel text={Reflect.apply(string, intl, [t['lL6/zF']])} />;
object17.onPress = onPress_103214;
items4[4] = <ActionSheetRow {...object17} />;
object18 = {};
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
object18.icon = <Icon IconComponent={EyeIcon} />;
string = intl.string;
object18.label = <FormLabel text={Reflect.apply(string, intl, [t.tx5Ax5])} />;
object18.onPress = onPress_103215;
items4[5] = <ActionSheetRow {...object18} />;
object19 = {};
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
object19.icon = <Icon IconComponent={(require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon} />;
string = intl.string;
object19.label = <FormLabel text={Reflect.apply(string, intl, [t.oisrFi])} />;
object19.onPress = onPress_103216;
items4[6] = <ActionSheetRow {...object19} />;
value = (
<Group {...groupProps}>
{items4}
</Group>
);
r5 = value;
} else {
r5 = preview;
}
items2[2] = r5;
return (
<ActionSheet>
{items2}
</ActionSheet>
);
function QuestDockContextMenuActionSheetOnPress() { // fn#103204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:693, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225c9cb, size: 157 bytes, params: 1, frame: 19
const value = environment.__proto__;
const openGameLinkDirectly = QuestPlatformUtilsModule.openGameLinkDirectly;
const questBinding = quest;
const object = {};
const QuestContent = (QuestTypesModule).QuestContent;
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object.content = QUEST_BAR_MOBILE;
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
const CONTEXT_MENU_OPEN_GAME_LINK = QuestContentCTA.CONTEXT_MENU_OPEN_GAME_LINK;
object.ctaContent = CONTEXT_MENU_OPEN_GAME_LINK;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.questContent = QUEST_BAR_MOBILE;
object2.questContentCTA = binding(binding4[13]).QuestContentCTA.CONTEXT_MENU_HIDE_CONTENT;
QuestContent = binding(binding4[12]).QuestContent;
object.sourceQuestContent = QUEST_BAR_MOBILE;
Reflect.apply(openGameLinkDirectly, QuestPlatformUtilsModule, [questBinding, object]);
(ActionSheetActionCreators).hideActionSheet();
}
function QuestDockContextMenuActionSheetOnPress_103205() { // fn#103205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:1114, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225ca68, size: 162 bytes, params: 1, frame: 19
const value = environment.__proto__;
const copyShareLink = QuestCopyUtilsModule.copyShareLink;
const id = quest.id;
const object = {};
const QuestContent = (QuestTypesModule).QuestContent;
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object.content = QUEST_BAR_MOBILE;
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
const CONTEXT_MENU_COPY_LINK = QuestContentCTA.CONTEXT_MENU_COPY_LINK;
object.ctaContent = CONTEXT_MENU_COPY_LINK;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object.sourceQuestContent = QUEST_BAR_MOBILE;
Reflect.apply(copyShareLink, QuestCopyUtilsModule, [id, object]);
(ActionSheetActionCreators).hideActionSheet();
}
function QuestDockContextMenuActionSheetOnPress_103206() { // fn#103206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:1570, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225cb0a, size: 499 bytes, params: 1, frame: 18
var moduleValue2;
var trackQuestContentClicked;
var object;
const QuestContent = (QuestTypesModule).QuestContent;
var QUEST_BAR_MOBILE;
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
var moduleValue3;
var captureAdUserAction;
const value = environment.__proto__;
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_dock_context_menu'])) {
moduleValue3 = require(9517) /* metro dependency 9517: captureAdUserAction */;
captureAdUserAction = moduleValue3.captureAdUserAction;
object = {};
object.type = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType.CLICK_INTERNAL;
object.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
object.adCreativeId = quest.id;
object.questContentCTA = QuestContentCTA.CONTEXT_MENU_LEARN_MORE;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object.surfaceId = QUEST_BAR_MOBILE;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object.sourceQuestContent = QUEST_BAR_MOBILE;
Reflect.apply(captureAdUserAction, moduleValue3, [object]);
} else {
moduleValue2 = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackQuestContentClicked = moduleValue2.trackQuestContentClicked;
object = {};
object.questId = quest.id;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object.questContent = QUEST_BAR_MOBILE;
object.questContentCTA = QuestContentCTA.CONTEXT_MENU_LEARN_MORE;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object.sourceQuestContent = QUEST_BAR_MOBILE;
Reflect.apply(trackQuestContentClicked, moduleValue2, [object]);
}
const openQuestHome = QuestUtilsNativeModule.openQuestHome;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
Reflect.apply(openQuestHome, QuestUtilsNativeModule, [{scrollToQuestId: quest.id, fromContent: QUEST_BAR_MOBILE}]);
(ActionSheetActionCreators).hideActionSheet();
}
function QuestDockContextMenuActionSheetOnPress_103207() { // fn#103207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:2570, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225ccfd, size: 175 bytes, params: 1, frame: 18
const value = environment.__proto__;
const defaultImport = QuestDisclosureModalActionCreators;
const showModal = defaultImport.showModal;
const object = {};
object.quest = quest;
object.isTargetedDisclosure = true;
const object2 = {};
const QuestContent = (QuestTypesModule).QuestContent;
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.content = QUEST_BAR_MOBILE;
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
const CONTEXT_MENU_OPEN_DISCLOSURE = QuestContentCTA.CONTEXT_MENU_OPEN_DISCLOSURE;
object2.ctaContent = CONTEXT_MENU_OPEN_DISCLOSURE;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.sourceQuestContent = QUEST_BAR_MOBILE;
Reflect.apply(trackQuestContentClicked, value8, [object2]);
object.trackingCtx = object2;
Reflect.apply(showModal, defaultImport, [object]);
(ActionSheetActionCreators).hideActionSheet();
}
yield value5;
if (false) {
return undefined;
function* _fun103209() { // fn#103209, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:3076, offset: 0x0225cdb7, size: 525 bytes, params: 1, frame: 21
var value8;
var trackQuestContentClicked;
var object;
var value9;
var captureAdUserAction;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var binding2 = env2_2;
var value3 = binding(binding2[27]);
var dismissQuestContent = value3.dismissQuestContent;
var id = require.id;
var QuestContent = binding(binding2[12]).QuestContent;
var QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
var value5 = Reflect.apply(dismissQuestContent, value3, [id, QUEST_BAR_MOBILE]);
env2_1(binding2[14]).hideActionSheet();
var value7 = binding(binding2[18]);
var shouldMigrateToAdAnalyticsInterface = value7.shouldMigrateToAdAnalyticsInterface;
var AdAnalyticsInterfaceExperimentStep = binding(binding2[18]).AdAnalyticsInterfaceExperimentStep;
var STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
var shouldMigrateToAdAnalyticsInterface2 = Reflect.apply(shouldMigrateToAdAnalyticsInterface, value7,
[STEP_2_CLICKED_INTERNAL, 'quest_dock_context_menu']);
binding = env2_0;
var binding4 = env2_2;
if (shouldMigrateToAdAnalyticsInterface2) {
value9 = binding(binding4[19]);
captureAdUserAction = value9.captureAdUserAction;
object = {};
object.type = binding(binding4[20]).AdUserActionType.CLICK_INTERNAL;
object.adCreativeType = binding(binding4[21]).AdCreativeType.QUEST;
object.adCreativeId = require.id;
object.questContentCTA = binding(binding4[13]).QuestContentCTA.CONTEXT_MENU_HIDE_CONTENT;
QuestContent = binding(binding4[12]).QuestContent;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object.surfaceId = QUEST_BAR_MOBILE;
QuestContent = binding(binding4[12]).QuestContent;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object.sourceQuestContent = QUEST_BAR_MOBILE;
Reflect.apply(captureAdUserAction, value9, [object]);
} else {
value8 = binding(binding4[22]);
trackQuestContentClicked = value8.trackQuestContentClicked;
object = {};
object.questId = require.id;
QuestContent = binding(binding4[12]).QuestContent;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object.questContent = QUEST_BAR_MOBILE;
object.questContentCTA = binding(binding4[13]).QuestContentCTA.CONTEXT_MENU_HIDE_CONTENT;
QuestContent = binding(binding4[12]).QuestContent;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object.sourceQuestContent = QUEST_BAR_MOBILE;
Reflect.apply(trackQuestContentClicked, value8, [object]);
}
yield value5;
if (false) {
return undefined;
}
env2_0(env2_2[28]).displayQuestDismissalToast();
}
}
env2_0(env2_2[28]).displayQuestDismissalToast();
function QuestDockContextMenuActionSheetOnPress_103210() { // fn#103210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:4226, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225cfc4, size: 48 bytes, params: 1, frame: 12
handleComplete();
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
function QuestDockContextMenuActionSheetOnPress_103211() { // fn#103211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:4444, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225cff4, size: 95 bytes, params: 1, frame: 12
const handleProgressBinding = handleProgress;
const Math = global.Math;
handleProgressBinding(0.9 * Math.random() + 0.03);
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
function QuestDockContextMenuActionSheetOnPress_103212() { // fn#103212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:4682, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225d053, size: 48 bytes, params: 1, frame: 12
handleResetStatusClick();
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
function QuestDockContextMenuActionSheetOnPress_103213() { // fn#103213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:4902, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225d083, size: 48 bytes, params: 1, frame: 12
handleResetDismissibilityClick();
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
function QuestDockContextMenuActionSheetOnPress_103214() { // fn#103214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:5122, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225d0b3, size: 109 bytes, params: 1, frame: 17
const value = environment.__proto__;
const markAdContentUnseen = QuestActionCreatorsModule.markAdContentUnseen;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const QUEST = AdCreativeType.QUEST;
Reflect.apply(markAdContentUnseen, QuestActionCreatorsModule, [QUEST, [quest.id]]);
(ActionSheetActionCreators).hideActionSheet();
}
function QuestDockContextMenuActionSheetOnPress_103215() { // fn#103215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:5402, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225d120, size: 105 bytes, params: 1, frame: 16
const value = environment.__proto__;
const openUserSettings = OpenUserSettingsModule.openUserSettings;
const QUEST_PREVIEW_TOOL_2 = UserSettingsSections.QUEST_PREVIEW_TOOL_2;
Reflect.apply(openUserSettings, OpenUserSettingsModule, [{screen: QUEST_PREVIEW_TOOL_2,
params: {questId: quest.id}}]);
(ActionSheetActionCreators).hideActionSheet();
}
function QuestDockContextMenuActionSheetOnPress_103216() { // fn#103216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:5697, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225d189, size: 76 bytes, params: 1, frame: 14
const value = environment.__proto__;
ClipboardUtilsNativeModule.copy(quest.id);
(ActionSheetActionCreators).hideActionSheet();
}
}
}
function QuestDockContextMenuActionSheetOnPress_103210() { // fn#103210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:4226, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225cfc4, size: 48 bytes, params: 1, frame: 12
handleComplete();
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function QuestDockContextMenuActionSheetOnPress_103211() { // fn#103211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:4444, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225cff4, size: 95 bytes, params: 1, frame: 12
const handleProgressBinding = handleProgress;
const Math = global.Math;
handleProgressBinding(0.9 * Math.random() + 0.03);
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function QuestDockContextMenuActionSheetOnPress_103212() { // fn#103212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:4682, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225d053, size: 48 bytes, params: 1, frame: 12
handleResetStatusClick();
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function QuestDockContextMenuActionSheetOnPress_103213() { // fn#103213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:4902, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225d083, size: 48 bytes, params: 1, frame: 12
handleResetDismissibilityClick();
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function QuestDockContextMenuActionSheetOnPress_103214() { // fn#103214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:5122, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225d0b3, size: 109 bytes, params: 1, frame: 17
const value = environment.__proto__;
const questActionCreatorsModule = require(9484) /* metro dependency 9484: QuestActionCreators */;
const markAdContentUnseen = questActionCreatorsModule.markAdContentUnseen;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const QUEST = AdCreativeType.QUEST;
Reflect.apply(markAdContentUnseen, questActionCreatorsModule, [QUEST, [quest.id]]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function QuestDockContextMenuActionSheetOnPress_103215() { // fn#103215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:5402, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225d120, size: 105 bytes, params: 1, frame: 16
const value = environment.__proto__;
const openUserSettingsModule = require(7007) /* metro dependency 7007: openUserSettings */;
const openUserSettings = openUserSettingsModule.openUserSettings;
const QUEST_PREVIEW_TOOL_2 = UserSettingsSections.QUEST_PREVIEW_TOOL_2;
Reflect.apply(openUserSettings, openUserSettingsModule, [{screen: QUEST_PREVIEW_TOOL_2,
params: {questId: quest.id}}]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function QuestDockContextMenuActionSheetOnPress_103216() { // fn#103216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:5697, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225d189, size: 76 bytes, params: 1, frame: 14
const value = environment.__proto__;
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
clipboardUtilsNativeModule.copy(quest.id);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
global.__d(_fun103202, 13577, [5, 31, 661, 33, 7114, 9483, 9505, 6805, 6807, 10638, 7972, 9520, 6531, 7120, 4080,
4060, 1244, 13578, 9519, 9517, 9518, 7121, 7110, 9480, 10139, 13580, 5312, 9484, 13583, 8653, 13584, 13586,
13588, 8999, 7007, 6797,
2]) /* metro module 13577, dependencies: [5, 31, 661, 33, 7114, 9483, 9505, 6805, 6807, 10638, 7972, 9520, 6531, 7120, 4080, 4060, 1244, 13578, 9519, 9517, 9518, 7121, 7110, 9480, 10139, 13580, 5312, 9484, 13583, 8653, 13584, 13586, 13588, 8999, 7007, 6797, 2] */;
@@ -1,146 +1,149 @@
/* Metro module 13665; source: modules/quests/native/QuestDock/QuestDockDragHandle.tsx; dependencies: [31, 27, 6528, 13572, 7553, 33, 4501, 13650, 13573, 5176, 4017, 4577, 8141, 13571, 6515, 1244, 2] */
import ReanimatedNativeView from '../../../core/native/ReanimatedNativeView.tsx'; /* Metro dependency 8141 */
import QuestDockContext from './QuestDockContext.tsx'; /* Metro dependency 13650 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as YouBarExperimentModule from '../../../main_tabs_v2/YouBarExperiment.tsx'; /* Metro dependency 5176 */
import * as ActionSheetHeaderBarNativeModule from '../../../../design/components/Sheet/native/ActionSheetHeaderBar.native.tsx'; /* Metro dependency 6515 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as YouBarConstantsModule from '../../../main_tabs_v2/native/YouBarConstants.tsx'; /* Metro dependency 7553 */
import * as QuestDockUtilsModule from './QuestDockUtils.tsx'; /* Metro dependency 13571 */
import * as QuestDockConstantsModule from './QuestDockConstants.tsx'; /* Metro dependency 13572 */
import * as QuestDockGestureContextModule from './QuestDockGestureContext.tsx'; /* Metro dependency 13573 */
function _fun104360(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13862:6, offset: 0x02293cfa, size: 460 bytes, params: 8, frame: 24
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
const env0_4 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
const env0_5 = questDockConstantsModule.QUEST_DOCK_MODE_CHANGE_PHYSICS;
const env0_6 = questDockConstantsModule.QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED;
const env0_7 = questDockConstantsModule.QUEST_DOCK_COLLAPSED_MAX_WIDTH;
const env0_8 = (require(7553) /* metro dependency 7553: YouBarConstants */).useYouBarHorizontalMargin;
const value3 = require(33) /* metro dependency 33 */;
const env0_9 = value3.jsx;
const env0_10 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {};
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
object5['bottom'] = undefined;
object5['right'] = undefined;
object5['zIndex'] = 4;
object4.dragHandleWrapper = object5;
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object6['bottom'] = undefined;
object4.dragHandleOverlay = object6;
const env0_11 = Reflect.apply(createStyles, createStylesModule, [object4]);
object4 = {code: 'function getDragHandleOffsetLeft_QuestDockDragHandleTsx1(activeQuestDockMode,horizontalEdgeGutter,withYouBar){const{QuestDockMode}=this.__closure;if(withYouBar){switch(activeQuestDockMode){case QuestDockMode.EXPANDED:return 0;default:return horizontalEdgeGutter*-1;}}else{switch(activeQuestDockMode){case QuestDockMode.COLLAPSED:return horizontalEdgeGutter*-1;default:return 0;}}}'};
const env0_13 = _fun104361();
object4 = {code: 'function QuestDockDragHandleTsx2(){const{windowDimensions,QUEST_DOCK_COLLAPSED_MAX_WIDTH}=this.__closure;return{width:Math.min(windowDimensions.get().width,QUEST_DOCK_COLLAPSED_MAX_WIDTH)};}'};
object4 = {code: 'function QuestDockDragHandleTsx3(){const{getDragHandleOffsetLeft,activeQuestDockMode,questDockHorizontalGutterCollapsed,youBarEnabled}=this.__closure;return{left:getDragHandleOffsetLeft(activeQuestDockMode.get(),questDockHorizontalGutterCollapsed,youBarEnabled)};}'};
object4 = {code: 'function QuestDockDragHandleTsx4(){const{withSpring,isEnrolled,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS}=this.__closure;return{opacity:withSpring(isEnrolled||activeQuestDockMode.get()===QuestDockMode.CLOSED||activeQuestDockMode.get()===QuestDockMode.SOFT_DISMISSED?1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS)};}'};
object4 = {code: 'function QuestDockDragHandleTsx5(){const{withSpring,isEnrolled,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS}=this.__closure;return{opacity:withSpring(!isEnrolled&&activeQuestDockMode.get()!==QuestDockMode.CLOSED&&activeQuestDockMode.get()!==QuestDockMode.SOFT_DISMISSED?0.5:0,QUEST_DOCK_MODE_CHANGE_PHYSICS)};}'};
value = value.memo(QuestDockDragHandle);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockDragHandle.tsx');
exports.default = value;
}
function _fun104361() { // fn#104361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13862:900, offset: 0x02293ec6, size: 57 bytes, params: 1, frame: 4
const closure = getDragHandleOffsetLeft;
closure.__closure = {QuestDockMode: QuestDockMode};
closure.__workletHash = 3634410156103;
closure.__initData = env0_12;
return closure;
}
function QuestDockDragHandle({isExpanded}) { // fn#104363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13862:2358, offset: 0x02293f45, size: 973 bytes, params: 2, frame: 31
var object2;
const binding = env0_3;
let useContext = binding.useContext;
const quest = Reflect.apply(useContext, binding,
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
const styles = useStyles();
useContext = binding.useContext;
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
const {activeQuestDockMode, windowDimensions} = Reflect.apply(useContext, binding, [QuestDockGestureContext]);
const userStatus = quest.userStatus;
const value4 = userStatus?.enrolledAt != null;
const value5 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDockDragHandle');
const r15 = value5 ? useYouBarHorizontalMargin() : QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = function() {
var object = {};
var Math = global.Math;
object.width = Math.min(windowDimensions.get().width, QUEST_DOCK_COLLAPSED_MAX_WIDTH);
return object;
};
closure.__closure = {windowDimensions: windowDimensions,
QUEST_DOCK_COLLAPSED_MAX_WIDTH: QUEST_DOCK_COLLAPSED_MAX_WIDTH};
closure.__workletHash = 13640576219747;
closure.__initData = env0_14;
const value7 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue3 = reanimatedRexportModule;
useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = QuestDockDragHandleH;
closure.__closure = {getDragHandleOffsetLeft: env0_13, activeQuestDockMode: activeQuestDockMode,
questDockHorizontalGutterCollapsed: r15, youBarEnabled: value5};
closure.__workletHash = 14041713732815;
closure.__initData = env0_15;
const value8 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const moduleValue4 = reanimatedRexportModule;
useAnimatedStyle = moduleValue4.useAnimatedStyle;
closure = function() {
var moduleValue = require(dependencyMap[11]);
return {opacity: moduleValue.withSpring(result || activeQuestDockMode.get() === QuestDockMode.CLOSED ? 1 : activeQuestDockMode.get() !== QuestDockMode.SOFT_DISMISSED ? 0 : 1,
QUEST_DOCK_MODE_CHANGE_PHYSICS)};
};
object2 = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, isEnrolled: value4,
activeQuestDockMode: activeQuestDockMode};
object2.QuestDockMode = QuestDockMode;
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS;
closure.__closure = object2;
closure.__workletHash = 12299455640931;
closure.__initData = env0_16;
const value9 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
const moduleValue5 = reanimatedRexportModule;
useAnimatedStyle = moduleValue5.useAnimatedStyle;
closure = function() {
var moduleValue = require(dependencyMap[11]);
return {opacity: moduleValue.withSpring(result || activeQuestDockMode.get() === QuestDockMode.CLOSED ? 0 : activeQuestDockMode.get() !== QuestDockMode.SOFT_DISMISSED ? 0.5 : 0,
QUEST_DOCK_MODE_CHANGE_PHYSICS)};
};
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, isEnrolled: value4,
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
QUEST_DOCK_MODE_CHANGE_PHYSICS: QUEST_DOCK_MODE_CHANGE_PHYSICS};
closure.__workletHash = 9632835517209;
closure.__initData = env0_17;
const value10 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
const items3 = [styles.dragHandleWrapper, value7];
const defaultImport2 = ReanimatedNativeView;
const dimensionsLayoutTransition = (require(13571) /* metro dependency 13571: QuestDockUtils */).dimensionsLayoutTransition;
const defaultImport3 = ReanimatedNativeView;
const items2 = [styles.dragHandleOverlay, value10];
const ActionSheetHeaderBar = (require(6515) /* metro dependency 6515: ActionSheetHeaderBarNative */).ActionSheetHeaderBar;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<ReanimatedNativeView style={items3}>
{((Component) => <Component style={value8} layout={dimensionsLayoutTransition}>{((Component) => <Component style={items2}><ActionSheetHeaderBar variant="overlay" accessibilityLabel={isExpanded ? Reflect.apply(string,
intl, [t['GQ+4bk']]) : Reflect.apply(string, intl,
[t.Yplnt6])} /></Component>)(defaultImport3)}<ReanimatedNativeView style={[styles.dragHandleOverlay,
value9]} pointerEvents="none" accessibilityElementsHidden importantForAccessibility="no-hide-descendants"><ActionSheetHeaderBar variant="default" /></ReanimatedNativeView></Component>)(defaultImport2)}
</ReanimatedNativeView>
);
}
function getDragHandleOffsetLeft(a0, a1, a2) { // fn#104362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13862:939, offset: 0x02293eff, size: 70 bytes, params: 4, frame: 5
const value = environment.__proto__;
return a2 ? a0 === QuestDockMode.EXPANDED ? 0 : -1 * a1 : a0 !== QuestDockMode.COLLAPSED ? 0 : -1 * a1;
}
function QuestDockDragHandleH() { // fn#104365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13862:2883, owner: QuestDockDragHandle.H, offset: 0x02294349, size: 48 bytes, params: 1, frame: 16
let value = ReactModule;
const StyleSheet = (ReactNativeModule).StyleSheet;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {};
object2.left = env1_13(activeQuestDockMode.get(), env0_4, env0_3);
return object2;
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['bottom'] = undefined;
object2['right'] = undefined;
object2['zIndex'] = 4;
object.dragHandleWrapper = object2;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['bottom'] = undefined;
object.dragHandleOverlay = object3;
const env0_11 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: 'function getDragHandleOffsetLeft_QuestDockDragHandleTsx1(activeQuestDockMode,horizontalEdgeGutter,withYouBar){const{QuestDockMode}=this.__closure;if(withYouBar){switch(activeQuestDockMode){case QuestDockMode.EXPANDED:return 0;default:return horizontalEdgeGutter*-1;}}else{switch(activeQuestDockMode){case QuestDockMode.COLLAPSED:return horizontalEdgeGutter*-1;default:return 0;}}}'};
const env0_13 = _fun104361();
object = {code: 'function QuestDockDragHandleTsx2(){const{windowDimensions,QUEST_DOCK_COLLAPSED_MAX_WIDTH}=this.__closure;return{width:Math.min(windowDimensions.get().width,QUEST_DOCK_COLLAPSED_MAX_WIDTH)};}'};
object = {code: 'function QuestDockDragHandleTsx3(){const{getDragHandleOffsetLeft,activeQuestDockMode,questDockHorizontalGutterCollapsed,youBarEnabled}=this.__closure;return{left:getDragHandleOffsetLeft(activeQuestDockMode.get(),questDockHorizontalGutterCollapsed,youBarEnabled)};}'};
object = {code: 'function QuestDockDragHandleTsx4(){const{withSpring,isEnrolled,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS}=this.__closure;return{opacity:withSpring(isEnrolled||activeQuestDockMode.get()===QuestDockMode.CLOSED||activeQuestDockMode.get()===QuestDockMode.SOFT_DISMISSED?1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS)};}'};
object = {code: 'function QuestDockDragHandleTsx5(){const{withSpring,isEnrolled,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS}=this.__closure;return{opacity:withSpring(!isEnrolled&&activeQuestDockMode.get()!==QuestDockMode.CLOSED&&activeQuestDockMode.get()!==QuestDockMode.SOFT_DISMISSED?0.5:0,QUEST_DOCK_MODE_CHANGE_PHYSICS)};}'};
value = value.memo(QuestDockDragHandle);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockDragHandle.tsx');
exports.default = value;
function _fun104361() { // fn#104361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13862:900, offset: 0x02293ec6, size: 57 bytes, params: 1, frame: 4
const getDragHandleOffsetLeft2 = getDragHandleOffsetLeft;
getDragHandleOffsetLeft2.__closure = {QuestDockMode: QuestDockMode};
getDragHandleOffsetLeft2.__workletHash = 3634410156103;
getDragHandleOffsetLeft2.__initData = env0_12;
return getDragHandleOffsetLeft2;
function getDragHandleOffsetLeft(a0, a1, a2) { // fn#104362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13862:939, offset: 0x02293eff, size: 70 bytes, params: 4, frame: 5
const value = environment.__proto__;
return a2 ? a0 === QuestDockMode.EXPANDED ? 0 : -1 * a1 : a0 !== QuestDockMode.COLLAPSED ? 0 : -1 * a1;
}
}
function QuestDockDragHandle({isExpanded}) { // fn#104363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13862:2358, offset: 0x02293f45, size: 973 bytes, params: 2, frame: 31
const binding = env0_3;
let useContext = binding.useContext;
const quest = Reflect.apply(useContext, binding,
[QuestDockContext]).quest;
const styles = useStyles();
useContext = binding.useContext;
const QuestDockGestureContext = (QuestDockGestureContextModule).QuestDockGestureContext;
const {activeQuestDockMode, windowDimensions} = Reflect.apply(useContext, binding, [QuestDockGestureContext]);
const userStatus = quest.userStatus;
const value4 = userStatus?.enrolledAt != null;
const value5 = (YouBarExperimentModule).useYouBarEnabled('QuestDockDragHandle');
const r15 = value5 ? useYouBarHorizontalMargin() : QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED;
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = function() {
var object = {};
var Math = global.Math;
object.width = Math.min(windowDimensions.get().width, QUEST_DOCK_COLLAPSED_MAX_WIDTH);
return object;
};
closure.__closure = {windowDimensions: windowDimensions,
QUEST_DOCK_COLLAPSED_MAX_WIDTH: QUEST_DOCK_COLLAPSED_MAX_WIDTH};
closure.__workletHash = 13640576219747;
closure.__initData = env0_14;
const value7 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = QuestDockDragHandleH;
closure.__closure = {getDragHandleOffsetLeft: env0_13, activeQuestDockMode: activeQuestDockMode,
questDockHorizontalGutterCollapsed: r15, youBarEnabled: value5};
closure.__workletHash = 14041713732815;
closure.__initData = env0_15;
const value8 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = function() {
var moduleValue = require(dependencyMap[11]);
return {opacity: moduleValue.withSpring(result || activeQuestDockMode.get() === QuestDockMode.CLOSED ? 1 : activeQuestDockMode.get() !== QuestDockMode.SOFT_DISMISSED ? 0 : 1,
QUEST_DOCK_MODE_CHANGE_PHYSICS)};
};
object = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, isEnrolled: value4,
activeQuestDockMode: activeQuestDockMode};
object.QuestDockMode = QuestDockMode;
object.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS;
closure.__closure = object;
closure.__workletHash = 12299455640931;
closure.__initData = env0_16;
const value9 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = function() {
var moduleValue = require(dependencyMap[11]);
return {opacity: moduleValue.withSpring(result || activeQuestDockMode.get() === QuestDockMode.CLOSED ? 0 : activeQuestDockMode.get() !== QuestDockMode.SOFT_DISMISSED ? 0.5 : 0,
QUEST_DOCK_MODE_CHANGE_PHYSICS)};
};
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, isEnrolled: value4,
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
QUEST_DOCK_MODE_CHANGE_PHYSICS: QUEST_DOCK_MODE_CHANGE_PHYSICS};
closure.__workletHash = 9632835517209;
closure.__initData = env0_17;
const value10 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const items3 = [styles.dragHandleWrapper, value7];
const defaultImport2 = ReanimatedNativeView;
const dimensionsLayoutTransition = (QuestDockUtilsModule).dimensionsLayoutTransition;
const defaultImport3 = ReanimatedNativeView;
const items2 = [styles.dragHandleOverlay, value10];
const ActionSheetHeaderBar = (ActionSheetHeaderBarNativeModule).ActionSheetHeaderBar;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
return (
<ReanimatedNativeView style={items3}>
{((Component) => <Component style={value8} layout={dimensionsLayoutTransition}>{((Component) => <Component style={items2}><ActionSheetHeaderBar variant="overlay" accessibilityLabel={isExpanded ? Reflect.apply(string,
intl, [t['GQ+4bk']]) : Reflect.apply(string, intl,
[t.Yplnt6])} /></Component>)(defaultImport3)}<ReanimatedNativeView style={[styles.dragHandleOverlay,
value9]} pointerEvents="none" accessibilityElementsHidden importantForAccessibility="no-hide-descendants"><ActionSheetHeaderBar variant="default" /></ReanimatedNativeView></Component>)(defaultImport2)}
</ReanimatedNativeView>
);
function QuestDockDragHandleH() { // fn#104365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13862:2883, owner: QuestDockDragHandle.H, offset: 0x02294349, size: 48 bytes, params: 1, frame: 16
const object = {};
object.left = env1_13(activeQuestDockMode.get(), QuestConstantsModule.QuestDockMode, env0_3);
return object;
}
}
}
global.__d(_fun104360, 13665, [31, 27, 6528, 13572, 7553, 33, 4501, 13650, 13573, 5176, 4017, 4577, 8141, 13571,
6515, 1244,
2]) /* metro module 13665, dependencies: [31, 27, 6528, 13572, 7553, 33, 4501, 13650, 13573, 5176, 4017, 4577, 8141, 13571, 6515, 1244, 2] */;
@@ -1,202 +1,267 @@
/* Metro module 13663; source: modules/quests/native/QuestDock/QuestDockEnrolledBody.tsx; dependencies: [5, 31, 27, 13570, 6528, 13572, 33, 4501, 697, 13576, 13573, 8621, 13568, 13595, 6531, 13592, 13591, 13593, 1585, 5176, 7116, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UseStateFromSharedValue from '../../../reanimated/native/useStateFromSharedValue.tsx'; /* Metro dependency 8621 */
import QuestDockStore from './QuestDockStore.tsx'; /* Metro dependency 13570 */
import QuestBottomSheetHeader from '../QuestBottomSheet/QuestBottomSheetHeader.tsx'; /* Metro dependency 13592 */
import QuestBottomSheetFooter from '../QuestBottomSheet/QuestBottomSheetFooter.tsx'; /* Metro dependency 13593 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as YouBarExperimentModule from '../../../main_tabs_v2/YouBarExperiment.tsx'; /* Metro dependency 5176 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestTypesModule from '../../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as QuestHooksNativeModule from '../QuestHooks.native.tsx'; /* Metro dependency 13568 */
import * as QuestDockConstantsModule from './QuestDockConstants.tsx'; /* Metro dependency 13572 */
import * as QuestDockGestureContextModule from './QuestDockGestureContext.tsx'; /* Metro dependency 13573 */
import * as QuestDockExternalCoordinationContextModule from './QuestDockExternalCoordinationContext.tsx'; /* Metro dependency 13576 */
import * as QuestBottomSheetModule from '../QuestBottomSheet/QuestBottomSheet.tsx'; /* Metro dependency 13591 */
function _fun104337(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:6, offset: 0x022929cd, size: 517 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const questDockStore = importDefault(13570) /* metro dependency 13570: QuestDockStore */;
const questConstantsModule = require(6528) /* metro dependency 6528: QuestConstants */;
const env0_7 = questConstantsModule.QuestDockMode;
const env0_8 = questConstantsModule.QuestsExperimentLocations;
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
const QUEST_DOCK_EXPANDED_ENROLLED_PADDING_TOP = questDockConstantsModule.QUEST_DOCK_EXPANDED_ENROLLED_PADDING_TOP;
const env0_9 = questDockConstantsModule.QUEST_DOCK_EXPANDED_HEIGHT;
const QUEST_DOCK_EXPANDED_PADDING_BOTTOM = questDockConstantsModule.QUEST_DOCK_EXPANDED_PADDING_BOTTOM;
const QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL = questDockConstantsModule.QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL;
const value4 = require(33) /* metro dependency 33 */;
const env0_11 = value4.jsx;
const env0_12 = value4.Fragment;
const env0_13 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.wrapper = {'flexGrow': 0, 'flexShrink': 0, paddingBottom: QUEST_DOCK_EXPANDED_PADDING_BOTTOM,
let value = ReactModule;
const QUEST_DOCK_EXPANDED_ENROLLED_PADDING_TOP = QuestDockConstantsModule.QUEST_DOCK_EXPANDED_ENROLLED_PADDING_TOP;
const QUEST_DOCK_EXPANDED_PADDING_BOTTOM = QuestDockConstantsModule.QUEST_DOCK_EXPANDED_PADDING_BOTTOM;
const QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL = QuestDockConstantsModule.QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL;
const createStyles = CreateStylesModule.createStyles;
object = {};
object.wrapper = {'flexGrow': 0, 'flexShrink': 0, paddingBottom: QUEST_DOCK_EXPANDED_PADDING_BOTTOM,
paddingTop: QUEST_DOCK_EXPANDED_ENROLLED_PADDING_TOP, paddingHorizontal: QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.headerWrapper = {marginBottom: PX_16};
object.headerWrapper = {marginBottom: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.contentWrapper = {'display': 'flex', 'gap': null, 'flexGrow': 0, 'flexShrink': 0, gap: PX_16};
object.contentWrapper = {'display': 'flex', 'gap': null, 'flexGrow': 0, 'flexShrink': 0, gap: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.footer = {marginTop: PX_16};
object2.footerWrapper = {marginLeft: -1 * QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL,
object.footer = {marginTop: PX_16};
object.footerWrapper = {marginLeft: -1 * QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL,
marginRight: -1 * QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL};
const env0_14 = Reflect.apply(createStyles, createStylesModule, [object2]);
const env0_14 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(QuestDockEnrolledBody);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockEnrolledBody.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockEnrolledBody.tsx');
exports.default = value;
}
function EnrolledBodyWatchTask({quest}) { // fn#104338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:733, offset: 0x02292bd2, size: 643 bytes, params: 2, frame: 29
const styles = useStyles();
let binding = env0_4;
let useContext = binding.useContext;
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
const {restingQuestDockMode, setRestingQuestDockMode} = Reflect.apply(useContext, binding,
[QuestDockExternalCoordinationContext]);
binding = env0_4;
useContext = binding.useContext;
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
const questDockWrapperSpecs = Reflect.apply(useContext, binding, [QuestDockGestureContext]).questDockWrapperSpecs;
const value3 = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(restingQuestDockMode);
const value4 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useHasWatchVideoOnMobileTasks(quest.config);
var env0_4 = value4;
env0_4.useEffect(_fun104339, [value3, questDockWrapperSpecs, quest.id, setRestingQuestDockMode, value4]);
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
const QuestBottomSheetHeader = importDefault(13592) /* metro dependency 13592: QuestBottomSheetHeader */;
const QuestBottomSheetStep = (require(13591) /* metro dependency 13591: QuestBottomSheet */).QuestBottomSheetStep;
let TASK_STATUS = QuestBottomSheetStep.TASK_STATUS;
let QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
const items2 = [<View style={styles.headerWrapper}><QuestBottomSheetHeader quest={quest} step={TASK_STATUS} withActionSheet location={QUESTS_BAR_MOBILE} /></View>];
const QuestBottomSheetContent = (require(13591) /* metro dependency 13591: QuestBottomSheet */).QuestBottomSheetContent;
QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
TASK_STATUS = QuestBottomSheetStep.TASK_STATUS;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
items2[1] = <View style={styles.contentWrapper}><QuestBottomSheetContent quest={quest} location={QUESTS_BAR_MOBILE} step={TASK_STATUS} sourceQuestContent={QUEST_BAR_MOBILE} /></View>;
const questBottomSheetFooter = importDefault(13593) /* metro dependency 13593: QuestBottomSheetFooter */;
TASK_STATUS = QuestBottomSheetStep.TASK_STATUS;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
items2[2] = <View style={styles.footerWrapper}>{((Component) => <Component quest={quest} step={TASK_STATUS} style={styles.footer} withSafeArea={false} sourceQuestContent={QUEST_BAR_MOBILE} />)(questBottomSheetFooter)}</View>;
return (
<>
{items2}
</>
);
}
function EnrolledBodyPlayStreamTask({quest}) { // fn#104344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:2070, offset: 0x02292f93, size: 532 bytes, params: 2, frame: 33
const styles = useStyles();
const questBottomSheetModule = require(13591) /* metro dependency 13591: QuestBottomSheet */;
const useEnrolledQuestContentProps = questBottomSheetModule.useEnrolledQuestContentProps;
const object2 = {quest: quest};
let QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
object2.location = QUESTS_BAR_MOBILE;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.sourceQuestContent = QUEST_BAR_MOBILE;
const {step, defibrillator, stepActions, handleTaskSelect,
showMicrophone} = Reflect.apply(useEnrolledQuestContentProps, questBottomSheetModule, [object2]);
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
const QuestBottomSheetHeader = importDefault(13592) /* metro dependency 13592: QuestBottomSheetHeader */;
QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
const items2 = [<View style={styles.headerWrapper}><QuestBottomSheetHeader quest={quest} step={step} withActionSheet location={QUESTS_BAR_MOBILE} /></View>];
const QuestBottomSheetContent = questBottomSheetModule.QuestBottomSheetContent;
QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
items2[1] = <View style={styles.contentWrapper}><QuestBottomSheetContent defibrillator={defibrillator} quest={quest} handleTaskSelect={handleTaskSelect} location={QUESTS_BAR_MOBILE} showMicrophone={showMicrophone} step={step} sourceQuestContent={QUEST_BAR_MOBILE} /></View>;
const questBottomSheetFooter = importDefault(13593) /* metro dependency 13593: QuestBottomSheetFooter */;
const isActive = defibrillator.isActive;
const onBack = stepActions.onBack;
const start = defibrillator.start;
const onNext = stepActions.onNext;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
items2[2] = <View style={styles.footerWrapper}>{((Component) => <Component quest={quest} step={step} isDefibrilating={isActive} onBack={onBack} onDefib={start} onConnectConsoleNext={onNext} style={styles.footer} withSafeArea={false} sourceQuestContent={QUEST_BAR_MOBILE} />)(questBottomSheetFooter)}</View>;
return (
<>
{items2}
</>
);
}
function QuestDockEnrolledBody({quest}) { // fn#104345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:2980, offset: 0x022931a7, size: 350 bytes, params: 2, frame: 23
const styles = useStyles();
const binding = env0_4;
const useContext = binding.useContext;
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
const minExpandedContentHeight = Reflect.apply(useContext, binding,
[QuestDockGestureContext]).minExpandedContentHeight;
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value2 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDockEnrolledBody');
const value3 = env0_4.useCallback(function(a0) {
var height = a0.nativeEvent.layout.height;
if (minExpandedContentHeight.get() !== height) {
minExpandedContentHeight.set(height);
}
}, [minExpandedContentHeight]);
env0_4.useEffect(function() {
return _fun104348;
}, [minExpandedContentHeight]);
return (
<View
style={[styles.wrapper, value2 ? {paddingBottom: global.Math.max(bottom,
QUEST_DOCK_EXPANDED_PADDING_BOTTOM)} : null]}
onLayout={value3}
>
{(require(7116) /* metro dependency 7116: QuestTaskUtils */).hasWatchVideoTasks(quest) ? <EnrolledBodyWatchTask quest={quest} /> : <EnrolledBodyPlayStreamTask quest={quest} />}
</View>
);
}
function _fun104339() { // fn#104339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:1057, offset: 0x02292e55, size: 40 bytes, params: 1, frame: 9
if (env0_4) {
(function() {
return _maybeOpenVideoQuestModal.apply(this, arguments);
})();
}
}
function _fun104347() { // fn#104347, offset: 0x0229333f, size: 11 bytes, params: 1, frame: 1
return function() {
if (minExpandedContentHeight.get() !== QUEST_DOCK_EXPANDED_HEIGHT) {
minExpandedContentHeight.set(QUEST_DOCK_EXPANDED_HEIGHT);
}
};
}
function _maybeOpenVideoQuestModal() { // fn#104340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:1062, offset: 0x02292e7d, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun104342).apply(this, arguments);
}
function* _fun104342() { // fn#104342, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:1135, offset: 0x02292ebd, size: 214 bytes, params: 1, frame: 17
var r1;
var binding;
var value4;
var value8;
var binding2;
var value9;
var object2;
if (true) {
value = environment.__proto__.__proto__.__proto__;
var get = dependencyMap.get;
var value3 = Reflect.apply(get, dependencyMap, []).prevDeltaY < 0;
if (value3) {
binding = env3_3;
value4 = environment.__proto__.__proto__.__proto__.__proto__;
r1 = binding === env4_7.RESET_TO_PREVIOUS;
} else {
r1 = value3;
}
r1 = r1 && env4_6.prevRestingQuestDockMode === env4_7.EXPANDED;
if (r1) {
value8 = environment.__proto__.__proto__.__proto__.__proto__;
binding = env4_1;
binding2 = env4_2;
value9 = binding(binding2[13]);
object2 = {};
object2.questId = require.id;
binding = env4_0;
object2.sourceQuestContent = binding(binding2[14]).QuestContent.QUEST_BAR_MOBILE;
yield value9(object2);
if (false) {
return undefined;
function EnrolledBodyWatchTask({quest}) { // fn#104338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:733, offset: 0x02292bd2, size: 643 bytes, params: 2, frame: 29
const styles = useStyles();
let binding = env0_4;
let useContext = binding.useContext;
const QuestDockExternalCoordinationContext = (QuestDockExternalCoordinationContextModule).QuestDockExternalCoordinationContext;
const {restingQuestDockMode, setRestingQuestDockMode} = Reflect.apply(useContext, binding,
[QuestDockExternalCoordinationContext]);
binding = env0_4;
useContext = binding.useContext;
const QuestDockGestureContext = (QuestDockGestureContextModule).QuestDockGestureContext;
const questDockWrapperSpecs = Reflect.apply(useContext, binding, [QuestDockGestureContext]).questDockWrapperSpecs;
const value3 = (UseStateFromSharedValue)(restingQuestDockMode);
const value4 = (QuestHooksNativeModule).useHasWatchVideoOnMobileTasks(quest.config);
var env0_4 = value4;
env0_4.useEffect(_fun104339, [value3, questDockWrapperSpecs, quest.id, setRestingQuestDockMode, value4]);
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
const QuestBottomSheetStep = (QuestBottomSheetModule).QuestBottomSheetStep;
let TASK_STATUS = QuestBottomSheetStep.TASK_STATUS;
let QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
const items2 = [
<View style={styles.headerWrapper}>
<QuestBottomSheetHeader
quest={quest}
step={TASK_STATUS}
withActionSheet
location={QUESTS_BAR_MOBILE}
/>
</View>,
];
const QuestBottomSheetContent = (QuestBottomSheetModule).QuestBottomSheetContent;
QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
TASK_STATUS = QuestBottomSheetStep.TASK_STATUS;
const QuestContent = (QuestTypesModule).QuestContent;
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
items2[1] = (
<View style={styles.contentWrapper}>
<QuestBottomSheetContent
quest={quest}
location={QUESTS_BAR_MOBILE}
step={TASK_STATUS}
sourceQuestContent={QUEST_BAR_MOBILE}
/>
</View>
);
TASK_STATUS = QuestBottomSheetStep.TASK_STATUS;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
items2[2] = (
<View style={styles.footerWrapper}>
{((Component) => <Component quest={quest} step={TASK_STATUS} style={styles.footer} withSafeArea={false} sourceQuestContent={QUEST_BAR_MOBILE} />)(QuestBottomSheetFooter)}
</View>
);
return (
<>
{items2}
</>
);
function _fun104339() { // fn#104339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:1057, offset: 0x02292e55, size: 40 bytes, params: 1, frame: 9
if (env0_4) {
(function() {
return _maybeOpenVideoQuestModal.apply(this, arguments);
})();
}
importDefault(env4_7.COLLAPSED);
function _maybeOpenVideoQuestModal() { // fn#104340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:1062, offset: 0x02292e7d, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun104342).apply(this, arguments);
function* _fun104342() { // fn#104342, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:1135, offset: 0x02292ebd, size: 214 bytes, params: 1, frame: 17
var r1;
var binding;
var value4;
var value8;
var binding2;
var value9;
var object;
if (true) {
value = environment.__proto__.__proto__.__proto__;
var get = dependencyMap.get;
var value3 = Reflect.apply(get, dependencyMap, []).prevDeltaY < 0;
if (value3) {
binding = env3_3;
value4 = environment.__proto__.__proto__.__proto__.__proto__;
r1 = binding === env4_7.RESET_TO_PREVIOUS;
} else {
r1 = value3;
}
r1 = r1 && env4_6.prevRestingQuestDockMode === env4_7.EXPANDED;
if (r1) {
value8 = environment.__proto__.__proto__.__proto__.__proto__;
binding = env4_1;
binding2 = env4_2;
value9 = binding(binding2[13]);
object = {};
object.questId = require.id;
binding = env4_0;
object.sourceQuestContent = binding(binding2[14]).QuestContent.QUEST_BAR_MOBILE;
yield value9(object);
if (false) {
return undefined;
}
importDefault(env4_7.COLLAPSED);
}
}
}
}
}
}
function EnrolledBodyPlayStreamTask({quest}) { // fn#104344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:2070, offset: 0x02292f93, size: 532 bytes, params: 2, frame: 33
const styles = useStyles();
const useEnrolledQuestContentProps = QuestBottomSheetModule.useEnrolledQuestContentProps;
const object = {quest: quest};
let QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
object.location = QUESTS_BAR_MOBILE;
const QuestContent = (QuestTypesModule).QuestContent;
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object.sourceQuestContent = QUEST_BAR_MOBILE;
const {step, defibrillator, stepActions, handleTaskSelect,
showMicrophone} = Reflect.apply(useEnrolledQuestContentProps, QuestBottomSheetModule, [object]);
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
const items2 = [
<View style={styles.headerWrapper}>
<QuestBottomSheetHeader
quest={quest}
step={step}
withActionSheet
location={QUESTS_BAR_MOBILE}
/>
</View>,
];
const QuestBottomSheetContent = QuestBottomSheetModule.QuestBottomSheetContent;
QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
items2[1] = (
<View style={styles.contentWrapper}>
<QuestBottomSheetContent
defibrillator={defibrillator}
quest={quest}
handleTaskSelect={handleTaskSelect}
location={QUESTS_BAR_MOBILE}
showMicrophone={showMicrophone}
step={step}
sourceQuestContent={QUEST_BAR_MOBILE}
/>
</View>
);
const isActive = defibrillator.isActive;
const onBack = stepActions.onBack;
const start = defibrillator.start;
const onNext = stepActions.onNext;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
items2[2] = (
<View style={styles.footerWrapper}>
{((Component) => <Component quest={quest} step={step} isDefibrilating={isActive} onBack={onBack} onDefib={start} onConnectConsoleNext={onNext} style={styles.footer} withSafeArea={false} sourceQuestContent={QUEST_BAR_MOBILE} />)(QuestBottomSheetFooter)}
</View>
);
return (
<>
{items2}
</>
);
}
function QuestDockEnrolledBody({quest}) { // fn#104345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:2980, offset: 0x022931a7, size: 350 bytes, params: 2, frame: 23
const styles = useStyles();
const binding = env0_4;
const useContext = binding.useContext;
const QuestDockGestureContext = (QuestDockGestureContextModule).QuestDockGestureContext;
const minExpandedContentHeight = Reflect.apply(useContext, binding,
[QuestDockGestureContext]).minExpandedContentHeight;
const bottom = (UseSafeAreaInsetsNative)().bottom;
const value2 = (YouBarExperimentModule).useYouBarEnabled('QuestDockEnrolledBody');
const value3 = env0_4.useCallback(function(a0) {
var height = a0.nativeEvent.layout.height;
if (minExpandedContentHeight.get() !== height) {
minExpandedContentHeight.set(height);
}
}, [minExpandedContentHeight]);
env0_4.useEffect(function() {
return _fun104348;
}, [minExpandedContentHeight]);
return (
<View
style={[styles.wrapper, value2 ? {paddingBottom: global.Math.max(bottom,
QUEST_DOCK_EXPANDED_PADDING_BOTTOM)} : null]}
onLayout={value3}
>
{
(require(7116) /* metro dependency 7116: QuestTaskUtils */).hasWatchVideoTasks(quest)
? (
<EnrolledBodyWatchTask quest={quest} />
)
: (
<EnrolledBodyPlayStreamTask quest={quest} />
)
}
</View>
);
function _fun104347() { // fn#104347, offset: 0x0229333f, size: 11 bytes, params: 1, frame: 1
return function() {
if (minExpandedContentHeight.get() !== QUEST_DOCK_EXPANDED_HEIGHT) {
minExpandedContentHeight.set(QUEST_DOCK_EXPANDED_HEIGHT);
}
};
function _fun104348() { // fn#104348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:3287, offset: 0x0229334a, size: 49 bytes, params: 1, frame: 12
if (minExpandedContentHeight.get() !== QUEST_DOCK_EXPANDED_HEIGHT) {
minExpandedContentHeight.set(QUEST_DOCK_EXPANDED_HEIGHT);
}
}
}
}
}
global.__d(_fun104337, 13663, [5, 31, 27, 13570, 6528, 13572, 33, 4501, 697, 13576, 13573, 8621, 13568, 13595, 6531,
13592, 13591, 13593, 1585, 5176, 7116,
2]) /* metro module 13663, dependencies: [5, 31, 27, 13570, 6528, 13572, 33, 4501, 697, 13576, 13573, 8621, 13568, 13595, 6531, 13592, 13591, 13593, 1585, 5176, 7116, 2] */;
@@ -1,49 +1,71 @@
/* Metro module 13660; source: modules/quests/native/QuestDock/QuestDockEnrolledHeader.tsx; dependencies: [57, 31, 27, 33, 4501, 13650, 9483, 9950, 6531, 13620, 4573, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import QuestProgressIndicator from '../QuestProgressIndicator.tsx'; /* Metro dependency 13620 */
import QuestDockContext from './QuestDockContext.tsx'; /* Metro dependency 13650 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as QuestTypesModule from '../../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as QuestHooksModule from '../../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as QuestCopyHooksModule from '../../hooks/QuestCopyHooks.tsx'; /* Metro dependency 9950 */
function _fun104325(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13857:6, offset: 0x0229198a, size: 275 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const value2 = require(33) /* metro dependency 33 */;
const env0_6 = value2.jsx;
const env0_7 = value2.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({wrapper: {'alignItems': 'center',
let value = ReactModule;
const env0_8 = (CreateStylesModule).createStyles({wrapper: {'alignItems': 'center',
'display': 'flex', 'flexDirection': 'row', 'flexGrow': 1, 'flexShrink': 1, 'gap': 8, 'justifyContent': 'center',
'padding': 8}, progressIndicatorWrapper: {'flexGrow': 0, 'flexShrink': 0}, copy: {'flexGrow': 1,
'flexShrink': 1}});
value = value.memo(QuestDockEnrolledHeader);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockEnrolledHeader.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockEnrolledHeader.tsx');
exports.default = value;
function QuestDockEnrolledHeader() { // fn#104326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13857:409, offset: 0x02291a9d, size: 445 bytes, params: 1, frame: 24
const binding = env0_4;
const useContext = binding.useContext;
const quest = Reflect.apply(useContext, binding,
[QuestDockContext]).quest;
const styles = useStyles();
const value2 = (QuestHooksModule).useQuestTaskDetails(quest);
const property = Module00057((QuestHooksModule).useTaskPlatformScreen(quest,
value2), 1)[0];
const value5 = (QuestCopyHooksModule).useQuestBarTitle(quest);
const useQuestBarSubtitle = QuestCopyHooksModule.useQuestBarSubtitle;
const object = {quest: quest, isExpanded: false, activeScreen: property};
const QuestContent = (QuestTypesModule).QuestContent;
const QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object.sourceQuestContent = QUEST_BAR_MOBILE;
const value6 = Reflect.apply(useQuestBarSubtitle, QuestCopyHooksModule, [object]);
let value = QuestProgressIndicator;
value = (
<View style={styles.progressIndicatorWrapper}>
{((Component) => <Component quest={quest} size="x-sm" progress={value2.percentComplete} loading={false} hasConfetti />)(value)}
</View>
);
const items2 = [value];
const Text = (TextModule).Text;
items2[1] = (
<View style={styles.copy}>
<Text variant="heading-md/semibold" color="mobile-text-heading-primary">
{value5}
</Text>
<Text variant="text-sm/medium" color="text-muted">
{value6}
</Text>
</View>
);
return (
<View style={styles.wrapper}>
{items2}
</View>
);
}
}
function QuestDockEnrolledHeader() { // fn#104326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13857:409, offset: 0x02291a9d, size: 445 bytes, params: 1, frame: 24
const binding = env0_4;
const useContext = binding.useContext;
const quest = Reflect.apply(useContext, binding,
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
const styles = useStyles();
const value2 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
const property = env0_3((require(9483) /* metro dependency 9483: QuestHooks */).useTaskPlatformScreen(quest,
value2), 1)[0];
const value5 = (require(9950) /* metro dependency 9950: QuestCopyHooks */).useQuestBarTitle(quest);
const questCopyHooksModule = require(9950) /* metro dependency 9950: QuestCopyHooks */;
const useQuestBarSubtitle = questCopyHooksModule.useQuestBarSubtitle;
const object2 = {quest: quest, isExpanded: false, activeScreen: property};
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.sourceQuestContent = QUEST_BAR_MOBILE;
const value6 = Reflect.apply(useQuestBarSubtitle, questCopyHooksModule, [object2]);
let value = importDefault(13620) /* metro dependency 13620: QuestProgressIndicator */;
value = <View style={styles.progressIndicatorWrapper}>{((Component) => <Component quest={quest} size="x-sm" progress={value2.percentComplete} loading={false} hasConfetti />)(value)}</View>;
const items2 = [value];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <View style={styles.copy}><Text variant="heading-md/semibold" color="mobile-text-heading-primary">{value5}</Text><Text variant="text-sm/medium" color="text-muted">{value6}</Text></View>;
return (
<View style={styles.wrapper}>
{items2}
</View>
);
}
global.__d(_fun104325, 13660, [57, 31, 27, 33, 4501, 13650, 9483, 9950, 6531, 13620, 4573,
2]) /* metro module 13660, dependencies: [57, 31, 27, 33, 4501, 13650, 9483, 9950, 6531, 13620, 4573, 2] */;
@@ -1,369 +1,378 @@
/* Metro module 13576; source: modules/quests/native/QuestDock/QuestDockExternalCoordinationContext.tsx; dependencies: [31, 13570, 6528, 13572, 33, 672, 8142, 4017, 13571, 9484, 477, 2] */
import Durations from '../../../../utils/Durations.tsx'; /* Metro dependency 672 */
import QuestDockStore from './QuestDockStore.tsx'; /* Metro dependency 13570 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as ReanimatedHelperTypesModule from '../../../reanimated/ReanimatedHelperTypes.tsx'; /* Metro dependency 8142 */
import * as QuestDockUtilsModule from './QuestDockUtils.tsx'; /* Metro dependency 13571 */
import * as QuestDockConstantsModule from './QuestDockConstants.tsx'; /* Metro dependency 13572 */
function _fun103187(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:6, offset: 0x0225b63c, size: 448 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const questDockStore = importDefault(13570) /* metro dependency 13570: QuestDockStore */;
const QuestDockMode = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
const env0_5 = (require(13572) /* metro dependency 13572: QuestDockConstants */).QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
let value = ReactModule;
const QuestDockMode = (QuestConstantsModule).QuestDockMode;
const Millis = (Durations).Millis;
const SECOND = Millis.SECOND;
const env0_7 = 1 * SECOND;
const createContext = value.createContext;
object2 = {};
const reanimatedHelperTypesModule = require(8142) /* metro dependency 8142: ReanimatedHelperTypes */;
const createFakeSharedValue = reanimatedHelperTypesModule.createFakeSharedValue;
object = {};
const createFakeSharedValue = ReanimatedHelperTypesModule.createFakeSharedValue;
const COLLAPSED = QuestDockMode.COLLAPSED;
object2.restingQuestDockMode = Reflect.apply(createFakeSharedValue, reanimatedHelperTypesModule, [COLLAPSED]);
object2.setRestingQuestDockMode = function() {
object.restingQuestDockMode = Reflect.apply(createFakeSharedValue, ReanimatedHelperTypesModule, [COLLAPSED]);
object.setRestingQuestDockMode = function() {
};
object2.lastScrollEventSourceId = reanimatedHelperTypesModule.createFakeSharedValue(null);
object2.questDockOffset = reanimatedHelperTypesModule.createFakeSharedValue(0);
const context = Reflect.apply(createContext, value, [object2]);
object.lastScrollEventSourceId = ReanimatedHelperTypesModule.createFakeSharedValue(null);
object.questDockOffset = ReanimatedHelperTypesModule.createFakeSharedValue(0);
const context = Reflect.apply(createContext, value, [object]);
value = value.memo(QuestDockExternalCoordinationContextProviderInner);
const env0_9 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
object2 = {code: 'function QuestDockExternalCoordinationContextTsx1(){const{restingQuestDockMode}=this.__closure;return restingQuestDockMode.get();}'};
object2 = {code: 'function QuestDockExternalCoordinationContextTsx2(nextMode,prevMode){const{runOnJS,cancelReopenQuestDock}=this.__closure;if(nextMode!==prevMode){runOnJS(cancelReopenQuestDock)();}}'};
object2 = {code: "function QuestDockExternalCoordinationContextTsx3(contentOffsetY,contentHeight,layoutHeight){const{isScrollHandlerEnabled,restingQuestDockMode,QuestDockMode,lastContentOffsetY,lastScrollEventSourceId,id,runOnJS,cancelReopenQuestDock,IS_ANDROID,scheduleReopenQuestDock,setRestingQuestDockMode,QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD}=this.__closure;if(!isScrollHandlerEnabled.get())return;if(restingQuestDockMode.get()===QuestDockMode.SOFT_DISMISSED||restingQuestDockMode.get()===QuestDockMode.EXPANDED){return;}const lastContentOffsetYValue=lastContentOffsetY.get();lastContentOffsetY.set(contentOffsetY);if(lastContentOffsetYValue===contentOffsetY)return;const lastSourceId=lastScrollEventSourceId.get();if(id!=='guilds'){lastScrollEventSourceId.set(id);}const isFirstScrollEvent=id!=='guilds'&&id!==lastSourceId;if(isFirstScrollEvent)return;const isOverscrollingAtTop=contentOffsetY<0&&lastContentOffsetYValue<0;if(isOverscrollingAtTop){runOnJS(cancelReopenQuestDock)();return;}const hasLayoutData=layoutHeight!=null&&contentHeight!=null;const isOverscrollingAtBottom=hasLayoutData&&contentOffsetY+layoutHeight>=contentHeight;if(isOverscrollingAtBottom)return;const isScrolledToTop=contentOffsetY<=0&&(IS_ANDROID||lastContentOffsetYValue<=0);if(isScrolledToTop&&restingQuestDockMode.get()===QuestDockMode.CLOSED){if(IS_ANDROID){runOnJS(scheduleReopenQuestDock)();}else{runOnJS(setRestingQuestDockMode)(QuestDockMode.COLLAPSED);}return;}const isScrollingDown=contentOffsetY>lastContentOffsetYValue&&contentOffsetY>0&&lastContentOffsetYValue>0;const isScrollingUp=contentOffsetY<lastContentOffsetYValue;const scrollDistance=Math.abs(lastContentOffsetYValue-contentOffsetY);if(isScrollingDown&&restingQuestDockMode.get()===QuestDockMode.COLLAPSED){runOnJS(setRestingQuestDockMode)(QuestDockMode.CLOSED);}else if(isScrollingUp&&restingQuestDockMode.get()===QuestDockMode.CLOSED&&scrollDistance>=QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD){runOnJS(scheduleReopenQuestDock)();}}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockExternalCoordinationContext.tsx');
const env0_9 = (PlatformUtilsModule).isAndroid();
object = {code: 'function QuestDockExternalCoordinationContextTsx1(){const{restingQuestDockMode}=this.__closure;return restingQuestDockMode.get();}'};
object = {code: 'function QuestDockExternalCoordinationContextTsx2(nextMode,prevMode){const{runOnJS,cancelReopenQuestDock}=this.__closure;if(nextMode!==prevMode){runOnJS(cancelReopenQuestDock)();}}'};
object = {code: "function QuestDockExternalCoordinationContextTsx3(contentOffsetY,contentHeight,layoutHeight){const{isScrollHandlerEnabled,restingQuestDockMode,QuestDockMode,lastContentOffsetY,lastScrollEventSourceId,id,runOnJS,cancelReopenQuestDock,IS_ANDROID,scheduleReopenQuestDock,setRestingQuestDockMode,QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD}=this.__closure;if(!isScrollHandlerEnabled.get())return;if(restingQuestDockMode.get()===QuestDockMode.SOFT_DISMISSED||restingQuestDockMode.get()===QuestDockMode.EXPANDED){return;}const lastContentOffsetYValue=lastContentOffsetY.get();lastContentOffsetY.set(contentOffsetY);if(lastContentOffsetYValue===contentOffsetY)return;const lastSourceId=lastScrollEventSourceId.get();if(id!=='guilds'){lastScrollEventSourceId.set(id);}const isFirstScrollEvent=id!=='guilds'&&id!==lastSourceId;if(isFirstScrollEvent)return;const isOverscrollingAtTop=contentOffsetY<0&&lastContentOffsetYValue<0;if(isOverscrollingAtTop){runOnJS(cancelReopenQuestDock)();return;}const hasLayoutData=layoutHeight!=null&&contentHeight!=null;const isOverscrollingAtBottom=hasLayoutData&&contentOffsetY+layoutHeight>=contentHeight;if(isOverscrollingAtBottom)return;const isScrolledToTop=contentOffsetY<=0&&(IS_ANDROID||lastContentOffsetYValue<=0);if(isScrolledToTop&&restingQuestDockMode.get()===QuestDockMode.CLOSED){if(IS_ANDROID){runOnJS(scheduleReopenQuestDock)();}else{runOnJS(setRestingQuestDockMode)(QuestDockMode.COLLAPSED);}return;}const isScrollingDown=contentOffsetY>lastContentOffsetYValue&&contentOffsetY>0&&lastContentOffsetYValue>0;const isScrollingUp=contentOffsetY<lastContentOffsetYValue;const scrollDistance=Math.abs(lastContentOffsetYValue-contentOffsetY);if(isScrollingDown&&restingQuestDockMode.get()===QuestDockMode.COLLAPSED){runOnJS(setRestingQuestDockMode)(QuestDockMode.CLOSED);}else if(isScrollingUp&&restingQuestDockMode.get()===QuestDockMode.CLOSED&&scrollDistance>=QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD){runOnJS(scheduleReopenQuestDock)();}}"};
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockExternalCoordinationContext.tsx');
exports.QuestDockExternalCoordinationContext = context;
exports.QuestDockExternalCoordinationContextProvider = value;
exports.useExternalScrollEventHandler = useExternalScrollEventHandler;
}
function QuestDockExternalCoordinationContextProviderInner(a0) { // fn#103189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:472, offset: 0x0225b7fc, size: 264 bytes, params: 2, frame: 19
let useSharedValue = ReanimatedRexportModule.useSharedValue;
const value2 = Reflect.apply(useSharedValue, ReanimatedRexportModule, [null]);
const value3 = ReanimatedRexportModule.useSharedValue(0);
useSharedValue = ReanimatedRexportModule.useSharedValue;
const value4 = Reflect.apply(useSharedValue, ReanimatedRexportModule,
[QuestDockUtilsModule.isSoftDismissed(QuestDockStore.questDockSoftDismissedAt) ? QuestDockMode.SOFT_DISMISSED : QuestDockMode.COLLAPSED]);
const binding = value4;
const value6 = binding.useMemo(_fun103191, [value2, value4, binding.useCallback(_fun103190, [value4, value3]),
value3]);
const Provider = env0_8.Provider;
return (
<Provider value={value6}>
{a0.children}
</Provider>
);
function _fun103190(a0) { // fn#103190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:721, offset: 0x0225b904, size: 107 bytes, params: 2, frame: 13
let binding = env0_1;
binding.set(0);
binding = env0_2;
const get = binding.get;
if (Reflect.apply(get, binding, []) !== a0) {
env0_2.set(a0);
}
const value = environment.__proto__;
const RESET_TO_PREVIOUS = QuestDockMode.RESET_TO_PREVIOUS;
if (a0 !== RESET_TO_PREVIOUS) {
(require(9484) /* metro dependency 9484: QuestActionCreators */).updatePrevRestingQuestDockMode(a0);
}
}
function QuestDockExternalCoordinationContextProviderInner(a0) { // fn#103189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:472, offset: 0x0225b7fc, size: 264 bytes, params: 2, frame: 19
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useSharedValue = reanimatedRexportModule.useSharedValue;
const value2 = Reflect.apply(useSharedValue, reanimatedRexportModule, [null]);
const value3 = reanimatedRexportModule.useSharedValue(0);
const moduleValue3 = reanimatedRexportModule;
useSharedValue = moduleValue3.useSharedValue;
const questDockUtilsModule = require(13571) /* metro dependency 13571: QuestDockUtils */;
const value4 = Reflect.apply(useSharedValue, moduleValue3,
[questDockUtilsModule.isSoftDismissed(QuestDockStore.questDockSoftDismissedAt) ? QuestDockMode.SOFT_DISMISSED : QuestDockMode.COLLAPSED]);
const binding = value4;
const value6 = binding.useMemo(_fun103191, [value2, value4, binding.useCallback(_fun103190, [value4, value3]),
value3]);
const Provider = env0_8.Provider;
return (
<Provider value={value6}>
{a0.children}
</Provider>
);
}
function useExternalScrollEventHandler({id}) { // fn#103192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:3587, offset: 0x0225b99a, size: 548 bytes, params: 2, frame: 28
const binding = env0_2;
const {setRestingQuestDockMode, restingQuestDockMode, lastScrollEventSourceId} = binding.useContext(env0_8);
const env0_4 = binding.useRef(-1);
let useCallback = binding.useCallback;
const value3 = Reflect.apply(useCallback, binding, [_fun103193, [setRestingQuestDockMode, restingQuestDockMode]]);
let closure = _fun103195;
const value4 = binding.useCallback(closure, []);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
closure = function() {
return restingQuestDockMode.get();
};
closure.__closure = {restingQuestDockMode: restingQuestDockMode};
closure.__workletHash = 14040596710288;
closure.__initData = env0_10;
const closure2 = useExternalScrollEventHandlerC;
const runOnJS = reanimatedRexportModule.runOnJS;
closure2.__closure = {runOnJS: runOnJS, cancelReopenQuestDock: value4};
closure2.__workletHash = 1848909508809;
closure2.__initData = env0_11;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
const value5 = reanimatedRexportModule.useSharedValue(0);
const value6 = reanimatedRexportModule.useSharedValue(false);
binding.useEffect(_fun103198, [value6]);
useCallback = binding.useCallback;
closure = useExternalScrollEventHandlerT;
closure.__closure = {isScrollHandlerEnabled: value6, restingQuestDockMode: restingQuestDockMode,
QuestDockMode: QuestDockMode, lastContentOffsetY: value5, lastScrollEventSourceId: lastScrollEventSourceId,
id: id, runOnJS: runOnJS, cancelReopenQuestDock: value4, IS_ANDROID: env0_9, scheduleReopenQuestDock: value3,
setRestingQuestDockMode: setRestingQuestDockMode,
QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD: QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD};
closure.__workletHash = 9824540806898;
closure.__initData = env0_12;
return Reflect.apply(useCallback, binding, [closure, [id, value5, lastScrollEventSourceId, restingQuestDockMode,
value3, setRestingQuestDockMode, value4, value6]]);
}
function _fun103190(a0) { // fn#103190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:721, offset: 0x0225b904, size: 107 bytes, params: 2, frame: 13
let binding = env0_1;
binding.set(0);
binding = env0_2;
const get = binding.get;
if (Reflect.apply(get, binding, []) !== a0) {
env0_2.set(a0);
}
const value = environment.__proto__;
const RESET_TO_PREVIOUS = QuestDockMode.RESET_TO_PREVIOUS;
if (a0 !== RESET_TO_PREVIOUS) {
(require(9484) /* metro dependency 9484: QuestActionCreators */).updatePrevRestingQuestDockMode(a0);
}
}
function _fun103191() { // fn#103191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:845, offset: 0x0225b96f, size: 43 bytes, params: 1, frame: 3
return {lastScrollEventSourceId: env0_0, restingQuestDockMode: env0_2, setRestingQuestDockMode: env0_3,
questDockOffset: env0_1};
}
function _fun103193() { // fn#103193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:3773, offset: 0x0225bbbe, size: 98 bytes, params: 1, frame: 14
var window;
if (env0_4.current !== -1) {
window = global.window;
window.clearTimeout(env0_4.current);
}
env0_4.current = global.window.setTimeout(function() {
if (restingQuestDockMode.get() !== QuestDockMode.EXPANDED) {
setRestingQuestDockMode(QuestDockMode.COLLAPSED);
function _fun103191() { // fn#103191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:845, offset: 0x0225b96f, size: 43 bytes, params: 1, frame: 3
return {lastScrollEventSourceId: env0_0, restingQuestDockMode: env0_2, setRestingQuestDockMode: env0_3,
questDockOffset: env0_1};
}
}, 500);
}
function _fun103195() { // fn#103195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:3929, offset: 0x0225bc5a, size: 54 bytes, params: 1, frame: 11
var window;
if (env0_4.current !== -1) {
window = global.window;
window.clearTimeout(env0_4.current);
}
}
function useExternalScrollEventHandlerC(a0, a1) { // fn#103197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:4119, owner: useExternalScrollEventHandler.c, offset: 0x0225bc90, size: 60 bytes, params: 3, frame: 12
var value;
if (a0 !== a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_6)();
}
}
function useExternalScrollEventHandler({id}) { // fn#103192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:3587, offset: 0x0225b99a, size: 548 bytes, params: 2, frame: 28
const binding = env0_2;
const {setRestingQuestDockMode, restingQuestDockMode, lastScrollEventSourceId} = binding.useContext(env0_8);
const env0_4 = binding.useRef(-1);
let useCallback = binding.useCallback;
const value3 = Reflect.apply(useCallback, binding, [_fun103193, [setRestingQuestDockMode, restingQuestDockMode]]);
let closure = _fun103195;
const value4 = binding.useCallback(closure, []);
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = function() {
return restingQuestDockMode.get();
};
closure.__closure = {restingQuestDockMode: restingQuestDockMode};
closure.__workletHash = 14040596710288;
closure.__initData = env0_10;
const useExternalScrollEventHandlerC2 = useExternalScrollEventHandlerC;
const runOnJS = ReanimatedRexportModule.runOnJS;
useExternalScrollEventHandlerC2.__closure = {runOnJS: runOnJS, cancelReopenQuestDock: value4};
useExternalScrollEventHandlerC2.__workletHash = 1848909508809;
useExternalScrollEventHandlerC2.__initData = env0_11;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, useExternalScrollEventHandlerC2]);
const value5 = ReanimatedRexportModule.useSharedValue(0);
const value6 = ReanimatedRexportModule.useSharedValue(false);
binding.useEffect(_fun103198, [value6]);
useCallback = binding.useCallback;
closure = useExternalScrollEventHandlerT;
closure.__closure = {isScrollHandlerEnabled: value6, restingQuestDockMode: restingQuestDockMode,
QuestDockMode: QuestDockMode, lastContentOffsetY: value5, lastScrollEventSourceId: lastScrollEventSourceId,
id: id, runOnJS: runOnJS, cancelReopenQuestDock: value4, IS_ANDROID: env0_9, scheduleReopenQuestDock: value3,
setRestingQuestDockMode: setRestingQuestDockMode,
QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD: QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD};
closure.__workletHash = 9824540806898;
closure.__initData = env0_12;
return Reflect.apply(useCallback, binding, [closure, [id, value5, lastScrollEventSourceId, restingQuestDockMode,
value3, setRestingQuestDockMode, value4, value6]]);
function _fun103193() { // fn#103193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:3773, offset: 0x0225bbbe, size: 98 bytes, params: 1, frame: 14
var window;
if (env0_4.current !== -1) {
window = global.window;
window.clearTimeout(env0_4.current);
}
env0_4.current = global.window.setTimeout(function() {
if (restingQuestDockMode.get() !== QuestDockMode.EXPANDED) {
setRestingQuestDockMode(QuestDockMode.COLLAPSED);
}
}, 500);
}
function _fun103198() { // fn#103198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:4355, offset: 0x0225bccc, size: 45 bytes, params: 1, frame: 14
const env0_0 = global.setTimeout(_fun103199, env1_7);
return _fun103200;
}
function _fun103195() { // fn#103195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:3929, offset: 0x0225bc5a, size: 54 bytes, params: 1, frame: 11
var window;
if (env0_4.current !== -1) {
window = global.window;
window.clearTimeout(env0_4.current);
}
}
function useExternalScrollEventHandlerT(a0, a1, a2) { // fn#103201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:4451, owner: useExternalScrollEventHandler.T, offset: 0x0225bd10, size: 595 bytes, params: 4, frame: 19
var r2;
var restingQuestDockModeBinding;
var value2;
var value3;
var SOFT_DISMISSED;
var value4;
var EXPANDED;
var value5;
var set;
var lastScrollEventSourceIdBinding;
var value6;
var value7;
var CLOSED;
var Math;
var abs;
var value8;
var value9;
var COLLAPSED;
var value10;
var value11;
var value12;
var value13;
var moduleValue;
var runOnJS;
var moduleValue2;
var moduleValue3;
var moduleValue4;
let value = environment;
let binding = env0_8;
let get = binding.get;
reducibleJoin32: while (true) {
if (Reflect.apply(get, binding, [])) {
restingQuestDockModeBinding = restingQuestDockMode;
get = restingQuestDockModeBinding.get;
value2 = Reflect.apply(get, restingQuestDockModeBinding, []);
value3 = environment.__proto__;
SOFT_DISMISSED = QuestDockMode.SOFT_DISMISSED;
if (value2 === SOFT_DISMISSED) {
break reducibleJoin32;
function useExternalScrollEventHandlerC(a0, a1) { // fn#103197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:4119, owner: useExternalScrollEventHandler.c, offset: 0x0225bc90, size: 60 bytes, params: 3, frame: 12
var value;
if (a0 !== a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(JsxRuntimeModule.jsx)();
}
restingQuestDockModeBinding = restingQuestDockMode;
get = restingQuestDockModeBinding.get;
value4 = Reflect.apply(get, restingQuestDockModeBinding, []);
EXPANDED = QuestDockMode.EXPANDED;
if (value4 === EXPANDED) {
break reducibleJoin32;
}
function _fun103198() { // fn#103198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:4355, offset: 0x0225bccc, size: 45 bytes, params: 1, frame: 14
const env0_0 = global.setTimeout(_fun103199, env1_7);
return _fun103200;
function _fun103199() { // fn#103199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:4378, offset: 0x0225bcf9, size: 23 bytes, params: 1, frame: 11
env1_8.set(true);
}
binding = env0_7;
get = binding.get;
value5 = Reflect.apply(get, binding, []);
set = binding.set;
Reflect.apply(set, binding, [a0]);
if (value5 === a0) {
break reducibleJoin32;
function _fun103200() { // fn#103200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:4404, offset: 0x00e59c84, size: 24 bytes, params: 1, frame: 11
global.clearTimeout(env0_0);
}
lastScrollEventSourceIdBinding = lastScrollEventSourceId;
get = lastScrollEventSourceIdBinding.get;
value6 = Reflect.apply(get, lastScrollEventSourceIdBinding, []);
reducibleJoin6: while (true) {
if (id === 'guilds') {
break reducibleJoin6;
}
lastScrollEventSourceIdBinding = lastScrollEventSourceId;
set = lastScrollEventSourceIdBinding.set;
Reflect.apply(set, lastScrollEventSourceIdBinding, [id]);
break reducibleJoin6;
}
if (id !== 'guilds') {
if (id !== value6) {
break reducibleJoin32;
}
}
if (a0 < 0) {
if (value5 < 0) {
moduleValue4 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = moduleValue4.runOnJS;
Reflect.apply(runOnJS, moduleValue4, [env0_6])();
break reducibleJoin32;
}
}
if (a2 != null) {
if (a1 != null) {
if (a0 + a2 >= a1) {
}
function useExternalScrollEventHandlerT(a0, a1, a2) { // fn#103201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:4451, owner: useExternalScrollEventHandler.T, offset: 0x0225bd10, size: 595 bytes, params: 4, frame: 19
var r2;
var restingQuestDockModeBinding;
var value2;
var value3;
var SOFT_DISMISSED;
var value4;
var EXPANDED;
var value5;
var set;
var lastScrollEventSourceIdBinding;
var value6;
var value7;
var CLOSED;
var Math;
var abs;
var value8;
var value9;
var COLLAPSED;
var value10;
var value11;
var value12;
var value13;
var moduleValue;
var runOnJS;
var moduleValue2;
var moduleValue3;
var moduleValue4;
let value = environment;
let binding = env0_8;
let get = binding.get;
reducibleJoin32: while (true) {
if (Reflect.apply(get, binding, [])) {
restingQuestDockModeBinding = restingQuestDockMode;
get = restingQuestDockModeBinding.get;
value2 = Reflect.apply(get, restingQuestDockModeBinding, []);
value3 = environment.__proto__;
SOFT_DISMISSED = QuestDockMode.SOFT_DISMISSED;
if (value2 === SOFT_DISMISSED) {
break reducibleJoin32;
}
}
}
if (a0 <= 0) {
if (!env1_9) {
if (!(value5 <= 0)) {
Math = global.Math;
value8 = Math.abs(value5 - a0);
if (a0 > value5) {
if (a0 > 0) {
if (value5 > 0) {
restingQuestDockModeBinding = restingQuestDockMode;
get = restingQuestDockModeBinding.get;
value9 = Reflect.apply(get, restingQuestDockModeBinding, []);
COLLAPSED = QuestDockMode.COLLAPSED;
if (value9 === COLLAPSED) {
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = moduleValue2.runOnJS;
value = Reflect.apply(runOnJS, moduleValue2, [setRestingQuestDockMode]);
CLOSED = QuestDockMode.CLOSED;
value(CLOSED);
break reducibleJoin32;
restingQuestDockModeBinding = restingQuestDockMode;
get = restingQuestDockModeBinding.get;
value4 = Reflect.apply(get, restingQuestDockModeBinding, []);
EXPANDED = QuestDockMode.EXPANDED;
if (value4 === EXPANDED) {
break reducibleJoin32;
}
binding = env0_7;
get = binding.get;
value5 = Reflect.apply(get, binding, []);
set = binding.set;
Reflect.apply(set, binding, [a0]);
if (value5 === a0) {
break reducibleJoin32;
}
lastScrollEventSourceIdBinding = lastScrollEventSourceId;
get = lastScrollEventSourceIdBinding.get;
value6 = Reflect.apply(get, lastScrollEventSourceIdBinding, []);
reducibleJoin6: while (true) {
if (id === 'guilds') {
break reducibleJoin6;
}
lastScrollEventSourceIdBinding = lastScrollEventSourceId;
set = lastScrollEventSourceIdBinding.set;
Reflect.apply(set, lastScrollEventSourceIdBinding, [id]);
break reducibleJoin6;
}
if (id !== 'guilds') {
if (id !== value6) {
break reducibleJoin32;
}
}
if (a0 < 0) {
if (value5 < 0) {
moduleValue4 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = moduleValue4.runOnJS;
Reflect.apply(runOnJS, moduleValue4, [JsxRuntimeModule.jsx])();
break reducibleJoin32;
}
}
if (a2 != null) {
if (a1 != null) {
if (a0 + a2 >= a1) {
break reducibleJoin32;
}
}
}
if (a0 <= 0) {
if (!env1_9) {
if (!(value5 <= 0)) {
Math = global.Math;
value8 = Math.abs(value5 - a0);
if (a0 > value5) {
if (a0 > 0) {
if (value5 > 0) {
restingQuestDockModeBinding = restingQuestDockMode;
get = restingQuestDockModeBinding.get;
value9 = Reflect.apply(get, restingQuestDockModeBinding, []);
COLLAPSED = QuestDockMode.COLLAPSED;
if (value9 === COLLAPSED) {
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = moduleValue2.runOnJS;
value = Reflect.apply(runOnJS, moduleValue2, [setRestingQuestDockMode]);
CLOSED = QuestDockMode.CLOSED;
value(CLOSED);
break reducibleJoin32;
}
}
}
}
value10 = a0 < value5;
reducibleJoin23: while (true) {
if (value10) {
restingQuestDockModeBinding = restingQuestDockMode;
get = restingQuestDockModeBinding.get;
value11 = Reflect.apply(get, restingQuestDockModeBinding, []);
CLOSED = QuestDockMode.CLOSED;
value12 = value11 === CLOSED;
r2 = value12;
break reducibleJoin23;
}
r2 = value10;
break reducibleJoin23;
}
reducibleJoin25: while (true) {
if (r2) {
value13 = value8 >= QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD;
r2 = value13;
break reducibleJoin25;
}
break reducibleJoin25;
}
if (r2) {
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = moduleValue.runOnJS;
Reflect.apply(runOnJS, moduleValue, [QuestDockConstantsModule.QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD])();
break reducibleJoin32;
}
break reducibleJoin32;
}
}
restingQuestDockModeBinding = restingQuestDockMode;
get = restingQuestDockModeBinding.get;
value7 = Reflect.apply(get, restingQuestDockModeBinding, []);
CLOSED = QuestDockMode.CLOSED;
if (value7 === CLOSED) {
binding = env1_9;
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = moduleValue3.runOnJS;
if (binding) {
Reflect.apply(runOnJS, moduleValue3, [QuestDockConstantsModule.QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD])();
break reducibleJoin32;
}
value = Reflect.apply(runOnJS, moduleValue3, [setRestingQuestDockMode]);
COLLAPSED = QuestDockMode.COLLAPSED;
value(COLLAPSED);
break reducibleJoin32;
}
}
Math = global.Math;
abs = Math.abs;
value8 = Reflect.apply(abs, Math, [value5 - a0]);
if (a0 > value5) {
if (a0 > 0) {
if (value5 > 0) {
restingQuestDockModeBinding = restingQuestDockMode;
get = restingQuestDockModeBinding.get;
value9 = Reflect.apply(get, restingQuestDockModeBinding, []);
COLLAPSED = QuestDockMode.COLLAPSED;
if (value9 === COLLAPSED) {
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = moduleValue2.runOnJS;
value = Reflect.apply(runOnJS, moduleValue2, [setRestingQuestDockMode]);
CLOSED = QuestDockMode.CLOSED;
value(CLOSED);
break reducibleJoin32;
}
}
}
value10 = a0 < value5;
reducibleJoin23: while (true) {
if (value10) {
restingQuestDockModeBinding = restingQuestDockMode;
get = restingQuestDockModeBinding.get;
value11 = Reflect.apply(get, restingQuestDockModeBinding, []);
CLOSED = QuestDockMode.CLOSED;
value12 = value11 === CLOSED;
r2 = value12;
break reducibleJoin23;
}
r2 = value10;
}
value10 = a0 < value5;
reducibleJoin23: while (true) {
if (value10) {
restingQuestDockModeBinding = restingQuestDockMode;
get = restingQuestDockModeBinding.get;
value11 = Reflect.apply(get, restingQuestDockModeBinding, []);
CLOSED = QuestDockMode.CLOSED;
value12 = value11 === CLOSED;
r2 = value12;
break reducibleJoin23;
}
reducibleJoin25: while (true) {
if (r2) {
value13 = value8 >= QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD;
r2 = value13;
break reducibleJoin25;
}
r2 = value10;
break reducibleJoin23;
}
reducibleJoin25: while (true) {
if (r2) {
value13 = value8 >= QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD;
r2 = value13;
break reducibleJoin25;
}
if (r2) {
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = moduleValue.runOnJS;
Reflect.apply(runOnJS, moduleValue, [env0_5])();
break reducibleJoin32;
}
break reducibleJoin25;
}
if (r2) {
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = moduleValue.runOnJS;
Reflect.apply(runOnJS, moduleValue, [QuestDockConstantsModule.QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD])();
break reducibleJoin32;
}
}
restingQuestDockModeBinding = restingQuestDockMode;
get = restingQuestDockModeBinding.get;
value7 = Reflect.apply(get, restingQuestDockModeBinding, []);
CLOSED = QuestDockMode.CLOSED;
if (value7 === CLOSED) {
binding = env1_9;
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = moduleValue3.runOnJS;
if (binding) {
Reflect.apply(runOnJS, moduleValue3, [env0_5])();
break reducibleJoin32;
}
value = Reflect.apply(runOnJS, moduleValue3, [setRestingQuestDockMode]);
COLLAPSED = QuestDockMode.COLLAPSED;
value(COLLAPSED);
break reducibleJoin32;
}
}
Math = global.Math;
abs = Math.abs;
value8 = Reflect.apply(abs, Math, [value5 - a0]);
if (a0 > value5) {
if (a0 > 0) {
if (value5 > 0) {
restingQuestDockModeBinding = restingQuestDockMode;
get = restingQuestDockModeBinding.get;
value9 = Reflect.apply(get, restingQuestDockModeBinding, []);
COLLAPSED = QuestDockMode.COLLAPSED;
if (value9 === COLLAPSED) {
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = moduleValue2.runOnJS;
value = Reflect.apply(runOnJS, moduleValue2, [setRestingQuestDockMode]);
CLOSED = QuestDockMode.CLOSED;
value(CLOSED);
break reducibleJoin32;
}
}
}
}
value10 = a0 < value5;
reducibleJoin23: while (true) {
if (value10) {
restingQuestDockModeBinding = restingQuestDockMode;
get = restingQuestDockModeBinding.get;
value11 = Reflect.apply(get, restingQuestDockModeBinding, []);
CLOSED = QuestDockMode.CLOSED;
value12 = value11 === CLOSED;
r2 = value12;
break reducibleJoin23;
}
r2 = value10;
break reducibleJoin23;
}
reducibleJoin25: while (true) {
if (r2) {
value13 = value8 >= QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD;
r2 = value13;
break reducibleJoin25;
}
break reducibleJoin25;
}
if (r2) {
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = moduleValue.runOnJS;
Reflect.apply(runOnJS, moduleValue, [env0_5])();
break reducibleJoin32;
}
break reducibleJoin32;
}
break reducibleJoin32;
}
}
function _fun103199() { // fn#103199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:4378, offset: 0x0225bcf9, size: 23 bytes, params: 1, frame: 11
env1_8.set(true);
}
global.__d(_fun103187, 13576, [31, 13570, 6528, 13572, 33, 672, 8142, 4017, 13571, 9484, 477,
2]) /* metro module 13576, dependencies: [31, 13570, 6528, 13572, 33, 672, 8142, 4017, 13571, 9484, 477, 2] */;
@@ -1,108 +1,115 @@
/* Metro module 13573; source: modules/quests/native/QuestDock/QuestDockGestureContext.tsx; dependencies: [31, 13570, 6528, 13572, 7553, 33, 8142, 1478, 13574, 4017, 5176, 13571, 1585, 11534, 2] */
import SubscribeToWindowDimensionsNative from '../../../screen/subscribeToWindowDimensions.native.tsx'; /* Metro dependency 11534 */
import QuestDockStore from './QuestDockStore.tsx'; /* Metro dependency 13570 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UseWindowDimensionsNativeModule from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as YouBarExperimentModule from '../../../main_tabs_v2/YouBarExperiment.tsx'; /* Metro dependency 5176 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as YouBarConstantsModule from '../../../main_tabs_v2/native/YouBarConstants.tsx'; /* Metro dependency 7553 */
import * as ReanimatedHelperTypesModule from '../../../reanimated/ReanimatedHelperTypes.tsx'; /* Metro dependency 8142 */
import * as QuestDockUtilsModule from './QuestDockUtils.tsx'; /* Metro dependency 13571 */
import * as QuestDockConstantsModule from './QuestDockConstants.tsx'; /* Metro dependency 13572 */
import * as UseTabsVisibleModule from '../../../main_tabs_v2/native/utils/useTabsVisible.tsx'; /* Metro dependency 13574 */
function _fun103170(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:6, offset: 0x0225add6, size: 404 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const questDockStore = importDefault(13570) /* metro dependency 13570: QuestDockStore */;
const QuestDockMode = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
const env0_6 = questDockConstantsModule.QUEST_DOCK_COLLAPSED_HEIGHT;
const env0_7 = questDockConstantsModule.QUEST_DOCK_EXPANDED_HEIGHT;
const env0_8 = (require(7553) /* metro dependency 7553: YouBarConstants */).useYouBarHorizontalMargin;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
const QuestDockMode = (QuestConstantsModule).QuestDockMode;
const createContext = value.createContext;
object2 = {};
const reanimatedHelperTypesModule = require(8142) /* metro dependency 8142: ReanimatedHelperTypes */;
let createFakeSharedValue = reanimatedHelperTypesModule.createFakeSharedValue;
object2.questDockWrapperSpecs = Reflect.apply(createFakeSharedValue, reanimatedHelperTypesModule, [{'width': 0,
object = {};
let createFakeSharedValue = ReanimatedHelperTypesModule.createFakeSharedValue;
object.questDockWrapperSpecs = Reflect.apply(createFakeSharedValue, ReanimatedHelperTypesModule, [{'width': 0,
'height': 0, 'x': 0, 'y': 0, 'prevDeltaY': 0}]);
object2.windowDimensions = reanimatedHelperTypesModule.createFakeSharedValue({'width': 0, 'height': 0,
object.windowDimensions = ReanimatedHelperTypesModule.createFakeSharedValue({'width': 0, 'height': 0,
'maxContentHeight': 0, 'landscape': false});
const value5 = reanimatedHelperTypesModule;
createFakeSharedValue = value5.createFakeSharedValue;
createFakeSharedValue = ReanimatedHelperTypesModule.createFakeSharedValue;
const COLLAPSED = QuestDockMode.COLLAPSED;
object2.activeQuestDockMode = Reflect.apply(createFakeSharedValue, value5, [COLLAPSED]);
object2.minExpandedContentHeight = reanimatedHelperTypesModule.createFakeSharedValue(0);
const context = Reflect.apply(createContext, value, [object2]);
object.activeQuestDockMode = Reflect.apply(createFakeSharedValue, ReanimatedHelperTypesModule, [COLLAPSED]);
object.minExpandedContentHeight = ReanimatedHelperTypesModule.createFakeSharedValue(0);
const context = Reflect.apply(createContext, value, [object]);
value = value.memo(QuestDockGestureContextProviderInner);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockGestureContext.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockGestureContext.tsx');
exports.QuestDockGestureContext = context;
exports.QuestDockGestureContextProvider = value;
}
function QuestDockGestureContextProviderInner(a0) { // fn#103171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:611, offset: 0x0225af6a, size: 650 bytes, params: 2, frame: 29
var r10;
var r8;
var moduleValue6;
var moduleValue7;
let binding = env0_3;
const useMemo = binding.useMemo;
const getWindowDimensions = (UseWindowDimensionsNativeModule).getWindowDimensions;
const value2 = Reflect.apply(useMemo, binding, [getWindowDimensions, []]);
const value3 = (UseTabsVisibleModule).useMainTabsHeight({'enabled': true,
'ignoreQuestDock': true});
const env0_1 = binding.useRef(value3);
let useSharedValue = ReanimatedRexportModule.useSharedValue;
let width = value2.width;
const value4 = Reflect.apply(useSharedValue, ReanimatedRexportModule, [{width: width, height: value2.height,
landscape: value2.width > value2.height, maxContentHeight: value2.height - value3}]);
const value5 = (YouBarExperimentModule).useYouBarEnabled('QuestDockGestureContext');
const value6 = useYouBarHorizontalMargin();
useSharedValue = ReanimatedRexportModule.useSharedValue;
const getQuestDockCollapsedWidth = QuestDockUtilsModule.getQuestDockCollapsedWidth;
width = value2.width;
if (value5) {
r10 = value6;
} else {
moduleValue6 = require(1585) /* metro dependency 1585: useSafeAreaInsetsNative */;
r10 = moduleValue6.getSafeAreaInsets().left;
}
if (value5) {
r8 = value6;
} else {
moduleValue7 = require(1585) /* metro dependency 1585: useSafeAreaInsetsNative */;
r8 = moduleValue7.getSafeAreaInsets().right;
}
const QUEST_DOCK_COLLAPSED_HEIGHT2 = value5 ? -8 : QUEST_DOCK_COLLAPSED_HEIGHT;
const value8 = Reflect.apply(useSharedValue, ReanimatedRexportModule, [{width: Reflect.apply(getQuestDockCollapsedWidth,
QuestDockUtilsModule, [width, r10, r8]), height: QUEST_DOCK_COLLAPSED_HEIGHT, x: 0,
y: QUEST_DOCK_COLLAPSED_HEIGHT2, prevDeltaY: 0}]);
var env0_3 = value8;
useSharedValue = ReanimatedRexportModule.useSharedValue;
const value9 = Reflect.apply(useSharedValue, ReanimatedRexportModule,
[QuestDockUtilsModule.isSoftDismissed(QuestDockStore.questDockSoftDismissedAt) ? QuestDockMode.SOFT_DISMISSED : QuestDockMode.COLLAPSED]);
const value10 = ReanimatedRexportModule.useSharedValue(QUEST_DOCK_EXPANDED_HEIGHT);
binding = env0_3;
binding.useEffect(_fun103172, [value3]);
binding.useEffect(_fun103173, [value4]);
const value11 = binding.useMemo(_fun103175, [value4, value8, value9, value10]);
const Provider = env0_10.Provider;
return (
<Provider value={value11}>
{a0.children}
</Provider>
);
function _fun103172() { // fn#103172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:1297, offset: 0x00e655cf, size: 21 bytes, params: 1, frame: 2
env0_1.current = env0_0;
}
function _fun103173() { // fn#103173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:1334, offset: 0x0225b1f4, size: 41 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
return (SubscribeToWindowDimensionsNative)(_fun103174);
function _fun103174({width, height}) { // fn#103174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:1348, offset: 0x0225b21d, size: 71 bytes, params: 2, frame: 15
env1_2.set({width: width, height: height, landscape: width > height, maxContentHeight: height - env1_1.current});
}
}
function _fun103175() { // fn#103175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:1466, offset: 0x0225b264, size: 43 bytes, params: 1, frame: 3
return {windowDimensions: env0_2, questDockWrapperSpecs: env0_3, activeQuestDockMode: env0_4,
minExpandedContentHeight: env0_5};
}
function QuestDockGestureContextProviderInner(a0) { // fn#103171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:611, offset: 0x0225af6a, size: 650 bytes, params: 2, frame: 29
var r10;
var r8;
var moduleValue6;
var moduleValue7;
let binding = env0_3;
const useMemo = binding.useMemo;
const getWindowDimensions = (require(1478) /* metro dependency 1478: useWindowDimensionsNative */).getWindowDimensions;
const value2 = Reflect.apply(useMemo, binding, [getWindowDimensions, []]);
const value3 = (require(13574) /* metro dependency 13574: useTabsVisible */).useMainTabsHeight({'enabled': true,
'ignoreQuestDock': true});
const env0_1 = binding.useRef(value3);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useSharedValue = reanimatedRexportModule.useSharedValue;
let width = value2.width;
const value4 = Reflect.apply(useSharedValue, reanimatedRexportModule, [{width: width, height: value2.height,
landscape: value2.width > value2.height, maxContentHeight: value2.height - value3}]);
const value5 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDockGestureContext');
const value6 = useYouBarHorizontalMargin();
const moduleValue4 = reanimatedRexportModule;
useSharedValue = moduleValue4.useSharedValue;
const questDockUtilsModule = require(13571) /* metro dependency 13571: QuestDockUtils */;
const getQuestDockCollapsedWidth = questDockUtilsModule.getQuestDockCollapsedWidth;
width = value2.width;
if (value5) {
r10 = value6;
} else {
moduleValue6 = require(1585) /* metro dependency 1585: useSafeAreaInsetsNative */;
r10 = moduleValue6.getSafeAreaInsets().left;
}
if (value5) {
r8 = value6;
} else {
moduleValue7 = require(1585) /* metro dependency 1585: useSafeAreaInsetsNative */;
r8 = moduleValue7.getSafeAreaInsets().right;
}
const QUEST_DOCK_COLLAPSED_HEIGHT2 = value5 ? -8 : QUEST_DOCK_COLLAPSED_HEIGHT;
const value8 = Reflect.apply(useSharedValue, moduleValue4, [{width: Reflect.apply(getQuestDockCollapsedWidth,
questDockUtilsModule, [width, r10, r8]), height: QUEST_DOCK_COLLAPSED_HEIGHT, x: 0,
y: QUEST_DOCK_COLLAPSED_HEIGHT2, prevDeltaY: 0}]);
var env0_3 = value8;
const moduleValue8 = reanimatedRexportModule;
useSharedValue = moduleValue8.useSharedValue;
const moduleValue9 = questDockUtilsModule;
const value9 = Reflect.apply(useSharedValue, moduleValue8,
[moduleValue9.isSoftDismissed(QuestDockStore.questDockSoftDismissedAt) ? QuestDockMode.SOFT_DISMISSED : QuestDockMode.COLLAPSED]);
const value10 = reanimatedRexportModule.useSharedValue(QUEST_DOCK_EXPANDED_HEIGHT);
binding = env0_3;
binding.useEffect(_fun103172, [value3]);
binding.useEffect(_fun103173, [value4]);
const value11 = binding.useMemo(_fun103175, [value4, value8, value9, value10]);
const Provider = env0_10.Provider;
return (
<Provider value={value11}>
{a0.children}
</Provider>
);
}
function _fun103173() { // fn#103173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:1334, offset: 0x0225b1f4, size: 41 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
return (importDefault(11534) /* metro dependency 11534: subscribeToWindowDimensionsNative */)(_fun103174);
}
function _fun103175() { // fn#103175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:1466, offset: 0x0225b264, size: 43 bytes, params: 1, frame: 3
return {windowDimensions: env0_2, questDockWrapperSpecs: env0_3, activeQuestDockMode: env0_4,
minExpandedContentHeight: env0_5};
}
function _fun103174({width, height}) { // fn#103174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:1348, offset: 0x0225b21d, size: 71 bytes, params: 2, frame: 15
env1_2.set({width: width, height: height, landscape: width > height, maxContentHeight: height - env1_1.current});
}
global.__d(_fun103170, 13573, [31, 13570, 6528, 13572, 7553, 33, 8142, 1478, 13574, 4017, 5176, 13571, 1585, 11534,
2]) /* metro module 13573, dependencies: [31, 13570, 6528, 13572, 7553, 33, 8142, 1478, 13574, 4017, 5176, 13571, 1585, 11534, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,13 +1,27 @@
/* Metro module 13569; source: modules/quests/native/QuestDock/QuestDockHooks.tsx; dependencies: [57, 31, 13570, 6528, 13572, 7553, 13573, 13576, 11281, 5176, 4017, 7739, 13571, 566, 672, 9949, 9513, 9519, 9517, 9518, 7121, 7120, 6531, 4080, 13577, 1962, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Durations from '../../../../utils/Durations.tsx'; /* Metro dependency 672 */
import UseSafeAreaInsetsSharedValueNative from '../../../safe_area/useSafeAreaInsetsSharedValue.native.tsx'; /* Metro dependency 11281 */
import QuestDockStore from './QuestDockStore.tsx'; /* Metro dependency 13570 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as YouBarExperimentModule from '../../../main_tabs_v2/YouBarExperiment.tsx'; /* Metro dependency 5176 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as CheapWorkletShallowEqualModule from '../../../reanimated/native/cheapWorkletShallowEqual.tsx'; /* Metro dependency 7739 */
import * as ContentImpressionTrackerHooksModule from '../../lib/analytics/ContentImpressionTrackerHooks.tsx'; /* Metro dependency 9513 */
import * as AnalyticsHooksModule from '../../lib/analytics/AnalyticsHooks.tsx'; /* Metro dependency 9949 */
import * as QuestDockUtilsModule from './QuestDockUtils.tsx'; /* Metro dependency 13571 */
import * as QuestDockConstantsModule from './QuestDockConstants.tsx'; /* Metro dependency 13572 */
import * as QuestDockGestureContextModule from './QuestDockGestureContext.tsx'; /* Metro dependency 13573 */
import * as QuestDockExternalCoordinationContextModule from './QuestDockExternalCoordinationContext.tsx'; /* Metro dependency 13576 */
function _fun103128(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:6, offset: 0x02259705, size: 390 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const questDockStore = importDefault(13570) /* metro dependency 13570: QuestDockStore */;
const env0_6 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
let value = require(13572) /* metro dependency 13572: QuestDockConstants */;
let value = QuestDockConstantsModule;
const env0_7 = value.QUEST_DOCK_CLOSED_HEIGHT;
const env0_8 = value.QUEST_DOCK_COLLAPSED_HEIGHT;
const env0_9 = value.QUEST_DOCK_EXTERNAL_OFFSET_CLOSED;
@@ -23,329 +37,349 @@ function _fun103128(global, require, importDefault, importAll, module, exports,
const env0_18 = value.useYouBarTotalHeight;
object = {code: 'function QuestDockHooksTsx1(){const{restingQuestDockMode,minExpandedContentHeight,windowDimensions,safeArea}=this.__closure;return{restingQuestDockMode:restingQuestDockMode.get(),minExpandedContentHeight:minExpandedContentHeight.get(),windowWidth:windowDimensions.get().width,windowHeight:windowDimensions.get().height,safeArea:safeArea.get()};}'};
object = {code: 'function QuestDockHooksTsx2(props,previous){const{cheapWorkletShallowEqual,QuestDockMode,runOnJS,setRestingQuestDockMode,questDockWrapperSpecs,youBarEnabled,QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED,getQuestDockCollapsedWidth,youBarHorizontalMargin,QUEST_DOCK_COLLAPSED_HEIGHT,activeQuestDockMode,QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED,getQuestDockClosedWidth,QUEST_DOCK_CLOSED_HEIGHT,getQuestDockExpandedHeightLimits,youBarHeight,QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED,getQuestDockExpandedWidth}=this.__closure;var _previous$restingQues;if(cheapWorkletShallowEqual(props,previous!==null&&previous!==void 0?previous:undefined))return;const{restingQuestDockMode:restingQuestDockMode,minExpandedContentHeight:minExpandedContentHeight,windowWidth:windowWidth,windowHeight:windowHeight,safeArea:safeArea}=props;switch(restingQuestDockMode){case QuestDockMode.RESET_TO_PREVIOUS:runOnJS(setRestingQuestDockMode)((_previous$restingQues=previous===null||previous===void 0?void 0:previous.restingQuestDockMode)!==null&&_previous$restingQues!==void 0?_previous$restingQues:QuestDockMode.COLLAPSED);return;case QuestDockMode.COLLAPSED:questDockWrapperSpecs.set({...questDockWrapperSpecs.get(),x:0,y:youBarEnabled?0:QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED*-1,width:getQuestDockCollapsedWidth(windowWidth,youBarEnabled?youBarHorizontalMargin:safeArea.left,youBarEnabled?youBarHorizontalMargin:safeArea.right),height:QUEST_DOCK_COLLAPSED_HEIGHT});activeQuestDockMode.set(QuestDockMode.COLLAPSED);break;case QuestDockMode.CLOSED:case QuestDockMode.SOFT_DISMISSED:questDockWrapperSpecs.set({...questDockWrapperSpecs.get(),x:0,y:youBarEnabled?0:QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED*-1,width:getQuestDockClosedWidth(windowWidth,youBarEnabled?youBarHorizontalMargin:safeArea.left,youBarEnabled?youBarHorizontalMargin:safeArea.right),height:QUEST_DOCK_CLOSED_HEIGHT});activeQuestDockMode.set(restingQuestDockMode);break;case QuestDockMode.EXPANDED:const minContentHeight=minExpandedContentHeight;const{minHeight:minHeight,maxHeight:maxHeight}=getQuestDockExpandedHeightLimits(windowHeight,safeArea.top,minContentHeight);const heightMidpoint=(maxHeight+minHeight)/2;let height;if(questDockWrapperSpecs.get().height<=QUEST_DOCK_COLLAPSED_HEIGHT){height=maxHeight;}else if(previous!=null&&questDockWrapperSpecs.get().height===getQuestDockExpandedHeightLimits(previous.windowHeight,previous.safeArea.top,minContentHeight).maxHeight){height=maxHeight;}else if(questDockWrapperSpecs.get().height>=heightMidpoint){height=maxHeight;}else{height=maxHeight;}questDockWrapperSpecs.set({...questDockWrapperSpecs.get(),x:0,y:youBarHeight>0?youBarHeight:QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED,width:getQuestDockExpandedWidth(windowWidth,safeArea.left,safeArea.right),height:height});activeQuestDockMode.set(QuestDockMode.EXPANDED);break;}}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockHooks.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockHooks.tsx');
exports.useQuestDockModeAnimatedReaction = useQuestDockModeAnimatedReaction;
exports.useQuestDockExternalOffset = useQuestDockExternalOffset;
exports.useQuestDockDismissalReset = useQuestDockDismissalReset;
exports.useActionSheetPressHandler = useActionSheetPressHandler;
}
function useQuestDockModeAnimatedReaction() { // fn#103129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:3948, offset: 0x0225988b, size: 554 bytes, params: 1, frame: 29
let useContext = ReactModule.useContext;
const QuestDockGestureContext = (QuestDockGestureContextModule).QuestDockGestureContext;
const {questDockWrapperSpecs, windowDimensions, activeQuestDockMode,
minExpandedContentHeight} = Reflect.apply(useContext, ReactModule, [QuestDockGestureContext]);
useContext = ReactModule.useContext;
const QuestDockExternalCoordinationContext = (QuestDockExternalCoordinationContextModule).QuestDockExternalCoordinationContext;
const {restingQuestDockMode, setRestingQuestDockMode} = Reflect.apply(useContext, ReactModule,
[QuestDockExternalCoordinationContext]);
const value4 = (UseSafeAreaInsetsSharedValueNative)();
const value5 = useYouBarHorizontalMargin();
const value6 = (YouBarExperimentModule).useYouBarEnabled('QuestDock');
const value7 = useYouBarTotalHeight();
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
const useQuestDockModeAnimatedReactionO2 = useQuestDockModeAnimatedReactionO;
useQuestDockModeAnimatedReactionO2.__closure = {restingQuestDockMode: restingQuestDockMode,
minExpandedContentHeight: minExpandedContentHeight, windowDimensions: windowDimensions, safeArea: value4};
useQuestDockModeAnimatedReactionO2.__workletHash = 9502251090521;
useQuestDockModeAnimatedReactionO2.__initData = env0_19;
const useQuestDockModeAnimatedReactionT2 = useQuestDockModeAnimatedReactionT;
object = {};
object.cheapWorkletShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletShallowEqual;
object.QuestDockMode = QuestDockMode;
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.setRestingQuestDockMode = setRestingQuestDockMode;
object.questDockWrapperSpecs = questDockWrapperSpecs;
object.youBarEnabled = value6;
object.QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED = QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED;
const getQuestDockCollapsedWidth = (QuestDockUtilsModule).getQuestDockCollapsedWidth;
object.getQuestDockCollapsedWidth = getQuestDockCollapsedWidth;
object.youBarHorizontalMargin = value5;
object.QUEST_DOCK_COLLAPSED_HEIGHT = QUEST_DOCK_COLLAPSED_HEIGHT;
object.activeQuestDockMode = activeQuestDockMode;
object.QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED = QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED;
const getQuestDockClosedWidth = (QuestDockUtilsModule).getQuestDockClosedWidth;
object.getQuestDockClosedWidth = getQuestDockClosedWidth;
object.QUEST_DOCK_CLOSED_HEIGHT = QUEST_DOCK_CLOSED_HEIGHT;
const getQuestDockExpandedHeightLimits = (QuestDockUtilsModule).getQuestDockExpandedHeightLimits;
object.getQuestDockExpandedHeightLimits = getQuestDockExpandedHeightLimits;
object.youBarHeight = value7;
object.QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED = QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED;
const getQuestDockExpandedWidth = (QuestDockUtilsModule).getQuestDockExpandedWidth;
object.getQuestDockExpandedWidth = getQuestDockExpandedWidth;
useQuestDockModeAnimatedReactionT2.__closure = object;
useQuestDockModeAnimatedReactionT2.__workletHash = 9030555854984;
useQuestDockModeAnimatedReactionT2.__initData = env0_20;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [useQuestDockModeAnimatedReactionO2,
useQuestDockModeAnimatedReactionT2]);
function useQuestDockModeAnimatedReactionO() { // fn#103130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:4359, owner: useQuestDockModeAnimatedReaction.o, offset: 0x02259ab5, size: 103 bytes, params: 1, frame: 11
const object = {};
const restingQuestDockModeBinding = restingQuestDockMode;
let get = restingQuestDockModeBinding.get;
object.restingQuestDockMode = Reflect.apply(get, restingQuestDockModeBinding, []);
object.minExpandedContentHeight = minExpandedContentHeight.get();
const windowDimensionsBinding = windowDimensions;
get = windowDimensionsBinding.get;
object.windowWidth = Reflect.apply(get, windowDimensionsBinding, []).width;
get = windowDimensionsBinding.get;
object.windowHeight = Reflect.apply(get, windowDimensionsBinding, []).height;
object.safeArea = QuestConstantsModule.QuestDockMode.get();
return object;
}
function useQuestDockModeAnimatedReaction() { // fn#103129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:3948, offset: 0x0225988b, size: 554 bytes, params: 1, frame: 29
var object2;
const binding = env0_4;
let useContext = binding.useContext;
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
const {questDockWrapperSpecs, windowDimensions, activeQuestDockMode,
minExpandedContentHeight} = Reflect.apply(useContext, binding, [QuestDockGestureContext]);
useContext = binding.useContext;
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
const {restingQuestDockMode, setRestingQuestDockMode} = Reflect.apply(useContext, binding,
[QuestDockExternalCoordinationContext]);
const value4 = (importDefault(11281) /* metro dependency 11281: useSafeAreaInsetsSharedValueNative */)();
const value5 = useYouBarHorizontalMargin();
const value6 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDock');
const value7 = useYouBarTotalHeight();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
const closure = useQuestDockModeAnimatedReactionO;
closure.__closure = {restingQuestDockMode: restingQuestDockMode, minExpandedContentHeight: minExpandedContentHeight,
windowDimensions: windowDimensions, safeArea: value4};
closure.__workletHash = 9502251090521;
closure.__initData = env0_19;
const closure2 = useQuestDockModeAnimatedReactionT;
object2 = {};
object2.cheapWorkletShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletShallowEqual;
object2.QuestDockMode = QuestDockMode;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.setRestingQuestDockMode = setRestingQuestDockMode;
object2.questDockWrapperSpecs = questDockWrapperSpecs;
object2.youBarEnabled = value6;
object2.QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED = QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED;
const getQuestDockCollapsedWidth = (require(13571) /* metro dependency 13571: QuestDockUtils */).getQuestDockCollapsedWidth;
object2.getQuestDockCollapsedWidth = getQuestDockCollapsedWidth;
object2.youBarHorizontalMargin = value5;
object2.QUEST_DOCK_COLLAPSED_HEIGHT = QUEST_DOCK_COLLAPSED_HEIGHT;
object2.activeQuestDockMode = activeQuestDockMode;
object2.QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED = QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED;
const getQuestDockClosedWidth = (require(13571) /* metro dependency 13571: QuestDockUtils */).getQuestDockClosedWidth;
object2.getQuestDockClosedWidth = getQuestDockClosedWidth;
object2.QUEST_DOCK_CLOSED_HEIGHT = QUEST_DOCK_CLOSED_HEIGHT;
const getQuestDockExpandedHeightLimits = (require(13571) /* metro dependency 13571: QuestDockUtils */).getQuestDockExpandedHeightLimits;
object2.getQuestDockExpandedHeightLimits = getQuestDockExpandedHeightLimits;
object2.youBarHeight = value7;
object2.QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED = QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED;
const getQuestDockExpandedWidth = (require(13571) /* metro dependency 13571: QuestDockUtils */).getQuestDockExpandedWidth;
object2.getQuestDockExpandedWidth = getQuestDockExpandedWidth;
closure2.__closure = object2;
closure2.__workletHash = 9030555854984;
closure2.__initData = env0_20;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
}
function useQuestDockExternalOffset() { // fn#103132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:6415, offset: 0x02259eef, size: 165 bytes, params: 1, frame: 18
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
const value3 = env0_3(Reflect.apply(useStateFromStoresArray, fluxModule, [[QuestDockStore], function() {
return [QuestDockStore.prevRestingQuestDockMode, QuestDockStore.isEligibleToBeVisible];
}]), 2);
return env0_4.useMemo(_fun103134, [value3[1], value3[0],
(require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDock')]);
}
function useQuestDockDismissalReset() { // fn#103135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:6830, offset: 0x0225a032, size: 129 bytes, params: 1, frame: 17
const binding = env0_4;
let useContext = binding.useContext;
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
const setRestingQuestDockMode = Reflect.apply(useContext, binding,
[QuestDockExternalCoordinationContext]).setRestingQuestDockMode;
useContext = binding.useContext;
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
binding.useEffect(function() {
var closure = _fun103137;
closure();
var setInterval = global.setInterval;
var MINUTE = importDefault(dependencyMap[14]).Millis.MINUTE;
var env0_0 = setInterval(closure, 5 * MINUTE);
return _fun103138;
}, [setRestingQuestDockMode, Reflect.apply(useContext, binding, [QuestDockGestureContext]).activeQuestDockMode]);
}
function useActionSheetPressHandler(a0) { // fn#103139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:7337, offset: 0x0225a172, size: 114 bytes, params: 2, frame: 17
const env0_0 = a0;
return env0_4.useCallback(_fun103140, [a0,
(require(9949) /* metro dependency 9949: AnalyticsHooks */).useTrackQuestContentClickedWithImpression(),
(require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId()]);
}
function useQuestDockModeAnimatedReactionO() { // fn#103130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:4359, owner: useQuestDockModeAnimatedReaction.o, offset: 0x02259ab5, size: 103 bytes, params: 1, frame: 11
const object2 = {};
const restingQuestDockModeBinding = restingQuestDockMode;
let get = restingQuestDockModeBinding.get;
object2.restingQuestDockMode = Reflect.apply(get, restingQuestDockModeBinding, []);
object2.minExpandedContentHeight = minExpandedContentHeight.get();
const windowDimensionsBinding = windowDimensions;
get = windowDimensionsBinding.get;
object2.windowWidth = Reflect.apply(get, windowDimensionsBinding, []).width;
get = windowDimensionsBinding.get;
object2.windowHeight = Reflect.apply(get, windowDimensionsBinding, []).height;
object2.safeArea = env0_6.get();
return object2;
}
function useQuestDockModeAnimatedReactionT(a0, a1) { // fn#103131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:4645, owner: useQuestDockModeAnimatedReaction.t, offset: 0x02259b1c, size: 979 bytes, params: 3, frame: 28
var r7;
var r11;
var moduleValue2;
var value4;
var maxHeight;
var questDockWrapperSpecsBinding;
var get;
var height;
var value6;
var value7;
var moduleValue3;
var set;
var object2;
var value8;
var moduleValue4;
var getQuestDockClosedWidth;
var value11;
var moduleValue5;
var moduleValue6;
let value = a1;
const value3 = undefined;
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
const cheapWorkletShallowEqual = cheapWorkletShallowEqualModule.cheapWorkletShallowEqual;
let r2 = value ?? value3;
if (!Reflect.apply(cheapWorkletShallowEqual, cheapWorkletShallowEqualModule, [a0, r2])) {
var restingQuestDockMode = a0.restingQuestDockMode;
var minExpandedContentHeight = a0.minExpandedContentHeight;
var windowWidth = a0.windowWidth;
var windowHeight = a0.windowHeight;
var safeArea = a0.safeArea;
var RESET_TO_PREVIOUS = QuestDockMode.RESET_TO_PREVIOUS;
if (RESET_TO_PREVIOUS === restingQuestDockMode) {
moduleValue6 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue6.runOnJS(setRestingQuestDockMode)((value == null ? value3 : value.restingQuestDockMode) ?? QuestDockMode.COLLAPSED);
function useQuestDockModeAnimatedReactionT(a0, a1) { // fn#103131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:4645, owner: useQuestDockModeAnimatedReaction.t, offset: 0x02259b1c, size: 979 bytes, params: 3, frame: 28
var r7;
var r11;
var moduleValue2;
var value4;
var maxHeight;
var questDockWrapperSpecsBinding;
var get;
var height;
var value6;
var value7;
var moduleValue3;
var set;
var object;
var value8;
var moduleValue4;
var getQuestDockClosedWidth;
var value11;
var moduleValue5;
var moduleValue6;
let value = a1;
const value3 = undefined;
const cheapWorkletShallowEqual = CheapWorkletShallowEqualModule.cheapWorkletShallowEqual;
let r2 = value ?? value3;
if (!Reflect.apply(cheapWorkletShallowEqual, CheapWorkletShallowEqualModule, [a0, r2])) {
var restingQuestDockMode = a0.restingQuestDockMode;
var minExpandedContentHeight = a0.minExpandedContentHeight;
var windowWidth = a0.windowWidth;
var windowHeight = a0.windowHeight;
var safeArea = a0.safeArea;
var RESET_TO_PREVIOUS = QuestDockMode.RESET_TO_PREVIOUS;
if (RESET_TO_PREVIOUS === restingQuestDockMode) {
moduleValue6 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue6.runOnJS(setRestingQuestDockMode)((value == null ? value3 : value.restingQuestDockMode) ?? QuestDockMode.COLLAPSED);
return value3;
}
var COLLAPSED = QuestDockMode.COLLAPSED;
if (COLLAPSED === restingQuestDockMode) {
questDockWrapperSpecsBinding = questDockWrapperSpecs;
set = questDockWrapperSpecsBinding.set;
object = {};
copyDataProperties(object, questDockWrapperSpecsBinding.get(), undefined);
value11 = 0;
object['x'] = value11;
object['y'] = env0_8 ? value11 : -1 * QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED;
moduleValue5 = require(13571) /* metro dependency 13571: QuestDockUtils */;
object['width'] = moduleValue5.getQuestDockCollapsedWidth(windowWidth, env0_8 ? env0_7 : safeArea.left,
env0_8 ? env0_7 : safeArea.right);
object['height'] = QUEST_DOCK_COLLAPSED_HEIGHT;
Reflect.apply(set, questDockWrapperSpecsBinding, [object]);
activeQuestDockMode.set(QuestDockMode.COLLAPSED);
} else if (QuestDockMode.CLOSED === restingQuestDockMode) {
questDockWrapperSpecsBinding = questDockWrapperSpecs;
set = questDockWrapperSpecsBinding.set;
object = {};
copyDataProperties(object, questDockWrapperSpecsBinding.get(), undefined);
value8 = 0;
object['x'] = value8;
r11 = env0_8 ? value8 : -1 * QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED;
object['y'] = r11;
moduleValue4 = require(13571) /* metro dependency 13571: QuestDockUtils */;
getQuestDockClosedWidth = moduleValue4.getQuestDockClosedWidth;
r11 = env0_8 ? env0_7 : safeArea.left;
object['width'] = Reflect.apply(getQuestDockClosedWidth, moduleValue4, [windowWidth, r11,
env0_8 ? env0_7 : safeArea.right]);
object['height'] = QUEST_DOCK_CLOSED_HEIGHT;
Reflect.apply(set, questDockWrapperSpecsBinding, [object]);
activeQuestDockMode.set(restingQuestDockMode);
} else if (QuestDockMode.SOFT_DISMISSED === restingQuestDockMode) {
questDockWrapperSpecsBinding = questDockWrapperSpecs;
set = questDockWrapperSpecsBinding.set;
object = {};
copyDataProperties(object, questDockWrapperSpecsBinding.get(), undefined);
value8 = 0;
object['x'] = value8;
r11 = env0_8 ? value8 : -1 * QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED;
object['y'] = r11;
moduleValue4 = require(13571) /* metro dependency 13571: QuestDockUtils */;
getQuestDockClosedWidth = moduleValue4.getQuestDockClosedWidth;
r11 = env0_8 ? env0_7 : safeArea.left;
object['width'] = Reflect.apply(getQuestDockClosedWidth, moduleValue4, [windowWidth, r11,
env0_8 ? env0_7 : safeArea.right]);
object['height'] = QUEST_DOCK_CLOSED_HEIGHT;
Reflect.apply(set, questDockWrapperSpecsBinding, [object]);
activeQuestDockMode.set(restingQuestDockMode);
} else if (QuestDockMode.EXPANDED === restingQuestDockMode) {
moduleValue2 = require(13571) /* metro dependency 13571: QuestDockUtils */;
value4 = moduleValue2.getQuestDockExpandedHeightLimits(windowHeight, safeArea.top,
minExpandedContentHeight);
value4.minHeight;
maxHeight = value4.maxHeight;
questDockWrapperSpecsBinding = questDockWrapperSpecs;
get = questDockWrapperSpecsBinding.get;
height = Reflect.apply(get, questDockWrapperSpecsBinding, []).height;
value6 = height <= QUEST_DOCK_COLLAPSED_HEIGHT;
if (value6) {
r2 = value6;
} else {
value7 = value != null;
if (value7) {
questDockWrapperSpecsBinding = questDockWrapperSpecs;
height = questDockWrapperSpecsBinding.get().height;
moduleValue3 = require(13571) /* metro dependency 13571: QuestDockUtils */;
value = height === moduleValue3.getQuestDockExpandedHeightLimits(value.windowHeight,
value.safeArea.top,
minExpandedContentHeight).maxHeight;
r7 = value;
} else {
r7 = value7;
}
r2 = r7;
}
if (!r2) {
questDockWrapperSpecsBinding = questDockWrapperSpecs;
questDockWrapperSpecsBinding.get().height;
}
questDockWrapperSpecsBinding = questDockWrapperSpecs;
set = questDockWrapperSpecsBinding.set;
object = {};
get = questDockWrapperSpecsBinding.get;
copyDataProperties(object, Reflect.apply(get, questDockWrapperSpecsBinding, []), undefined);
object['x'] = 0;
object['y'] = env0_9 > 0 ? env0_9 : QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED;
value = require(13571) /* metro dependency 13571: QuestDockUtils */;
value = value.getQuestDockExpandedWidth(windowWidth, safeArea.left, safeArea.right);
object['width'] = value;
object['height'] = maxHeight;
Reflect.apply(set, questDockWrapperSpecsBinding, [object]);
activeQuestDockMode.set(QuestDockMode.EXPANDED);
}
}
return value3;
}
var COLLAPSED = QuestDockMode.COLLAPSED;
if (COLLAPSED === restingQuestDockMode) {
questDockWrapperSpecsBinding = questDockWrapperSpecs;
set = questDockWrapperSpecsBinding.set;
object2 = {};
copyDataProperties(object2, questDockWrapperSpecsBinding.get(), undefined);
value11 = 0;
object2['x'] = value11;
object2['y'] = env0_8 ? value11 : -1 * QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED;
moduleValue5 = require(13571) /* metro dependency 13571: QuestDockUtils */;
object2['width'] = moduleValue5.getQuestDockCollapsedWidth(windowWidth, env0_8 ? env0_7 : safeArea.left,
env0_8 ? env0_7 : safeArea.right);
object2['height'] = QUEST_DOCK_COLLAPSED_HEIGHT;
Reflect.apply(set, questDockWrapperSpecsBinding, [object2]);
activeQuestDockMode.set(QuestDockMode.COLLAPSED);
} else if (QuestDockMode.CLOSED === restingQuestDockMode) {
questDockWrapperSpecsBinding = questDockWrapperSpecs;
set = questDockWrapperSpecsBinding.set;
object2 = {};
copyDataProperties(object2, questDockWrapperSpecsBinding.get(), undefined);
value8 = 0;
object2['x'] = value8;
r11 = env0_8 ? value8 : -1 * QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED;
object2['y'] = r11;
moduleValue4 = require(13571) /* metro dependency 13571: QuestDockUtils */;
getQuestDockClosedWidth = moduleValue4.getQuestDockClosedWidth;
r11 = env0_8 ? env0_7 : safeArea.left;
object2['width'] = Reflect.apply(getQuestDockClosedWidth, moduleValue4, [windowWidth, r11,
env0_8 ? env0_7 : safeArea.right]);
object2['height'] = QUEST_DOCK_CLOSED_HEIGHT;
Reflect.apply(set, questDockWrapperSpecsBinding, [object2]);
activeQuestDockMode.set(restingQuestDockMode);
} else if (QuestDockMode.SOFT_DISMISSED === restingQuestDockMode) {
questDockWrapperSpecsBinding = questDockWrapperSpecs;
set = questDockWrapperSpecsBinding.set;
object2 = {};
copyDataProperties(object2, questDockWrapperSpecsBinding.get(), undefined);
value8 = 0;
object2['x'] = value8;
r11 = env0_8 ? value8 : -1 * QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED;
object2['y'] = r11;
moduleValue4 = require(13571) /* metro dependency 13571: QuestDockUtils */;
getQuestDockClosedWidth = moduleValue4.getQuestDockClosedWidth;
r11 = env0_8 ? env0_7 : safeArea.left;
object2['width'] = Reflect.apply(getQuestDockClosedWidth, moduleValue4, [windowWidth, r11,
env0_8 ? env0_7 : safeArea.right]);
object2['height'] = QUEST_DOCK_CLOSED_HEIGHT;
Reflect.apply(set, questDockWrapperSpecsBinding, [object2]);
activeQuestDockMode.set(restingQuestDockMode);
} else if (QuestDockMode.EXPANDED === restingQuestDockMode) {
moduleValue2 = require(13571) /* metro dependency 13571: QuestDockUtils */;
value4 = moduleValue2.getQuestDockExpandedHeightLimits(windowHeight, safeArea.top,
minExpandedContentHeight);
value4.minHeight;
maxHeight = value4.maxHeight;
questDockWrapperSpecsBinding = questDockWrapperSpecs;
get = questDockWrapperSpecsBinding.get;
height = Reflect.apply(get, questDockWrapperSpecsBinding, []).height;
value6 = height <= QUEST_DOCK_COLLAPSED_HEIGHT;
if (value6) {
r2 = value6;
} else {
value7 = value != null;
if (value7) {
questDockWrapperSpecsBinding = questDockWrapperSpecs;
height = questDockWrapperSpecsBinding.get().height;
moduleValue3 = require(13571) /* metro dependency 13571: QuestDockUtils */;
value = height === moduleValue3.getQuestDockExpandedHeightLimits(value.windowHeight,
value.safeArea.top,
minExpandedContentHeight).maxHeight;
r7 = value;
} else {
r7 = value7;
}
function useQuestDockExternalOffset() { // fn#103132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:6415, offset: 0x02259eef, size: 165 bytes, params: 1, frame: 18
const useStateFromStoresArray = FluxModule.useStateFromStoresArray;
const value3 = Module00057(Reflect.apply(useStateFromStoresArray, FluxModule, [[QuestDockStore], function() {
var questDockStoreBinding = QuestDockStore;
return [questDockStoreBinding.prevRestingQuestDockMode, questDockStoreBinding.isEligibleToBeVisible];
}]), 2);
return ReactModule.useMemo(_fun103134, [value3[1], value3[0],
(YouBarExperimentModule).useYouBarEnabled('QuestDock')]);
function _fun103134() { // fn#103134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:6637, offset: 0x02259fb5, size: 125 bytes, params: 1, frame: 4
var binding;
var value2;
if (env0_1) {
binding = env0_0;
value2 = environment.__proto__;
if (QuestDockMode.COLLAPSED === binding) {
return env0_2 ? QUEST_DOCK_EXTERNAL_OFFSET_COLLAPSED_WITH_YOU_BAR : QUEST_DOCK_EXTERNAL_OFFSET_COLLAPSED;
}
if (QuestDockMode.EXPANDED === binding) {
return env0_2 ? QUEST_DOCK_EXTERNAL_OFFSET_EXPANDED_WITH_YOU_BAR : QUEST_DOCK_EXTERNAL_OFFSET_EXPANDED;
}
if (QuestDockMode.CLOSED === binding) {
return QUEST_DOCK_EXTERNAL_OFFSET_CLOSED;
}
if (QuestDockMode.SOFT_DISMISSED === binding) {
return QUEST_DOCK_EXTERNAL_OFFSET_CLOSED;
}
r2 = r7;
}
if (!r2) {
questDockWrapperSpecsBinding = questDockWrapperSpecs;
questDockWrapperSpecsBinding.get().height;
return 0;
}
}
function useQuestDockDismissalReset() { // fn#103135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:6830, offset: 0x0225a032, size: 129 bytes, params: 1, frame: 17
let useContext = ReactModule.useContext;
const QuestDockExternalCoordinationContext = (QuestDockExternalCoordinationContextModule).QuestDockExternalCoordinationContext;
const setRestingQuestDockMode = Reflect.apply(useContext, ReactModule,
[QuestDockExternalCoordinationContext]).setRestingQuestDockMode;
useContext = ReactModule.useContext;
const QuestDockGestureContext = (QuestDockGestureContextModule).QuestDockGestureContext;
ReactModule.useEffect(function() {
var closure = _fun103137;
closure();
var setInterval = global.setInterval;
var MINUTE = importDefault(dependencyMap[14]).Millis.MINUTE;
var env0_0 = setInterval(closure, 5 * MINUTE);
return _fun103138;
}, [setRestingQuestDockMode, Reflect.apply(useContext, ReactModule, [QuestDockGestureContext]).activeQuestDockMode]);
function _fun103136() { // fn#103136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:7038, offset: 0x0225a0b3, size: 84 bytes, params: 1, frame: 16
const closure = function() {
if (!(activeQuestDockMode.get() !== QuestDockMode.SOFT_DISMISSED || require(dependencyMap[12]).isSoftDismissed(QuestDockStore.questDockSoftDismissedAt))) {
setRestingQuestDockMode(QuestDockMode.COLLAPSED);
}
};
closure();
const setInterval = global.setInterval;
const Millis = (Durations).Millis;
const MINUTE = Millis.MINUTE;
const env0_0 = setInterval(closure, 5 * MINUTE);
return _fun103138;
function maybeResetSoftDismissal() { // fn#103137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:7043, offset: 0x0225a107, size: 107 bytes, params: 1, frame: 14
var r2;
var moduleValue;
const value2 = activeQuestDockMode.get();
const SOFT_DISMISSED = QuestDockMode.SOFT_DISMISSED;
const value4 = value2 !== SOFT_DISMISSED;
if (value4) {
r2 = value4;
} else {
moduleValue = require(13571) /* metro dependency 13571: QuestDockUtils */;
r2 = moduleValue.isSoftDismissed(QuestDockStore.questDockSoftDismissedAt);
}
if (!r2) {
setRestingQuestDockMode(QuestDockMode.COLLAPSED);
}
}
questDockWrapperSpecsBinding = questDockWrapperSpecs;
set = questDockWrapperSpecsBinding.set;
object2 = {};
get = questDockWrapperSpecsBinding.get;
copyDataProperties(object2, Reflect.apply(get, questDockWrapperSpecsBinding, []), undefined);
object2['x'] = 0;
object2['y'] = env0_9 > 0 ? env0_9 : QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED;
value = require(13571) /* metro dependency 13571: QuestDockUtils */;
value = value.getQuestDockExpandedWidth(windowWidth, safeArea.left, safeArea.right);
object2['width'] = value;
object2['height'] = maxHeight;
Reflect.apply(set, questDockWrapperSpecsBinding, [object2]);
activeQuestDockMode.set(QuestDockMode.EXPANDED);
function _fun103138() { // fn#103138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:7275, offset: 0x01f6d8c0, size: 24 bytes, params: 1, frame: 11
global.clearInterval(env0_0);
}
}
}
return value3;
}
function _fun103134() { // fn#103134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:6637, offset: 0x02259fb5, size: 125 bytes, params: 1, frame: 4
var binding;
var value2;
if (env0_1) {
binding = env0_0;
value2 = environment.__proto__;
if (QuestDockMode.COLLAPSED === binding) {
return env0_2 ? QUEST_DOCK_EXTERNAL_OFFSET_COLLAPSED_WITH_YOU_BAR : QUEST_DOCK_EXTERNAL_OFFSET_COLLAPSED;
}
if (QuestDockMode.EXPANDED === binding) {
return env0_2 ? QUEST_DOCK_EXTERNAL_OFFSET_EXPANDED_WITH_YOU_BAR : QUEST_DOCK_EXTERNAL_OFFSET_EXPANDED;
}
if (QuestDockMode.CLOSED === binding) {
return QUEST_DOCK_EXTERNAL_OFFSET_CLOSED;
}
if (QuestDockMode.SOFT_DISMISSED === binding) {
return QUEST_DOCK_EXTERNAL_OFFSET_CLOSED;
function useActionSheetPressHandler(a0) { // fn#103139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:7337, offset: 0x0225a172, size: 114 bytes, params: 2, frame: 17
const env0_0 = a0;
return ReactModule.useCallback(_fun103140, [a0,
(AnalyticsHooksModule).useTrackQuestContentClickedWithImpression(),
(ContentImpressionTrackerHooksModule).useQuestImpressionId()]);
function _fun103140() { // fn#103140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:7491, offset: 0x0225a1e4, size: 484 bytes, params: 1, frame: 20
var binding;
var object;
const QuestContent = require(dependencyMap[22]).QuestContent;
var QUEST_BAR_MOBILE;
const QuestContentCTA = require(dependencyMap[21]).QuestContentCTA;
var moduleValue2;
var captureAdUserAction;
let value = environment.__proto__;
const moduleValue = require(dependencyMap[17]);
const shouldMigrateToAdAnalyticsInterface = moduleValue.shouldMigrateToAdAnalyticsInterface;
const AdAnalyticsInterfaceExperimentStep = require(dependencyMap[17]).AdAnalyticsInterfaceExperimentStep;
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
if (Reflect.apply(shouldMigrateToAdAnalyticsInterface, moduleValue, [STEP_2_CLICKED_INTERNAL,
'quest_dock_action_sheet'])) {
moduleValue2 = require(dependencyMap[18]);
captureAdUserAction = moduleValue2.captureAdUserAction;
object = {};
object.type = require(dependencyMap[19]).AdUserActionType.CLICK_INTERNAL;
object.adCreativeType = require(dependencyMap[20]).AdCreativeType.QUEST;
object.adCreativeId = env0_0.id;
object.questContentCTA = QuestContentCTA.OPEN_CONTEXT_MENU;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object.surfaceId = QUEST_BAR_MOBILE;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object.sourceQuestContent = QUEST_BAR_MOBILE;
object.impressionId = env0_2;
Reflect.apply(captureAdUserAction, moduleValue2, [object]);
} else {
binding = env0_1;
object = {};
object.questId = env0_0.id;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object.questContent = QUEST_BAR_MOBILE;
object.questContentCTA = QuestContentCTA.OPEN_CONTEXT_MENU;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object.sourceQuestContent = QUEST_BAR_MOBILE;
binding(object);
}
const defaultImport = importDefault(dependencyMap[23]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[25]);
value = value(dependencyMap[24], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'QuestDockContextMenuActionSheet', {quest: env0_0}]);
}
}
return 0;
}
function _fun103136() { // fn#103136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:7038, offset: 0x0225a0b3, size: 84 bytes, params: 1, frame: 16
const closure = function() {
if (!(activeQuestDockMode.get() !== QuestDockMode.SOFT_DISMISSED || require(dependencyMap[12]).isSoftDismissed(QuestDockStore.questDockSoftDismissedAt))) {
setRestingQuestDockMode(QuestDockMode.COLLAPSED);
}
};
closure();
const setInterval = global.setInterval;
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const MINUTE = Millis.MINUTE;
const env0_0 = setInterval(closure, 5 * MINUTE);
return _fun103138;
}
function _fun103140() { // fn#103140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:7491, offset: 0x0225a1e4, size: 484 bytes, params: 1, frame: 20
var binding;
var object2;
const QuestContent = require(dependencyMap[22]).QuestContent;
var QUEST_BAR_MOBILE;
const QuestContentCTA = require(dependencyMap[21]).QuestContentCTA;
var moduleValue2;
var captureAdUserAction;
let value = environment.__proto__;
const moduleValue = require(dependencyMap[17]);
const shouldMigrateToAdAnalyticsInterface = moduleValue.shouldMigrateToAdAnalyticsInterface;
const AdAnalyticsInterfaceExperimentStep = require(dependencyMap[17]).AdAnalyticsInterfaceExperimentStep;
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
if (Reflect.apply(shouldMigrateToAdAnalyticsInterface, moduleValue, [STEP_2_CLICKED_INTERNAL,
'quest_dock_action_sheet'])) {
moduleValue2 = require(dependencyMap[18]);
captureAdUserAction = moduleValue2.captureAdUserAction;
object2 = {};
object2.type = require(dependencyMap[19]).AdUserActionType.CLICK_INTERNAL;
object2.adCreativeType = require(dependencyMap[20]).AdCreativeType.QUEST;
object2.adCreativeId = env0_0.id;
object2.questContentCTA = QuestContentCTA.OPEN_CONTEXT_MENU;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.surfaceId = QUEST_BAR_MOBILE;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.sourceQuestContent = QUEST_BAR_MOBILE;
object2.impressionId = env0_2;
Reflect.apply(captureAdUserAction, moduleValue2, [object2]);
} else {
binding = env0_1;
object2 = {};
object2.questId = env0_0.id;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.questContent = QUEST_BAR_MOBILE;
object2.questContentCTA = QuestContentCTA.OPEN_CONTEXT_MENU;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.sourceQuestContent = QUEST_BAR_MOBILE;
binding(object2);
}
const defaultImport = importDefault(dependencyMap[23]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[25]);
value = value(dependencyMap[24], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'QuestDockContextMenuActionSheet', {quest: env0_0}]);
}
global.__d(_fun103128, 13569, [57, 31, 13570, 6528, 13572, 7553, 13573, 13576, 11281, 5176, 4017, 7739, 13571, 566,
672, 9949, 9513, 9519, 9517, 9518, 7121, 7120, 6531, 4080, 13577, 1962,
2]) /* metro module 13569, dependencies: [57, 31, 13570, 6528, 13572, 7553, 13573, 13576, 11281, 5176, 4017, 7739, 13571, 566, 672, 9949, 9513, 9519, 9517, 9518, 7121, 7120, 6531, 4080, 13577, 1962, 2] */;
@@ -1,16 +1,20 @@
/* Metro module 13570; source: modules/quests/native/QuestDock/QuestDockStore.tsx; dependencies: [6, 7, 15, 17, 18, 6528, 13571, 566, 694, 2] */
import ClassCallCheck from '../../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
function _fun103141(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13760:6, offset: 0x0225a3c8, size: 353 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const env0_6 = importDefault(15) /* metro dependency 15 */;
const env0_7 = importDefault(17) /* metro dependency 17 */;
const env0_8 = importDefault(18) /* metro dependency 18 */;
const QuestDockMode = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
const QuestDockMode = (QuestConstantsModule).QuestDockMode;
let env0_2 = QuestDockMode.COLLAPSED;
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
let value = _fun103145(PersistedStore);
value.displayName = 'QuestDockStore';
value.persistKey = 'QuestDockStore';
@@ -28,61 +32,79 @@ function _fun103141(global, require, importDefault, importAll, module, exports,
}, QUESTS_DOCK_VISIBILITY_ELIGIBILITY_UPDATE: function(a0) {
env0_10 = a0.isEligibleToBeVisible;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_103142() { // fn#103142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13760:176, offset: 0x0225a529, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_103142() { // fn#103142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13760:176, offset: 0x0225a529, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_103142_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_103142_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun103145(a0) { // fn#103145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13760:441, offset: 0x0225a58b, size: 172 bytes, params: 2, frame: 16
const closure = QuestDockStore;
env0_8(closure, a0);
return env0_5(closure, [{key: 'initialize', value: value_103147}, {key: 'getState', value: value_103148},
{key: 'prevRestingQuestDockMode', get: function() {
return COLLAPSED;
}}, {key: 'questDockSoftDismissedAt', get: get_103150}, {key: 'isEligibleToBeVisible', get: get_103151}]);
}
function _fun103145(a0) { // fn#103145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13760:441, offset: 0x0225a58b, size: 172 bytes, params: 2, frame: 16
const QuestDockStore2 = QuestDockStore;
Inherits(QuestDockStore2, a0);
return CreateClass(QuestDockStore2, [{key: 'initialize', value: value_103147}, {key: 'getState', value: value_103148},
{key: 'prevRestingQuestDockMode', get: function() {
return COLLAPSED;
}}, {key: 'questDockSoftDismissedAt', get: get_103150}, {key: 'isEligibleToBeVisible', get: get_103151}]);
function QuestDockStore() { // fn#103146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13760:453, offset: 0x011c382c, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_4(this, QuestDockStore);
const value3 = env1_7(QuestDockStore);
return env1_6(this, _isNativeReflectConstruct_103142() ? global.Reflect.construct(value3, arguments,
env1_7(this).constructor) : value3.apply(this, arguments));
}
function value_103147(a0) { // fn#103147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13760:741, offset: 0x0225a637, size: 88 bytes, params: 2, frame: 12
var r0;
var questDockSoftDismissedAt;
var value;
if (a0 != null) {
questDockSoftDismissedAt = a0.questDockSoftDismissedAt;
value = environment.__proto__;
r0 = (require(13571) /* metro dependency 13571: QuestDockUtils */).isSoftDismissed(questDockSoftDismissedAt) ? QuestDockMode.SOFT_DISMISSED : QuestDockMode.COLLAPSED;
}
}
function value_103148() { // fn#103148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13760:875, offset: 0x0225a68f, size: 25 bytes, params: 1, frame: 3
return {prevRestingQuestDockMode: COLLAPSED, questDockSoftDismissedAt: env1_3};
}
function get_103150() { // fn#103150, offset: 0x011057d9, size: 9 bytes, params: 1, frame: 1
return env1_3;
}
function get_103151() { // fn#103151, offset: 0x00fbd9ec, size: 9 bytes, params: 1, frame: 1
return env1_10;
}
function value_103147(a0) { // fn#103147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13760:741, offset: 0x0225a637, size: 88 bytes, params: 2, frame: 12
var r0;
var questDockSoftDismissedAt;
var value;
if (a0 != null) {
questDockSoftDismissedAt = a0.questDockSoftDismissedAt;
value = environment.__proto__;
r0 = (require(13571) /* metro dependency 13571: QuestDockUtils */).isSoftDismissed(questDockSoftDismissedAt) ? QuestDockMode.SOFT_DISMISSED : QuestDockMode.COLLAPSED;
}
}
function value_103148() { // fn#103148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13760:875, offset: 0x0225a68f, size: 25 bytes, params: 1, frame: 3
return {prevRestingQuestDockMode: COLLAPSED, questDockSoftDismissedAt: env1_3};
}
global.__d(_fun103141, 13570, [6, 7, 15, 17, 18, 6528, 13571, 566, 694,
2]) /* metro module 13570, dependencies: [6, 7, 15, 17, 18, 6528, 13571, 566, 694, 2] */;
@@ -1,201 +1,222 @@
/* Metro module 13664; source: modules/quests/native/QuestDock/QuestDockUnenrolledBackground.tsx; dependencies: [57, 31, 27, 4502, 6528, 13572, 661, 33, 4501, 13650, 13568, 13573, 13576, 8621, 566, 3860, 697, 674, 4017, 4577, 477, 9480, 8141, 9543, 5475, 4589, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import defaultImport5 from '../../../../by-id/module-04589-LinearGradient.js'; /* Metro dependency 4589 */
import ReanimatedNativeView from '../../../core/native/ReanimatedNativeView.tsx'; /* Metro dependency 8141 */
import UseStateFromSharedValue from '../../../reanimated/native/useStateFromSharedValue.tsx'; /* Metro dependency 8621 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestHooksNativeModule from '../QuestHooks.native.tsx'; /* Metro dependency 13568 */
import * as QuestDockConstantsModule from './QuestDockConstants.tsx'; /* Metro dependency 13572 */
import * as QuestDockGestureContextModule from './QuestDockGestureContext.tsx'; /* Metro dependency 13573 */
import * as QuestDockExternalCoordinationContextModule from './QuestDockExternalCoordinationContext.tsx'; /* Metro dependency 13576 */
function _fun104349(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:6, offset: 0x0229337b, size: 502 bytes, params: 8, frame: 25
var object6;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.AppState;
const StyleSheet = value2.StyleSheet;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_7 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
const QUEST_DOCK_EXPANDED_HEIGHT = questDockConstantsModule.QUEST_DOCK_EXPANDED_HEIGHT;
const env0_8 = questDockConstantsModule.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
const env0_9 = questDockConstantsModule.QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
const env0_10 = (require(661) /* metro dependency 661: Constants */).VerticalGradient;
const value4 = require(33) /* metro dependency 33 */;
const env0_11 = value4.jsx;
const env0_12 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object6 = {};
const object7 = {};
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
object7['right'] = undefined;
object7['bottom'] = undefined;
object7['height'] = QUEST_DOCK_EXPANDED_HEIGHT;
object7['zIndex'] = 1;
object6.backgroundWrapper = object7;
const object8 = {};
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
object8['height'] = QUEST_DOCK_EXPANDED_HEIGHT;
object8['resizeMode'] = 'cover';
object6.backgroundHeroAsset = object8;
const object9 = {};
copyDataProperties(object9, StyleSheet.absoluteFillObject, undefined);
object6.backgroundHeroAssetVideo = object9;
const object10 = {};
copyDataProperties(object10, StyleSheet.absoluteFillObject, undefined);
object10['height'] = QUEST_DOCK_EXPANDED_HEIGHT;
object6.backgroundGradient = object10;
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object6]);
object6 = {code: 'function QuestDockUnenrolledBackgroundTsx1(){const{withSpring,activeQuestDockMode,QuestDockMode,QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED,windowDimensions}=this.__closure;return{transform:[{translateX:withSpring(activeQuestDockMode.get()===QuestDockMode.COLLAPSED?QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED*-1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)},{translateY:withSpring(activeQuestDockMode.get()===QuestDockMode.COLLAPSED?QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED*-1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)}],width:windowDimensions.get().width};}'};
object6 = {code: 'function QuestDockUnenrolledBackgroundTsx2(){const{withSpring,activeQuestDockMode,QuestDockMode,videoLoaded,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED}=this.__closure;return{opacity:withSpring(activeQuestDockMode.get()!==QuestDockMode.EXPANDED||!videoLoaded?1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)};}'};
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const QUEST_DOCK_EXPANDED_HEIGHT = QuestDockConstantsModule.QUEST_DOCK_EXPANDED_HEIGHT;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['right'] = undefined;
object2['bottom'] = undefined;
object2['height'] = QUEST_DOCK_EXPANDED_HEIGHT;
object2['zIndex'] = 1;
object.backgroundWrapper = object2;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['height'] = QUEST_DOCK_EXPANDED_HEIGHT;
object3['resizeMode'] = 'cover';
object.backgroundHeroAsset = object3;
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
object.backgroundHeroAssetVideo = object4;
const object5 = {};
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
object5['height'] = QUEST_DOCK_EXPANDED_HEIGHT;
object.backgroundGradient = object5;
const env0_13 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: 'function QuestDockUnenrolledBackgroundTsx1(){const{withSpring,activeQuestDockMode,QuestDockMode,QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED,windowDimensions}=this.__closure;return{transform:[{translateX:withSpring(activeQuestDockMode.get()===QuestDockMode.COLLAPSED?QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED*-1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)},{translateY:withSpring(activeQuestDockMode.get()===QuestDockMode.COLLAPSED?QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED*-1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)}],width:windowDimensions.get().width};}'};
object = {code: 'function QuestDockUnenrolledBackgroundTsx2(){const{withSpring,activeQuestDockMode,QuestDockMode,videoLoaded,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED}=this.__closure;return{opacity:withSpring(activeQuestDockMode.get()!==QuestDockMode.EXPANDED||!videoLoaded?1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)};}'};
value = value.memo(QuestDockUnenrolledBackground);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockUnenrolledBackground.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockUnenrolledBackground.tsx');
exports.default = value;
}
function QuestDockUnenrolledBackground() { // fn#104350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:1604, offset: 0x02293571, size: 1273 bytes, params: 1, frame: 35
var moduleValue5;
let binding = env0_4;
let useContext = binding.useContext;
const quest = Reflect.apply(useContext, binding,
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
const styles = useStyles();
const {staticUrl,
videoAsset} = (QuestHooksNativeModule).useQuestDockHeroAsset(quest);
useContext = binding.useContext;
const QuestDockGestureContext = (QuestDockGestureContextModule).QuestDockGestureContext;
const {activeQuestDockMode, windowDimensions} = Reflect.apply(useContext, binding, [QuestDockGestureContext]);
useContext = binding.useContext;
const QuestDockExternalCoordinationContext = (QuestDockExternalCoordinationContextModule).QuestDockExternalCoordinationContext;
const setRestingQuestDockMode = Reflect.apply(useContext, binding,
[QuestDockExternalCoordinationContext]).setRestingQuestDockMode;
const value4 = (UseStateFromSharedValue)(activeQuestDockMode);
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const useToken = UseTokenModule.useToken;
const CARD_BACKGROUND_DEFAULT = (Native).colors.CARD_BACKGROUND_DEFAULT;
const value5 = Reflect.apply(useToken, UseTokenModule, [CARD_BACKGROUND_DEFAULT]);
const env0_3 = value5;
const value6 = binding.useMemo(_fun104352, [value5]);
let closure = function() {
return [0, 0.33, 0.76, 1];
};
const value7 = binding.useMemo(closure, []);
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = QuestDockUnenrolledBackgroundS;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED: QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED: QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED,
windowDimensions: windowDimensions};
closure.__workletHash = 3565242281634;
closure.__initData = env0_14;
const value8 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const useState = binding.useState;
const value10 = env0_3(Reflect.apply(useState, binding, [AppState.currentState !== 'active']), 2);
var property = value10[0];
var env0_4 = value10[1];
binding.useEffect(function() {
var env0_0 = AppState.addEventListener('change', _fun104356);
return _fun104357;
}, [activeQuestDockMode, setRestingQuestDockMode]);
useContext = binding.useContext;
let r4 = !property && Reflect.apply(useContext, binding,
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).isRendered && !useReducedMotion && videoAsset != null;
if (r4) {
moduleValue5 = require(477) /* metro dependency 477: PlatformUtils */;
r4 = !moduleValue5.isAndroid();
}
r4 = r4 && (require(9480) /* metro dependency 9480: QuestUtilsNative */).isHeroVideoSupported(videoAsset);
binding = env0_4;
var [property, env0_6] = env0_3(binding.useState(false), 2);
const value17 = binding.useCallback(_fun104358, []);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = QuestDockUnenrolledBackgroundG;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode, videoLoaded: property,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED: QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED};
closure.__workletHash = 13084905891385;
closure.__initData = env0_15;
const value18 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const items2 = [styles.backgroundWrapper, value8];
const r5 = (
r4
? (
<env0_4.Fragment>
{((VideoComponent) => <VideoComponent style={styles.backgroundHeroAssetVideo} onLoad={value17} source={{uri: videoAsset.url}} paused={value4 !== QuestDockMode.EXPANDED} resizeMode="cover" muted disableFocus preventsDisplaySleepDuringVideoPlayback={false} />)((require(9543) /* metro dependency 9543: Video */).VideoComponent)}
<ReanimatedNativeView style={value18}>
{((Component) => <Component style={styles.backgroundHeroAsset} source={{uri: staticUrl}} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
</ReanimatedNativeView>
</env0_4.Fragment>
)
: ((Component) => <Component style={styles.backgroundHeroAsset} source={{uri: staticUrl}} />)(importDefault(5475) /* metro dependency 5475: FastImage */)
);
const {START, END} = VerticalGradient;
return (
<ReanimatedNativeView style={items2}>
{r5}
{((Component) => <Component locations={value7} style={styles.backgroundGradient} start={START} end={END} colors={value6} />)(defaultImport5)}
</ReanimatedNativeView>
);
function _fun104352() { // fn#104352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:2080, offset: 0x02293a6a, size: 168 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = importDefault(674) /* metro dependency 674 */;
value = value(env0_3);
const value3 = value.alpha(0);
const items2 = [value3.hex()];
const value5 = value.alpha(0.1);
items2[1] = value5.hex();
const value6 = value.alpha(0.8);
items2[2] = value6.hex();
value = value.alpha(1);
items2[3] = value.hex();
return items2;
}
function QuestDockUnenrolledBackground() { // fn#104350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:1604, offset: 0x02293571, size: 1273 bytes, params: 1, frame: 35
var moduleValue5;
let binding = env0_4;
let useContext = binding.useContext;
const quest = Reflect.apply(useContext, binding,
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
const styles = useStyles();
const {staticUrl,
videoAsset} = (require(13568) /* metro dependency 13568: QuestHooksNative */).useQuestDockHeroAsset(quest);
useContext = binding.useContext;
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
const {activeQuestDockMode, windowDimensions} = Reflect.apply(useContext, binding, [QuestDockGestureContext]);
useContext = binding.useContext;
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
const setRestingQuestDockMode = Reflect.apply(useContext, binding,
[QuestDockExternalCoordinationContext]).setRestingQuestDockMode;
const value4 = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(activeQuestDockMode);
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
const value5 = Reflect.apply(useToken, useTokenModule, [CARD_BACKGROUND_DEFAULT]);
const env0_3 = value5;
const value6 = binding.useMemo(_fun104352, [value5]);
let closure = function() {
return [0, 0.33, 0.76, 1];
};
const value7 = binding.useMemo(closure, []);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
closure = QuestDockUnenrolledBackgroundS;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED: QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED: QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED,
windowDimensions: windowDimensions};
closure.__workletHash = 3565242281634;
closure.__initData = env0_14;
const value8 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const useState = binding.useState;
const value10 = env0_3(Reflect.apply(useState, binding, [AppState.currentState !== 'active']), 2);
var property = value10[0];
var env0_4 = value10[1];
binding.useEffect(function() {
var env0_0 = AppState.addEventListener('change', _fun104356);
return _fun104357;
}, [activeQuestDockMode, setRestingQuestDockMode]);
useContext = binding.useContext;
let r4 = !property && Reflect.apply(useContext, binding,
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).isRendered && !useReducedMotion && videoAsset != null;
if (r4) {
moduleValue5 = require(477) /* metro dependency 477: PlatformUtils */;
r4 = !moduleValue5.isAndroid();
}
r4 = r4 && (require(9480) /* metro dependency 9480: QuestUtilsNative */).isHeroVideoSupported(videoAsset);
binding = env0_4;
var [property, env0_6] = env0_3(binding.useState(false), 2);
const value17 = binding.useCallback(_fun104358, []);
const moduleValue7 = reanimatedRexportModule;
useAnimatedStyle = moduleValue7.useAnimatedStyle;
closure = QuestDockUnenrolledBackgroundG;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode, videoLoaded: property,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED: QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED};
closure.__workletHash = 13084905891385;
closure.__initData = env0_15;
const value18 = Reflect.apply(useAnimatedStyle, moduleValue7, [closure]);
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
const items2 = [styles.backgroundWrapper, value8];
const r5 = r4 ? <env0_4.Fragment>{((VideoComponent) => <VideoComponent style={styles.backgroundHeroAssetVideo} onLoad={value17} source={{uri: videoAsset.url}} paused={value4 !== QuestDockMode.EXPANDED} resizeMode="cover" muted disableFocus preventsDisplaySleepDuringVideoPlayback={false} />)((require(9543) /* metro dependency 9543: Video */).VideoComponent)}<ReanimatedNativeView style={value18}>{((Component) => <Component style={styles.backgroundHeroAsset} source={{uri: staticUrl}} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</ReanimatedNativeView></env0_4.Fragment> : ((Component) => <Component style={styles.backgroundHeroAsset} source={{uri: staticUrl}} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const defaultImport5 = importDefault(4589) /* metro dependency 4589 */;
const {START, END} = VerticalGradient;
return (
<ReanimatedNativeView style={items2}>
{r5}
{((Component) => <Component locations={value7} style={styles.backgroundGradient} start={START} end={END} colors={value6} />)(defaultImport5)}
</ReanimatedNativeView>
);
}
function QuestDockUnenrolledBackgroundS() { // fn#104354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:2256, owner: QuestDockUnenrolledBackground.s, offset: 0x02293b1e, size: 217 bytes, params: 1, frame: 21
let withSpring = SpringModule.withSpring;
const activeQuestDockModeBinding = activeQuestDockMode;
let get = activeQuestDockModeBinding.get;
const value3 = Reflect.apply(get, activeQuestDockModeBinding, []);
let COLLAPSED = QuestDockMode.COLLAPSED;
const value4 = 0;
const items2 = [{translateX: Reflect.apply(withSpring, SpringModule,
[value3 !== COLLAPSED ? value4 : -1 * QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED])}];
withSpring = SpringModule.withSpring;
const value6 = activeQuestDockMode.get();
COLLAPSED = QuestDockMode.COLLAPSED;
items2[1] = {translateY: Reflect.apply(withSpring, SpringModule,
[value6 !== COLLAPSED ? value4 : -1 * QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED])};
const windowDimensionsBinding = windowDimensions;
get = windowDimensionsBinding.get;
return {transform: items2, width: Reflect.apply(get, windowDimensionsBinding, []).width};
}
function _fun104352() { // fn#104352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:2080, offset: 0x02293a6a, size: 168 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = importDefault(674) /* metro dependency 674 */;
value = value(env0_3);
const value3 = value.alpha(0);
const items2 = [value3.hex()];
const value5 = value.alpha(0.1);
items2[1] = value5.hex();
const value6 = value.alpha(0.8);
items2[2] = value6.hex();
value = value.alpha(1);
items2[3] = value.hex();
return items2;
}
function _fun104355() { // fn#104355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:2739, offset: 0x02293bf7, size: 45 bytes, params: 1, frame: 14
const env0_0 = AppState.addEventListener('change', _fun104356);
return _fun104357;
function _fun104356(a0) { // fn#104356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:2779, offset: 0x02293c24, size: 118 bytes, params: 2, frame: 15
let value = a0 !== 'active';
env1_4(value);
let r3 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS() && value;
if (r3) {
value = activeQuestDockMode.get();
value = value === QuestDockMode.EXPANDED;
r3 = value;
}
if (r3) {
setRestingQuestDockMode(QuestDockMode.COLLAPSED);
}
}
function QuestDockUnenrolledBackgroundS() { // fn#104354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:2256, owner: QuestDockUnenrolledBackground.s, offset: 0x02293b1e, size: 217 bytes, params: 1, frame: 21
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
const activeQuestDockModeBinding = activeQuestDockMode;
let get = activeQuestDockModeBinding.get;
const value3 = Reflect.apply(get, activeQuestDockModeBinding, []);
let COLLAPSED = QuestDockMode.COLLAPSED;
const value4 = 0;
const items2 = [{translateX: Reflect.apply(withSpring, springModule,
[value3 !== COLLAPSED ? value4 : -1 * QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED])}];
const moduleValue2 = springModule;
withSpring = moduleValue2.withSpring;
const value6 = activeQuestDockMode.get();
COLLAPSED = QuestDockMode.COLLAPSED;
items2[1] = {translateY: Reflect.apply(withSpring, moduleValue2,
[value6 !== COLLAPSED ? value4 : -1 * QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED])};
const windowDimensionsBinding = windowDimensions;
get = windowDimensionsBinding.get;
return {transform: items2, width: Reflect.apply(get, windowDimensionsBinding, []).width};
}
function _fun104357() { // fn#104357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:2874, offset: 0x00cd0cb3, size: 21 bytes, params: 1, frame: 9
env0_0.remove();
}
function _fun104355() { // fn#104355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:2739, offset: 0x02293bf7, size: 45 bytes, params: 1, frame: 14
const env0_0 = AppState.addEventListener('change', _fun104356);
return _fun104357;
}
}
function QuestDockUnenrolledBackgroundG() { // fn#104359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:3125, owner: QuestDockUnenrolledBackground.G, offset: 0x02293c9a, size: 96 bytes, params: 1, frame: 18
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const value3 = activeQuestDockMode.get();
const EXPANDED = QuestDockMode.EXPANDED;
const value4 = 1;
return {opacity: Reflect.apply(withSpring, springModule, [value3 !== EXPANDED ? value4 : env0_5 ? 0 : value4,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED])};
}
function _fun104358() { // fn#104358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:3076, offset: 0x0218c4cf, size: 18 bytes, params: 1, frame: 11
env0_6(true);
}
function QuestDockUnenrolledBackgroundG() { // fn#104359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:3125, owner: QuestDockUnenrolledBackground.G, offset: 0x02293c9a, size: 96 bytes, params: 1, frame: 18
const withSpring = SpringModule.withSpring;
const value3 = activeQuestDockMode.get();
const EXPANDED = QuestDockMode.EXPANDED;
const value4 = 1;
return {opacity: Reflect.apply(withSpring, SpringModule, [value3 !== EXPANDED ? value4 : ReactNativeModule.AppState ? 0 : value4,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED])};
}
function _fun104356(a0) { // fn#104356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:2779, offset: 0x02293c24, size: 118 bytes, params: 2, frame: 15
let value = a0 !== 'active';
env1_4(value);
let r3 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS() && value;
if (r3) {
value = activeQuestDockMode.get();
value = value === QuestDockMode.EXPANDED;
r3 = value;
}
if (r3) {
setRestingQuestDockMode(QuestDockMode.COLLAPSED);
}
}
global.__d(_fun104349, 13664, [57, 31, 27, 4502, 6528, 13572, 661, 33, 4501, 13650, 13568, 13573, 13576, 8621, 566,
3860, 697, 674, 4017, 4577, 477, 9480, 8141, 9543, 5475, 4589,
2]) /* metro module 13664, dependencies: [57, 31, 27, 4502, 6528, 13572, 661, 33, 4501, 13650, 13568, 13573, 13576, 8621, 566, 3860, 697, 674, 4017, 4577, 477, 9480, 8141, 9543, 5475, 4589, 2] */;
@@ -1,179 +1,225 @@
/* Metro module 13662; source: modules/quests/native/QuestDock/QuestDockUnenrolledBody.tsx; dependencies: [5, 31, 27, 7093, 13570, 6528, 13572, 33, 4501, 697, 13650, 632, 13568, 9483, 1585, 5176, 9502, 9503, 13576, 9484, 7120, 6531, 13595, 9950, 13634, 13631, 9542, 13635, 4573, 1244, 1305, 9480, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import QuestStore from '../../QuestStore.tsx'; /* Metro dependency 7093 */
import QuestRewardTile from '../QuestRewardTile.tsx'; /* Metro dependency 9542 */
import QuestDockStore from './QuestDockStore.tsx'; /* Metro dependency 13570 */
import QuestDockBlurredContentBackground from './QuestDockBlurredContentBackground.tsx'; /* Metro dependency 13631 */
import PremiumRewardGradient from '../PremiumRewardGradient.tsx'; /* Metro dependency 13634 */
import QuestDockContext from './QuestDockContext.tsx'; /* Metro dependency 13650 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as YouBarExperimentModule from '../../../main_tabs_v2/YouBarExperiment.tsx'; /* Metro dependency 5176 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestTypesModule from '../../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as QuestUtilsNativeModule from '../QuestUtils.native.tsx'; /* Metro dependency 9480 */
import * as QuestHooksModule from '../../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as QuestOrbMultiplierHooksModule from '../../hooks/QuestOrbMultiplierHooks.tsx'; /* Metro dependency 9502 */
import * as QuestCopyHooksModule from '../../hooks/QuestCopyHooks.tsx'; /* Metro dependency 9950 */
import * as QuestHooksNativeModule from '../QuestHooks.native.tsx'; /* Metro dependency 13568 */
import * as QuestDockConstantsModule from './QuestDockConstants.tsx'; /* Metro dependency 13572 */
import * as QuestDockExternalCoordinationContextModule from './QuestDockExternalCoordinationContext.tsx'; /* Metro dependency 13576 */
function _fun104330(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13859:6, offset: 0x02292031, size: 642 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
const questDockStore = importDefault(13570) /* metro dependency 13570: QuestDockStore */;
const questConstantsModule = require(6528) /* metro dependency 6528: QuestConstants */;
const env0_8 = questConstantsModule.QuestDockMode;
const env0_9 = questConstantsModule.QuestsExperimentLocations;
let value = ReactModule;
const {QUEST_DOCK_EXPANDED_PADDING_BOTTOM,
QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL} = require(13572) /* metro dependency 13572: QuestDockConstants */;
const value4 = require(33) /* metro dependency 33 */;
const env0_11 = value4.jsx;
const env0_12 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.wrapper = {'flexGrow': 1, 'flexShrink': 0, 'justifyContent': 'flex-end',
QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL} = QuestDockConstantsModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
object.wrapper = {'flexGrow': 1, 'flexShrink': 0, 'justifyContent': 'flex-end',
paddingHorizontal: QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL, paddingBottom: QUEST_DOCK_EXPANDED_PADDING_BOTTOM};
const QUEST_DOCK_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.QUEST_DOCK_BORDER_RADIUS;
object2.rewardContentWrapper = {'borderRadius': null, 'overflow': 'hidden', 'padding': 8, 'paddingRight': 16,
object.rewardContentWrapper = {'borderRadius': null, 'overflow': 'hidden', 'padding': 8, 'paddingRight': 16,
borderRadius: QUEST_DOCK_BORDER_RADIUS};
object2.rewardContent = {'alignItems': 'center', 'flexDirection': 'row', 'gap': 16};
object2.rewardContentCopy = {'flexGrow': 1, 'flexShrink': 1, 'gap': 4};
object2.premiumRewardPerkPill = {alignSelf: 'flex-start'};
object.rewardContent = {'alignItems': 'center', 'flexDirection': 'row', 'gap': 16};
object.rewardContentCopy = {'flexGrow': 1, 'flexShrink': 1, 'gap': 4};
object.premiumRewardPerkPill = {alignSelf: 'flex-start'};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.titleRow = {'flexDirection': 'row', 'alignItems': 'center', 'gap': null, 'flexWrap': 'wrap', gap: PX_8};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.questDockRewardTile = object3;
object2.questDockCtaWrapper = {'marginTop': 12, 'paddingHorizontal': 4, 'paddingTop': 16, 'position': 'relative'};
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.questDockCta = object4;
object2.questDockCtaRow = {alignSelf: 'stretch'};
object.titleRow = {'flexDirection': 'row', 'alignItems': 'center', 'gap': null, 'flexWrap': 'wrap', gap: PX_8};
const object5 = {};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.questDockRewardTile = object5;
object.questDockCtaWrapper = {'marginTop': 12, 'paddingHorizontal': 4, 'paddingTop': 16, 'position': 'relative'};
const object6 = {};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.questDockCta = object6;
object.questDockCtaRow = {alignSelf: 'stretch'};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.questDockCtaSaparator = {'position': 'absolute', 'left': -12, 'right': -12, 'top': 0,
object.questDockCtaSaparator = {'position': 'absolute', 'left': -12, 'right': -12, 'top': 0,
'backgroundColor': null, 'height': 1, 'opacity': 1, backgroundColor: BORDER_SUBTLE};
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object2]);
const env0_13 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(QuestDockUnenrolledBody);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockUnenrolledBody.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockUnenrolledBody.tsx');
exports.default = value;
}
function QuestDockUnenrolledBody() { // fn#104331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13859:1202, offset: 0x022922b3, size: 1382 bytes, params: 1, frame: 44
var object2;
let binding = env0_4;
let useContext = binding.useContext;
const {isRendered, quest} = Reflect.apply(useContext, binding,
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]);
const styles = useStyles();
const value3 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([QuestDockStore],
function() {
return QuestDockStore.prevRestingQuestDockMode === QuestDockMode.EXPANDED;
});
const value4 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([QuestStore],
function() {
return QuestStore.isEnrolling(quest.id);
});
const value5 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useHasWatchVideoOnMobileTasks(quest.config);
const value6 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
const {isMobileActivityQuest, questApplication,
launchMobileActivity} = (require(13568) /* metro dependency 13568: QuestHooksNative */).useMobileActivityQuest(quest);
const env0_3 = launchMobileActivity;
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value8 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDockUnenrolledBody');
const value9 = (require(9502) /* metro dependency 9502: QuestOrbMultiplierHooks */).useQuestOrbMultiplierEligibility();
const value10 = (require(9483) /* metro dependency 9483: QuestHooks */).useShouldShowBonusOrbsUX(quest, value9);
const r6 = value10 && value9 === (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).QuestOrbMultiplierEligibilityType.NITRO;
binding = env0_4;
useContext = binding.useContext;
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
const value13 = binding.useCallback(env0_3(_fun104335), [quest.id, value5, Reflect.apply(useContext, binding,
[QuestDockExternalCoordinationContext]).setRestingQuestDockMode, isMobileActivityQuest, launchMobileActivity]);
const value14 = (require(9950) /* metro dependency 9950: QuestCopyHooks */).usePrimaryCtaCopy({quest: quest,
application: questApplication, shortText: true});
const questCopyHooksModule = require(9950) /* metro dependency 9950: QuestCopyHooks */;
const useQuestsInstructionsToWinReward = questCopyHooksModule.useQuestsInstructionsToWinReward;
object2 = {quest: quest};
const QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
object2.location = QUESTS_BAR_MOBILE;
object2.taskDetails = value6;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.sourceQuestContent = QUEST_BAR_MOBILE;
const value15 = Reflect.apply(useQuestsInstructionsToWinReward, questCopyHooksModule, [object2]);
const PremiumRewardGradient = importDefault(13634) /* metro dependency 13634: PremiumRewardGradient */;
const premiumRewardGradientProps = {visible: r6, glow: true, style: [styles.wrapper,
value8 ? {paddingBottom: global.Math.max(bottom, QUEST_DOCK_EXPANDED_PADDING_BOTTOM)} : null]};
const value17 = ((Component) => <Component />)(importDefault(13631) /* metro dependency 13631: QuestDockBlurredContentBackground */);
const QuestRewardTile = importDefault(9542) /* metro dependency 9542: QuestRewardTile */;
const value18 = !value3;
const questRewardTile = <QuestRewardTile paused={value3 ? !isRendered : value18} height={80} width={80} quest={quest} style={styles.questDockRewardTile} withAnimation={value3 && isRendered} />;
const items4 = [value10 && <View style={styles.premiumRewardPerkPill}>{((QuestOrbMultiplierPerkPill) => <QuestOrbMultiplierPerkPill questId={quest.config.id} orbMultiplierEligibility={value9} />)((require(13635) /* metro dependency 13635: QuestOrbMultiplierPerkPill */).QuestOrbMultiplierPerkPill)}</View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const EQa7os = (require(1244) /* metro dependency 1244: indexNative */).t.EQa7os;
items4[1] = <View style={styles.titleRow}><Text variant="heading-md/medium" color="mobile-text-heading-primary">{Reflect.apply(format,
intl, [EQa7os, {questName: quest.config.messages.questName}])}</Text></View>;
items4[2] = <Text color="text-default" variant="text-sm/normal">{value15}</Text>;
const view2 = <View style={styles.rewardContentWrapper}>{value17}<View style={styles.rewardContent}>{questRewardTile}<View style={styles.rewardContentCopy}>{items4}</View></View></View>;
const view = <View style={styles.questDockCtaSaparator} />;
const ShinyButton = (require(1305) /* metro dependency 1305: native */).ShinyButton;
return (
<PremiumRewardGradient {...premiumRewardGradientProps}>
{view2}
<View style={styles.questDockCtaWrapper}>
{view}
<View style={styles.questDockCtaRow}>
<ShinyButton
style={styles.questDockCta}
onPress={value13}
loading={value4}
renderIcon={renderIcon}
text={value14}
shineDisabled={value18}
/>
function QuestDockUnenrolledBody() { // fn#104331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13859:1202, offset: 0x022922b3, size: 1382 bytes, params: 1, frame: 44
let binding = env0_4;
let useContext = binding.useContext;
const {isRendered, quest} = Reflect.apply(useContext, binding,
[QuestDockContext]);
const styles = useStyles();
const value3 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([QuestDockStore],
function() {
return QuestDockStore.prevRestingQuestDockMode === QuestDockMode.EXPANDED;
});
const value4 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([QuestStore],
function() {
return QuestStore.isEnrolling(quest.id);
});
const value5 = (QuestHooksNativeModule).useHasWatchVideoOnMobileTasks(quest.config);
const value6 = (QuestHooksModule).useQuestTaskDetails(quest);
const {isMobileActivityQuest, questApplication,
launchMobileActivity} = (QuestHooksNativeModule).useMobileActivityQuest(quest);
const launchMobileActivity2 = launchMobileActivity;
const bottom = (UseSafeAreaInsetsNative)().bottom;
const value8 = (YouBarExperimentModule).useYouBarEnabled('QuestDockUnenrolledBody');
const value9 = (QuestOrbMultiplierHooksModule).useQuestOrbMultiplierEligibility();
const value10 = (QuestHooksModule).useShouldShowBonusOrbsUX(quest, value9);
const r6 = value10 && value9 === (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).QuestOrbMultiplierEligibilityType.NITRO;
binding = env0_4;
useContext = binding.useContext;
const QuestDockExternalCoordinationContext = (QuestDockExternalCoordinationContextModule).QuestDockExternalCoordinationContext;
const value13 = binding.useCallback(launchMobileActivity2(_fun104335), [quest.id, value5, Reflect.apply(useContext,
binding, [QuestDockExternalCoordinationContext]).setRestingQuestDockMode, isMobileActivityQuest,
launchMobileActivity]);
const value14 = (QuestCopyHooksModule).usePrimaryCtaCopy({quest: quest,
application: questApplication, shortText: true});
const useQuestsInstructionsToWinReward = QuestCopyHooksModule.useQuestsInstructionsToWinReward;
object = {quest: quest};
const QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
object.location = QUESTS_BAR_MOBILE;
object.taskDetails = value6;
const QuestContent = (QuestTypesModule).QuestContent;
const QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object.sourceQuestContent = QUEST_BAR_MOBILE;
const value15 = Reflect.apply(useQuestsInstructionsToWinReward, QuestCopyHooksModule, [object]);
const premiumRewardGradientProps = {visible: r6, glow: true, style: [styles.wrapper,
value8 ? {paddingBottom: global.Math.max(bottom, QUEST_DOCK_EXPANDED_PADDING_BOTTOM)} : null]};
const value17 = ((Component) => <Component />)(QuestDockBlurredContentBackground);
const value18 = !value3;
const questRewardTile = (
<QuestRewardTile
paused={value3 ? !isRendered : value18}
height={80}
width={80}
quest={quest}
style={styles.questDockRewardTile}
withAnimation={value3 && isRendered}
/>
);
const items4 = [
value10 && <View style={styles.premiumRewardPerkPill}>{((QuestOrbMultiplierPerkPill) => <QuestOrbMultiplierPerkPill questId={quest.config.id} orbMultiplierEligibility={value9} />)((require(13635) /* metro dependency 13635: QuestOrbMultiplierPerkPill */).QuestOrbMultiplierPerkPill)}</View>,
];
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
const format = intl.format;
const EQa7os = (IndexNativeModule).t.EQa7os;
items4[1] = (
<View style={styles.titleRow}>
<Text variant="heading-md/medium" color="mobile-text-heading-primary">
{Reflect.apply(format, intl, [EQa7os, {questName: quest.config.messages.questName}])}
</Text>
</View>
);
items4[2] = (
<Text color="text-default" variant="text-sm/normal">
{value15}
</Text>
);
const view2 = (
<View style={styles.rewardContentWrapper}>
{value17}
<View style={styles.rewardContent}>
{questRewardTile}
<View style={styles.rewardContentCopy}>
{items4}
</View>
</View>
</View>
</PremiumRewardGradient>
);
}
function* _fun104335() { // fn#104335, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13859:1958, offset: 0x02292861, size: 316 bytes, params: 1, frame: 21
var binding3;
var value7;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var binding2 = env2_2;
var value3 = binding(binding2[19]);
var enrollInQuest = value3.enrollInQuest;
var id = require.id;
var object2 = {};
var QuestContentCTA = binding(binding2[20]).QuestContentCTA;
var ACCEPT_QUEST = QuestContentCTA.ACCEPT_QUEST;
object2.questContentCTA = ACCEPT_QUEST;
var QuestContent = binding(binding2[21]).QuestContent;
var QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.questContent = QUEST_BAR_MOBILE;
QuestContent = binding(binding2[21]).QuestContent;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.sourceQuestContent = QUEST_BAR_MOBILE;
yield Reflect.apply(enrollInQuest, value3, [id, object2]);
if (false) {
return undefined;
}
if (dependencyMap) {
yield env1_3();
if (false) {
return undefined;
);
const view = <View style={styles.questDockCtaSaparator} />;
const ShinyButton = (NativeModule).ShinyButton;
return (
<PremiumRewardGradient {...premiumRewardGradientProps}>
{view2}
<View style={styles.questDockCtaWrapper}>
{view}
<View style={styles.questDockCtaRow}>
<ShinyButton
style={styles.questDockCta}
onPress={value13}
loading={value4}
renderIcon={renderIcon_104336}
text={value14}
shineDisabled={value18}
/>
</View>
</View>
</PremiumRewardGradient>
);
function* _fun104335() { // fn#104335, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13859:1958, offset: 0x02292861, size: 316 bytes, params: 1, frame: 21
var binding3;
var value7;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var binding2 = env2_2;
var value3 = binding(binding2[19]);
var enrollInQuest = value3.enrollInQuest;
var id = require.id;
var object = {};
var QuestContentCTA = binding(binding2[20]).QuestContentCTA;
var ACCEPT_QUEST = QuestContentCTA.ACCEPT_QUEST;
object.questContentCTA = ACCEPT_QUEST;
var QuestContent = binding(binding2[21]).QuestContent;
var QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object.questContent = QUEST_BAR_MOBILE;
QuestContent = binding(binding2[21]).QuestContent;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object.sourceQuestContent = QUEST_BAR_MOBILE;
yield Reflect.apply(enrollInQuest, value3, [id, object]);
if (false) {
return undefined;
}
if (dependencyMap) {
yield env1_3();
if (false) {
return undefined;
}
env1_4(env2_8.COLLAPSED);
} else if (importDefault) {
binding = env2_1;
binding3 = env2_2;
value7 = binding(binding3[22]);
object = {};
object.questId = require.id;
binding = env2_0;
object.sourceQuestContent = binding(binding3[21]).QuestContent.QUEST_BAR_MOBILE;
value7(object);
binding = env1_4;
binding(env2_8.COLLAPSED);
}
}
env1_4(env2_8.COLLAPSED);
} else if (importDefault) {
binding = env2_1;
binding3 = env2_2;
value7 = binding(binding3[22]);
object2 = {};
object2.questId = require.id;
binding = env2_0;
object2.sourceQuestContent = binding(binding3[21]).QuestContent.QUEST_BAR_MOBILE;
value7(object2);
binding = env1_4;
binding(env2_8.COLLAPSED);
}
function QuestDockUnenrolledBodyRenderIcon() { // fn#104336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13859:3507, owner: QuestDockUnenrolledBody.renderIcon, offset: 0x0229299d, size: 48 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (QuestUtilsNativeModule).getPrimaryCtaIcon(quest, true);
}
}
}
function QuestDockUnenrolledBodyRenderIcon() { // fn#104336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13859:3507, owner: QuestDockUnenrolledBody.renderIcon, offset: 0x0229299d, size: 48 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (require(9480) /* metro dependency 9480: QuestUtilsNative */).getPrimaryCtaIcon(quest, true);
}
global.__d(_fun104330, 13662, [5, 31, 27, 7093, 13570, 6528, 13572, 33, 4501, 697, 13650, 632, 13568, 9483, 1585,
5176, 9502, 9503, 13576, 9484, 7120, 6531, 13595, 9950, 13634, 13631, 9542, 13635, 4573, 1244, 1305, 9480,
2]) /* metro module 13662, dependencies: [5, 31, 27, 7093, 13570, 6528, 13572, 33, 4501, 697, 13650, 632, 13568, 9483, 1585, 5176, 9502, 9503, 13576, 9484, 7120, 6531, 13595, 9950, 13634, 13631, 9542, 13635, 4573, 1244, 1305, 9480, 2] */;
@@ -1,378 +1,428 @@
/* Metro module 13655; source: modules/quests/native/QuestDock/QuestDockUnenrolledHeader.tsx; dependencies: [57, 31, 27, 6528, 13572, 482, 33, 4501, 697, 4577, 13650, 13573, 478, 13569, 13580, 6531, 7120, 4048, 4002, 5176, 3860, 13652, 4017, 13568, 8141, 13656, 13631, 5475, 13658, 13659, 13622, 4573, 1244, 5278, 10139, 8638, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import FastImage from '../../../../components_native/common/FastImage.tsx'; /* Metro dependency 5475 */
import ReanimatedNativeView from '../../../core/native/ReanimatedNativeView.tsx'; /* Metro dependency 8141 */
import QuestDisclosureModalActionCreators from '../QuestDisclosureModal/QuestDisclosureModalActionCreators.tsx'; /* Metro dependency 13580 */
import QuestDockContext from './QuestDockContext.tsx'; /* Metro dependency 13650 */
import UseQuestDockAnimatedBorderRadius from './useQuestDockAnimatedBorderRadius.tsx'; /* Metro dependency 13652 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../external/discord_common/js/shared/utils/PlatformUtils.tsx'; /* Metro dependency 478 */
import * as ConstantsModule from '../../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as YouBarExperimentModule from '../../../main_tabs_v2/YouBarExperiment.tsx'; /* Metro dependency 5176 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestTypesModule from '../../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as AnalyticsTypesModule from '../../lib/analytics/AnalyticsTypes.tsx'; /* Metro dependency 7120 */
import * as MoreHorizontalIconModule from '../../../../design/components/Icon/native/redesign/generated/MoreHorizontalIcon.tsx'; /* Metro dependency 8638 */
import * as CircleQuestionIconModule from '../../../../design/components/Icon/native/redesign/generated/CircleQuestionIcon.tsx'; /* Metro dependency 10139 */
import * as QuestHooksNativeModule from '../QuestHooks.native.tsx'; /* Metro dependency 13568 */
import * as QuestDockHooksModule from './QuestDockHooks.tsx'; /* Metro dependency 13569 */
import * as QuestDockConstantsModule from './QuestDockConstants.tsx'; /* Metro dependency 13572 */
import * as QuestDockGestureContextModule from './QuestDockGestureContext.tsx'; /* Metro dependency 13573 */
function _fun104295(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:6, offset: 0x0228f0a7, size: 725 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.AccessibilityInfo;
const env0_6 = value2.View;
const env0_7 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
const env0_8 = questDockConstantsModule.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
const env0_9 = questDockConstantsModule.QUEST_DOCK_CONTENT_BORDER_RADII;
const QUEST_DOCK_COLLAPSED_HEIGHT = questDockConstantsModule.QUEST_DOCK_COLLAPSED_HEIGHT;
const env0_10 = questDockConstantsModule.QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED;
const env0_11 = questDockConstantsModule.QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
const env0_12 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
const value4 = require(33) /* metro dependency 33 */;
const env0_13 = value4.jsx;
const env0_14 = value4.jsxs;
const env0_15 = value4.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.questDockHeader = {'alignItems': 'center', 'justifyContent': 'space-between', 'flexDirection': 'row',
let value = ReactModule;
const QUEST_DOCK_COLLAPSED_HEIGHT = QuestDockConstantsModule.QUEST_DOCK_COLLAPSED_HEIGHT;
const createStyles = CreateStylesModule.createStyles;
object = {};
object.questDockHeader = {'alignItems': 'center', 'justifyContent': 'space-between', 'flexDirection': 'row',
'height': null, 'overflow': 'hidden', 'paddingRight': 16, 'paddingLeft': 8, 'position': 'absolute', 'zIndex': 2,
height: QUEST_DOCK_COLLAPSED_HEIGHT};
object2.wreathImage = {'height': 35, 'marginRight': 4, 'width': 35};
object2.questDockHeaderPrimary = {'alignItems': 'center', 'flexDirection': 'row'};
object2.logo = {marginTop: 2};
object2.questDockHeaderSecondary = {'flexGrow': 0, 'flexShrink': 0};
object2.questDockHeaderContentCollapsed = {'justifyContent': 'center', 'position': 'absolute', 'bottom': 0,
'top': 0, 'right': 0};
object2.questDockHeaderContentExpanded = {'alignItems': 'center', 'flexDirection': 'row', 'gap': 8};
object2.questDockHeaderActionDisclosures = {'alignItems': 'center', 'display': 'flex', 'flexDirection': 'row',
object.wreathImage = {'height': 35, 'marginRight': 4, 'width': 35};
object.questDockHeaderPrimary = {'alignItems': 'center', 'flexDirection': 'row'};
object.logo = {marginTop: 2};
object.questDockHeaderSecondary = {'flexGrow': 0, 'flexShrink': 0};
object.questDockHeaderContentCollapsed = {'justifyContent': 'center', 'position': 'absolute', 'bottom': 0, 'top': 0,
'right': 0};
object.questDockHeaderContentExpanded = {'alignItems': 'center', 'flexDirection': 'row', 'gap': 8};
object.questDockHeaderActionDisclosures = {'alignItems': 'center', 'display': 'flex', 'flexDirection': 'row',
'gap': 4};
object2.questDockHeaderActionDisclosuresIcon = {'height': 14, 'width': 14};
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object2.questDockHeaderActionSeparator = {'backgroundColor': null, 'opacity': 0.2, 'height': 18, 'width': 1.5,
object.questDockHeaderActionDisclosuresIcon = {'height': 14, 'width': 14};
const TEXT_DEFAULT = (Native).colors.TEXT_DEFAULT;
object.questDockHeaderActionSeparator = {'backgroundColor': null, 'opacity': 0.2, 'height': 18, 'width': 1.5,
backgroundColor: TEXT_DEFAULT};
object2.questDockHeaderTertiaryContent = {opacity: 0.7};
const env0_16 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {code: 'function questDockHeaderLayoutAnimation_QuestDockUnenrolledHeaderTsx1(values){const{withSpring,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED}=this.__closure;return{initialValues:{originX:values.currentOriginX,originY:values.currentOriginY,width:values.currentWidth,height:values.currentHeight},animations:{originX:withSpring(values.targetOriginX,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED),originY:withSpring(values.targetOriginY,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED),height:withSpring(values.targetHeight,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED),width:withSpring(values.targetWidth,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)}};}'};
object.questDockHeaderTertiaryContent = {opacity: 0.7};
const env0_16 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: 'function questDockHeaderLayoutAnimation_QuestDockUnenrolledHeaderTsx1(values){const{withSpring,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED}=this.__closure;return{initialValues:{originX:values.currentOriginX,originY:values.currentOriginY,width:values.currentWidth,height:values.currentHeight},animations:{originX:withSpring(values.targetOriginX,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED),originY:withSpring(values.targetOriginY,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED),height:withSpring(values.targetHeight,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED),width:withSpring(values.targetWidth,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)}};}'};
const env0_18 = _fun104296();
object2 = {code: 'function QuestDockUnenrolledHeaderTsx2(){const{activeQuestDockMode,QuestDockMode,QUEST_DOCK_CONTENT_BORDER_RADII,questDockBorderRadius,youBarEnabled,withSpring,questDockAnimatedBorderRadius,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED,questDockWrapperSpecs,QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED}=this.__closure;return{borderTopLeftRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:questDockBorderRadius,borderTopRightRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:questDockBorderRadius,borderBottomLeftRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:youBarEnabled?withSpring(questDockAnimatedBorderRadius.get(),QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED):questDockBorderRadius,borderBottomRightRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:youBarEnabled?withSpring(questDockAnimatedBorderRadius.get(),QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED):questDockBorderRadius,width:activeQuestDockMode.get()===QuestDockMode.EXPANDED?questDockWrapperSpecs.get().width-QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED*2:questDockWrapperSpecs.get().width,transform:[{translateX:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)},{translateY:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)}]};}'};
object2 = {code: 'function QuestDockUnenrolledHeaderTsx3(){const{withSpring,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED}=this.__closure;return{opacity:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?0:1,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)};}'};
object2 = {code: 'function QuestDockUnenrolledHeaderTsx4(){const{activeQuestDockMode,QuestDockMode,QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED}=this.__closure;return{right:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED*-1:0};}'};
object2 = {code: 'function QuestDockUnenrolledHeaderTsx5(){const{withSpring,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED}=this.__closure;return{opacity:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)};}'};
object2 = {code: 'function QuestDockUnenrolledHeaderTsx6(){const{activeQuestDockMode,QuestDockMode,QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED}=this.__closure;return{right:activeQuestDockMode.get()===QuestDockMode.EXPANDED?0:QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED};}'};
object2 = {code: "function QuestDockUnenrolledHeaderTsx7(){const{activeQuestDockMode,QuestDockMode}=this.__closure;return{pointerEvents:activeQuestDockMode.get()===QuestDockMode.EXPANDED?'auto':'none'};}"};
object2 = {code: 'function QuestDockUnenrolledHeaderTsx8(){const{activeQuestDockMode,QuestDockMode,QUEST_DOCK_CONTENT_BORDER_RADII,questDockBorderRadius,youBarEnabled,withSpring,questDockAnimatedBorderRadius,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED,questDockWrapperSpecs}=this.__closure;return{borderRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:questDockBorderRadius,borderBottomLeftRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:youBarEnabled?withSpring(questDockAnimatedBorderRadius.get(),QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED):questDockBorderRadius,borderBottomRightRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:youBarEnabled?withSpring(questDockAnimatedBorderRadius.get(),QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED):questDockBorderRadius,width:questDockWrapperSpecs.get().width};}'};
object = {code: 'function QuestDockUnenrolledHeaderTsx2(){const{activeQuestDockMode,QuestDockMode,QUEST_DOCK_CONTENT_BORDER_RADII,questDockBorderRadius,youBarEnabled,withSpring,questDockAnimatedBorderRadius,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED,questDockWrapperSpecs,QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED}=this.__closure;return{borderTopLeftRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:questDockBorderRadius,borderTopRightRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:questDockBorderRadius,borderBottomLeftRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:youBarEnabled?withSpring(questDockAnimatedBorderRadius.get(),QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED):questDockBorderRadius,borderBottomRightRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:youBarEnabled?withSpring(questDockAnimatedBorderRadius.get(),QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED):questDockBorderRadius,width:activeQuestDockMode.get()===QuestDockMode.EXPANDED?questDockWrapperSpecs.get().width-QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED*2:questDockWrapperSpecs.get().width,transform:[{translateX:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)},{translateY:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)}]};}'};
object = {code: 'function QuestDockUnenrolledHeaderTsx3(){const{withSpring,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED}=this.__closure;return{opacity:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?0:1,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)};}'};
object = {code: 'function QuestDockUnenrolledHeaderTsx4(){const{activeQuestDockMode,QuestDockMode,QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED}=this.__closure;return{right:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED*-1:0};}'};
object = {code: 'function QuestDockUnenrolledHeaderTsx5(){const{withSpring,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED}=this.__closure;return{opacity:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)};}'};
object = {code: 'function QuestDockUnenrolledHeaderTsx6(){const{activeQuestDockMode,QuestDockMode,QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED}=this.__closure;return{right:activeQuestDockMode.get()===QuestDockMode.EXPANDED?0:QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED};}'};
object = {code: "function QuestDockUnenrolledHeaderTsx7(){const{activeQuestDockMode,QuestDockMode}=this.__closure;return{pointerEvents:activeQuestDockMode.get()===QuestDockMode.EXPANDED?'auto':'none'};}"};
object = {code: 'function QuestDockUnenrolledHeaderTsx8(){const{activeQuestDockMode,QuestDockMode,QUEST_DOCK_CONTENT_BORDER_RADII,questDockBorderRadius,youBarEnabled,withSpring,questDockAnimatedBorderRadius,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED,questDockWrapperSpecs}=this.__closure;return{borderRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:questDockBorderRadius,borderBottomLeftRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:youBarEnabled?withSpring(questDockAnimatedBorderRadius.get(),QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED):questDockBorderRadius,borderBottomRightRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:youBarEnabled?withSpring(questDockAnimatedBorderRadius.get(),QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED):questDockBorderRadius,width:questDockWrapperSpecs.get().width};}'};
value = value.memo(QuestDockUnenrolledHeader);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockUnenrolledHeader.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockUnenrolledHeader.tsx');
exports.default = value;
}
function _fun104296() { // fn#104296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:1958, offset: 0x0228f37c, size: 88 bytes, params: 1, frame: 14
const questDockHeaderLayoutAnimation2 = questDockHeaderLayoutAnimation;
const object = {};
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED = QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
questDockHeaderLayoutAnimation2.__closure = object;
questDockHeaderLayoutAnimation2.__workletHash = 6787168806966;
questDockHeaderLayoutAnimation2.__initData = env0_17;
return questDockHeaderLayoutAnimation2;
function questDockHeaderLayoutAnimation({currentOriginX, currentOriginY, currentWidth, currentHeight, targetOriginX, targetOriginY, targetHeight, targetWidth}) { // fn#104297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:2004, offset: 0x0228f3d4, size: 205 bytes, params: 2, frame: 20
const object = {};
object.initialValues = {originX: currentOriginX, originY: currentOriginY, width: currentWidth,
height: currentHeight};
const object3 = {};
const value = environment.__proto__;
object3.originX = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginX,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
object3.originY = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginY,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
object3.height = (require(4577) /* metro dependency 4577: spring */).withSpring(targetHeight,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
object3.width = (require(4577) /* metro dependency 4577: spring */).withSpring(targetWidth,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
object.animations = object3;
return object;
}
function _fun104296() { // fn#104296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:1958, offset: 0x0228f37c, size: 88 bytes, params: 1, frame: 14
const closure = questDockHeaderLayoutAnimation;
const object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED = QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
closure.__closure = object2;
closure.__workletHash = 6787168806966;
closure.__initData = env0_17;
return closure;
}
function QuestDockUnenrolledHeader() { // fn#104298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:6344, offset: 0x0228f4a1, size: 2221 bytes, params: 1, frame: 42
var object2;
let binding = env0_4;
let useContext = binding.useContext;
const quest = Reflect.apply(useContext, binding,
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
useContext = binding.useContext;
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
const {activeQuestDockMode, questDockWrapperSpecs} = Reflect.apply(useContext, binding, [QuestDockGestureContext]);
const [property, env0_3] = env0_3Binding(binding.useState(false), 2);
let closure = _fun104299;
binding.useEffect(closure, []);
const value5 = (require(13569) /* metro dependency 13569: QuestDockHooks */).useActionSheetPressHandler(quest);
const value6 = binding.useCallback(_fun104301, [quest]);
const r19 = (require(4002) /* metro dependency 4002: shared */).isThemeDark((importDefault(4048) /* metro dependency 4048: useTheme */)()) ? ThemeTypes.DARK : ThemeTypes.LIGHT;
const value8 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDockUnenrolledHeader');
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const QUEST_DOCK_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.QUEST_DOCK_BORDER_RADIUS;
const value9 = Reflect.apply(useToken, useTokenModule, [QUEST_DOCK_BORDER_RADIUS]);
const value10 = (importDefault(13652) /* metro dependency 13652: useQuestDockAnimatedBorderRadius */)(value9);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
closure = QuestDockUnenrolledHeaderB;
object2 = {activeQuestDockMode: activeQuestDockMode};
object2.QuestDockMode = QuestDockMode;
object2.QUEST_DOCK_CONTENT_BORDER_RADII = QUEST_DOCK_CONTENT_BORDER_RADII;
object2.questDockBorderRadius = value9;
object2.youBarEnabled = value8;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.questDockAnimatedBorderRadius = value10;
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED = QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
object2.questDockWrapperSpecs = questDockWrapperSpecs;
object2.QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED = QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
closure.__closure = object2;
closure.__workletHash = 961167275812;
closure.__initData = env0_19;
const value11 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue6 = reanimatedRexportModule;
useAnimatedStyle = moduleValue6.useAnimatedStyle;
closure = function() {
var moduleValue = require(dependencyMap[9]);
return {opacity: moduleValue.withSpring(activeQuestDockMode.get() !== QuestDockMode.EXPANDED ? 1 : 0,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)};
};
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED: QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED};
closure.__workletHash = 15527972438968;
closure.__initData = env0_20;
const value12 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
const moduleValue7 = reanimatedRexportModule;
useAnimatedStyle = moduleValue7.useAnimatedStyle;
closure = QuestDockUnenrolledHeaderK;
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED: QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED};
closure.__workletHash = 7866036039040;
closure.__initData = env0_21;
const value13 = Reflect.apply(useAnimatedStyle, moduleValue7, [closure]);
const moduleValue8 = reanimatedRexportModule;
useAnimatedStyle = moduleValue8.useAnimatedStyle;
closure = function() {
var moduleValue = require(dependencyMap[9]);
return {opacity: moduleValue.withSpring(activeQuestDockMode.get() !== QuestDockMode.EXPANDED ? 0 : 1,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)};
};
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED: QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED};
closure.__workletHash = 11647269239934;
closure.__initData = env0_22;
const value14 = Reflect.apply(useAnimatedStyle, moduleValue8, [closure]);
const moduleValue9 = reanimatedRexportModule;
useAnimatedStyle = moduleValue9.useAnimatedStyle;
closure = QuestDockUnenrolledHeaderG;
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED: QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED};
closure.__workletHash = 14794727045076;
closure.__initData = env0_23;
const value15 = Reflect.apply(useAnimatedStyle, moduleValue9, [closure]);
const moduleValue10 = reanimatedRexportModule;
const useAnimatedProps = moduleValue10.useAnimatedProps;
closure = QuestDockUnenrolledHeaderF;
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode};
closure.__workletHash = 6738114933032;
closure.__initData = env0_24;
const value16 = Reflect.apply(useAnimatedProps, moduleValue10, [closure]);
const moduleValue11 = reanimatedRexportModule;
useAnimatedStyle = moduleValue11.useAnimatedStyle;
closure = QuestDockUnenrolledHeaderB_104308;
object2 = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
QUEST_DOCK_CONTENT_BORDER_RADII: QUEST_DOCK_CONTENT_BORDER_RADII, questDockBorderRadius: value9,
youBarEnabled: value8};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.questDockAnimatedBorderRadius = value10;
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED = QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
object2.questDockWrapperSpecs = questDockWrapperSpecs;
closure.__closure = object2;
closure.__workletHash = 6128777581416;
closure.__initData = env0_25;
const value17 = Reflect.apply(useAnimatedStyle, moduleValue11, [closure]);
const styles = useStyles();
const value18 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useQuestGameLogotypeAssetUrl(quest);
const questBarHeroBlurhash = quest.config.assets.questBarHeroBlurhash;
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
object2 = {style: [styles.questDockHeader, value11], layout: env0_18};
const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */;
const items2 = [(platformUtilsModule.isAndroid() || property) && questBarHeroBlurhash != null ? ((Component) => <Component placeholder={questBarHeroBlurhash} animatedStyle={value17} animatedLayout={env0_18} />)(importDefault(13656) /* metro dependency 13656: QuestDockBlurredHeaderPlaceholder */) : ((Component) => <Component animatedStyle={value17} animatedLayout={env0_18} />)(importDefault(13631) /* metro dependency 13631: QuestDockBlurredContentBackground */)];
const FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
const DARK = ThemeTypes.DARK;
items2[1] = <View style={styles.questDockHeaderPrimary}><FastImage source={r19 === DARK ? importDefault(13658) /* metro dependency 13658 */ : importDefault(13659) /* metro dependency 13659 */} resizeMode="contain" style={styles.wreathImage} />{((Component) => <Component assetUrl={value18} height={36} maxWidth={120} style={styles.logo} />)(importDefault(13622) /* metro dependency 13622: QuestGameLogotype */)}</View>;
const defaultImport8 = ReanimatedNativeView;
const items4 = [styles.questDockHeaderContentCollapsed, value13];
binding = env0_18;
const defaultImport9 = ReanimatedNativeView;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
let questDockHeaderTertiaryContent = styles.questDockHeaderTertiaryContent;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const defaultImport82 = ((Component) => <Component style={items4} layout={binding}>{((Component) => <Component style={value12}><Text style={questDockHeaderTertiaryContent} variant="text-sm/medium" color="interactive-text-active">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3mgEQf'])}</Text></Component>)(defaultImport9)}</Component>)(defaultImport8);
const defaultImport10 = ReanimatedNativeView;
const defaultImport11 = ReanimatedNativeView;
const items6 = [styles.questDockHeaderContentExpanded, value14];
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const items7 = [styles.questDockHeaderActionDisclosures];
items7[1] = styles.questDockHeaderTertiaryContent;
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
let value = <Text color="interactive-text-active" variant="text-sm/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.o6FLcF)}</Text>;
const CircleQuestionIcon = (require(10139) /* metro dependency 10139: CircleQuestionIcon */).CircleQuestionIcon;
let INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
value = <PressableOpacity onPress={value6} accessibilityRole="button" style={items7}><>{value}<CircleQuestionIcon color={INTERACTIVE_TEXT_ACTIVE} style={styles.questDockHeaderActionDisclosuresIcon} /></></PressableOpacity>;
const items9 = [value];
items9[1] = <View style={styles.questDockHeaderActionSeparator} />;
questDockHeaderTertiaryContent = styles.questDockHeaderTertiaryContent;
const MoreHorizontalIcon = (require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon;
INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
items9[2] = <PressableOpacity accessibilityRole="button" onPress={value5} style={questDockHeaderTertiaryContent}><MoreHorizontalIcon color={INTERACTIVE_TEXT_ACTIVE} /></PressableOpacity>;
items2[2] = <View style={styles.questDockHeaderSecondary}>{defaultImport82}{((Component) => <Component animatedProps={value16} style={value15} layout={binding}>{((Component) => <Component style={items6}>{items9}</Component>)(defaultImport11)}</Component>)(defaultImport10)}</View>;
return (
<ReanimatedNativeView {...object2}>
{items2}
</ReanimatedNativeView>
);
}
function questDockHeaderLayoutAnimation({currentOriginX, currentOriginY, currentWidth, currentHeight, targetOriginX, targetOriginY, targetHeight, targetWidth}) { // fn#104297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:2004, offset: 0x0228f3d4, size: 205 bytes, params: 2, frame: 20
const object2 = {};
object2.initialValues = {originX: currentOriginX, originY: currentOriginY, width: currentWidth,
height: currentHeight};
const object4 = {};
const value = environment.__proto__;
object4.originX = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginX,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
object4.originY = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginY,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
object4.height = (require(4577) /* metro dependency 4577: spring */).withSpring(targetHeight,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
object4.width = (require(4577) /* metro dependency 4577: spring */).withSpring(targetWidth,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
object2.animations = object4;
return object2;
}
function _fun104299() { // fn#104299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:6568, offset: 0x0228fd4e, size: 104 bytes, params: 1, frame: 14
var environment;
var then;
var binding;
let value = environment.__proto__;
const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */;
if (platformUtilsModule.isIOS()) {
value = AccessibilityInfo.isReduceTransparencyEnabled();
then = value.then;
binding = env0_3;
Reflect.apply(then, value, [binding]);
var env0_0 = AccessibilityInfo.addEventListener('reduceTransparencyChanged', binding);
return _fun104300;
}
}
function _fun104301() { // fn#104301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:6794, offset: 0x0228fdb6, size: 153 bytes, params: 1, frame: 17
const defaultImport = importDefault(13580) /* metro dependency 13580: QuestDisclosureModalActionCreators */;
const showModal = defaultImport.showModal;
const object3 = {};
object3.quest = quest;
object3.isTargetedDisclosure = true;
const object4 = {};
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object4.content = QUEST_BAR_MOBILE;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
const CONTEXT_MENU_OPEN_DISCLOSURE = QuestContentCTA.CONTEXT_MENU_OPEN_DISCLOSURE;
object4.ctaContent = CONTEXT_MENU_OPEN_DISCLOSURE;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object4.sourceQuestContent = QUEST_BAR_MOBILE;
object3.trackingCtx = object4;
Reflect.apply(showModal, defaultImport, [object3]);
}
function QuestDockUnenrolledHeader() { // fn#104298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:6344, offset: 0x0228f4a1, size: 2221 bytes, params: 1, frame: 42
let binding = env0_4;
let useContext = binding.useContext;
const quest = Reflect.apply(useContext, binding,
[QuestDockContext]).quest;
useContext = binding.useContext;
const QuestDockGestureContext = (QuestDockGestureContextModule).QuestDockGestureContext;
const {activeQuestDockMode, questDockWrapperSpecs} = Reflect.apply(useContext, binding, [QuestDockGestureContext]);
const [property, env0_3] = env0_3Binding(binding.useState(false), 2);
let closure = _fun104299;
binding.useEffect(closure, []);
const value5 = (QuestDockHooksModule).useActionSheetPressHandler(quest);
const value6 = binding.useCallback(_fun104301, [quest]);
const r19 = (require(4002) /* metro dependency 4002: shared */).isThemeDark((importDefault(4048) /* metro dependency 4048: useTheme */)()) ? ThemeTypes.DARK : ThemeTypes.LIGHT;
const value8 = (YouBarExperimentModule).useYouBarEnabled('QuestDockUnenrolledHeader');
const useToken = UseTokenModule.useToken;
const QUEST_DOCK_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.QUEST_DOCK_BORDER_RADIUS;
const value9 = Reflect.apply(useToken, UseTokenModule, [QUEST_DOCK_BORDER_RADIUS]);
const value10 = (UseQuestDockAnimatedBorderRadius)(value9);
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = QuestDockUnenrolledHeaderB;
object = {activeQuestDockMode: activeQuestDockMode};
object.QuestDockMode = QuestDockMode;
object.QUEST_DOCK_CONTENT_BORDER_RADII = QUEST_DOCK_CONTENT_BORDER_RADII;
object.questDockBorderRadius = value9;
object.youBarEnabled = value8;
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.questDockAnimatedBorderRadius = value10;
object.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED = QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
object.questDockWrapperSpecs = questDockWrapperSpecs;
object.QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED = QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
closure.__closure = object;
closure.__workletHash = 961167275812;
closure.__initData = env0_19;
const value11 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = function() {
var moduleValue = require(dependencyMap[9]);
return {opacity: moduleValue.withSpring(activeQuestDockMode.get() !== QuestDockMode.EXPANDED ? 1 : 0,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)};
};
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED: QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED};
closure.__workletHash = 15527972438968;
closure.__initData = env0_20;
const value12 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = QuestDockUnenrolledHeaderK;
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED: QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED};
closure.__workletHash = 7866036039040;
closure.__initData = env0_21;
const value13 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = function() {
var moduleValue = require(dependencyMap[9]);
return {opacity: moduleValue.withSpring(activeQuestDockMode.get() !== QuestDockMode.EXPANDED ? 0 : 1,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)};
};
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED: QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED};
closure.__workletHash = 11647269239934;
closure.__initData = env0_22;
const value14 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = QuestDockUnenrolledHeaderG;
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED: QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED};
closure.__workletHash = 14794727045076;
closure.__initData = env0_23;
const value15 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const useAnimatedProps = ReanimatedRexportModule.useAnimatedProps;
closure = QuestDockUnenrolledHeaderF;
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode};
closure.__workletHash = 6738114933032;
closure.__initData = env0_24;
const value16 = Reflect.apply(useAnimatedProps, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = QuestDockUnenrolledHeaderB_104308;
object = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
QUEST_DOCK_CONTENT_BORDER_RADII: QUEST_DOCK_CONTENT_BORDER_RADII, questDockBorderRadius: value9,
youBarEnabled: value8};
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.questDockAnimatedBorderRadius = value10;
object.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED = QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
object.questDockWrapperSpecs = questDockWrapperSpecs;
closure.__closure = object;
closure.__workletHash = 6128777581416;
closure.__initData = env0_25;
const value17 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const styles = useStyles();
const value18 = (QuestHooksNativeModule).useQuestGameLogotypeAssetUrl(quest);
const questBarHeroBlurhash = quest.config.assets.questBarHeroBlurhash;
object = {style: [styles.questDockHeader, value11], layout: env0_18};
const items2 = [
(PlatformUtilsModule.isAndroid() || property) && questBarHeroBlurhash != null
? ((Component) => <Component placeholder={questBarHeroBlurhash} animatedStyle={value17} animatedLayout={env0_18} />)(importDefault(13656) /* metro dependency 13656: QuestDockBlurredHeaderPlaceholder */)
: ((Component) => <Component animatedStyle={value17} animatedLayout={env0_18} />)(importDefault(13631) /* metro dependency 13631: QuestDockBlurredContentBackground */),
];
const DARK = ThemeTypes.DARK;
items2[1] = (
<View style={styles.questDockHeaderPrimary}>
<FastImage
source={r19 === DARK ? importDefault(13658) /* metro dependency 13658 */ : importDefault(13659) /* metro dependency 13659 */}
resizeMode="contain"
style={styles.wreathImage}
/>
{((Component) => <Component assetUrl={value18} height={36} maxWidth={120} style={styles.logo} />)(importDefault(13622) /* metro dependency 13622: QuestGameLogotype */)}
</View>
);
const defaultImport8 = ReanimatedNativeView;
const items4 = [styles.questDockHeaderContentCollapsed, value13];
binding = env0_18;
const defaultImport9 = ReanimatedNativeView;
const Text = (TextModule).Text;
let questDockHeaderTertiaryContent = styles.questDockHeaderTertiaryContent;
const intl = (IndexNativeModule).intl;
const defaultImport82 = ((Component) => <Component style={items4} layout={binding}>{((Component) => <Component style={value12}><Text style={questDockHeaderTertiaryContent} variant="text-sm/medium" color="interactive-text-active">{intl.string((IndexNativeModule).t['3mgEQf'])}</Text></Component>)(defaultImport9)}</Component>)(defaultImport8);
const defaultImport10 = ReanimatedNativeView;
const defaultImport11 = ReanimatedNativeView;
const items6 = [styles.questDockHeaderContentExpanded, value14];
const PressableOpacity = (PressablesModule).PressableOpacity;
const items7 = [styles.questDockHeaderActionDisclosures];
items7[1] = styles.questDockHeaderTertiaryContent;
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
let value = (
<Text color="interactive-text-active" variant="text-sm/medium">
{intl.string((IndexNativeModule).t.o6FLcF)}
</Text>
);
const CircleQuestionIcon = (CircleQuestionIconModule).CircleQuestionIcon;
let INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
value = (
<PressableOpacity
onPress={value6}
accessibilityRole="button"
style={items7}
>
<>
{value}
<CircleQuestionIcon color={INTERACTIVE_TEXT_ACTIVE} style={styles.questDockHeaderActionDisclosuresIcon} />
</>
</PressableOpacity>
);
const items9 = [value];
items9[1] = <View style={styles.questDockHeaderActionSeparator} />;
questDockHeaderTertiaryContent = styles.questDockHeaderTertiaryContent;
const MoreHorizontalIcon = (MoreHorizontalIconModule).MoreHorizontalIcon;
INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
items9[2] = (
<PressableOpacity
accessibilityRole="button"
onPress={value5}
style={questDockHeaderTertiaryContent}
>
<MoreHorizontalIcon color={INTERACTIVE_TEXT_ACTIVE} />
</PressableOpacity>
);
items2[2] = (
<View style={styles.questDockHeaderSecondary}>
{defaultImport82}
{((Component) => <Component animatedProps={value16} style={value15} layout={binding}>{((Component) => <Component style={items6}>{items9}</Component>)(defaultImport11)}</Component>)(defaultImport10)}
</View>
);
return (
<ReanimatedNativeView {...object}>
{items2}
</ReanimatedNativeView>
);
function _fun104299() { // fn#104299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:6568, offset: 0x0228fd4e, size: 104 bytes, params: 1, frame: 14
var environment;
var then;
var binding;
let value = environment.__proto__;
if (PlatformUtilsModule.isIOS()) {
value = AccessibilityInfo.isReduceTransparencyEnabled();
then = value.then;
binding = env0_3;
Reflect.apply(then, value, [binding]);
var env0_0 = AccessibilityInfo.addEventListener('reduceTransparencyChanged', binding);
return _fun104300;
}
function _fun104300() { // fn#104300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:6696, offset: 0x00cef11e, size: 19 bytes, params: 1, frame: 9
return env0_0.remove();
}
}
function _fun104301() { // fn#104301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:6794, offset: 0x0228fdb6, size: 153 bytes, params: 1, frame: 17
const defaultImport = QuestDisclosureModalActionCreators;
const showModal = defaultImport.showModal;
const object = {};
object.quest = quest;
object.isTargetedDisclosure = true;
const object2 = {};
const QuestContent = (QuestTypesModule).QuestContent;
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.content = QUEST_BAR_MOBILE;
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
const CONTEXT_MENU_OPEN_DISCLOSURE = QuestContentCTA.CONTEXT_MENU_OPEN_DISCLOSURE;
object2.ctaContent = CONTEXT_MENU_OPEN_DISCLOSURE;
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
object2.sourceQuestContent = QUEST_BAR_MOBILE;
object.trackingCtx = object2;
Reflect.apply(showModal, defaultImport, [object]);
}
function QuestDockUnenrolledHeaderB() { // fn#104302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:7270, owner: QuestDockUnenrolledHeader.B, offset: 0x0228fe4f, size: 545 bytes, params: 1, frame: 21
var r1;
var moduleValue;
var moduleValue2;
const object = {};
const value2 = activeQuestDockMode.get();
let EXPANDED = QuestDockMode.EXPANDED;
object.borderTopLeftRadius = value2 === EXPANDED ? QUEST_DOCK_CONTENT_BORDER_RADII : ReactNativeModule.AccessibilityInfo;
const value4 = activeQuestDockMode.get();
EXPANDED = QuestDockMode.EXPANDED;
object.borderTopRightRadius = value4 === EXPANDED ? QUEST_DOCK_CONTENT_BORDER_RADII : ReactNativeModule.AccessibilityInfo;
const value5 = activeQuestDockMode.get();
EXPANDED = QuestDockMode.EXPANDED;
if (value5 === EXPANDED) {
r1 = QUEST_DOCK_CONTENT_BORDER_RADII;
} else if (env0_4) {
moduleValue = require(4577) /* metro dependency 4577: spring */;
r1 = moduleValue.withSpring(ReactNativeModule.View.get(), QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
} else {
r1 = ReactNativeModule.AccessibilityInfo;
}
object.borderBottomLeftRadius = r1;
const value8 = activeQuestDockMode.get();
EXPANDED = QuestDockMode.EXPANDED;
if (value8 === EXPANDED) {
r1 = QUEST_DOCK_CONTENT_BORDER_RADII;
} else if (env0_4) {
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
r1 = moduleValue2.withSpring(ReactNativeModule.View.get(), QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
} else {
r1 = ReactNativeModule.AccessibilityInfo;
}
object.borderBottomRightRadius = r1;
const value11 = activeQuestDockMode.get();
EXPANDED = QuestDockMode.EXPANDED;
object.width = value11 === EXPANDED ? questDockWrapperSpecs.get().width - 2 * QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED : questDockWrapperSpecs.get().width;
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
const value13 = activeQuestDockMode.get();
EXPANDED = QuestDockMode.EXPANDED;
const value14 = 0;
const QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED2 = value13 !== EXPANDED ? value14 : QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
const items2 = [{translateX: Reflect.apply(withSpring, springModule, [QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED2,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED])}];
const moduleValue4 = springModule;
withSpring = moduleValue4.withSpring;
const value = activeQuestDockMode.get();
EXPANDED = QuestDockMode.EXPANDED;
const QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED3 = value !== EXPANDED ? value14 : QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
items2[1] = {translateY: Reflect.apply(withSpring, moduleValue4, [QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED3,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED])};
object.transform = items2;
return object;
}
function QuestDockUnenrolledHeaderK() { // fn#104304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:8365, owner: QuestDockUnenrolledHeader.K, offset: 0x022900c3, size: 57 bytes, params: 1, frame: 12
const value = activeQuestDockMode.get();
const EXPANDED = QuestDockMode.EXPANDED;
return {right: value !== EXPANDED ? 0 : -1 * QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED};
}
function QuestDockUnenrolledHeaderG() { // fn#104306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:8853, owner: QuestDockUnenrolledHeader.G, offset: 0x0229014f, size: 47 bytes, params: 1, frame: 12
const value = activeQuestDockMode.get();
const EXPANDED = QuestDockMode.EXPANDED;
const QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED2 = value === EXPANDED ? 0 : QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED;
return {right: QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED2};
}
function QuestDockUnenrolledHeaderF() { // fn#104307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:9071, owner: QuestDockUnenrolledHeader.f, offset: 0x0229017e, size: 50 bytes, params: 1, frame: 11
const value = activeQuestDockMode.get();
const EXPANDED = QuestDockMode.EXPANDED;
return {pointerEvents: value !== EXPANDED ? 'none' : 'auto'};
}
function QuestDockUnenrolledHeaderB_104308() { // fn#104308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:9261, owner: QuestDockUnenrolledHeader.b, offset: 0x022901b0, size: 275 bytes, params: 1, frame: 17
var r2;
var moduleValue;
var moduleValue2;
const object = {};
const activeQuestDockModeBinding = activeQuestDockMode;
let get = activeQuestDockModeBinding.get;
const value2 = Reflect.apply(get, activeQuestDockModeBinding, []);
let EXPANDED = QuestDockMode.EXPANDED;
object.borderRadius = value2 === EXPANDED ? QUEST_DOCK_CONTENT_BORDER_RADII : ReactNativeModule.AccessibilityInfo;
const value4 = activeQuestDockMode.get();
EXPANDED = QuestDockMode.EXPANDED;
if (value4 === EXPANDED) {
r2 = QUEST_DOCK_CONTENT_BORDER_RADII;
} else if (env0_4) {
moduleValue = require(4577) /* metro dependency 4577: spring */;
r2 = moduleValue.withSpring(ReactNativeModule.View.get(), QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
} else {
r2 = ReactNativeModule.AccessibilityInfo;
}
object.borderBottomLeftRadius = r2;
const value7 = activeQuestDockMode.get();
EXPANDED = QuestDockMode.EXPANDED;
if (value7 === EXPANDED) {
r2 = QUEST_DOCK_CONTENT_BORDER_RADII;
} else if (env0_4) {
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
r2 = moduleValue2.withSpring(ReactNativeModule.View.get(), QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
} else {
r2 = ReactNativeModule.AccessibilityInfo;
}
object.borderBottomRightRadius = r2;
const questDockWrapperSpecsBinding = questDockWrapperSpecs;
get = questDockWrapperSpecsBinding.get;
object.width = Reflect.apply(get, questDockWrapperSpecsBinding, []).width;
return object;
}
function QuestDockUnenrolledHeaderB() { // fn#104302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:7270, owner: QuestDockUnenrolledHeader.B, offset: 0x0228fe4f, size: 545 bytes, params: 1, frame: 21
var r1;
var moduleValue;
var moduleValue2;
const object2 = {};
const value2 = activeQuestDockMode.get();
let EXPANDED = QuestDockMode.EXPANDED;
object2.borderTopLeftRadius = value2 === EXPANDED ? QUEST_DOCK_CONTENT_BORDER_RADII : env0_5;
const value4 = activeQuestDockMode.get();
EXPANDED = QuestDockMode.EXPANDED;
object2.borderTopRightRadius = value4 === EXPANDED ? QUEST_DOCK_CONTENT_BORDER_RADII : env0_5;
const value5 = activeQuestDockMode.get();
EXPANDED = QuestDockMode.EXPANDED;
if (value5 === EXPANDED) {
r1 = QUEST_DOCK_CONTENT_BORDER_RADII;
} else if (env0_4) {
moduleValue = require(4577) /* metro dependency 4577: spring */;
r1 = moduleValue.withSpring(env0_6.get(), QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
} else {
r1 = env0_5;
}
object2.borderBottomLeftRadius = r1;
const value8 = activeQuestDockMode.get();
EXPANDED = QuestDockMode.EXPANDED;
if (value8 === EXPANDED) {
r1 = QUEST_DOCK_CONTENT_BORDER_RADII;
} else if (env0_4) {
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
r1 = moduleValue2.withSpring(env0_6.get(), QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
} else {
r1 = env0_5;
}
object2.borderBottomRightRadius = r1;
const value11 = activeQuestDockMode.get();
EXPANDED = QuestDockMode.EXPANDED;
object2.width = value11 === EXPANDED ? questDockWrapperSpecs.get().width - 2 * QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED : questDockWrapperSpecs.get().width;
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
const value13 = activeQuestDockMode.get();
EXPANDED = QuestDockMode.EXPANDED;
const value14 = 0;
const QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED2 = value13 !== EXPANDED ? value14 : QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
const items2 = [{translateX: Reflect.apply(withSpring, springModule, [QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED2,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED])}];
const moduleValue4 = springModule;
withSpring = moduleValue4.withSpring;
const value = activeQuestDockMode.get();
EXPANDED = QuestDockMode.EXPANDED;
const QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED3 = value !== EXPANDED ? value14 : QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
items2[1] = {translateY: Reflect.apply(withSpring, moduleValue4, [QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED3,
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED])};
object2.transform = items2;
return object2;
}
function QuestDockUnenrolledHeaderK() { // fn#104304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:8365, owner: QuestDockUnenrolledHeader.K, offset: 0x022900c3, size: 57 bytes, params: 1, frame: 12
const value = activeQuestDockMode.get();
const EXPANDED = QuestDockMode.EXPANDED;
return {right: value !== EXPANDED ? 0 : -1 * QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED};
}
function QuestDockUnenrolledHeaderG() { // fn#104306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:8853, owner: QuestDockUnenrolledHeader.G, offset: 0x0229014f, size: 47 bytes, params: 1, frame: 12
const value = activeQuestDockMode.get();
const EXPANDED = QuestDockMode.EXPANDED;
const QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED2 = value === EXPANDED ? 0 : QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED;
return {right: QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED2};
}
function QuestDockUnenrolledHeaderF() { // fn#104307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:9071, owner: QuestDockUnenrolledHeader.f, offset: 0x0229017e, size: 50 bytes, params: 1, frame: 11
const value = activeQuestDockMode.get();
const EXPANDED = QuestDockMode.EXPANDED;
return {pointerEvents: value !== EXPANDED ? 'none' : 'auto'};
}
function QuestDockUnenrolledHeaderB_104308() { // fn#104308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:9261, owner: QuestDockUnenrolledHeader.b, offset: 0x022901b0, size: 275 bytes, params: 1, frame: 17
var r2;
var moduleValue;
var moduleValue2;
const object2 = {};
const activeQuestDockModeBinding = activeQuestDockMode;
let get = activeQuestDockModeBinding.get;
const value2 = Reflect.apply(get, activeQuestDockModeBinding, []);
let EXPANDED = QuestDockMode.EXPANDED;
object2.borderRadius = value2 === EXPANDED ? QUEST_DOCK_CONTENT_BORDER_RADII : env0_5;
const value4 = activeQuestDockMode.get();
EXPANDED = QuestDockMode.EXPANDED;
if (value4 === EXPANDED) {
r2 = QUEST_DOCK_CONTENT_BORDER_RADII;
} else if (env0_4) {
moduleValue = require(4577) /* metro dependency 4577: spring */;
r2 = moduleValue.withSpring(env0_6.get(), QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
} else {
r2 = env0_5;
}
object2.borderBottomLeftRadius = r2;
const value7 = activeQuestDockMode.get();
EXPANDED = QuestDockMode.EXPANDED;
if (value7 === EXPANDED) {
r2 = QUEST_DOCK_CONTENT_BORDER_RADII;
} else if (env0_4) {
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
r2 = moduleValue2.withSpring(env0_6.get(), QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
} else {
r2 = env0_5;
}
object2.borderBottomRightRadius = r2;
const questDockWrapperSpecsBinding = questDockWrapperSpecs;
get = questDockWrapperSpecsBinding.get;
object2.width = Reflect.apply(get, questDockWrapperSpecsBinding, []).width;
return object2;
}
global.__d(_fun104295, 13655, [57, 31, 27, 6528, 13572, 482, 33, 4501, 697, 4577, 13650, 13573, 478, 13569, 13580,
6531, 7120, 4048, 4002, 5176, 3860, 13652, 4017, 13568, 8141, 13656, 13631, 5475, 13658, 13659, 13622, 4573,
1244, 5278, 10139, 8638,
2]) /* metro module 13655, dependencies: [57, 31, 27, 6528, 13572, 482, 33, 4501, 697, 4577, 13650, 13573, 478, 13569, 13580, 6531, 7120, 4048, 4002, 5176, 3860, 13652, 4017, 13568, 8141, 13656, 13631, 5475, 13658, 13659, 13622, 4573, 1244, 5278, 10139, 8638, 2] */;
@@ -1,10 +1,15 @@
/* Metro module 13571; source: modules/quests/native/QuestDock/QuestDockUtils.tsx; dependencies: [27, 13572, 672, 4577, 2] */
import Durations from '../../../../utils/Durations.tsx'; /* Metro dependency 672 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as QuestDockConstantsModule from './QuestDockConstants.tsx'; /* Metro dependency 13572 */
function _fun103155(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:6, offset: 0x0225a722, size: 414 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const PixelRatio = (require(27) /* metro dependency 27 */).PixelRatio;
let value = require(13572) /* metro dependency 13572: QuestDockConstants */;
const PixelRatio = (ReactNativeModule).PixelRatio;
let value = QuestDockConstantsModule;
const env0_2 = value.QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED;
const env0_3 = value.QUEST_DOCK_COLLAPSED_MAX_WIDTH;
const env0_4 = value.QUEST_DOCK_COLLAPSED_HEIGHT;
@@ -20,12 +25,12 @@ function _fun103155(global, require, importDefault, importAll, module, exports,
const value4 = _fun103162();
object = {code: 'function getQuestDockClosedWidth_QuestDockUtilsTsx5(windowWidth,safeAreaLeft,safeAreaRight){const{QUEST_DOCK_COLLAPSED_MAX_WIDTH}=this.__closure;return Math.min(windowWidth-safeAreaLeft-safeAreaRight,QUEST_DOCK_COLLAPSED_MAX_WIDTH);}'};
const value5 = _fun103164();
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const Millis = (Durations).Millis;
const HOUR = Millis.HOUR;
const env0_12 = 3 * HOUR;
object = {code: 'function dimensionsLayoutTransition_QuestDockUtilsTsx6(values){const{withSpring,QUEST_DOCK_MODE_CHANGE_PHYSICS}=this.__closure;return{initialValues:{originX:values.currentOriginX,originY:values.currentOriginY,width:values.currentWidth,height:values.currentHeight},animations:{originX:withSpring(values.targetOriginX,QUEST_DOCK_MODE_CHANGE_PHYSICS),originY:withSpring(values.targetOriginY,QUEST_DOCK_MODE_CHANGE_PHYSICS),height:withSpring(values.targetHeight,QUEST_DOCK_MODE_CHANGE_PHYSICS),width:withSpring(values.targetWidth,QUEST_DOCK_MODE_CHANGE_PHYSICS)}};}'};
const value6 = _fun103166();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockUtils.tsx');
exports.roundToNearestPixel = value;
exports.getQuestDockExpandedHeightLimits = value2;
exports.getQuestDockCollapsedWidth = value3;
@@ -33,116 +38,118 @@ function _fun103155(global, require, importDefault, importAll, module, exports,
exports.getQuestDockClosedWidth = value5;
exports.isSoftDismissed = isSoftDismissed;
exports.dimensionsLayoutTransition = value6;
}
function _fun103156() { // fn#103156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:452, offset: 0x0225a8c0, size: 57 bytes, params: 1, frame: 4
const roundToNearestPixel2 = roundToNearestPixel;
roundToNearestPixel2.__closure = {PIXEL_DENSITY: env0_6};
roundToNearestPixel2.__workletHash = 9602449563120;
roundToNearestPixel2.__initData = env0_7;
return roundToNearestPixel2;
function roundToNearestPixel(a0) { // fn#103157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:487, offset: 0x0225a8f9, size: 38 bytes, params: 2, frame: 12
const Math = global.Math;
const round = Math.round;
const binding = env1_6;
return Reflect.apply(round, Math, [a0 * binding]) / binding;
}
function _fun103156() { // fn#103156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:452, offset: 0x0225a8c0, size: 57 bytes, params: 1, frame: 4
const closure = roundToNearestPixel;
closure.__closure = {PIXEL_DENSITY: env0_6};
closure.__workletHash = 9602449563120;
closure.__initData = env0_7;
return closure;
}
function _fun103158() { // fn#103158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:961, offset: 0x0225a91f, size: 57 bytes, params: 1, frame: 4
const closure = function(a0, a1, a2) {
var object = {};
object.minHeight = QUEST_DOCK_COLLAPSED_HEIGHT;
var Math = global.Math;
object.maxHeight = Math.min(a2, a0 - a1);
return object;
};
closure.__closure = {QUEST_DOCK_COLLAPSED_HEIGHT: QUEST_DOCK_COLLAPSED_HEIGHT};
closure.__workletHash = 880847803554;
closure.__initData = env0_8;
return closure;
}
function _fun103160() { // fn#103160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:1752, offset: 0x0225a98d, size: 66 bytes, params: 1, frame: 4
const closure = function(a0, a1, a2) {
var Math = global.Math;
var value2 = Math.max(a1, QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED);
Math = global.Math;
var value3 = Math.max(a2, QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED);
Math = global.Math;
return Math.min(a0 - value2 - value3, QUEST_DOCK_COLLAPSED_MAX_WIDTH);
};
closure.__closure = {QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED: QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED,
QUEST_DOCK_COLLAPSED_MAX_WIDTH: QUEST_DOCK_COLLAPSED_MAX_WIDTH};
closure.__workletHash = 1119343760780;
closure.__initData = env0_9;
return closure;
}
function _fun103162() { // fn#103162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:2367, offset: 0x0225aa22, size: 57 bytes, params: 1, frame: 4
const closure = function(a0, a1, a2) {
var Math = global.Math;
return Math.min(a0 - a1 - a2, QUEST_DOCK_COLLAPSED_MAX_WIDTH);
};
closure.__closure = {QUEST_DOCK_COLLAPSED_MAX_WIDTH: QUEST_DOCK_COLLAPSED_MAX_WIDTH};
closure.__workletHash = 6480418564130;
closure.__initData = env0_10;
return closure;
}
function _fun103164() { // fn#103164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:2897, offset: 0x0225aa88, size: 57 bytes, params: 1, frame: 4
const closure = function(a0, a1, a2) {
var Math = global.Math;
return Math.min(a0 - a1 - a2, QUEST_DOCK_COLLAPSED_MAX_WIDTH);
};
closure.__closure = {QUEST_DOCK_COLLAPSED_MAX_WIDTH: QUEST_DOCK_COLLAPSED_MAX_WIDTH};
closure.__workletHash = 14159592925974;
closure.__initData = env0_11;
return closure;
}
function _fun103166() { // fn#103166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:3773, offset: 0x0225aac1, size: 88 bytes, params: 1, frame: 14
const closure = dimensionsLayoutTransition;
const object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS;
closure.__closure = object2;
closure.__workletHash = 4497154070776;
closure.__initData = env0_13;
return closure;
}
function isSoftDismissed(a0) { // fn#103168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:4623, offset: 0x0225abe6, size: 46 bytes, params: 2, frame: 11
var r0;
var Date;
let value = a0 != null;
if (value) {
Date = global.Date;
value = Date.now() - a0;
value = value < env0_12;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function roundToNearestPixel(a0) { // fn#103157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:487, offset: 0x0225a8f9, size: 38 bytes, params: 2, frame: 12
const Math = global.Math;
const round = Math.round;
const binding = env1_6;
return Reflect.apply(round, Math, [a0 * binding]) / binding;
}
function dimensionsLayoutTransition({currentOriginX, currentOriginY, currentWidth, currentHeight, targetOriginX, targetOriginY, targetHeight, targetWidth}) { // fn#103167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:3815, offset: 0x0225ab19, size: 205 bytes, params: 2, frame: 20
const object2 = {};
object2.initialValues = {originX: currentOriginX, originY: currentOriginY, width: currentWidth,
height: currentHeight};
const object4 = {};
const value = environment.__proto__;
object4.originX = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginX,
QUEST_DOCK_MODE_CHANGE_PHYSICS);
object4.originY = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginY,
QUEST_DOCK_MODE_CHANGE_PHYSICS);
object4.height = (require(4577) /* metro dependency 4577: spring */).withSpring(targetHeight,
QUEST_DOCK_MODE_CHANGE_PHYSICS);
object4.width = (require(4577) /* metro dependency 4577: spring */).withSpring(targetWidth,
QUEST_DOCK_MODE_CHANGE_PHYSICS);
object2.animations = object4;
return object2;
function _fun103158() { // fn#103158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:961, offset: 0x0225a91f, size: 57 bytes, params: 1, frame: 4
const closure = function(a0, a1, a2) {
var object = {};
object.minHeight = QUEST_DOCK_COLLAPSED_HEIGHT;
var Math = global.Math;
object.maxHeight = Math.min(a2, a0 - a1);
return object;
};
closure.__closure = {QUEST_DOCK_COLLAPSED_HEIGHT: QUEST_DOCK_COLLAPSED_HEIGHT};
closure.__workletHash = 880847803554;
closure.__initData = env0_8;
return closure;
}
function _fun103160() { // fn#103160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:1752, offset: 0x0225a98d, size: 66 bytes, params: 1, frame: 4
const closure = function(a0, a1, a2) {
var Math = global.Math;
var value2 = Math.max(a1, QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED);
Math = global.Math;
var value3 = Math.max(a2, QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED);
Math = global.Math;
return Math.min(a0 - value2 - value3, QUEST_DOCK_COLLAPSED_MAX_WIDTH);
};
closure.__closure = {QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED: QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED,
QUEST_DOCK_COLLAPSED_MAX_WIDTH: QUEST_DOCK_COLLAPSED_MAX_WIDTH};
closure.__workletHash = 1119343760780;
closure.__initData = env0_9;
return closure;
}
function _fun103162() { // fn#103162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:2367, offset: 0x0225aa22, size: 57 bytes, params: 1, frame: 4
const closure = function(a0, a1, a2) {
var Math = global.Math;
return Math.min(a0 - a1 - a2, QUEST_DOCK_COLLAPSED_MAX_WIDTH);
};
closure.__closure = {QUEST_DOCK_COLLAPSED_MAX_WIDTH: QUEST_DOCK_COLLAPSED_MAX_WIDTH};
closure.__workletHash = 6480418564130;
closure.__initData = env0_10;
return closure;
}
function _fun103164() { // fn#103164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:2897, offset: 0x0225aa88, size: 57 bytes, params: 1, frame: 4
const closure = function(a0, a1, a2) {
var Math = global.Math;
return Math.min(a0 - a1 - a2, QUEST_DOCK_COLLAPSED_MAX_WIDTH);
};
closure.__closure = {QUEST_DOCK_COLLAPSED_MAX_WIDTH: QUEST_DOCK_COLLAPSED_MAX_WIDTH};
closure.__workletHash = 14159592925974;
closure.__initData = env0_11;
return closure;
}
function _fun103166() { // fn#103166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:3773, offset: 0x0225aac1, size: 88 bytes, params: 1, frame: 14
const dimensionsLayoutTransition2 = dimensionsLayoutTransition;
const object = {};
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS;
dimensionsLayoutTransition2.__closure = object;
dimensionsLayoutTransition2.__workletHash = 4497154070776;
dimensionsLayoutTransition2.__initData = env0_13;
return dimensionsLayoutTransition2;
function dimensionsLayoutTransition({currentOriginX, currentOriginY, currentWidth, currentHeight, targetOriginX, targetOriginY, targetHeight, targetWidth}) { // fn#103167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:3815, offset: 0x0225ab19, size: 205 bytes, params: 2, frame: 20
const object = {};
object.initialValues = {originX: currentOriginX, originY: currentOriginY, width: currentWidth,
height: currentHeight};
const object3 = {};
const value = environment.__proto__;
object3.originX = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginX,
QUEST_DOCK_MODE_CHANGE_PHYSICS);
object3.originY = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginY,
QUEST_DOCK_MODE_CHANGE_PHYSICS);
object3.height = (require(4577) /* metro dependency 4577: spring */).withSpring(targetHeight,
QUEST_DOCK_MODE_CHANGE_PHYSICS);
object3.width = (require(4577) /* metro dependency 4577: spring */).withSpring(targetWidth,
QUEST_DOCK_MODE_CHANGE_PHYSICS);
object.animations = object3;
return object;
}
}
function isSoftDismissed(a0) { // fn#103168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:4623, offset: 0x0225abe6, size: 46 bytes, params: 2, frame: 11
var r0;
var Date;
let value = a0 != null;
if (value) {
Date = global.Date;
value = Date.now() - a0;
value = value < env0_12;
r0 = value;
} else {
r0 = value;
}
return r0;
}
}
global.__d(_fun103155, 13571, [27, 13572, 672, 4577,
2]) /* metro module 13571, dependencies: [27, 13572, 672, 4577, 2] */;
@@ -1,30 +1,37 @@
/* Metro module 13578; source: modules/quests/native/QuestDock/WreathIcon.tsx; dependencies: [31, 33, 697, 3859, 13579, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as BaseIconImageModule from '../../../../design/components/Icon/native/BaseIconImage.tsx'; /* Metro dependency 3859 */
import * as Module13579Module from '../../../../by-id/module-13579.js'; /* Metro dependency 13579 */
function _fun103217(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13768:6, offset: 0x0225d1d5, size: 138 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/WreathIcon.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/WreathIcon.tsx');
exports.default = WreathIcon;
function WreathIcon(a0) { // fn#103218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13768:208, offset: 0x0225d25f, size: 154 bytes, params: 2, frame: 20
const style = a0.style;
const color = a0.color;
const r6 = color !== undefined ? color : (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
const value = Object.create(null);
value.style = 0;
value.color = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const BaseIconImage = (BaseIconImageModule).BaseIconImage;
return (
<BaseIconImage
source={Module13579Module}
color={r6}
style={style}
{...value2}
/>
);
}
}
function WreathIcon(a0) { // fn#103218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13768:208, offset: 0x0225d25f, size: 154 bytes, params: 2, frame: 20
const style = a0.style;
const color = a0.color;
const r6 = color !== undefined ? color : (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
const value = Object.create(null);
value.style = 0;
value.color = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const BaseIconImage = (require(3859) /* metro dependency 3859: BaseIconImage */).BaseIconImage;
return (
<BaseIconImage
source={require(13579) /* metro dependency 13579 */}
color={r6}
style={style}
{...value2}
/>
);
}
global.__d(_fun103217, 13578, [31, 33, 697, 3859, 13579,
2]) /* metro module 13578, dependencies: [31, 33, 697, 3859, 13579, 2] */;
@@ -1,46 +1,50 @@
/* Metro module 13652; source: modules/quests/native/QuestDock/useQuestDockAnimatedBorderRadius.tsx; dependencies: [31, 13576, 4017, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as QuestDockExternalCoordinationContextModule from './QuestDockExternalCoordinationContext.tsx'; /* Metro dependency 13576 */
function _fun104277(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13849:6, offset: 0x0228d804, size: 130 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
object = {code: 'function useQuestDockAnimatedBorderRadiusTsx1(){const{interpolate,questDockOffset,minBorder,maxBorder,Extrapolation}=this.__closure;return interpolate(questDockOffset.get(),[0,50],[minBorder,maxBorder],Extrapolation.CLAMP);}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/useQuestDockAnimatedBorderRadius.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/useQuestDockAnimatedBorderRadius.tsx');
exports.default = useQuestDockAnimatedBorderRadius;
function useQuestDockAnimatedBorderRadius(a0) { // fn#104278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13849:454, offset: 0x0228d886, size: 207 bytes, params: 2, frame: 21
const value = a1;
const env0_0 = a0;
const r10 = value !== undefined ? value : 0;
const binding = undefined;
const useContext = binding.useContext;
const QuestDockExternalCoordinationContext = (QuestDockExternalCoordinationContextModule).QuestDockExternalCoordinationContext;
const questDockOffset = Reflect.apply(useContext, binding, [QuestDockExternalCoordinationContext]).questDockOffset;
const useDerivedValue = ReanimatedRexportModule.useDerivedValue;
const useQuestDockAnimatedBorderRadiusU2 = useQuestDockAnimatedBorderRadiusU;
const object = {};
object.interpolate = ReanimatedRexportModule.interpolate;
object.questDockOffset = questDockOffset;
object.minBorder = r10;
object.maxBorder = a0;
const Extrapolation = ReanimatedRexportModule.Extrapolation;
object.Extrapolation = Extrapolation;
useQuestDockAnimatedBorderRadiusU2.__closure = object;
useQuestDockAnimatedBorderRadiusU2.__workletHash = 17005846780112;
useQuestDockAnimatedBorderRadiusU2.__initData = env0_3;
return Reflect.apply(useDerivedValue, ReanimatedRexportModule, [useQuestDockAnimatedBorderRadiusU2]);
function useQuestDockAnimatedBorderRadiusU() { // fn#104279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13849:621, owner: useQuestDockAnimatedBorderRadius.u, offset: 0x0228d955, size: 113 bytes, params: 1, frame: 21
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = value.interpolate;
const value3 = questDockOffset.get();
const items2 = [env0_1, env0_0];
const Extrapolation = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Extrapolation;
const CLAMP = Extrapolation.CLAMP;
return Reflect.apply(interpolate, value, [value3, [0, 50], items2, CLAMP]);
}
}
}
function useQuestDockAnimatedBorderRadius(a0) { // fn#104278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13849:454, offset: 0x0228d886, size: 207 bytes, params: 2, frame: 21
const value = a1;
const env0_0 = a0;
const r10 = value !== undefined ? value : 0;
const binding = undefined;
const useContext = binding.useContext;
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
const questDockOffset = Reflect.apply(useContext, binding, [QuestDockExternalCoordinationContext]).questDockOffset;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
const closure = useQuestDockAnimatedBorderRadiusU;
const object2 = {};
object2.interpolate = reanimatedRexportModule.interpolate;
object2.questDockOffset = questDockOffset;
object2.minBorder = r10;
object2.maxBorder = a0;
const Extrapolation = reanimatedRexportModule.Extrapolation;
object2.Extrapolation = Extrapolation;
closure.__closure = object2;
closure.__workletHash = 17005846780112;
closure.__initData = env0_3;
return Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
}
function useQuestDockAnimatedBorderRadiusU() { // fn#104279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13849:621, owner: useQuestDockAnimatedBorderRadius.u, offset: 0x0228d955, size: 113 bytes, params: 1, frame: 21
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = value.interpolate;
const value3 = questDockOffset.get();
const items2 = [env0_1, env0_0];
const Extrapolation = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Extrapolation;
const CLAMP = Extrapolation.CLAMP;
return Reflect.apply(interpolate, value, [value3, [0, 50], items2, CLAMP]);
}
global.__d(_fun104277, 13652, [31, 13576, 4017, 2]) /* metro module 13652, dependencies: [31, 13576, 4017, 2] */;
@@ -1,20 +1,24 @@
/* Metro module 13583; source: modules/quests/native/QuestDockDismissalToast.tsx; dependencies: [31, 27, 33, 4501, 697, 4573, 1244, 11808, 3857, 7548, 2] */
import Module11808 from '../../../by-id/module-11808.js'; /* Metro dependency 11808 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun103234(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13773:6, offset: 0x0225dfb8, size: 213 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const value = require(27) /* metro dependency 27 */;
const env0_3 = value.Image;
const env0_4 = value.View;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
ReactModule;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
var object2 = {'opacity': 0.35, 'position': 'absolute', 'top': '50%', 'left': 0, 'height': 16, 'width': 16};
object2.tintColor = importDefault(dependencyMap[4]).colors.INTERACTIVE_TEXT_ACTIVE;
object2.transform = [{translateY: -10}];
return {toastArrowForwardIconContainer: {'height': 6, 'width': 16}, toastArrowForwardIcon: object2};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDockDismissalToast.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDockDismissalToast.tsx');
exports.displayQuestDismissalToast = function() {
var defaultImport = importDefault(dependencyMap[8]);
var object = {key: 'QUEST_BAR_DISMISS_TOAST'};
@@ -23,29 +27,31 @@ function _fun103234(global, require, importDefault, importAll, module, exports,
object.position = 'bottom';
defaultImport.open(object);
};
function QuestDockDismissalNotification() { // fn#103235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13773:402, offset: 0x0225e08d, size: 140 bytes, params: 1, frame: 19
const env0_0 = useStyles();
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<Text color="mobile-text-heading-primary" variant="text-sm/semibold">
{intl.format((IndexNativeModule).t.dYE1px, {arrowHook: arrowHook})}
</Text>
);
function arrowHook() { // fn#103236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13773:597, owner: QuestDockDismissalNotification.arrowHook, offset: 0x0225e119, size: 102 bytes, params: 1, frame: 19
const stylesBinding = styles;
return (
<View style={stylesBinding.toastArrowForwardIconContainer}>
<Image
resizeMode="contain"
source={Module11808}
style={stylesBinding.toastArrowForwardIcon}
/>
</View>
);
}
}
}
function QuestDockDismissalNotification() { // fn#103235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13773:402, offset: 0x0225e08d, size: 140 bytes, params: 1, frame: 19
const env0_0 = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Text color="mobile-text-heading-primary" variant="text-sm/semibold">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.dYE1px, {arrowHook: arrowHook})}
</Text>
);
}
function arrowHook() { // fn#103236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13773:597, owner: QuestDockDismissalNotification.arrowHook, offset: 0x0225e119, size: 102 bytes, params: 1, frame: 19
const stylesBinding = styles;
return (
<View style={stylesBinding.toastArrowForwardIconContainer}>
<Image
resizeMode="contain"
source={importDefault(11808) /* metro dependency 11808 */}
style={stylesBinding.toastArrowForwardIcon}
/>
</View>
);
}
global.__d(_fun103234, 13583, [31, 27, 33, 4501, 697, 4573, 1244, 11808, 3857, 7548,
2]) /* metro module 13583, dependencies: [31, 27, 33, 4501, 697, 4573, 1244, 11808, 3857, 7548, 2] */;
@@ -1,17 +1,24 @@
/* Metro module 10574; source: modules/quests/native/QuestEmbed.native.tsx; dependencies: [27, 1310, 7093, 6528, 661, 4118, 477, 1244, 7116, 9950, 6531, 4002, 9495, 1581, 10575, 7091, 7110, 7114, 8189, 2] */
import ThemeStore from '../../user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */
import QuestStore from '../QuestStore.tsx'; /* Metro dependency 7093 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as MetaQuestUtilsAndroidModule from '../../device/MetaQuestUtils.android.tsx'; /* Metro dependency 1581 */
import * as ConstantsModule2 from '../../instant_invite/Constants.tsx'; /* Metro dependency 4118 */
import * as QuestConstantsModule from '../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestTypesModule from '../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as QuestDataUtilsModule from '../utils/QuestDataUtils.tsx'; /* Metro dependency 7091 */
import * as QuestTaskUtilsModule from '../utils/QuestTaskUtils.tsx'; /* Metro dependency 7116 */
import * as QuestCopyHooksModule from '../hooks/QuestCopyHooks.tsx'; /* Metro dependency 9950 */
function _fun81578(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10760:6, offset: 0x01ed4cb0, size: 265 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).Image;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
const questConstantsModule = require(6528) /* metro dependency 6528: QuestConstants */;
const env0_6 = questConstantsModule.QuestsExperimentLocations;
const env0_7 = questConstantsModule.QuestEmbedFallbackReason;
const env0_8 = (require(661) /* metro dependency 661: Constants */).ThemeTypes;
const env0_9 = (require(4118) /* metro dependency 4118: Constants */).InviteTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestEmbed.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestEmbed.native.tsx');
exports.createQuestsEmbed = function({questId, theme, currentUser}) {
var buildQuestsEmbedPropsBinding = buildQuestsEmbedProps;
var object = {questId: questId};
@@ -19,135 +26,208 @@ function _fun81578(global, require, importDefault, importAll, module, exports, d
object.currentUser = currentUser;
return buildQuestsEmbedPropsBinding(object);
};
}
function buildBaseEmbedProps({titleText, bodyText, themeColors, thumbnailUrl}) { // fn#81579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10760:244, offset: 0x01ed4db9, size: 266 bytes, params: 2, frame: 16
const baseColors = themeColors.baseColors;
const colors = themeColors.colors;
const object3 = {};
copyDataProperties(object3, baseColors, undefined);
const headerColor = colors.headerColor;
object3['headerColor'] = headerColor;
object3['titleText'] = titleText;
object3['titleColor'] = colors.titleColor;
object3['subtitleColor'] = colors.bodyTextColor;
object3['bodyTextColor'] = colors.bodyTextColor;
object3['thumbnailUrl'] = thumbnailUrl;
object3['embedCanBeTapped'] = true;
object3['canBeAccepted'] = true;
const GUILD = InviteTypes.GUILD;
object3['type'] = GUILD;
let value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
const object4 = {};
copyDataProperties(object4, object3, headerColor);
if (value) {
object4['headerText'] = null;
object4['subtitle'] = bodyText;
} else {
object4['headerText'] = undefined;
object4['subtitle'] = bodyText;
function buildBaseEmbedProps({titleText, bodyText, themeColors, thumbnailUrl}) { // fn#81579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10760:244, offset: 0x01ed4db9, size: 266 bytes, params: 2, frame: 16
const baseColors = themeColors.baseColors;
const colors = themeColors.colors;
const object = {};
copyDataProperties(object, baseColors, undefined);
const headerColor = colors.headerColor;
object['headerColor'] = headerColor;
object['titleText'] = titleText;
object['titleColor'] = colors.titleColor;
object['subtitleColor'] = colors.bodyTextColor;
object['bodyTextColor'] = colors.bodyTextColor;
object['thumbnailUrl'] = thumbnailUrl;
object['embedCanBeTapped'] = true;
object['canBeAccepted'] = true;
const GUILD = InviteTypes.GUILD;
object['type'] = GUILD;
let value = PlatformUtilsModule;
value = value.isAndroid();
const object2 = {};
copyDataProperties(object2, object, headerColor);
if (value) {
object2['headerText'] = null;
object2['subtitle'] = bodyText;
} else {
object2['headerText'] = undefined;
object2['subtitle'] = bodyText;
}
return object2;
}
return object4;
}
function buildSupportedOnMobileEmbedBodyText({quest, currentUser}) { // fn#81580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10760:651, offset: 0x01ed4ec3, size: 327 bytes, params: 2, frame: 21
var intl;
const expiresAt = quest.config.expiresAt;
const Date = global.Date;
const date = new Date();
if (expiresAt < date.toISOString()) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['ge+AJp'],
{questName: quest.config.messages.questName});
function buildSupportedOnMobileEmbedBodyText({quest, currentUser}) { // fn#81580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10760:651, offset: 0x01ed4ec3, size: 327 bytes, params: 2, frame: 21
var intl;
const expiresAt = quest.config.expiresAt;
const Date = global.Date;
const date = new Date();
if (expiresAt < date.toISOString()) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['ge+AJp'],
{questName: quest.config.messages.questName});
}
const questTaskDetails = (QuestTaskUtilsModule).getQuestTaskDetails(quest);
const thirdPartyTaskDetails = (QuestTaskUtilsModule).getThirdPartyTaskDetails(quest);
const getQuestsInstructionsToWinReward = QuestCopyHooksModule.getQuestsInstructionsToWinReward;
const object = {quest: quest, taskDetails: questTaskDetails};
const EMBED_MOBILE = QuestsExperimentLocations.EMBED_MOBILE;
object.location = EMBED_MOBILE;
const QuestContent = (QuestTypesModule).QuestContent;
const QUEST_EMBED_MOBILE = QuestContent.QUEST_EMBED_MOBILE;
object.sourceQuestContent = QUEST_EMBED_MOBILE;
object.thirdPartyTaskDetails = thirdPartyTaskDetails ?? undefined;
object.withoutMarkdown = true;
object.currentUser = currentUser;
return Reflect.apply(getQuestsInstructionsToWinReward, QuestCopyHooksModule, [object]);
}
const questTaskDetails = (require(7116) /* metro dependency 7116: QuestTaskUtils */).getQuestTaskDetails(quest);
const thirdPartyTaskDetails = (require(7116) /* metro dependency 7116: QuestTaskUtils */).getThirdPartyTaskDetails(quest);
const questCopyHooksModule = require(9950) /* metro dependency 9950: QuestCopyHooks */;
const getQuestsInstructionsToWinReward = questCopyHooksModule.getQuestsInstructionsToWinReward;
const object2 = {quest: quest, taskDetails: questTaskDetails};
const EMBED_MOBILE = QuestsExperimentLocations.EMBED_MOBILE;
object2.location = EMBED_MOBILE;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const QUEST_EMBED_MOBILE = QuestContent.QUEST_EMBED_MOBILE;
object2.sourceQuestContent = QUEST_EMBED_MOBILE;
object2.thirdPartyTaskDetails = thirdPartyTaskDetails ?? undefined;
object2.withoutMarkdown = true;
object2.currentUser = currentUser;
return Reflect.apply(getQuestsInstructionsToWinReward, questCopyHooksModule, [object2]);
}
function buildQuestsEmbedProps({questId, themeColors, currentUser}) { // fn#81581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10760:1173, offset: 0x01ed500a, size: 1769 bytes, params: 2, frame: 36
var r19;
var r0;
var baseEmbedPropsBinding;
var moduleValue3;
var isShareableQuest;
var config;
var moduleValue4;
var buildBaseEmbedPropsBinding;
var object3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var quest;
var colors;
var value4;
var expiresAt;
var date;
var value7;
var value8;
var object4;
var formatToPlainString;
var EAYZAr;
var messages;
var moduleValue6;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
var moduleValue7;
var moduleValue8;
var object6;
const metaQuestUtilsAndroidModule = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
if (metaQuestUtilsAndroidModule.isMetaQuest()) {
object3 = {};
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
object6 = {};
object6.titleText = intl.string(t['6LxbQM']);
object6.bodyText = intl.string(t.CXEb9p);
object6.themeColors = themeColors;
object6.thumbnailUrl = Image.resolveAssetSource(importDefault(10575) /* metro dependency 10575 */).uri;
copyDataProperties(object3, buildBaseEmbedPropsBinding(object6), undefined);
object3['acceptLabelText'] = intl.string(t.hvVgAZ);
colors = themeColors.colors;
object3['acceptLabelBackgroundColor'] = colors.acceptBlurpleLabelBackgroundColor;
colors = themeColors.colors;
object3['acceptLabelColor'] = colors.acceptLabelGreenColor;
return object3;
}
const questDataUtilsModule = require(7091) /* metro dependency 7091: QuestDataUtils */;
const questOrReplacement = questDataUtilsModule.findQuestOrReplacement(questId, QuestStore.quests,
QuestStore.excludedQuests);
const value3 = QuestStore.excludedQuests.get(questId);
if (questOrReplacement != null) {
if (questOrReplacement == null) {
function buildQuestsEmbedProps({questId, themeColors, currentUser}) { // fn#81581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10760:1173, offset: 0x01ed500a, size: 1769 bytes, params: 2, frame: 36
var r19;
var r0;
var baseEmbedPropsBinding;
var moduleValue3;
var isShareableQuest;
var config;
var moduleValue4;
var buildBaseEmbedPropsBinding;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var quest;
var colors;
var value4;
var expiresAt;
var date;
var value7;
var themeStoreBinding;
var value8;
var object2;
var formatToPlainString;
var EAYZAr;
var messages;
var moduleValue6;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
var moduleValue7;
var moduleValue8;
var object5;
if (MetaQuestUtilsAndroidModule.isMetaQuest()) {
object = {};
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
object5 = {};
object5.titleText = intl.string(t['6LxbQM']);
object5.bodyText = intl.string(t.CXEb9p);
object5.themeColors = themeColors;
object5.thumbnailUrl = Image.resolveAssetSource(importDefault(10575) /* metro dependency 10575 */).uri;
copyDataProperties(object, buildBaseEmbedPropsBinding(object5), undefined);
object['acceptLabelText'] = intl.string(t.hvVgAZ);
colors = themeColors.colors;
object['acceptLabelBackgroundColor'] = colors.acceptBlurpleLabelBackgroundColor;
colors = themeColors.colors;
object['acceptLabelColor'] = colors.acceptLabelGreenColor;
return object;
}
const questOrReplacement = QuestDataUtilsModule.findQuestOrReplacement(questId, QuestStore.quests,
QuestStore.excludedQuests);
const value3 = QuestStore.excludedQuests.get(questId);
if (questOrReplacement != null) {
if (questOrReplacement == null) {
if (value3 != null) {
moduleValue8 = require(7110) /* metro dependency 7110: AnalyticsActions */;
moduleValue8.trackQuestEmbedFallbackViewed(questId, QuestEmbedFallbackReason.EXCLUDED_QUEST);
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
object = {};
object.titleText = intl.string(t.Dd6Daw);
object.bodyText = intl.string(t.ii4mJo);
object.themeColors = themeColors;
object.thumbnailUrl = Image.resolveAssetSource(importDefault(10575) /* metro dependency 10575 */).uri;
baseEmbedPropsBinding = buildBaseEmbedPropsBinding(object);
} else {
moduleValue7 = require(7110) /* metro dependency 7110: AnalyticsActions */;
moduleValue7.trackQuestEmbedFallbackViewed(questId, QuestEmbedFallbackReason.UNKNOWN_QUEST);
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
object = {};
object.titleText = intl.string(t['rxf+nx']);
object.bodyText = intl.string(t.Ow5AQI);
object.themeColors = themeColors;
object.thumbnailUrl = Image.resolveAssetSource(importDefault(10575) /* metro dependency 10575 */).uri;
baseEmbedPropsBinding = buildBaseEmbedPropsBinding(object);
}
r0 = baseEmbedPropsBinding;
} else {
moduleValue3 = require(7114) /* metro dependency 7114: QuestUtils */;
isShareableQuest = moduleValue3.isShareableQuest;
config = questOrReplacement.config;
if (Reflect.apply(isShareableQuest, moduleValue3, [config])) {
object = {themeColors: themeColors, quest: questOrReplacement, currentUser: currentUser};
themeColors = object.themeColors;
quest = object.quest;
currentUser = object.currentUser;
colors = themeColors.colors;
value4 = quest.userStatus?.enrolledAt != null;
config = quest.config;
expiresAt = config.expiresAt;
date = new global.Date();
value7 = expiresAt < date.toISOString();
themeStoreBinding = ThemeStore;
r19 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(themeStoreBinding.getState().theme) ? ThemeTypes.DARK : ThemeTypes.LIGHT;
value8 = QuestStore.questEnrollmentBlockedUntil != null;
object = {};
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
object2 = {};
formatToPlainString = intl.formatToPlainString;
EAYZAr = t.EAYZAr;
config = quest.config;
messages = config.messages;
object2.titleText = Reflect.apply(formatToPlainString, intl, [EAYZAr, {questName: messages.questName}]);
config = quest.config;
messages = config.messages;
object2.subtitle = messages.gamePublisher;
object2.bodyText = buildSupportedOnMobileEmbedBodyText({quest: quest, currentUser: currentUser});
object2.themeColors = themeColors;
moduleValue6 = require(9495) /* metro dependency 9495: AssetUtils */;
object2.thumbnailUrl = moduleValue6.getQuestAsset(quest, QuestAssetType.GAME_TILE, r19).url;
copyDataProperties(object, buildBaseEmbedPropsBinding(object2), undefined);
object['acceptLabelText'] = value4 || value7 ? value7 ? intl.string(t.hvVgAZ) : intl.string(t['th2+0j']) : value8 ? intl.string(t['th2+0j']) : intl.string(t.kUQLMJ);
object['acceptLabelBackgroundColor'] = colors.acceptBlurpleLabelBackgroundColor;
colors = themeColors.colors;
object['acceptLabelColor'] = colors.acceptLabelGreenColor;
object['thumbnailCornerRadius'] = 8;
r0 = object;
} else {
moduleValue4 = require(7110) /* metro dependency 7110: AnalyticsActions */;
moduleValue4.trackQuestEmbedFallbackViewed(questId, QuestEmbedFallbackReason.NOT_SHAREABLE_QUEST);
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
object = {};
object.titleText = intl.string(t.Dd6Daw);
object.bodyText = intl.string(t.NXrP3N);
object.themeColors = themeColors;
object.thumbnailUrl = Image.resolveAssetSource(importDefault(10575) /* metro dependency 10575 */).uri;
r0 = buildBaseEmbedPropsBinding(object);
}
}
} else if (QuestStore.isFetchingCurrentQuests) {
r0 = buildBaseEmbedProps({themeColors: themeColors});
} else if (questOrReplacement == null) {
if (value3 != null) {
moduleValue8 = require(7110) /* metro dependency 7110: AnalyticsActions */;
moduleValue8.trackQuestEmbedFallbackViewed(questId, QuestEmbedFallbackReason.EXCLUDED_QUEST);
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
object3 = {};
object3.titleText = intl.string(t.Dd6Daw);
object3.bodyText = intl.string(t.ii4mJo);
object3.themeColors = themeColors;
object3.thumbnailUrl = Image.resolveAssetSource(importDefault(10575) /* metro dependency 10575 */).uri;
baseEmbedPropsBinding = buildBaseEmbedPropsBinding(object3);
object = {};
object.titleText = intl.string(t.Dd6Daw);
object.bodyText = intl.string(t.ii4mJo);
object.themeColors = themeColors;
object.thumbnailUrl = Image.resolveAssetSource(importDefault(10575) /* metro dependency 10575 */).uri;
baseEmbedPropsBinding = buildBaseEmbedPropsBinding(object);
} else {
moduleValue7 = require(7110) /* metro dependency 7110: AnalyticsActions */;
moduleValue7.trackQuestEmbedFallbackViewed(questId, QuestEmbedFallbackReason.UNKNOWN_QUEST);
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
object3 = {};
object3.titleText = intl.string(t['rxf+nx']);
object3.bodyText = intl.string(t.Ow5AQI);
object3.themeColors = themeColors;
object3.thumbnailUrl = Image.resolveAssetSource(importDefault(10575) /* metro dependency 10575 */).uri;
baseEmbedPropsBinding = buildBaseEmbedPropsBinding(object3);
object = {};
object.titleText = intl.string(t['rxf+nx']);
object.bodyText = intl.string(t.Ow5AQI);
object.themeColors = themeColors;
object.thumbnailUrl = Image.resolveAssetSource(importDefault(10575) /* metro dependency 10575 */).uri;
baseEmbedPropsBinding = buildBaseEmbedPropsBinding(object);
}
r0 = baseEmbedPropsBinding;
} else {
@@ -155,128 +235,58 @@ function buildQuestsEmbedProps({questId, themeColors, currentUser}) { // fn#8158
isShareableQuest = moduleValue3.isShareableQuest;
config = questOrReplacement.config;
if (Reflect.apply(isShareableQuest, moduleValue3, [config])) {
object3 = {themeColors: themeColors, quest: questOrReplacement, currentUser: currentUser};
themeColors = object3.themeColors;
quest = object3.quest;
currentUser = object3.currentUser;
object = {themeColors: themeColors, quest: questOrReplacement, currentUser: currentUser};
themeColors = object.themeColors;
quest = object.quest;
currentUser = object.currentUser;
colors = themeColors.colors;
value4 = quest.userStatus?.enrolledAt != null;
config = quest.config;
expiresAt = config.expiresAt;
date = new global.Date();
value7 = expiresAt < date.toISOString();
r19 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(ThemeStore.getState().theme) ? ThemeTypes.DARK : ThemeTypes.LIGHT;
themeStoreBinding = ThemeStore;
r19 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(themeStoreBinding.getState().theme) ? ThemeTypes.DARK : ThemeTypes.LIGHT;
value8 = QuestStore.questEnrollmentBlockedUntil != null;
object3 = {};
object = {};
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
object4 = {};
object2 = {};
formatToPlainString = intl.formatToPlainString;
EAYZAr = t.EAYZAr;
config = quest.config;
messages = config.messages;
object4.titleText = Reflect.apply(formatToPlainString, intl, [EAYZAr, {questName: messages.questName}]);
object2.titleText = Reflect.apply(formatToPlainString, intl, [EAYZAr, {questName: messages.questName}]);
config = quest.config;
messages = config.messages;
object4.subtitle = messages.gamePublisher;
object4.bodyText = buildSupportedOnMobileEmbedBodyText({quest: quest, currentUser: currentUser});
object4.themeColors = themeColors;
object2.subtitle = messages.gamePublisher;
object2.bodyText = buildSupportedOnMobileEmbedBodyText({quest: quest, currentUser: currentUser});
object2.themeColors = themeColors;
moduleValue6 = require(9495) /* metro dependency 9495: AssetUtils */;
object4.thumbnailUrl = moduleValue6.getQuestAsset(quest, QuestAssetType.GAME_TILE, r19).url;
copyDataProperties(object3, buildBaseEmbedPropsBinding(object4), undefined);
object3['acceptLabelText'] = value4 || value7 ? value7 ? intl.string(t.hvVgAZ) : intl.string(t['th2+0j']) : value8 ? intl.string(t['th2+0j']) : intl.string(t.kUQLMJ);
object3['acceptLabelBackgroundColor'] = colors.acceptBlurpleLabelBackgroundColor;
object2.thumbnailUrl = moduleValue6.getQuestAsset(quest, QuestAssetType.GAME_TILE, r19).url;
copyDataProperties(object, buildBaseEmbedPropsBinding(object2), undefined);
object['acceptLabelText'] = value4 || value7 ? value7 ? intl.string(t.hvVgAZ) : intl.string(t['th2+0j']) : value8 ? intl.string(t['th2+0j']) : intl.string(t.kUQLMJ);
object['acceptLabelBackgroundColor'] = colors.acceptBlurpleLabelBackgroundColor;
colors = themeColors.colors;
object3['acceptLabelColor'] = colors.acceptLabelGreenColor;
object3['thumbnailCornerRadius'] = 8;
r0 = object3;
object['acceptLabelColor'] = colors.acceptLabelGreenColor;
object['thumbnailCornerRadius'] = 8;
r0 = object;
} else {
moduleValue4 = require(7110) /* metro dependency 7110: AnalyticsActions */;
moduleValue4.trackQuestEmbedFallbackViewed(questId, QuestEmbedFallbackReason.NOT_SHAREABLE_QUEST);
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
object3 = {};
object3.titleText = intl.string(t.Dd6Daw);
object3.bodyText = intl.string(t.NXrP3N);
object3.themeColors = themeColors;
object3.thumbnailUrl = Image.resolveAssetSource(importDefault(10575) /* metro dependency 10575 */).uri;
r0 = buildBaseEmbedPropsBinding(object3);
object = {};
object.titleText = intl.string(t.Dd6Daw);
object.bodyText = intl.string(t.NXrP3N);
object.themeColors = themeColors;
object.thumbnailUrl = Image.resolveAssetSource(importDefault(10575) /* metro dependency 10575 */).uri;
r0 = buildBaseEmbedPropsBinding(object);
}
}
} else if (QuestStore.isFetchingCurrentQuests) {
r0 = buildBaseEmbedProps({themeColors: themeColors});
} else if (questOrReplacement == null) {
if (value3 != null) {
moduleValue8 = require(7110) /* metro dependency 7110: AnalyticsActions */;
moduleValue8.trackQuestEmbedFallbackViewed(questId, QuestEmbedFallbackReason.EXCLUDED_QUEST);
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
object3 = {};
object3.titleText = intl.string(t.Dd6Daw);
object3.bodyText = intl.string(t.ii4mJo);
object3.themeColors = themeColors;
object3.thumbnailUrl = Image.resolveAssetSource(importDefault(10575) /* metro dependency 10575 */).uri;
baseEmbedPropsBinding = buildBaseEmbedPropsBinding(object3);
} else {
moduleValue7 = require(7110) /* metro dependency 7110: AnalyticsActions */;
moduleValue7.trackQuestEmbedFallbackViewed(questId, QuestEmbedFallbackReason.UNKNOWN_QUEST);
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
object3 = {};
object3.titleText = intl.string(t['rxf+nx']);
object3.bodyText = intl.string(t.Ow5AQI);
object3.themeColors = themeColors;
object3.thumbnailUrl = Image.resolveAssetSource(importDefault(10575) /* metro dependency 10575 */).uri;
baseEmbedPropsBinding = buildBaseEmbedPropsBinding(object3);
}
r0 = baseEmbedPropsBinding;
} else {
moduleValue3 = require(7114) /* metro dependency 7114: QuestUtils */;
isShareableQuest = moduleValue3.isShareableQuest;
config = questOrReplacement.config;
if (Reflect.apply(isShareableQuest, moduleValue3, [config])) {
object3 = {themeColors: themeColors, quest: questOrReplacement, currentUser: currentUser};
themeColors = object3.themeColors;
quest = object3.quest;
currentUser = object3.currentUser;
colors = themeColors.colors;
value4 = quest.userStatus?.enrolledAt != null;
config = quest.config;
expiresAt = config.expiresAt;
date = new global.Date();
value7 = expiresAt < date.toISOString();
r19 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(ThemeStore.getState().theme) ? ThemeTypes.DARK : ThemeTypes.LIGHT;
value8 = QuestStore.questEnrollmentBlockedUntil != null;
object3 = {};
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
object4 = {};
formatToPlainString = intl.formatToPlainString;
EAYZAr = t.EAYZAr;
config = quest.config;
messages = config.messages;
object4.titleText = Reflect.apply(formatToPlainString, intl, [EAYZAr, {questName: messages.questName}]);
config = quest.config;
messages = config.messages;
object4.subtitle = messages.gamePublisher;
object4.bodyText = buildSupportedOnMobileEmbedBodyText({quest: quest, currentUser: currentUser});
object4.themeColors = themeColors;
moduleValue6 = require(9495) /* metro dependency 9495: AssetUtils */;
object4.thumbnailUrl = moduleValue6.getQuestAsset(quest, QuestAssetType.GAME_TILE, r19).url;
copyDataProperties(object3, buildBaseEmbedPropsBinding(object4), undefined);
object3['acceptLabelText'] = value4 || value7 ? value7 ? intl.string(t.hvVgAZ) : intl.string(t['th2+0j']) : value8 ? intl.string(t['th2+0j']) : intl.string(t.kUQLMJ);
object3['acceptLabelBackgroundColor'] = colors.acceptBlurpleLabelBackgroundColor;
colors = themeColors.colors;
object3['acceptLabelColor'] = colors.acceptLabelGreenColor;
object3['thumbnailCornerRadius'] = 8;
r0 = object3;
} else {
moduleValue4 = require(7110) /* metro dependency 7110: AnalyticsActions */;
moduleValue4.trackQuestEmbedFallbackViewed(questId, QuestEmbedFallbackReason.NOT_SHAREABLE_QUEST);
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
object3 = {};
object3.titleText = intl.string(t.Dd6Daw);
object3.bodyText = intl.string(t.NXrP3N);
object3.themeColors = themeColors;
object3.thumbnailUrl = Image.resolveAssetSource(importDefault(10575) /* metro dependency 10575 */).uri;
r0 = buildBaseEmbedPropsBinding(object3);
}
return r0;
}
return r0;
}
global.__d(_fun81578, 10574, [27, 1310, 7093, 6528, 661, 4118, 477, 1244, 7116, 9950, 6531, 4002, 9495, 1581, 10575,
7091, 7110, 7114, 8189,
2]) /* metro module 10574, dependencies: [27, 1310, 7093, 6528, 661, 4118, 477, 1244, 7116, 9950, 6531, 4002, 9495, 1581, 10575, 7091, 7110, 7114, 8189, 2] */;
@@ -1,107 +1,120 @@
/* Metro module 13638; source: modules/quests/native/QuestEnrollmentBlockedBottomSheet/QuestEnrollmentBlockedBottomSheet.tsx; dependencies: [31, 27, 7093, 33, 4501, 697, 566, 10183, 6531, 7054, 6275, 4573, 1244, 2] */
import UseCountdown from '../../../../hooks/useCountdown.tsx'; /* Metro dependency 7054 */
import QuestStore from '../../QuestStore.tsx'; /* Metro dependency 7093 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun104141(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13835:6, offset: 0x02287abf, size: 373 bytes, params: 8, frame: 22
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center'};
ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingHorizontal = PX_16;
object2.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingTop = PX_16;
object2.paddingTop = PX_16;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object5.gap = PX_24;
object4.heading = object5;
const object6 = {'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center'};
object2.gap = PX_24;
object.heading = object2;
const object3 = {'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingHorizontal = PX_16;
object3.paddingHorizontal = PX_16;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object6.paddingBottom = PX_32;
object4.container = object6;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestEnrollmentBlockedBottomSheet/QuestEnrollmentBlockedBottomSheet.tsx');
object3.paddingBottom = PX_32;
object.container = object3;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestEnrollmentBlockedBottomSheet/QuestEnrollmentBlockedBottomSheet.tsx');
exports.default = QuestEnrollmentBlockedBottomSheetConnected;
}
function QuestEnrollmentBlockedBottomSheet({questEnrollmentBlockedUntil}) { // fn#104142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13835:474, offset: 0x02287c34, size: 541 bytes, params: 2, frame: 36
var r2;
var r0;
var date;
var BottomSheet;
var object;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var formatToPlainString;
var property;
var object2;
const styles = useStyles();
const defaultImport = importDefault(7054) /* metro dependency 7054: useCountdown */;
if (questEnrollmentBlockedUntil != null) {
r2 = questEnrollmentBlockedUntil;
} else {
date = new global.Date();
function QuestEnrollmentBlockedBottomSheet({questEnrollmentBlockedUntil}) { // fn#104142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13835:474, offset: 0x02287c34, size: 541 bytes, params: 2, frame: 36
var r2;
var r0;
var date;
var BottomSheet;
var object2;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var formatToPlainString;
var property;
var object;
const styles = useStyles();
const defaultImport = UseCountdown;
if (questEnrollmentBlockedUntil != null) {
r2 = questEnrollmentBlockedUntil;
} else {
date = new global.Date();
}
const {hours, minutes, seconds} = defaultImport(r2);
let String = global.String;
const value7 = String(hours).padStart(2, '0');
String = global.String;
const value9 = String(minutes).padStart(2, '0');
String = global.String;
if (questEnrollmentBlockedUntil == null) {
r0 = null;
} else {
BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
var bottomSheetProps = {'header': null, 'footer': null, 'startExpanded': true,
header: <View style={styles.heading}><Text variant="heading-xl/bold">{intl.string(t['XEHDT/'])}</Text></View>};
var viewBindingProps2 = {style: styles.container};
formatToPlainString = intl.formatToPlainString;
property = t['+5XVH+'];
object = {};
object.countdownString = '' + value7 + ':' + value9 + ':' + String(seconds).padStart(2, '0');
r0 = (
<BottomSheet {...bottomSheetProps}>
<View {...viewBindingProps2}>
<Text variant="text-md/normal">
{Reflect.apply(formatToPlainString, intl, [property, object])}
</Text>
</View>
</BottomSheet>
);
}
return r0;
}
const {hours, minutes, seconds} = defaultImport(r2);
let String = global.String;
const value7 = String(hours).padStart(2, '0');
String = global.String;
const value9 = String(minutes).padStart(2, '0');
String = global.String;
if (questEnrollmentBlockedUntil == null) {
r0 = null;
} else {
BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
var bottomSheetProps = {'header': null, 'footer': null, 'startExpanded': true,
header: <View style={styles.heading}><Text variant="heading-xl/bold">{intl.string(t['XEHDT/'])}</Text></View>};
var viewBindingProps2 = {style: styles.container};
formatToPlainString = intl.formatToPlainString;
property = t['+5XVH+'];
object2 = {};
object2.countdownString = '' + value7 + ':' + value9 + ':' + String(seconds).padStart(2, '0');
r0 = <BottomSheet {...bottomSheetProps}><View {...viewBindingProps2}><Text variant="text-md/normal">{Reflect.apply(formatToPlainString,
intl, [property, object2])}</Text></View></BottomSheet>;
function QuestEnrollmentBlockedBottomSheetConnected({questId, questEnrollmentBlockedUntil, questContentPosition, sourceQuestContent}) { // fn#104143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13835:1244, offset: 0x02287e51, size: 207 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_ENROLLMENT_BLOCKED_BOTTOM_SHEET}
questContentPosition={questContentPosition}
sourceQuestContent={sourceQuestContent}
>
{children_104145}
</QuestContentImpressionTrackerNative>
);
}
function QuestEnrollmentBlockedBottomSheetConnectedChildren() { // fn#104145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13835:1671, owner: QuestEnrollmentBlockedBottomSheetConnected.children, offset: 0x02287f3b, size: 53 bytes, params: 1, frame: 14
return (
<QuestEnrollmentBlockedBottomSheet
questId={questId}
questEnrollmentBlockedUntil={questEnrollmentBlockedUntil}
sourceQuestContent={sourceQuestContent}
/>
);
}
}
return r0;
}
function QuestEnrollmentBlockedBottomSheetConnected({questId, questEnrollmentBlockedUntil, questContentPosition, sourceQuestContent}) { // fn#104143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13835:1244, offset: 0x02287e51, size: 207 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_ENROLLMENT_BLOCKED_BOTTOM_SHEET}
questContentPosition={questContentPosition}
sourceQuestContent={sourceQuestContent}
>
{children_104145}
</QuestContentImpressionTrackerNative>
);
}
}
function QuestEnrollmentBlockedBottomSheetConnectedChildren() { // fn#104145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13835:1671, owner: QuestEnrollmentBlockedBottomSheetConnected.children, offset: 0x02287f3b, size: 53 bytes, params: 1, frame: 14
return (
<QuestEnrollmentBlockedBottomSheet
questId={questId}
questEnrollmentBlockedUntil={questEnrollmentBlockedUntil}
sourceQuestContent={sourceQuestContent}
/>
);
}
global.__d(_fun104141, 13638, [31, 27, 7093, 33, 4501, 697, 566, 10183, 6531, 7054, 6275, 4573, 1244,
2]) /* metro module 13638, dependencies: [31, 27, 7093, 33, 4501, 697, 566, 10183, 6531, 7054, 6275, 4573, 1244, 2] */;
@@ -1,105 +1,113 @@
/* Metro module 13622; source: modules/quests/native/QuestGameLogotype.tsx; dependencies: [57, 31, 27, 33, 4581, 4501, 697, 4017, 4577, 7744, 5475, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SpringModule from '../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as SpringPresetsModule from '../../../design/animation/reanimated/spring/springPresets.tsx'; /* Metro dependency 4581 */
function _fun104037(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13819:6, offset: 0x02281ae4, size: 317 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.View;
const env0_6 = value2.Image;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
object2 = {};
copyDataProperties(object2, (require(4581) /* metro dependency 4581: springPresets */).springSlow, undefined);
object2['overshootClamping'] = true;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
const env0_9 = Reflect.apply(createStyles, createStylesModule, [{logo: {marginBottom: PX_4}}]);
object2 = {code: "function QuestGameLogotypeTsx1(){const{withSpring,logoDimensionStyles,SPRING_CONFIG}=this.__closure;return{opacity:withSpring(logoDimensionStyles==null?0:1,SPRING_CONFIG,'animate-always')};}"};
let value = ReactModule;
object = {};
copyDataProperties(object, (SpringPresetsModule).springSlow, undefined);
object['overshootClamping'] = true;
const createStyles = CreateStylesModule.createStyles;
const PX_4 = (Native).space.PX_4;
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [{logo: {marginBottom: PX_4}}]);
object = {code: "function QuestGameLogotypeTsx1(){const{withSpring,logoDimensionStyles,SPRING_CONFIG}=this.__closure;return{opacity:withSpring(logoDimensionStyles==null?0:1,SPRING_CONFIG,'animate-always')};}"};
value = value.memo(_fun104038);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestGameLogotype.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestGameLogotype.tsx');
exports.default = value;
}
function _fun104038({assetUrl, width, height, maxWidth, maxHeight, style, onError}) { // fn#104038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13819:483, offset: 0x02281c21, size: 572 bytes, params: 2, frame: 26
var r4;
width = width === undefined ? 120 : width;
const env0_3 = maxWidth;
const env0_4 = maxHeight;
var value;
const styles = useStyles();
const binding = env0_4;
const [property, env0_6] = env0_3(binding.useState(null), 2);
const value4 = binding.useMemo(_fun104039, [property, width, height, maxWidth, maxHeight]);
binding.useEffect(function() {
Image.getSize(assetUrl, _fun104041);
}, [assetUrl]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = C_104042;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
logoDimensionStyles: value4, SPRING_CONFIG: env0_8};
closure.__workletHash = 11242802634598;
closure.__initData = env0_10;
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const value6 = binding.useMemo(function() {
return assetUrl.endsWith('.svg');
}, [assetUrl]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [value5, style];
if (value6) {
r4 = <View style={[value4,
styles.logo]}>{((SvgUri) => <SvgUri height="100%" width="100%" uri={assetUrl} onError={onError} />)((require(7744) /* metro dependency 7744 */).SvgUri)}</View>;
} else {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: assetUrl}} style={[value4,
styles.logo]} onError={onError} />)(value);
r4 = value;
}
return (
<View2 style={items2}>
{r4}
</View2>
);
}
function _fun104039() { // fn#104039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13819:633, offset: 0x02281e5d, size: 204 bytes, params: 1, frame: 17
var r0;
var value2;
var Math;
if (env0_5 != null) {
value2 = env0_5.width / env0_5.height;
r0 = height != null ? {height: height, width: height * value2} : {height: width / value2, width: width};
if (maxWidth != null) {
Math = global.Math;
r0.width = Math.min(maxWidth, r0.width);
r0.height = r0.width / value2;
function _fun104038({assetUrl, width, height, maxWidth, maxHeight, style, onError}) { // fn#104038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13819:483, offset: 0x02281c21, size: 572 bytes, params: 2, frame: 26
var r4;
width = width === undefined ? 120 : width;
const maxWidth2 = maxWidth;
const maxHeight2 = maxHeight;
var value;
const styles = useStyles();
const binding = maxHeight2;
const [property, env0_6] = maxWidth2(binding.useState(null), 2);
const value4 = binding.useMemo(_fun104039, [property, width, height, maxWidth, maxHeight]);
binding.useEffect(function() {
Image.getSize(assetUrl, _fun104041);
}, [assetUrl]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const C_1040422 = C_104042;
C_1040422.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
logoDimensionStyles: value4, SPRING_CONFIG: env0_8};
C_1040422.__workletHash = 11242802634598;
C_1040422.__initData = env0_10;
const value5 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [C_1040422]);
const value6 = binding.useMemo(function() {
return assetUrl.endsWith('.svg');
}, [assetUrl]);
const View2 = (ReanimatedRexport).View;
const items2 = [value5, style];
if (value6) {
r4 = (
<View style={[value4, styles.logo]}>
{((SvgUri) => <SvgUri height="100%" width="100%" uri={assetUrl} onError={onError} />)((require(7744) /* metro dependency 7744 */).SvgUri)}
</View>
);
} else {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: assetUrl}} style={[value4,
styles.logo]} onError={onError} />)(value);
r4 = value;
}
if (maxHeight != null) {
Math = global.Math;
r0.height = Math.min(maxHeight, r0.height);
r0.width = r0.height * value2;
return (
<View2 style={items2}>
{r4}
</View2>
);
function _fun104039() { // fn#104039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13819:633, offset: 0x02281e5d, size: 204 bytes, params: 1, frame: 17
var r0;
var value2;
var Math;
if (ReactNativeModule.View != null) {
value2 = ReactNativeModule.View.width / ReactNativeModule.View.height;
r0 = height != null ? {height: height, width: height * value2} : {height: width / value2, width: width};
if (maxWidth != null) {
Math = global.Math;
r0.width = Math.min(maxWidth, r0.width);
r0.height = r0.width / value2;
}
if (maxHeight != null) {
Math = global.Math;
r0.height = Math.min(maxHeight, r0.height);
r0.width = r0.height * value2;
}
return r0;
}
}
return r0;
}
}
function _fun104040() { // fn#104040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13819:883, offset: 0x02281f29, size: 39 bytes, params: 1, frame: 13
Image.getSize(assetUrl, _fun104041);
}
function _fun104040() { // fn#104040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13819:883, offset: 0x02281f29, size: 39 bytes, params: 1, frame: 13
Image.getSize(assetUrl, _fun104041);
function _fun104041(a0, a1) { // fn#104041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13819:901, offset: 0x02281f50, size: 50 bytes, params: 3, frame: 13
let value = a0 > 0;
if (value && a1 > 0) {
value = environment.__proto__;
env1_6({width: a0, height: a1});
}
}
function C_104042() { // fn#104042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13819:988, offset: 0x02281f82, size: 76 bytes, params: 1, frame: 16
const springModule = require(4577) /* metro dependency 4577: spring */;
return {opacity: springModule.withSpring(env0_7 == null ? 0 : 1, env1_8, 'animate-always')};
}
}
function C_104042() { // fn#104042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13819:988, offset: 0x02281f82, size: 76 bytes, params: 1, frame: 16
return {opacity: SpringModule.withSpring(JsxRuntimeModule.jsx == null ? 0 : 1, env1_8, 'animate-always')};
}
function _fun104041(a0, a1) { // fn#104041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13819:901, offset: 0x02281f50, size: 50 bytes, params: 3, frame: 13
let value = a0 > 0;
if (value && a1 > 0) {
value = environment.__proto__;
env1_6({width: a0, height: a1});
}
}
global.__d(_fun104037, 13622, [57, 31, 27, 33, 4581, 4501, 697, 4017, 4577, 7744, 5475,
2]) /* metro module 13622, dependencies: [57, 31, 27, 33, 4581, 4501, 697, 4017, 4577, 7744, 5475, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,20 +1,30 @@
/* Metro module 13555; source: modules/quests/native/QuestHomeEmptyState.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 1244, 3860, 4010, 6618, 477, 4573, 13556, 4589, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseChatLayout from '../../chat/native/useChatLayout.tsx'; /* Metro dependency 4010 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as SafeAreaViewModule from '../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
function _fun102966(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13745:6, offset: 0x02251c62, size: 402 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.ImageBackground;
const env0_5 = (require(661) /* metro dependency 661: Constants */).VerticalGradient;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
const PX_32 = (Native).space.PX_32;
const env0_9 = Reflect.apply(createStyles, value, [{container: {flex: 1},
emptyStateContainer: {'justifyContent': 'center', 'alignItems': 'center', 'flex': 1},
emptyStateContentContainer: {top: -55, paddingHorizontal: PX_32}, emptyStateContentTitle: {textAlign: 'center'},
@@ -22,52 +32,83 @@ function _fun102966(global, require, importDefault, importAll, module, exports,
'aspectRatio': 1.6375545851528384, 'minWidth': '100%', 'position': 'absolute', 'bottom': 0, 'zIndex': -1},
gradient: {'height': 22, 'width': '100%', 'position': 'absolute', 'bottom': 0}, actionWrapper: {'marginTop': 16,
'alignSelf': 'center'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestHomeEmptyState.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestHomeEmptyState.tsx');
exports.default = QuestHomeEmptyState;
}
function QuestHomeEmptyState({action, title, subtitle}) { // fn#102967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13745:745, offset: 0x02251df4, size: 720 bytes, params: 2, frame: 31
var r9;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var jsxRuntimeEnv0_8Binding;
var items3;
const r20 = title !== undefined ? title : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.SdlRnK);
const r13 = subtitle !== undefined ? subtitle : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R7mv+G']);
const styles = useStyles();
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
const value2 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOWER]);
const isChatLockedOpen = (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatLockedOpen;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const safeAreaPaddingViewProps = {bottom: (require(477) /* metro dependency 477: PlatformUtils */).isAndroid()};
let container = styles.container;
safeAreaPaddingViewProps.style = container;
container = styles.container;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<Text variant="heading-xl/bold" color="mobile-text-heading-primary" style={styles.emptyStateContentTitle}>{r20}</Text>];
items2[1] = <Text variant="text-md/normal" color="text-default" style={styles.emptyStateContentDescription}>{r13}</Text>;
items2[2] = action != null && <View style={styles.actionWrapper}>{action}</View>;
const view = <View style={styles.emptyStateContentContainer}>{items2}</View>;
if (isChatLockedOpen) {
r9 = null;
} else {
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
items3 = [<ImageBackground style={styles.emptyImage} source={importDefault(13556) /* metro dependency 13556 */} resizeMode="cover" />];
items3[1] = ((Component) => <Component style={styles.gradient} end={VerticalGradient.END} start={VerticalGradient.START} colors={['rgba(0, 0, 0, 0)',
value2]} />)(importDefault(4589) /* metro dependency 4589 */);
r9 = <>{items3}</>;
}
return (
<SafeAreaPaddingView {...safeAreaPaddingViewProps}>
<View style={container}>
<View style={styles.emptyStateContainer}>
{view}
{r9}
</View>
function QuestHomeEmptyState({action, title, subtitle}) { // fn#102967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13745:745, offset: 0x02251df4, size: 720 bytes, params: 2, frame: 31
var r9;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var jsxRuntimeEnv0_8Binding;
var items3;
const r20 = title !== undefined ? title : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.SdlRnK);
const r13 = subtitle !== undefined ? subtitle : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R7mv+G']);
const styles = useStyles();
const useToken = UseTokenModule.useToken;
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
const value2 = Reflect.apply(useToken, UseTokenModule, [BACKGROUND_BASE_LOWER]);
const isChatLockedOpen = (UseChatLayout)().isChatLockedOpen;
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const safeAreaPaddingViewProps = {bottom: (PlatformUtilsModule).isAndroid()};
let container = styles.container;
safeAreaPaddingViewProps.style = container;
container = styles.container;
const Text = (TextModule).Text;
const items2 = [
<Text
variant="heading-xl/bold"
color="mobile-text-heading-primary"
style={styles.emptyStateContentTitle}
>
{r20}
</Text>,
];
items2[1] = (
<Text
variant="text-md/normal"
color="text-default"
style={styles.emptyStateContentDescription}
>
{r13}
</Text>
);
items2[2] = action != null && <View style={styles.actionWrapper}>{action}</View>;
const view = (
<View style={styles.emptyStateContentContainer}>
{items2}
</View>
</SafeAreaPaddingView>
);
);
if (isChatLockedOpen) {
r9 = null;
} else {
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
items3 = [
<ImageBackground
style={styles.emptyImage}
source={importDefault(13556) /* metro dependency 13556 */}
resizeMode="cover"
/>,
];
items3[1] = ((Component) => <Component style={styles.gradient} end={VerticalGradient.END} start={VerticalGradient.START} colors={['rgba(0, 0, 0, 0)',
value2]} />)(importDefault(4589) /* metro dependency 4589 */);
r9 = (
<>
{items3}
</>
);
}
return (
<SafeAreaPaddingView {...safeAreaPaddingViewProps}>
<View style={container}>
<View style={styles.emptyStateContainer}>
{view}
{r9}
</View>
</View>
</SafeAreaPaddingView>
);
}
}
global.__d(_fun102966, 13555, [31, 27, 661, 33, 4501, 697, 1244, 3860, 4010, 6618, 477, 4573, 13556, 4589,
2]) /* metro module 13555, dependencies: [31, 27, 661, 33, 4501, 697, 1244, 3860, 4010, 6618, 477, 4573, 13556, 4589, 2] */;
+124 -100
View File
@@ -1,4 +1,16 @@
/* Metro module 13509; source: modules/quests/native/QuestHomeSetting.tsx; dependencies: [57, 31, 9481, 6528, 33, 4501, 697, 1484, 3769, 7508, 13510, 13514, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserSettingsModalActionCreators from '../../../actions/UserSettingsModalActionCreators.tsx'; /* Metro dependency 7508 */
import QuestHomeNavigationStore from '../QuestHomeNavigationStore.tsx'; /* Metro dependency 9481 */
import UseQuestHomeHeader from './useQuestHomeHeader.tsx'; /* Metro dependency 13510 */
import QuestHome from './QuestHome.tsx'; /* Metro dependency 13514 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as QuestConstantsModule from '../QuestConstants.tsx'; /* Metro dependency 6528 */
function _fun102590(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:6, offset: 0x02241890, size: 297 bytes, params: 8, frame: 21
const env0_0 = require;
const parseSortMethod = function(a0) {
@@ -7,122 +19,134 @@ function _fun102590(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const questHomeNavigationStore = importDefault(9481) /* metro dependency 9481: QuestHomeNavigationStore */;
let value = require(6528) /* metro dependency 6528: QuestConstants */;
let value = QuestConstantsModule;
const env0_6 = value.QuestHomeSortMethods;
const env0_7 = value.getQuestHomeFilterOptionItem;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
const BACKGROUND_BASE_LOWEST = (Native).colors.BACKGROUND_BASE_LOWEST;
const env0_9 = Reflect.apply(createStyles, value, [{container: {backgroundColor: BACKGROUND_BASE_LOWEST}}]);
const env0_10 = [];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestHomeSetting.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestHomeSetting.tsx');
exports.default = QuestHomeSetting;
}
function parseFilters(a0) { // fn#102592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:392, offset: 0x022419f7, size: 88 bytes, params: 2, frame: 12
if (a0 == null) {
return env0_10;
function parseFilters(a0) { // fn#102592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:392, offset: 0x022419f7, size: 88 bytes, params: 2, frame: 12
if (a0 == null) {
return env0_10;
}
let value = a0.split(',');
value = value.map(function(a0) {
return getQuestHomeFilterOptionItem(a0);
});
value = value.filter(function(a0) {
return a0 != null;
});
return value.length > 0 ? value : env0_10;
}
let value = a0.split(',');
value = value.map(function(a0) {
return getQuestHomeFilterOptionItem(a0);
});
value = value.filter(function(a0) {
return a0 != null;
});
return value.length > 0 ? value : env0_10;
}
function QuestHomeSetting() { // fn#102595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:520, offset: 0x02241a4f, size: 380 bytes, params: 1, frame: 26
const styles = useStyles();
const binding = env0_4;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [_fun102596]);
const binding2 = env0_3;
const value3 = binding2(value2, 2);
const property = value3[0];
const property2 = value3[1];
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, [_fun102597]), 2);
const property3 = value4[0];
const property4 = value4[1];
binding.useEffect(function() {
var object = {};
object.equalityFn = require(dependencyMap[8]).shallow;
object.fireImmediately = true;
return QuestHomeNavigationStore.subscribe(_fun102599, _fun102600, object);
}, []);
const value5 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property5 = value6[0];
var env0_3 = value6[1];
binding.useEffect(_fun102601, [value5]);
const value7 = binding.useCallback(_fun102603, []);
binding.useEffect(function() {
return _fun102605;
}, []);
const value8 = QuestHomeNavigationStore.useField('scrollToQuestId');
(importDefault(13510) /* metro dependency 13510: useQuestHomeHeader */)({setSelectedSortMethod: property2,
setSelectedFilters: property4, selectedFilters: property3, selectedSortMethod: property});
return ((Component) => <Component containerStyle={styles.container} isNavigationComplete={property5} scrollToQuestId={value8} sortMethod={property} filters={property3} onClearFilters={value7} />)(importDefault(13514) /* metro dependency 13514: QuestHome */);
}
function QuestHomeSetting() { // fn#102595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:520, offset: 0x02241a4f, size: 380 bytes, params: 1, frame: 26
const styles = useStyles();
let useState = ReactModule.useState;
const value2 = Reflect.apply(useState, ReactModule, [_fun102596]);
const binding2 = env0_3;
const value3 = binding2(value2, 2);
const property = value3[0];
const property2 = value3[1];
useState = ReactModule.useState;
const value4 = binding2(Reflect.apply(useState, ReactModule, [_fun102597]), 2);
const property3 = value4[0];
const property4 = value4[1];
ReactModule.useEffect(function() {
var questHomeNavigationStoreBinding = QuestHomeNavigationStore;
var object = {};
object.equalityFn = require(dependencyMap[8]).shallow;
object.fireImmediately = true;
return questHomeNavigationStoreBinding.subscribe(_fun102599, _fun102600, object);
}, []);
const value5 = (UseNavigationNativeModule).useNavigation();
useState = ReactModule.useState;
const value6 = binding2(Reflect.apply(useState, ReactModule, [false]), 2);
const property5 = value6[0];
var env0_3 = value6[1];
ReactModule.useEffect(_fun102601, [value5]);
const value7 = ReactModule.useCallback(_fun102603, []);
ReactModule.useEffect(function() {
return _fun102605;
}, []);
const value8 = QuestHomeNavigationStore.useField('scrollToQuestId');
(UseQuestHomeHeader)({setSelectedSortMethod: property2,
setSelectedFilters: property4, selectedFilters: property3, selectedSortMethod: property});
return ((Component) => <Component containerStyle={styles.container} isNavigationComplete={property5} scrollToQuestId={value8} sortMethod={property} filters={property3} onClearFilters={value7} />)(QuestHome);
function _fun102596() { // fn#102596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:572, offset: 0x02241bcb, size: 35 bytes, params: 1, frame: 12
const value = environment.__proto__;
return parseSortMethod(QuestHomeNavigationStore.getField('sort'));
}
function _fun102596() { // fn#102596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:572, offset: 0x02241bcb, size: 35 bytes, params: 1, frame: 12
const value = environment.__proto__;
return parseSortMethod(QuestHomeNavigationStore.getField('sort'));
}
function _fun102597() { // fn#102597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:651, offset: 0x02241bee, size: 35 bytes, params: 1, frame: 12
const value = environment.__proto__;
return parseFilters(QuestHomeNavigationStore.getField('filter'));
}
function _fun102597() { // fn#102597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:651, offset: 0x02241bee, size: 35 bytes, params: 1, frame: 12
const value = environment.__proto__;
return parseFilters(QuestHomeNavigationStore.getField('filter'));
}
function _fun102598() { // fn#102598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:728, offset: 0x02241c11, size: 80 bytes, params: 1, frame: 17
const questHomeNavigationStoreBinding = QuestHomeNavigationStore;
const subscribe = questHomeNavigationStoreBinding.subscribe;
const object = {};
object.equalityFn = (require(3769) /* metro dependency 3769 */).shallow;
object.fireImmediately = true;
return Reflect.apply(subscribe, questHomeNavigationStoreBinding, [function({sort, filter}) {
return {sort: sort, filter: filter};
}, _fun102600, object]);
function _fun102600(a0, {sort, filter}) { // fn#102600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:788, offset: 0x02241c7c, size: 103 bytes, params: 3, frame: 14
var value;
var binding;
const sort = a0.sort;
if (sort !== sort) {
value = environment.__proto__;
binding = env1_0;
value = environment.__proto__.__proto__;
binding(parseSortMethod(a0.sort));
}
const filter = a0.filter;
if (filter !== filter) {
value = environment.__proto__;
binding = env1_1;
value = environment.__proto__.__proto__;
binding(parseFilters(a0.filter));
}
}
function _fun102598() { // fn#102598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:728, offset: 0x02241c11, size: 80 bytes, params: 1, frame: 17
const subscribe = QuestHomeNavigationStore.subscribe;
const object2 = {};
object2.equalityFn = (require(3769) /* metro dependency 3769 */).shallow;
object2.fireImmediately = true;
return Reflect.apply(subscribe, QuestHomeNavigationStore, [function({sort, filter}) {
return {sort: sort, filter: filter};
}, _fun102600, object2]);
}
}
function _fun102601() { // fn#102601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:1039, offset: 0x02241ce3, size: 34 bytes, params: 1, frame: 13
return env0_2.addListener('transitionEnd', _fun102602);
}
function _fun102601() { // fn#102601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:1039, offset: 0x02241ce3, size: 34 bytes, params: 1, frame: 13
return env0_2.addListener('transitionEnd', _fun102602);
function _fun102602() { // fn#102602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:1074, offset: 0x01f5570e, size: 18 bytes, params: 1, frame: 11
return env1_3(true);
}
function _fun102603() { // fn#102603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:1112, offset: 0x02241d05, size: 23 bytes, params: 1, frame: 11
env0_1(env1_10);
}
}
function _fun102604() { // fn#102604, offset: 0x02241d1c, size: 11 bytes, params: 1, frame: 1
return function() {
importDefault(dependencyMap[9]).close();
QuestHomeNavigationStore.resetState();
};
}
function _fun102603() { // fn#102603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:1112, offset: 0x02241d05, size: 23 bytes, params: 1, frame: 11
env0_1(env1_10);
}
function _fun102604() { // fn#102604, offset: 0x02241d1c, size: 11 bytes, params: 1, frame: 1
return function() {
importDefault(dependencyMap[9]).close();
QuestHomeNavigationStore.resetState();
};
function _fun102605() { // fn#102605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:1145, offset: 0x02241d27, size: 51 bytes, params: 1, frame: 12
(UserSettingsModalActionCreators).close();
QuestHomeNavigationStore.resetState();
}
}
function _fun102600(a0, {sort, filter}) { // fn#102600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:788, offset: 0x02241c7c, size: 103 bytes, params: 3, frame: 14
var value;
var binding;
const sort = a0.sort;
if (sort !== sort) {
value = environment.__proto__;
binding = env1_0;
value = environment.__proto__.__proto__;
binding(parseSortMethod(a0.sort));
}
const filter = a0.filter;
if (filter !== filter) {
value = environment.__proto__;
binding = env1_1;
value = environment.__proto__.__proto__;
binding(parseFilters(a0.filter));
}
}
function _fun102599({sort, filter}) { // fn#102599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:745, offset: 0x02241c61, size: 27 bytes, params: 2, frame: 3
return {sort: sort, filter: filter};
}
global.__d(_fun102590, 13509, [57, 31, 9481, 6528, 33, 4501, 697, 1484, 3769, 7508, 13510, 13514,
2]) /* metro module 13509, dependencies: [57, 31, 9481, 6528, 33, 4501, 697, 1484, 3769, 7508, 13510, 13514, 2] */;
@@ -1,215 +1,258 @@
/* Metro module 13511; source: modules/quests/native/QuestHomeSortingFilteringBottomSheet.tsx; dependencies: [57, 31, 27, 6528, 33, 4501, 697, 6618, 6261, 4578, 1244, 4559, 4002, 4080, 9483, 6275, 6758, 6277, 4572, 7988, 7987, 6231, 8950, 9505, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as SharedModule from '../../../design/shared.tsx'; /* Metro dependency 4002 */
import * as UseIsScreenReaderEnabledNativeModule from '../../a11y/native/useIsScreenReaderEnabled.native.tsx'; /* Metro dependency 4559 */
import * as StackNativeModule from '../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as TableRowGroupNativeModule from '../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as ButtonGroupNativeModule from '../../../design/components/ButtonGroup/native/ButtonGroup.native.tsx'; /* Metro dependency 6261 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as Module06277Module from '../../../by-id/module-06277.js'; /* Metro dependency 6277 */
import * as QuestConstantsModule from '../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as SafeAreaViewModule from '../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as BottomSheetTitleHeaderNativeModule from '../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as TableRadioRowNativeModule from '../../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
import * as TableRadioGroupNativeModule from '../../../design/components/TableRow/native/TableRadioGroup.native.tsx'; /* Metro dependency 7988 */
import * as TableCheckboxRowNativeModule from '../../../design/components/TableRow/native/TableCheckboxRow.native.tsx'; /* Metro dependency 8950 */
import * as QuestHooksModule from '../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as QuestCopyUtilsModule from '../utils/QuestCopyUtils.tsx'; /* Metro dependency 9505 */
function _fun102621(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:6, offset: 0x0224273e, size: 393 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const env0_6 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestHomeSortMethods;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.content = {paddingHorizontal: PX_16};
object2.bodyContainer = {'flex': 1, 'minHeight': 0};
object.content = {paddingHorizontal: PX_16};
object.bodyContainer = {'flex': 1, 'minHeight': 0};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.footerInline = {paddingTop: PX_16};
object.footerInline = {paddingTop: PX_16};
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object2.footer = {backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
object2.footerButtonGroup = {paddingBottom: 0};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
object.footer = {backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
object.footerButtonGroup = {paddingBottom: 0};
const env0_9 = Reflect.apply(createStyles, value, [object]);
const env0_10 = [];
const isFilterOptionEqual = function(a0, a1) {
return a0.group === a1.group && a0.filter === a1.filter;
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestHomeSortingFilteringBottomSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestHomeSortingFilteringBottomSheet.tsx');
exports.default = QuestHomeSortingFilteringBottomSheet;
}
function FilterFooter({onConfirm, onReset, onLayout, inline}) { // fn#102622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:523, offset: 0x022428c7, size: 414 bytes, params: 2, frame: 32
inline = !(inline === undefined) && inline;
const styles = useStyles();
const r5 = inline ? styles.footerInline : [styles.footer, styles.content];
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={r5} onLayout={onLayout}>
<SafeAreaPaddingView bottom>
<ButtonGroup direction="vertical" style={styles.footerButtonGroup}>
<Button
size="lg"
grow
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.i4jeWR)}
onPress={onConfirm}
/>
<Button
size="lg"
grow
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yBZMsQ)}
onPress={onReset}
variant="secondary"
/>
</ButtonGroup>
</SafeAreaPaddingView>
</View>
);
}
function QuestHomeSortingFilteringBottomSheet({onSortMethodChange, onFiltersChange, initialSortMethod, initialFilters}) { // fn#102624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:1028, offset: 0x02242a8e, size: 886 bytes, params: 2, frame: 36
var object2;
const styles = useStyles();
const value3 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
const binding = env0_4;
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [initialSortMethod]);
const binding2 = env0_3;
const value5 = binding2(value4, 2);
const property = value5[0];
const property2 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [initialFilters]), 2);
const property3 = value6[0];
const env0_5 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [0]), 2);
const property4 = value7[0];
const env0_6 = value7[1];
const value9 = binding.useRef(null);
const value10 = binding.useCallback(_fun102625, []);
const env0_8 = binding.useCallback(_fun102626, []);
const value11 = binding.useCallback(_fun102629, []);
const value12 = binding.useCallback(_fun102630, [onSortMethodChange, onFiltersChange, property, property3]);
const value13 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestHomeSortOptions();
const value14 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestHomeFilterOptions();
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
object2 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const UdhTtk = (require(1244) /* metro dependency 1244: indexNative */).t.UdhTtk;
object2.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [UdhTtk])} />;
object2.footer = value3 ? null : <FilterFooter onConfirm={value12} onReset={value11} onLayout={value10} />;
object2.scrollable = true;
object2.startExpanded = true;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const r7 = value3 ? undefined : {paddingBottom: property4};
const items3 = [styles.content];
items3[1] = styles.bodyContainer;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
const items2 = [<TableRadioGroup groupRef={value9} hasIcons={false} defaultValue={property} onChange={property2} title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tZXJIS)}>{value13.map(_fun102631)}</TableRadioGroup>];
items2[1] = value14.map(_fun102632);
return (
<BottomSheet {...object2}>
<BottomSheetScrollView contentContainerStyle={r7} style={items3}>
<Stack spacing={PX_32}>
{items2}
</Stack>
{value3 && <FilterFooter onConfirm={value12} onReset={value11} inline />}
</BottomSheetScrollView>
</BottomSheet>
);
}
function _fun102626(a0, a1) { // fn#102626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:1418, offset: 0x02242e04, size: 39 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
env0_5(_fun102627);
}
function _fun102629() { // fn#102629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:1509, offset: 0x02242e90, size: 164 bytes, params: 1, frame: 16
const binding = env0_3;
const SUGGESTED = QuestHomeSortMethods.SUGGESTED;
binding(SUGGESTED);
env0_5(env1_10);
const current = env0_7.current;
if (current != null) {
current.setValue(QuestHomeSortMethods.SUGGESTED);
function FilterFooter({onConfirm, onReset, onLayout, inline}) { // fn#102622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:523, offset: 0x022428c7, size: 414 bytes, params: 2, frame: 32
inline = !(inline === undefined) && inline;
const styles = useStyles();
const r5 = inline ? styles.footerInline : [styles.footer, styles.content];
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const ButtonGroup = (ButtonGroupNativeModule).ButtonGroup;
const Button = (ButtonNativeModule).Button;
const intl = (IndexNativeModule).intl;
return (
<View style={r5} onLayout={onLayout}>
<SafeAreaPaddingView bottom>
<ButtonGroup direction="vertical" style={styles.footerButtonGroup}>
<Button
size="lg"
grow
text={intl.string((IndexNativeModule).t.i4jeWR)}
onPress={onConfirm}
/>
<Button
size="lg"
grow
text={intl.string((IndexNativeModule).t.yBZMsQ)}
onPress={onReset}
variant="secondary"
/>
</ButtonGroup>
</SafeAreaPaddingView>
</View>
);
}
const AccessibilityAnnouncer = (require(4002) /* metro dependency 4002: shared */).AccessibilityAnnouncer;
const announce = AccessibilityAnnouncer.announce;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bK5N8u)]);
}
function _fun102630() { // fn#102630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:1690, offset: 0x02242f34, size: 73 bytes, params: 1, frame: 12
onSortMethodChange(env0_2);
onFiltersChange(env0_4);
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('QuestHomeSortingFilteringBottomSheet');
}
function QuestHomeSortingFilteringBottomSheet({onSortMethodChange, onFiltersChange, initialSortMethod, initialFilters}) { // fn#102624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:1028, offset: 0x02242a8e, size: 886 bytes, params: 2, frame: 36
const styles = useStyles();
const value3 = (UseIsScreenReaderEnabledNativeModule).useIsScreenReaderEnabled();
let useState = ReactModule.useState;
const value4 = Reflect.apply(useState, ReactModule, [initialSortMethod]);
const value5 = Module00057(value4, 2);
const property = value5[0];
const property2 = value5[1];
useState = ReactModule.useState;
const value6 = Module00057(Reflect.apply(useState, ReactModule, [initialFilters]), 2);
const property3 = value6[0];
const env0_5 = value6[1];
useState = ReactModule.useState;
const value7 = Module00057(Reflect.apply(useState, ReactModule, [0]), 2);
const property4 = value7[0];
const env0_6 = value7[1];
const value9 = ReactModule.useRef(null);
const value10 = ReactModule.useCallback(_fun102625, []);
const env0_8 = ReactModule.useCallback(_fun102626, []);
const value11 = ReactModule.useCallback(_fun102629, []);
const value12 = ReactModule.useCallback(_fun102630, [onSortMethodChange, onFiltersChange, property, property3]);
const value13 = (QuestHooksModule).useQuestHomeSortOptions();
const value14 = (QuestHooksModule).useQuestHomeFilterOptions();
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
object = {};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const UdhTtk = (IndexNativeModule).t.UdhTtk;
object.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [UdhTtk])} />;
object.footer = (
value3
? null
: (
<FilterFooter
onConfirm={value12}
onReset={value11}
onLayout={value10}
/>
)
);
object.scrollable = true;
object.startExpanded = true;
const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView;
const r7 = value3 ? undefined : {paddingBottom: property4};
const items3 = [styles.content];
items3[1] = styles.bodyContainer;
const Stack = (StackNativeModule).Stack;
const PX_32 = (Native).space.PX_32;
const TableRadioGroup = (TableRadioGroupNativeModule).TableRadioGroup;
const items2 = [
<TableRadioGroup
groupRef={value9}
hasIcons={false}
defaultValue={property}
onChange={property2}
title={intl.string((IndexNativeModule).t.tZXJIS)}
>
{value13.map(_fun102631)}
</TableRadioGroup>,
];
items2[1] = value14.map(_fun102632);
return (
<BottomSheet {...object}>
<BottomSheetScrollView contentContainerStyle={r7} style={items3}>
<Stack spacing={PX_32}>
{items2}
</Stack>
{value3 && <FilterFooter onConfirm={value12} onReset={value11} inline />}
</BottomSheetScrollView>
</BottomSheet>
);
function _fun102625({nativeEvent}) { // fn#102625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:1360, offset: 0x01e4fcfa, size: 36 bytes, params: 2, frame: 11
env0_6(nativeEvent.layout.height);
}
function _fun102631(a0, a1) { // fn#102631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:2407, offset: 0x02242f7d, size: 70 bytes, params: 3, frame: 16
const value = environment.__proto__;
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
label={a0.label}
value={a0.value}
key={a1}
/>
);
}
function _fun102626(a0, a1) { // fn#102626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:1418, offset: 0x02242e04, size: 39 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
env0_5(_fun102627);
function _fun102627(a0) { // fn#102627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:1429, offset: 0x02242e2b, size: 71 bytes, params: 2, frame: 15
var r0;
var items2;
var value2;
if (require) {
items2 = [];
value2 = arraySpread(items2, a0, 0, a0);
items2[value2] = env0_0;
value2 + 1;
r0 = items2;
} else {
r0 = a0.filter(_fun102628);
}
return r0;
function _fun102628(a0) { // fn#102628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:1453, offset: 0x02242e72, size: 30 bytes, params: 2, frame: 13
return !isFilterOptionEqual(a0, env1_0);
}
function _fun102632(a0, a1) { // fn#102632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:2483, offset: 0x02242fc3, size: 97 bytes, params: 3, frame: 17
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<TableRowGroup
title={a0.heading}
hasIcons={false}
key={a1}
>
{a0.options.map(_fun102633)}
</TableRowGroup>
);
}
}
}
function _fun102629() { // fn#102629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:1509, offset: 0x02242e90, size: 164 bytes, params: 1, frame: 16
const SUGGESTED = QuestHomeSortMethods.SUGGESTED;
Module00057(SUGGESTED);
env0_5(env1_10);
const current = env0_7.current;
if (current != null) {
current.setValue(QuestHomeSortMethods.SUGGESTED);
}
const AccessibilityAnnouncer = (SharedModule).AccessibilityAnnouncer;
const announce = AccessibilityAnnouncer.announce;
const intl = (IndexNativeModule).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.string((IndexNativeModule).t.bK5N8u)]);
}
function _fun102630() { // fn#102630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:1690, offset: 0x02242f34, size: 73 bytes, params: 1, frame: 12
onSortMethodChange(env0_2);
onFiltersChange(ReactModule);
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet('QuestHomeSortingFilteringBottomSheet');
}
function _fun102631(a0, a1) { // fn#102631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:2407, offset: 0x02242f7d, size: 70 bytes, params: 3, frame: 16
const value = environment.__proto__;
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
return (
<TableRadioRow
label={a0.label}
value={a0.value}
key={a1}
/>
);
}
function _fun102632(a0, a1) { // fn#102632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:2483, offset: 0x02242fc3, size: 97 bytes, params: 3, frame: 17
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
return (
<TableRowGroup
title={a0.heading}
hasIcons={false}
key={a1}
>
{a0.options.map(_fun102633)}
</TableRowGroup>
);
function _fun102633(a0, a1) { // fn#102633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:2568, offset: 0x02243024, size: 131 bytes, params: 3, frame: 19
var environment;
const env0_0 = a0;
let value = environment.__proto__.__proto__;
const TableCheckboxRow = (TableCheckboxRowNativeModule).TableCheckboxRow;
const tableCheckboxRowProps = {label: (QuestCopyUtilsModule).getFilterTypeText(a0.filter),
onPress: onPress_102634};
value = environment.__proto__;
tableCheckboxRowProps.checked = env1_4.some(_fun102635);
return <TableCheckboxRow {...tableCheckboxRowProps} key={a1} />;
function onPress_102634(a0) { // fn#102634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:2655, offset: 0x022430a7, size: 27 bytes, params: 2, frame: 13
return env2_8(env0_0, a0);
}
function _fun102635(a0) { // fn#102635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:2681, offset: 0x022430c2, size: 27 bytes, params: 2, frame: 13
return isFilterOptionEqual(a0, env0_0);
}
}
}
function _fun102627(a0) { // fn#102627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:1429, offset: 0x02242e2b, size: 71 bytes, params: 2, frame: 15
var r0;
var items2;
var value2;
if (require) {
items2 = [];
value2 = arraySpread(items2, a0, 0, a0);
items2[value2] = env0_0;
value2 + 1;
r0 = items2;
} else {
r0 = a0.filter(_fun102628);
}
return r0;
}
function _fun102633(a0, a1) { // fn#102633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:2568, offset: 0x02243024, size: 131 bytes, params: 3, frame: 19
var environment;
const env0_0 = a0;
let value = environment.__proto__.__proto__;
const TableCheckboxRow = (require(8950) /* metro dependency 8950: TableCheckboxRowNative */).TableCheckboxRow;
const tableCheckboxRowProps = {label: (require(9505) /* metro dependency 9505: QuestCopyUtils */).getFilterTypeText(a0.filter),
onPress: onPress_102634};
value = environment.__proto__;
tableCheckboxRowProps.checked = env1_4.some(_fun102635);
return <TableCheckboxRow {...tableCheckboxRowProps} key={a1} />;
}
function _fun102628(a0) { // fn#102628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:1453, offset: 0x02242e72, size: 30 bytes, params: 2, frame: 13
return !isFilterOptionEqual(a0, env1_0);
}
function onPress_102634(a0) { // fn#102634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:2655, offset: 0x022430a7, size: 27 bytes, params: 2, frame: 13
return env2_8(env0_0, a0);
}
function _fun102635(a0) { // fn#102635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:2681, offset: 0x022430c2, size: 27 bytes, params: 2, frame: 13
return isFilterOptionEqual(a0, env0_0);
}
global.__d(_fun102621, 13511, [57, 31, 27, 6528, 33, 4501, 697, 6618, 6261, 4578, 1244, 4559, 4002, 4080, 9483,
6275, 6758, 6277, 4572, 7988, 7987, 6231, 8950, 9505,
2]) /* metro module 13511, dependencies: [57, 31, 27, 6528, 33, 4501, 697, 6618, 6261, 4578, 1244, 4559, 4002, 4080, 9483, 6275, 6758, 6277, 4572, 7988, 7987, 6231, 8950, 9505, 2] */;
@@ -1,296 +1,322 @@
/* Metro module 13568; source: modules/quests/native/QuestHooks.native.tsx; dependencies: [5, 31, 3849, 4234, 7093, 6528, 9488, 482, 13569, 7108, 566, 6531, 7091, 13590, 10915, 4007, 7556, 9483, 9479, 5176, 9495, 7116, 8045, 7114, 8105, 6772, 8087, 9527, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import ActionSheetStore from '../../action_sheet/native/ActionSheetStore.tsx'; /* Metro dependency 3849 */
import ApplicationStore from '../../applications/ApplicationStore.tsx'; /* Metro dependency 4234 */
import QuestStore from '../QuestStore.tsx'; /* Metro dependency 7093 */
import NewAdRequestBehaviorExperiment from '../experiments/NewAdRequestBehaviorExperiment.tsx'; /* Metro dependency 7108 */
import UseIsWindowLarge from '../../screen/native/useIsWindowLarge.tsx'; /* Metro dependency 7556 */
import UseQuestForPlacement from '../useQuestForPlacement.tsx'; /* Metro dependency 13590 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as NavigationRouteUtilsNativeModule from '../../main_tabs_v2/helpers/NavigationRouteUtils.native.tsx'; /* Metro dependency 4007 */
import * as YouBarExperimentModule from '../../main_tabs_v2/YouBarExperiment.tsx'; /* Metro dependency 5176 */
import * as QuestConstantsModule from '../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestTypesModule from '../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as QuestDataUtilsModule from '../utils/QuestDataUtils.tsx'; /* Metro dependency 7091 */
import * as QuestTaskUtilsModule from '../utils/QuestTaskUtils.tsx'; /* Metro dependency 7116 */
import * as CanLaunchFrameModule from '../../frames/utils/canLaunchFrame.tsx'; /* Metro dependency 8045 */
import * as QuestsEligibilityModule from '../lib/QuestsEligibility.tsx'; /* Metro dependency 9479 */
import * as QuestHooksModule from '../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as CaptchaConstantsModule from '../../captcha/CaptchaConstants.tsx'; /* Metro dependency 9488 */
import * as AssetUtilsModule from '../lib/AssetUtils.tsx'; /* Metro dependency 9495 */
import * as IsChannelFocusedNativeModule from '../../panels/isChannelFocused.native.tsx'; /* Metro dependency 10915 */
import * as QuestDockHooksModule from './QuestDock/QuestDockHooks.tsx'; /* Metro dependency 13569 */
function _fun103102(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:6, offset: 0x02258a64, size: 373 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = useIsMobileQuestDockRenderedBase;
const closure2 = useIsMobileQuestDockRendered;
const useIsMobileQuestDockRenderedBase2 = useIsMobileQuestDockRenderedBase;
const useIsMobileQuestDockRendered2 = useIsMobileQuestDockRendered;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const actionSheetStore = importDefault(3849) /* metro dependency 3849: ActionSheetStore */;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
const questConstantsModule = require(6528) /* metro dependency 6528: QuestConstants */;
const env0_8 = questConstantsModule.QUEST_REWARD_CODE_CLAIM_BOTTOM_SHEET_KEY;
const env0_9 = questConstantsModule.QuestVariants;
const env0_10 = (require(9488) /* metro dependency 9488: CaptchaConstants */).CAPTCHA_MODAL_KEY;
const env0_11 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestHooks.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestHooks.native.tsx');
exports.useMobileQuestDockHeight = useMobileQuestDockHeight;
exports.useMobileQuestDock = useMobileQuestDock;
exports.useIsMobileQuestDockVisibleToUser = useIsMobileQuestDockVisibleToUser;
exports.useIsMobileQuestDockRenderedBase = closure;
exports.useIsMobileQuestDockRendered = closure2;
exports.useIsMobileQuestDockRenderedBase = useIsMobileQuestDockRenderedBase2;
exports.useIsMobileQuestDockRendered = useIsMobileQuestDockRendered2;
exports.useQuestGameLogotypeAssetUrl = useQuestGameLogotypeAssetUrl;
exports.useQuestDockHeroAsset = useQuestDockHeroAsset;
exports.useHasWatchVideoOnMobileTasks = useHasWatchVideoOnMobileTasks;
exports.useMobileActivityQuest = useMobileActivityQuest;
}
function useIsMobileQuestDockRenderedBase(a0) { // fn#103103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:268, offset: 0x02258bd9, size: 391 bytes, params: 2, frame: 23
var r6;
var r0;
var r1;
var moduleValue2;
const value2 = undefined;
const value3 = (UseIsWindowLarge)();
const value4 = (FluxModule).useStateFromStores([QuestStore], _fun103104, []);
const userStatus = a0 == null ? value2 : a0.userStatus;
const value5 = userStatus != null;
if (value5) {
moduleValue2 = require(7091) /* metro dependency 7091: QuestDataUtils */;
r6 = moduleValue2.isDismissed(a0.userStatus,
(require(6531) /* metro dependency 6531: QuestTypes */).QuestContent.QUEST_BAR_MOBILE);
} else {
r6 = value5;
}
const value6 = (a0 == null || a0.userStatus == null ? value2 : a0.userStatus.claimedAt) != null;
let value = QuestHooksModule;
value = value.useIsQuestExpired(a0);
const isEligibleForQuests = (QuestsEligibilityModule).getIsEligibleForQuests();
const YouBarExperiment = (YouBarExperimentModule).YouBarExperiment;
const {enabled, questDockEnabled} = YouBarExperiment.useConfig({location: 'QuestDock'});
if (value4) {
value = a0 == null;
r1 = value || value3;
r1 = !r1 ? enabled && !questDockEnabled : r1;
value = !r1;
r0 = value;
} else {
r0 = a0 != null && isEligibleForQuests;
r0 = r0 && !value;
r0 = r0 && !value6;
r0 = r0 && !r6;
r0 = r0 && !value3;
r0 = r0 && !(enabled && !questDockEnabled);
}
return r0;
function _fun103104() { // fn#103104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:367, offset: 0x02258d60, size: 60 bytes, params: 1, frame: 13
const value = environment.__proto__;
const questStoreBinding = QuestStore;
const getQuestPreviewOverride = questStoreBinding.getQuestPreviewOverride;
const QuestContent = (QuestTypesModule).QuestContent;
const QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
return Reflect.apply(getQuestPreviewOverride, questStoreBinding, [QUEST_BAR_MOBILE]) != null;
}
function useIsMobileQuestDockRenderedBase(a0) { // fn#103103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:268, offset: 0x02258bd9, size: 391 bytes, params: 2, frame: 23
var r6;
var r0;
var r1;
var moduleValue2;
const value2 = undefined;
const value3 = (importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)();
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore], _fun103104, []);
const userStatus = a0 == null ? value2 : a0.userStatus;
const value5 = userStatus != null;
if (value5) {
moduleValue2 = require(7091) /* metro dependency 7091: QuestDataUtils */;
r6 = moduleValue2.isDismissed(a0.userStatus,
(require(6531) /* metro dependency 6531: QuestTypes */).QuestContent.QUEST_BAR_MOBILE);
} else {
r6 = value5;
}
const value6 = (a0 == null || a0.userStatus == null ? value2 : a0.userStatus.claimedAt) != null;
let value = require(9483) /* metro dependency 9483: QuestHooks */;
value = value.useIsQuestExpired(a0);
const isEligibleForQuests = (require(9479) /* metro dependency 9479: QuestsEligibility */).getIsEligibleForQuests();
const YouBarExperiment = (require(5176) /* metro dependency 5176: YouBarExperiment */).YouBarExperiment;
const {enabled, questDockEnabled} = YouBarExperiment.useConfig({location: 'QuestDock'});
if (value4) {
value = a0 == null;
r1 = value || value3;
r1 = !r1 ? enabled && !questDockEnabled : r1;
value = !r1;
r0 = value;
} else {
r0 = a0 != null && isEligibleForQuests;
r0 = r0 && !value;
r0 = r0 && !value6;
r0 = r0 && !r6;
r0 = r0 && !value3;
r0 = r0 && !(enabled && !questDockEnabled);
function useIsMobileQuestDockRendered() { // fn#103105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:852, offset: 0x02258d9c, size: 263 bytes, params: 1, frame: 23
const defaultImport = NewAdRequestBehaviorExperiment;
const useConfig = defaultImport.useConfig;
const enableNewRequestBehavior = Reflect.apply(useConfig, defaultImport,
[{location: 'QuestMobileDock'}]).enableNewRequestBehavior;
let useStateFromStores = FluxModule.useStateFromStores;
const value2 = Reflect.apply(useStateFromStores, FluxModule, [[QuestStore], function() {
return QuestStore.getQuestPreviewOverride(require(dependencyMap[11]).QuestContent.QUEST_BAR_MOBILE);
}, []]);
const value3 = FluxModule.useStateFromStores([QuestStore], _fun103107);
const value4 = FluxModule.useStateFromStores([QuestStore], _fun103108);
useStateFromStores = FluxModule.useStateFromStores;
return useIsMobileQuestDockRenderedBase(value2 ?? (enableNewRequestBehavior ? Reflect.apply(useStateFromStores,
FluxModule, [[QuestStore], _fun103109, [value4]]) : value3));
function _fun103107() { // fn#103107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:1116, offset: 0x02258ed9, size: 96 bytes, params: 1, frame: 18
let value = environment.__proto__;
const getQuestForPlacement = QuestDataUtilsModule.getQuestForPlacement;
const quests = QuestStore.quests;
const questToDeliverForPlacement = QuestStore.questToDeliverForPlacement;
const QuestPlacement = (QuestTypesModule).QuestPlacement;
const MOBILE_HOME_DOCK_AREA = QuestPlacement.MOBILE_HOME_DOCK_AREA;
value = Reflect.apply(getQuestForPlacement, QuestDataUtilsModule, [quests, questToDeliverForPlacement,
MOBILE_HOME_DOCK_AREA]);
const value2 = null;
return value2 != value ? value : value2;
}
function _fun103108() { // fn#103108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:1304, offset: 0x02258f39, size: 71 bytes, params: 1, frame: 13
let value = environment.__proto__;
const questAdDecisionByPlacement = QuestStore.questAdDecisionByPlacement;
const get = questAdDecisionByPlacement.get;
const QuestPlacement = (QuestTypesModule).QuestPlacement;
const MOBILE_HOME_DOCK_AREA = QuestPlacement.MOBILE_HOME_DOCK_AREA;
value = Reflect.apply(get, questAdDecisionByPlacement, [MOBILE_HOME_DOCK_AREA]);
const value2 = null;
return value2 != value ? value : value2;
}
function _fun103109() { // fn#103109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:1457, offset: 0x02258f80, size: 84 bytes, params: 1, frame: 13
const value2 = null;
return value2 != (value2 == env0_0 ? undefined : env0_0.questId) && value2 != QuestStore.quests.get(env0_0.questId) ? QuestStore.quests.get(env0_0.questId) : value2;
}
}
return r0;
}
function useIsMobileQuestDockRendered() { // fn#103105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:852, offset: 0x02258d9c, size: 263 bytes, params: 1, frame: 23
const defaultImport = importDefault(7108) /* metro dependency 7108: NewAdRequestBehaviorExperiment */;
const useConfig = defaultImport.useConfig;
const enableNewRequestBehavior = Reflect.apply(useConfig, defaultImport,
[{location: 'QuestMobileDock'}]).enableNewRequestBehavior;
const fluxModule = require(566) /* metro dependency 566: flux */;
let useStateFromStores = fluxModule.useStateFromStores;
const value2 = Reflect.apply(useStateFromStores, fluxModule, [[QuestStore], function() {
return QuestStore.getQuestPreviewOverride(require(dependencyMap[11]).QuestContent.QUEST_BAR_MOBILE);
}, []]);
const value3 = fluxModule.useStateFromStores([QuestStore], _fun103107);
const value4 = fluxModule.useStateFromStores([QuestStore], _fun103108);
const moduleValue4 = fluxModule;
useStateFromStores = moduleValue4.useStateFromStores;
return useIsMobileQuestDockRenderedBase(value2 ?? (enableNewRequestBehavior ? Reflect.apply(useStateFromStores,
moduleValue4, [[QuestStore], _fun103109, [value4]]) : value3));
}
function useMobileQuestDockHeight() { // fn#103110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:1719, offset: 0x02258fd4, size: 53 bytes, params: 1, frame: 13
const value2 = useIsMobileQuestDockRendered();
let value = require(13569) /* metro dependency 13569: QuestDockHooks */;
value = value.useQuestDockExternalOffset();
return value2 ? value : 0;
}
function useMobileQuestDock() { // fn#103111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:1866, offset: 0x02259009, size: 204 bytes, params: 1, frame: 23
const defaultImport = importDefault(7108) /* metro dependency 7108: NewAdRequestBehaviorExperiment */;
const useConfig = defaultImport.useConfig;
const enableNewRequestBehavior = Reflect.apply(useConfig, defaultImport,
[{location: 'QuestMobileDock'}]).enableNewRequestBehavior;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore], function() {
return QuestStore.getQuestPreviewOverride(require(dependencyMap[11]).QuestContent.QUEST_BAR_MOBILE);
}, []);
const value = (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore], _fun103113);
const defaultImport2 = importDefault(13590) /* metro dependency 13590: useQuestForPlacement */;
const QuestPlacement = (require(6531) /* metro dependency 6531: QuestTypes */).QuestPlacement;
const MOBILE_HOME_DOCK_AREA = QuestPlacement.MOBILE_HOME_DOCK_AREA;
return value2 ?? (enableNewRequestBehavior ? defaultImport2(MOBILE_HOME_DOCK_AREA) : value);
}
function useIsMobileQuestDockVisibleToUser(a0, a1) { // fn#103114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:2391, offset: 0x022590d5, size: 208 bytes, params: 3, frame: 22
const value = a1;
const env0_0 = a0;
const value3 = (require(10915) /* metro dependency 10915: isChannelFocusedNative */).useIsChannelFocused();
const value4 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).useCurrentNavigationRouteName();
const navigationRouteUtilsNativeModule = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
return value && !value3 && (navigationRouteUtilsNativeModule.coerceGuildsRoute({name: value4}) != null || (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore],
_fun103115) && (require(566) /* metro dependency 566: flux */).useStateFromStores([ActionSheetStore],
_fun103116));
}
function useQuestGameLogotypeAssetUrl(a0) { // fn#103117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:2903, offset: 0x022591f8, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
return env0_4.useMemo(_fun103118, [a0]);
}
function useQuestDockHeroAsset(a0) { // fn#103119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:3068, offset: 0x02259276, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
return env0_4.useMemo(_fun103120, [a0]);
}
function useHasWatchVideoOnMobileTasks(a0) { // fn#103121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:3439, offset: 0x0225937f, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
return env0_4.useMemo(_fun103122, [a0]);
}
function useMobileActivityQuest(a0) { // fn#103123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:3583, offset: 0x022593df, size: 403 bytes, params: 2, frame: 22
const env0_0 = a0;
const value2 = undefined;
const activityApplicationId = (require(7116) /* metro dependency 7116: QuestTaskUtils */).getActivityApplicationId(a0);
const application = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStore],
_fun103124);
const canLaunchFrame2 = (require(8045) /* metro dependency 8045: canLaunchFrame */).canLaunchFrame(application);
const env0_3 = canLaunchFrame2;
const r3 = (require(7114) /* metro dependency 7114: QuestUtils */).canLaunchActivity(a0) && a0.config.features.includes(QuestVariants.MOBILE_ACTIVITY_QUEST) && (importDefault(8105) /* metro dependency 8105: isActivitySupportedOnClientPlatform */)(application == null || application.embeddedActivityConfig == null ? value2 : application.embeddedActivityConfig.supported_platforms) && (canLaunchFrame2 || (application == null || application.bot == null ? value2 : application.bot.id) != null);
const binding = r3;
binding.useEffect(_fun103125, [application, activityApplicationId, a0.config.features]);
const useCallback = binding.useCallback;
let value = env0_3(_fun103127);
value = Reflect.apply(useCallback, binding, [value, [canLaunchFrame2, application, r3]]);
return {isMobileActivityQuest: r3, questApplication: application, launchMobileActivity: value};
}
function _fun103104() { // fn#103104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:367, offset: 0x02258d60, size: 60 bytes, params: 1, frame: 13
const value = environment.__proto__;
const getQuestPreviewOverride = QuestStore.getQuestPreviewOverride;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
return Reflect.apply(getQuestPreviewOverride, QuestStore, [QUEST_BAR_MOBILE]) != null;
}
function _fun103107() { // fn#103107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:1116, offset: 0x02258ed9, size: 96 bytes, params: 1, frame: 18
let value = environment.__proto__;
const questDataUtilsModule = require(7091) /* metro dependency 7091: QuestDataUtils */;
const getQuestForPlacement = questDataUtilsModule.getQuestForPlacement;
const quests = QuestStore.quests;
const questToDeliverForPlacement = QuestStore.questToDeliverForPlacement;
const QuestPlacement = (require(6531) /* metro dependency 6531: QuestTypes */).QuestPlacement;
const MOBILE_HOME_DOCK_AREA = QuestPlacement.MOBILE_HOME_DOCK_AREA;
value = Reflect.apply(getQuestForPlacement, questDataUtilsModule, [quests, questToDeliverForPlacement,
MOBILE_HOME_DOCK_AREA]);
const value2 = null;
return value2 != value ? value : value2;
}
function _fun103108() { // fn#103108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:1304, offset: 0x02258f39, size: 71 bytes, params: 1, frame: 13
let value = environment.__proto__;
const questAdDecisionByPlacement = QuestStore.questAdDecisionByPlacement;
const get = questAdDecisionByPlacement.get;
const QuestPlacement = (require(6531) /* metro dependency 6531: QuestTypes */).QuestPlacement;
const MOBILE_HOME_DOCK_AREA = QuestPlacement.MOBILE_HOME_DOCK_AREA;
value = Reflect.apply(get, questAdDecisionByPlacement, [MOBILE_HOME_DOCK_AREA]);
const value2 = null;
return value2 != value ? value : value2;
}
function _fun103109() { // fn#103109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:1457, offset: 0x02258f80, size: 84 bytes, params: 1, frame: 13
const value2 = null;
return value2 != (value2 == env0_0 ? undefined : env0_0.questId) && value2 != QuestStore.quests.get(env0_0.questId) ? QuestStore.quests.get(env0_0.questId) : value2;
}
function _fun103115() { // fn#103115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:2599, offset: 0x022591a5, size: 45 bytes, params: 1, frame: 12
return env0_0 != null && QuestStore.isClaimingReward(env0_0.id);
}
function _fun103116() { // fn#103116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:2674, offset: 0x022591d2, size: 38 bytes, params: 1, frame: 11
const value = environment.__proto__;
const key = ActionSheetStore.getKey();
return key === CAPTCHA_MODAL_KEY || key === QUEST_REWARD_CODE_CLAIM_BOTTOM_SHEET_KEY;
}
function _fun103118() { // fn#103118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:2962, offset: 0x02259224, size: 82 bytes, params: 1, frame: 18
const assetUtilsModule = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = assetUtilsModule.getQuestAsset;
const binding = env0_0;
const QuestAssetType = assetUtilsModule.QuestAssetType;
const LOGO_TYPE = QuestAssetType.LOGO_TYPE;
const DARK = ThemeTypes.DARK;
return Reflect.apply(getQuestAsset, assetUtilsModule, [binding, LOGO_TYPE, DARK]).url;
}
function _fun103120() { // fn#103120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:3120, offset: 0x022592a2, size: 221 bytes, params: 1, frame: 18
var r1;
var moduleValue2;
var resolveAsset;
const value = environment.__proto__;
const assetUtilsModule = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = assetUtilsModule.getQuestAsset;
let binding = env0_0;
const QuestAssetType = assetUtilsModule.QuestAssetType;
const QUEST_BAR_HERO = QuestAssetType.QUEST_BAR_HERO;
const value3 = Reflect.apply(getQuestAsset, assetUtilsModule, [binding, QUEST_BAR_HERO]);
const questBarHeroVideo = binding.config.assets.questBarHeroVideo;
const value4 = null;
if (value4 != questBarHeroVideo) {
moduleValue2 = assetUtilsModule;
resolveAsset = moduleValue2.resolveAsset;
binding = env0_0;
r1 = Reflect.apply(resolveAsset, moduleValue2, [binding.id, binding.config.assets.questBarHeroVideo]);
} else {
r1 = value4;
function useMobileQuestDockHeight() { // fn#103110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:1719, offset: 0x02258fd4, size: 53 bytes, params: 1, frame: 13
const value2 = useIsMobileQuestDockRendered();
let value = QuestDockHooksModule;
value = value.useQuestDockExternalOffset();
return value2 ? value : 0;
}
const isAnimated = value3.isAnimated;
const url = value3.url;
return {staticUrl: isAnimated ? url.replace(assetUtilsModule.EXTENSION_RE, '.png') : url, videoAsset: r1};
}
function _fun103122() { // fn#103122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:3499, offset: 0x022593ab, size: 52 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (require(7116) /* metro dependency 7116: QuestTaskUtils */).hasWatchVideoOnMobileTasks({config: env0_0});
}
function useMobileQuestDock() { // fn#103111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:1866, offset: 0x02259009, size: 204 bytes, params: 1, frame: 23
const defaultImport = NewAdRequestBehaviorExperiment;
const useConfig = defaultImport.useConfig;
const enableNewRequestBehavior = Reflect.apply(useConfig, defaultImport,
[{location: 'QuestMobileDock'}]).enableNewRequestBehavior;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore], function() {
return QuestStore.getQuestPreviewOverride(require(dependencyMap[11]).QuestContent.QUEST_BAR_MOBILE);
}, []);
const value = (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore], _fun103113);
const defaultImport2 = UseQuestForPlacement;
const QuestPlacement = (QuestTypesModule).QuestPlacement;
const MOBILE_HOME_DOCK_AREA = QuestPlacement.MOBILE_HOME_DOCK_AREA;
return value2 ?? (enableNewRequestBehavior ? defaultImport2(MOBILE_HOME_DOCK_AREA) : value);
function _fun103113() { // fn#103113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:2120, offset: 0x02258ed9, size: 96 bytes, params: 1, frame: 18
let value = environment.__proto__;
const getQuestForPlacement = QuestDataUtilsModule.getQuestForPlacement;
const quests = QuestStore.quests;
const questToDeliverForPlacement = QuestStore.questToDeliverForPlacement;
const QuestPlacement = (QuestTypesModule).QuestPlacement;
const MOBILE_HOME_DOCK_AREA = QuestPlacement.MOBILE_HOME_DOCK_AREA;
value = Reflect.apply(getQuestForPlacement, QuestDataUtilsModule, [quests, questToDeliverForPlacement,
MOBILE_HOME_DOCK_AREA]);
const value2 = null;
return value2 != value ? value : value2;
}
function _fun103124() { // fn#103124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:3700, offset: 0x02259572, size: 27 bytes, params: 1, frame: 11
return ApplicationStore.getApplication(env0_1);
}
function _fun103125() { // fn#103125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:3988, offset: 0x0225958d, size: 124 bytes, params: 1, frame: 14
var value6;
var defaultImport;
if (application == null && env0_1 != null && env0_0.config.features.includes(QuestVariants.MOBILE_ACTIVITY_QUEST)) {
value6 = environment.__proto__;
defaultImport = importDefault(6772) /* metro dependency 6772: ApplicationActionCreators */;
defaultImport.fetchApplications([env0_1], false);
}
}
function* _fun103127() { // fn#103127, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:4149, offset: 0x02259614, size: 241 bytes, params: 1, frame: 15
var id;
var value4;
var value5;
var launchActivityInBotDM;
var object2;
var value7;
var value8;
if (true) {
value = environment.__proto__;
if (env1_4) {
if (env1_3) {
value7 = environment.__proto__.__proto__;
value8 = env2_1(env2_2[26]);
yield value8.launchFrame({applicationId: dependencyMap.id});
if (false) {
return undefined;
}
return undefined;
function useIsMobileQuestDockVisibleToUser(a0, a1) { // fn#103114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:2391, offset: 0x022590d5, size: 208 bytes, params: 3, frame: 22
const value = a1;
const env0_0 = a0;
const value3 = (IsChannelFocusedNativeModule).useIsChannelFocused();
const value4 = (NavigationRouteUtilsNativeModule).useCurrentNavigationRouteName();
return value && !value3 && (NavigationRouteUtilsNativeModule.coerceGuildsRoute({name: value4}) != null || (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore],
_fun103115) && (require(566) /* metro dependency 566: flux */).useStateFromStores([ActionSheetStore],
_fun103116));
function _fun103115() { // fn#103115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:2599, offset: 0x022591a5, size: 45 bytes, params: 1, frame: 12
return env0_0 != null && QuestStore.isClaimingReward(env0_0.id);
}
function _fun103116() { // fn#103116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:2674, offset: 0x022591d2, size: 38 bytes, params: 1, frame: 11
const value = environment.__proto__;
const key = ActionSheetStore.getKey();
return key === CAPTCHA_MODAL_KEY || key === QUEST_REWARD_CODE_CLAIM_BOTTOM_SHEET_KEY;
}
}
function useQuestGameLogotypeAssetUrl(a0) { // fn#103117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:2903, offset: 0x022591f8, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
return ReactModule.useMemo(_fun103118, [a0]);
function _fun103118() { // fn#103118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:2962, offset: 0x02259224, size: 82 bytes, params: 1, frame: 18
const getQuestAsset = AssetUtilsModule.getQuestAsset;
const binding = env0_0;
const QuestAssetType = AssetUtilsModule.QuestAssetType;
const LOGO_TYPE = QuestAssetType.LOGO_TYPE;
const DARK = ThemeTypes.DARK;
return Reflect.apply(getQuestAsset, AssetUtilsModule, [binding, LOGO_TYPE, DARK]).url;
}
}
function useQuestDockHeroAsset(a0) { // fn#103119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:3068, offset: 0x02259276, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
return ReactModule.useMemo(_fun103120, [a0]);
function _fun103120() { // fn#103120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:3120, offset: 0x022592a2, size: 221 bytes, params: 1, frame: 18
var r1;
var moduleValue2;
var resolveAsset;
const value = environment.__proto__;
const getQuestAsset = AssetUtilsModule.getQuestAsset;
let binding = env0_0;
const QuestAssetType = AssetUtilsModule.QuestAssetType;
const QUEST_BAR_HERO = QuestAssetType.QUEST_BAR_HERO;
const value3 = Reflect.apply(getQuestAsset, AssetUtilsModule, [binding, QUEST_BAR_HERO]);
const questBarHeroVideo = binding.config.assets.questBarHeroVideo;
const value4 = null;
if (value4 != questBarHeroVideo) {
moduleValue2 = AssetUtilsModule;
resolveAsset = moduleValue2.resolveAsset;
binding = env0_0;
r1 = Reflect.apply(resolveAsset, moduleValue2, [binding.id, binding.config.assets.questBarHeroVideo]);
} else {
r1 = value4;
}
id = dependencyMap == null || dependencyMap.bot == null ? undefined : dependencyMap.bot.id;
if (id == null) {
return undefined;
}
value4 = environment.__proto__.__proto__;
value5 = env2_0(env2_2[27]);
launchActivityInBotDM = value5.launchActivityInBotDM;
object2 = {};
id = dependencyMap.id;
object2.appId = id;
id = dependencyMap.bot.id;
object2.botId = id;
object2.analyticsLocations = [];
yield Reflect.apply(launchActivityInBotDM, value5, [object2]);
if (false) {
return undefined;
const isAnimated = value3.isAnimated;
const url = value3.url;
return {staticUrl: isAnimated ? url.replace(AssetUtilsModule.EXTENSION_RE, '.png') : url, videoAsset: r1};
}
}
function useHasWatchVideoOnMobileTasks(a0) { // fn#103121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:3439, offset: 0x0225937f, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
return ReactModule.useMemo(_fun103122, [a0]);
function _fun103122() { // fn#103122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:3499, offset: 0x022593ab, size: 52 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (QuestTaskUtilsModule).hasWatchVideoOnMobileTasks({config: env0_0});
}
}
function useMobileActivityQuest(a0) { // fn#103123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:3583, offset: 0x022593df, size: 403 bytes, params: 2, frame: 22
const env0_0 = a0;
const value2 = undefined;
const activityApplicationId = (QuestTaskUtilsModule).getActivityApplicationId(a0);
const application = (FluxModule).useStateFromStores([ApplicationStore],
_fun103124);
const canLaunchFrame2 = (CanLaunchFrameModule).canLaunchFrame(application);
const canLaunchFrame22 = canLaunchFrame2;
const r3 = (require(7114) /* metro dependency 7114: QuestUtils */).canLaunchActivity(a0) && a0.config.features.includes(QuestVariants.MOBILE_ACTIVITY_QUEST) && (importDefault(8105) /* metro dependency 8105: isActivitySupportedOnClientPlatform */)(application == null || application.embeddedActivityConfig == null ? value2 : application.embeddedActivityConfig.supported_platforms) && (canLaunchFrame2 || (application == null || application.bot == null ? value2 : application.bot.id) != null);
const binding = r3;
binding.useEffect(_fun103125, [application, activityApplicationId, a0.config.features]);
const useCallback = binding.useCallback;
let value = canLaunchFrame22(_fun103127);
value = Reflect.apply(useCallback, binding, [value, [canLaunchFrame2, application, r3]]);
return {isMobileActivityQuest: r3, questApplication: application, launchMobileActivity: value};
function _fun103124() { // fn#103124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:3700, offset: 0x02259572, size: 27 bytes, params: 1, frame: 11
return ApplicationStore.getApplication(env0_1);
}
function _fun103125() { // fn#103125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:3988, offset: 0x0225958d, size: 124 bytes, params: 1, frame: 14
var value6;
var defaultImport;
if (application == null && env0_1 != null && env0_0.config.features.includes(QuestVariants.MOBILE_ACTIVITY_QUEST)) {
value6 = environment.__proto__;
defaultImport = importDefault(6772) /* metro dependency 6772: ApplicationActionCreators */;
defaultImport.fetchApplications([env0_1], false);
}
}
function* _fun103127() { // fn#103127, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:4149, offset: 0x02259614, size: 241 bytes, params: 1, frame: 15
var id;
var value4;
var value5;
var launchActivityInBotDM;
var object;
var value7;
var value8;
if (true) {
value = environment.__proto__;
if (env1_4) {
if (env1_3) {
value7 = environment.__proto__.__proto__;
value8 = env2_1(env2_2[26]);
yield value8.launchFrame({applicationId: dependencyMap.id});
if (false) {
return undefined;
}
return undefined;
}
id = dependencyMap == null || dependencyMap.bot == null ? undefined : dependencyMap.bot.id;
if (id == null) {
return undefined;
}
value4 = environment.__proto__.__proto__;
value5 = env2_0(env2_2[27]);
launchActivityInBotDM = value5.launchActivityInBotDM;
object = {};
id = dependencyMap.id;
object.appId = id;
id = dependencyMap.bot.id;
object.botId = id;
object.analyticsLocations = [];
yield Reflect.apply(launchActivityInBotDM, value5, [object]);
if (false) {
return undefined;
}
}
}
}
}
}
global.__d(_fun103102, 13568, [5, 31, 3849, 4234, 7093, 6528, 9488, 482, 13569, 7108, 566, 6531, 7091, 13590, 10915,
4007, 7556, 9483, 9479, 5176, 9495, 7116, 8045, 7114, 8105, 6772, 8087, 9527,
2]) /* metro module 13568, dependencies: [5, 31, 3849, 4234, 7093, 6528, 9488, 482, 13569, 7108, 566, 6531, 7091, 13590, 10915, 4007, 7556, 9483, 9479, 5176, 9495, 7116, 8045, 7114, 8105, 6772, 8087, 9527, 2] */;
@@ -1,77 +1,90 @@
/* Metro module 13598; source: modules/quests/native/QuestModalContentCloudBackground.tsx; dependencies: [31, 27, 33, 4501, 3866, 4048, 4589, 5475, 13599, 13600, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun103347(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13788:6, offset: 0x0226343e, size: 248 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.StyleSheet;
value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun103348);
const env0_7 = (CreateStylesModule).createStyles(_fun103348);
const env0_9 = ['#292252FF', '#1E1F2200'].slice().reverse();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestModalContentCloudBackground.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestModalContentCloudBackground.tsx');
exports.default = QuestModalContentCloudBackground;
}
function _fun103348(a0) { // fn#103348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13788:189, offset: 0x02263536, size: 295 bytes, params: 2, frame: 18
const object6 = {};
const object7 = {};
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
const object8 = {};
if (a0) {
object8.top = undefined;
} else {
object8.bottom = undefined;
function _fun103348(a0) { // fn#103348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13788:189, offset: 0x02263536, size: 295 bytes, params: 2, frame: 18
const object = {};
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
const object3 = {};
if (a0) {
object3.top = undefined;
} else {
object3.bottom = undefined;
}
copyDataProperties(object2, object3, undefined);
object2['height'] = 380;
object2['zIndex'] = 1;
object.wrapper = object2;
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
const object5 = {};
if (a0) {
object5.top = undefined;
} else {
object5.bottom = undefined;
}
copyDataProperties(object4, object5, undefined);
copyDataProperties(object4, a0 ? {} : {transform: [{rotate: '180deg'}]}, undefined);
object4['width'] = '100%';
object.cloudsImage = object4;
const object9 = {};
copyDataProperties(object9, StyleSheet.absoluteFillObject, undefined);
object9['bottom'] = undefined;
object9['width'] = '100%';
object.cloudsImageLight = object9;
const object10 = {};
copyDataProperties(object10, StyleSheet.absoluteFillObject, undefined);
object10['opacity'] = 1;
object.gradient = object10;
const object11 = {};
copyDataProperties(object11, StyleSheet.absoluteFillObject, undefined);
object.solidBackground = object11;
return object;
}
copyDataProperties(object7, object8, undefined);
object7['height'] = 380;
object7['zIndex'] = 1;
object6.wrapper = object7;
const object12 = {};
copyDataProperties(object12, StyleSheet.absoluteFillObject, undefined);
const object13 = {};
if (a0) {
object13.top = undefined;
} else {
object13.bottom = undefined;
function QuestModalContentCloudBackground({align, style, imgStyle, resizeMode}) { // fn#103349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13788:624, offset: 0x0226365d, size: 373 bytes, params: 2, frame: 24
let value = 'bottom';
const r14 = align === undefined ? value : align;
const r8 = resizeMode === undefined ? 'cover' : resizeMode;
const styles = useStyles(value === r14);
const isThemeDark = require(dependencyMap[4]).isThemeDark;
const moduleValue = require(dependencyMap[5]);
const useTheme = moduleValue.useTheme;
value = Reflect.apply(isThemeDark, value, [Reflect.apply(useTheme, moduleValue, [])]);
return (
<View style={[styles.wrapper, style]}>
{
value
? ((Component) => <Component colors={r14 === 'top' ? env0_8 : env0_9} style={styles.gradient} />)(importDefault(dependencyMap[6]))
: (
<View style={styles.solidBackground} />
)
}
{((Component) => <Component style={[value ? styles.cloudsImage : styles.cloudsImageLight,
imgStyle]} source={importDefault(value ? dependencyMap[8] : dependencyMap[9])} resizeMode={r8} />)(importDefault(dependencyMap[7]))}
</View>
);
}
copyDataProperties(object12, object13, undefined);
copyDataProperties(object12, a0 ? {} : {transform: [{rotate: '180deg'}]}, undefined);
object12['width'] = '100%';
object6.cloudsImage = object12;
const object14 = {};
copyDataProperties(object14, StyleSheet.absoluteFillObject, undefined);
object14['bottom'] = undefined;
object14['width'] = '100%';
object6.cloudsImageLight = object14;
const object15 = {};
copyDataProperties(object15, StyleSheet.absoluteFillObject, undefined);
object15['opacity'] = 1;
object6.gradient = object15;
const object16 = {};
copyDataProperties(object16, StyleSheet.absoluteFillObject, undefined);
object6.solidBackground = object16;
return object6;
}
function QuestModalContentCloudBackground({align, style, imgStyle, resizeMode}) { // fn#103349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13788:624, offset: 0x0226365d, size: 373 bytes, params: 2, frame: 24
let value = 'bottom';
const r14 = align === undefined ? value : align;
const r8 = resizeMode === undefined ? 'cover' : resizeMode;
const styles = useStyles(value === r14);
const isThemeDark = require(dependencyMap[4]).isThemeDark;
const moduleValue = require(dependencyMap[5]);
const useTheme = moduleValue.useTheme;
value = Reflect.apply(isThemeDark, value, [Reflect.apply(useTheme, moduleValue, [])]);
return (
<View style={[styles.wrapper, style]}>
{value ? ((Component) => <Component colors={r14 === 'top' ? env0_8 : env0_9} style={styles.gradient} />)(importDefault(dependencyMap[6])) : <View style={styles.solidBackground} />}
{((Component) => <Component style={[value ? styles.cloudsImage : styles.cloudsImageLight,
imgStyle]} source={importDefault(value ? dependencyMap[8] : dependencyMap[9])} resizeMode={r8} />)(importDefault(dependencyMap[7]))}
</View>
);
}
global.__d(_fun103347, 13598, [31, 27, 33, 4501, 3866, 4048, 4589, 5475, 13599, 13600,
2]) /* metro module 13598, dependencies: [31, 27, 33, 4501, 3866, 4048, 4589, 5475, 13599, 13600, 2] */;
@@ -1,12 +1,25 @@
/* Metro module 13637; source: modules/quests/native/QuestOrbMultiplierPerkInfoActionSheet.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 4080, 7007, 7899, 3853, 1948, 4578, 1244, 1585, 6515, 3868, 4573, 9503, 3066, 6275, 13634, 2] */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import UsePremiumFeatureUpsellGetNitro from '../../premium/roadblocks/native/hooks/usePremiumFeatureUpsellGetNitro.tsx'; /* Metro dependency 7899 */
import PremiumRewardGradient from './PremiumRewardGradient.tsx'; /* Metro dependency 13634 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as ActionSheetHeaderBarNativeModule from '../../../design/components/Sheet/native/ActionSheetHeaderBar.native.tsx'; /* Metro dependency 6515 */
import * as QuestOrbMultiplierUtilsModule from '../utils/QuestOrbMultiplierUtils.tsx'; /* Metro dependency 9503 */
function _fun104132(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13834:6, offset: 0x02287146, size: 527 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_5 = value.AnalyticsPages;
const env0_6 = value.HelpdeskArticles;
const env0_7 = value.UserSettingsSections;
@@ -14,156 +27,198 @@ function _fun104132(global, require, importDefault, importAll, module, exports,
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
const env0_10 = value.Fragment;
object2 = {marginBottom: 0};
object = {marginBottom: 0};
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.container = {alignItems: 'center', paddingHorizontal: PX_16};
object.container = {alignItems: 'center', paddingHorizontal: PX_16};
const PX_48 = (importDefault(697) /* metro dependency 697: native */).space.PX_48;
object2.contentContainer = {'alignItems': 'center', 'width': '100%', marginTop: PX_48};
const object3 = {textAlign: 'center'};
object.contentContainer = {'alignItems': 'center', 'width': '100%', marginTop: PX_48};
const object4 = {textAlign: 'center'};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object3.paddingHorizontal = PX_24;
object4.paddingHorizontal = PX_24;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingBottom = PX_16;
object2.text = object3;
const object6 = {width: '100%'};
object4.paddingBottom = PX_16;
object.text = object4;
const object5 = {width: '100%'};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.gap = PX_12;
object5.gap = PX_12;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginVertical = PX_16;
object2.buttonContainer = object6;
object2.title = {'textTransform': 'uppercase', 'textAlign': 'center', 'lineHeight': 34, 'paddingHorizontal': 0};
object2.riveContainer = {'width': '100%', 'height': 160};
const env0_12 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestOrbMultiplierPerkInfoActionSheet.tsx');
object5.marginVertical = PX_16;
object.buttonContainer = object5;
object.title = {'textTransform': 'uppercase', 'textAlign': 'center', 'lineHeight': 34, 'paddingHorizontal': 0};
object.riveContainer = {'width': '100%', 'height': 160};
const env0_12 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestOrbMultiplierPerkInfoActionSheet.tsx');
exports.default = QuestOrbMultiplierPerkInfoActionSheet;
}
function Footer({eligibleToReceivePremiumRewards}) { // fn#104133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13834:755, offset: 0x02287355, size: 579 bytes, params: 2, frame: 29
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var items3;
var items2;
const styles = useStyles();
const value2 = ReactModule.useCallback(function() {
importDefault(dependencyMap[6]).hideActionSheet();
require(dependencyMap[7]).openUserSettings({screen: UserSettingsSections.PREMIUM});
}, []);
const defaultImport = UsePremiumFeatureUpsellGetNitro;
const QUEST_ORB_MULTIPLIER_PERK_INFO = AnalyticsPages.QUEST_ORB_MULTIPLIER_PERK_INFO;
const {loading, onPress} = defaultImport(false, value2, QUEST_ORB_MULTIPLIER_PERK_INFO);
const value4 = ReactModule.useCallback(function() {
importDefault(dependencyMap[6]).hideActionSheet();
importDefault(dependencyMap[9]).openURL(importDefault(dependencyMap[10]).getArticleURL(HelpdeskArticles.VIRTUAL_CURRENCY_ORB_MULTIPLIER_LEARN_MORE));
}, []);
const value5 = ReactModule.useCallback(_fun104136, []);
const viewBindingProps = {style: styles.buttonContainer};
const Button = (ButtonNativeModule).Button;
if (eligibleToReceivePremiumRewards) {
string = intl.string;
items2 = [
<Button
size="lg"
text={Reflect.apply(string, intl, [t.hvVgAZ])}
variant="primary"
onPress={value4}
/>,
];
string = intl.string;
items2[1] = (
<Button
size="lg"
variant="secondary"
text={Reflect.apply(string, intl, [t.cpT0Cq])}
onPress={value5}
/>
);
viewBindingProps.children = items2;
} else {
string = intl.string;
items3 = [
<Button
size="lg"
variant="primary"
text={Reflect.apply(string, intl, [t.pj0XBN])}
onPress={onPress}
loading={loading}
/>,
];
string = intl.string;
items3[1] = (
<Button
size="lg"
variant="secondary"
text={Reflect.apply(string, intl, [t.PcTCB7])}
onPress={value2}
/>
);
viewBindingProps.children = items3;
}
return <View {...viewBindingProps} />;
function _fun104136() { // fn#104136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13834:1134, offset: 0x02287646, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
function Footer({eligibleToReceivePremiumRewards}) { // fn#104133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13834:755, offset: 0x02287355, size: 579 bytes, params: 2, frame: 29
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items3;
var items2;
const styles = useStyles();
const binding = env0_3;
const value2 = binding.useCallback(function() {
importDefault(dependencyMap[6]).hideActionSheet();
require(dependencyMap[7]).openUserSettings({screen: UserSettingsSections.PREMIUM});
}, []);
const defaultImport = importDefault(7899) /* metro dependency 7899: usePremiumFeatureUpsellGetNitro */;
const QUEST_ORB_MULTIPLIER_PERK_INFO = AnalyticsPages.QUEST_ORB_MULTIPLIER_PERK_INFO;
const {loading, onPress} = defaultImport(false, value2, QUEST_ORB_MULTIPLIER_PERK_INFO);
const value4 = binding.useCallback(function() {
importDefault(dependencyMap[6]).hideActionSheet();
importDefault(dependencyMap[9]).openURL(importDefault(dependencyMap[10]).getArticleURL(HelpdeskArticles.VIRTUAL_CURRENCY_ORB_MULTIPLIER_LEARN_MORE));
}, []);
const value5 = binding.useCallback(_fun104136, []);
const viewBindingProps = {style: styles.buttonContainer};
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
if (eligibleToReceivePremiumRewards) {
string = intl.string;
items2 = [<Button size="lg" text={Reflect.apply(string, intl,
[t.hvVgAZ])} variant="primary" onPress={value4} />];
string = intl.string;
items2[1] = <Button size="lg" variant="secondary" text={Reflect.apply(string, intl,
[t.cpT0Cq])} onPress={value5} />;
viewBindingProps.children = items2;
} else {
string = intl.string;
items3 = [<Button size="lg" variant="primary" text={Reflect.apply(string, intl,
[t.pj0XBN])} onPress={onPress} loading={loading} />];
string = intl.string;
items3[1] = <Button size="lg" variant="secondary" text={Reflect.apply(string, intl,
[t.PcTCB7])} onPress={value2} />;
viewBindingProps.children = items3;
}
return <View {...viewBindingProps} />;
}
function SheetContent({title, body, eligibleToReceivePremiumRewards}) { // fn#104137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13834:1703, offset: 0x0228766b, size: 401 bytes, params: 2, frame: 31
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const ActionSheetHeaderBar = (require(6515) /* metro dependency 6515: ActionSheetHeaderBarNative */).ActionSheetHeaderBar;
const actionSheetHeaderBar = <ActionSheetHeaderBar variant="floating" />;
const items2 = [styles.container];
items2[1] = {marginBottom: bottom};
const NitroQuestOrbsMultiplierRive = (require(3868) /* metro dependency 3868: native */).NitroQuestOrbsMultiplierRive;
const items3 = [<View style={styles.riveContainer}><NitroQuestOrbsMultiplierRive /></View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items3[1] = <Text style={[styles.text,
styles.title]} variant="display-md" color="mobile-text-heading-primary" accessibilityRole="header">{title}</Text>;
items3[2] = <Text style={styles.text} variant="text-sm/normal">{body}</Text>;
items3[3] = <Footer eligibleToReceivePremiumRewards={eligibleToReceivePremiumRewards} />;
return (
<>
{actionSheetHeaderBar}
<View style={items2}>
<View style={styles.contentContainer}>
{items3}
function SheetContent({title, body, eligibleToReceivePremiumRewards}) { // fn#104137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13834:1703, offset: 0x0228766b, size: 401 bytes, params: 2, frame: 31
const styles = useStyles();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const ActionSheetHeaderBar = (ActionSheetHeaderBarNativeModule).ActionSheetHeaderBar;
const actionSheetHeaderBar = <ActionSheetHeaderBar variant="floating" />;
const items2 = [styles.container];
items2[1] = {marginBottom: bottom};
const NitroQuestOrbsMultiplierRive = (NativeModule).NitroQuestOrbsMultiplierRive;
const items3 = [
<View style={styles.riveContainer}>
<NitroQuestOrbsMultiplierRive />
</View>,
];
const Text = (TextModule).Text;
items3[1] = (
<Text
style={[styles.text, styles.title]}
variant="display-md"
color="mobile-text-heading-primary"
accessibilityRole="header"
>
{title}
</Text>
);
items3[2] = (
<Text style={styles.text} variant="text-sm/normal">
{body}
</Text>
);
items3[3] = <Footer eligibleToReceivePremiumRewards={eligibleToReceivePremiumRewards} />;
return (
<>
{actionSheetHeaderBar}
<View style={items2}>
<View style={styles.contentContainer}>
{items3}
</View>
</View>
</View>
</>
);
}
function QuestOrbMultiplierPerkInfoActionSheet({multiplier, orbMultiplierEligibility}) { // fn#104138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13834:2405, offset: 0x022877fc, size: 313 bytes, params: 2, frame: 21
const shouldReceiveQuestOrbMultiplier2 = (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).shouldReceiveQuestOrbMultiplier(orbMultiplierEligibility);
const QuestOrbMultiplierEligibilityType = (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).QuestOrbMultiplierEligibilityType;
const NITRO = QuestOrbMultiplierEligibilityType.NITRO;
const r7 = orbMultiplierEligibility === NITRO || orbMultiplierEligibility === (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).QuestOrbMultiplierEligibilityType.UPSELL;
const binding = env0_3;
const value4 = binding.useMemo(_fun104139, [orbMultiplierEligibility]);
const value5 = binding.useMemo(_fun104140, [shouldReceiveQuestOrbMultiplier2, orbMultiplierEligibility, multiplier]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
return (
<BottomSheet
scrollable={false}
handleDisabled
startExpanded
contentStyles={env0_11}
>
{((Component) => <Component visible={r7}><SheetContent title={value4} body={value5} eligibleToReceivePremiumRewards={shouldReceiveQuestOrbMultiplier2} /></Component>)(importDefault(13634) /* metro dependency 13634: PremiumRewardGradient */)}
</BottomSheet>
);
}
function _fun104136() { // fn#104136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13834:1134, offset: 0x02287646, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _fun104139() { // fn#104139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13834:2668, offset: 0x02287935, size: 168 bytes, params: 1, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const orbMultiplierEligibilityBinding = orbMultiplierEligibility;
const value = environment.__proto__;
const QuestOrbMultiplierEligibilityType = (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).QuestOrbMultiplierEligibilityType;
const CREPE = QuestOrbMultiplierEligibilityType.CREPE;
return orbMultiplierEligibilityBinding === CREPE ? intl.string((importDefault(3066) /* metro dependency 3066: CrepeMessages */).c5usUr) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Csf5Ol);
}
function _fun104140() { // fn#104140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13834:2822, offset: 0x022879dd, size: 226 bytes, params: 1, frame: 18
var r0;
var binding;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
var t;
const orbMultiplierEligibilityBinding = orbMultiplierEligibility;
const QuestOrbMultiplierEligibilityType = (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).QuestOrbMultiplierEligibilityType;
const CREPE = QuestOrbMultiplierEligibilityType.CREPE;
if (orbMultiplierEligibilityBinding === CREPE) {
r0 = intl.format((importDefault(3066) /* metro dependency 3066: CrepeMessages */).UkrcSH,
{bonusOrbMultiplier: multiplier});
} else {
binding = env0_2;
format = intl.format;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
r0 = binding ? Reflect.apply(format, intl, [t.NpUfej, {bonusOrbMultiplier: multiplier}]) : Reflect.apply(format,
intl, [t['G5k+lZ'], {bonusOrbMultiplier: multiplier}]);
</>
);
}
return r0;
function QuestOrbMultiplierPerkInfoActionSheet({multiplier, orbMultiplierEligibility}) { // fn#104138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13834:2405, offset: 0x022877fc, size: 313 bytes, params: 2, frame: 21
const shouldReceiveQuestOrbMultiplier2 = (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).shouldReceiveQuestOrbMultiplier(orbMultiplierEligibility);
const QuestOrbMultiplierEligibilityType = (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).QuestOrbMultiplierEligibilityType;
const NITRO = QuestOrbMultiplierEligibilityType.NITRO;
const r7 = orbMultiplierEligibility === NITRO || orbMultiplierEligibility === (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).QuestOrbMultiplierEligibilityType.UPSELL;
const value4 = ReactModule.useMemo(_fun104139, [orbMultiplierEligibility]);
const value5 = ReactModule.useMemo(_fun104140, [shouldReceiveQuestOrbMultiplier2, orbMultiplierEligibility, multiplier]);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
return (
<BottomSheet
scrollable={false}
handleDisabled
startExpanded
contentStyles={env0_11}
>
{((Component) => <Component visible={r7}><SheetContent title={value4} body={value5} eligibleToReceivePremiumRewards={shouldReceiveQuestOrbMultiplier2} /></Component>)(PremiumRewardGradient)}
</BottomSheet>
);
function _fun104139() { // fn#104139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13834:2668, offset: 0x02287935, size: 168 bytes, params: 1, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const orbMultiplierEligibilityBinding = orbMultiplierEligibility;
const value = environment.__proto__;
const QuestOrbMultiplierEligibilityType = (QuestOrbMultiplierUtilsModule).QuestOrbMultiplierEligibilityType;
const CREPE = QuestOrbMultiplierEligibilityType.CREPE;
return orbMultiplierEligibilityBinding === CREPE ? intl.string((importDefault(3066) /* metro dependency 3066: CrepeMessages */).c5usUr) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Csf5Ol);
}
function _fun104140() { // fn#104140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13834:2822, offset: 0x022879dd, size: 226 bytes, params: 1, frame: 18
var r0;
var binding;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
var t;
const orbMultiplierEligibilityBinding = orbMultiplierEligibility;
const QuestOrbMultiplierEligibilityType = (QuestOrbMultiplierUtilsModule).QuestOrbMultiplierEligibilityType;
const CREPE = QuestOrbMultiplierEligibilityType.CREPE;
if (orbMultiplierEligibilityBinding === CREPE) {
r0 = intl.format((importDefault(3066) /* metro dependency 3066: CrepeMessages */).UkrcSH,
{bonusOrbMultiplier: multiplier});
} else {
binding = env0_2;
format = intl.format;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
r0 = binding ? Reflect.apply(format, intl, [t.NpUfej, {bonusOrbMultiplier: multiplier}]) : Reflect.apply(format,
intl, [t['G5k+lZ'], {bonusOrbMultiplier: multiplier}]);
}
return r0;
}
}
}
global.__d(_fun104132, 13637, [31, 27, 661, 33, 4501, 697, 4080, 7007, 7899, 3853, 1948, 4578, 1244, 1585, 6515,
3868, 4573, 9503, 3066, 6275, 13634,
2]) /* metro module 13637, dependencies: [31, 27, 661, 33, 4501, 697, 4080, 7007, 7899, 3853, 1948, 4578, 1244, 1585, 6515, 3868, 4573, 9503, 3066, 6275, 13634, 2] */;
@@ -1,11 +1,24 @@
/* Metro module 13635; source: modules/quests/native/QuestOrbMultiplierPerkPill.tsx; dependencies: [31, 27, 33, 4501, 697, 4048, 3866, 3860, 4000, 9483, 9503, 1244, 7954, 4573, 5278, 13636, 4589, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import OpenQuestOrbMultiplierPerkInfoActionSheet from './openQuestOrbMultiplierPerkInfoActionSheet.tsx'; /* Metro dependency 13636 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ThemesModule from '../../../design/utils/shared/themes.tsx'; /* Metro dependency 3866 */
import * as ColorUtilsModule from '../../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as UseThemeModule from '../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as QuestHooksModule from '../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as QuestOrbMultiplierUtilsModule from '../utils/QuestOrbMultiplierUtils.tsx'; /* Metro dependency 9503 */
function _fun104126(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13832:6, offset: 0x02286af6, size: 383 bytes, params: 8, frame: 23
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const StyleSheet = value.StyleSheet;
const env0_4 = value.View;
value = require(33) /* metro dependency 33 */;
@@ -16,94 +29,106 @@ function _fun104126(global, require, importDefault, importAll, module, exports,
const env0_9 = {'x': 1, 'y': 0};
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {'borderRadius': null, 'overflow': 'hidden', 'height': 19, 'backgroundColor': 'transparent'};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object4.fullGradientContainer = object5;
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object6['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.round;
object4.fullGradient = object6;
object = {};
const object2 = {'borderRadius': null, 'overflow': 'hidden', 'height': 19, 'backgroundColor': 'transparent'};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.fullGradientContainer = object2;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.fullGradient = object3;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.fullGradientContent = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center',
object.fullGradientContent = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center',
'paddingHorizontal': null, 'gap': 4, 'height': 19, paddingHorizontal: PX_8};
const env0_10 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestOrbMultiplierPerkPill.tsx');
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestOrbMultiplierPerkPill.tsx');
exports.QuestOrbMultiplierPerkPill = QuestOrbMultiplierPerkPill;
}
function QuestOrbMultiplierPerkPill({onPress, questId, orbMultiplierEligibility}) { // fn#104127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13832:672, offset: 0x02286c75, size: 938 bytes, params: 2, frame: 29
const styles = useStyles();
const isThemeDark2 = (require(3866) /* metro dependency 3866: themes */).isThemeDark((require(4048) /* metro dependency 4048: useTheme */).useTheme());
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const EXPRESSIVE_GRADIENT_PINK_START = (importDefault(697) /* metro dependency 697: native */).colors.EXPRESSIVE_GRADIENT_PINK_START;
const value3 = Reflect.apply(useToken, useTokenModule, [EXPRESSIVE_GRADIENT_PINK_START, 'dark']);
const moduleValue4 = useTokenModule;
useToken = moduleValue4.useToken;
const EXPRESSIVE_GRADIENT_TENURE_BADGE_DIAMOND_END = (importDefault(697) /* metro dependency 697: native */).colors.EXPRESSIVE_GRADIENT_TENURE_BADGE_DIAMOND_END;
const value4 = Reflect.apply(useToken, moduleValue4, [EXPRESSIVE_GRADIENT_TENURE_BADGE_DIAMOND_END, 'dark']);
const moduleValue5 = useTokenModule;
useToken = moduleValue5.useToken;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
const value5 = Reflect.apply(useToken, moduleValue5, [BACKGROUND_BASE_LOWEST, 'dark']);
const env0_3 = value5;
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const items2 = [colorUtilsModule.hexOpacityToRgba(value3, 1)];
const moduleValue7 = colorUtilsModule;
items2[1] = moduleValue7.hexOpacityToRgba(value4, 0.5);
const moduleValue8 = useTokenModule;
useToken = moduleValue8.useToken;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
const value7 = Reflect.apply(useToken, moduleValue8, [BACKGROUND_BRAND]);
const value8 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestOrbRewardMultiplier(questId);
const shouldReceiveQuestOrbMultiplier2 = (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).shouldReceiveQuestOrbMultiplier(orbMultiplierEligibility);
const QuestOrbMultiplierEligibilityType = (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).QuestOrbMultiplierEligibilityType;
const CREPE = QuestOrbMultiplierEligibilityType.CREPE;
const value9 = orbMultiplierEligibility === CREPE;
const value10 = env0_3.useMemo(_fun104128, [value9, value5, value7, isThemeDark2]);
if (value8 == null) {
return null;
}
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r5 = shouldReceiveQuestOrbMultiplier2 ? Reflect.apply(formatToPlainString, intl, [t.l2UfLG,
{bonusOrbMultiplier: value8}]) : Reflect.apply(formatToPlainString, intl, [t['G+mKoo'],
{bonusOrbMultiplier: value8}]);
const jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
const value13 = !value9;
const r2 = value9 ? value13 : ((NitroWheelIcon) => <NitroWheelIcon size="xs" color="white" />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const fragment = <>{r2}<Text variant="text-xs/semibold" color="always-white">{r5}</Text></>;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
return (
<PressableOpacity
onPress={onPress_104129}
activeOpacity={0.8}
accessibilityRole="button"
accessibilityLabel={r5}
>
<View style={[styles.fullGradientContainer, {backgroundColor: value10}]}>
{value9 ? value13 : ((Component) => <Component style={styles.fullGradient} colors={items2} start={env0_8} end={env0_9} />)(importDefault(4589) /* metro dependency 4589 */)}
<View style={styles.fullGradientContent}>
{fragment}
function QuestOrbMultiplierPerkPill({onPress, questId, orbMultiplierEligibility}) { // fn#104127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13832:672, offset: 0x02286c75, size: 938 bytes, params: 2, frame: 29
const styles = useStyles();
const isThemeDark2 = (ThemesModule).isThemeDark((UseThemeModule).useTheme());
let useToken = UseTokenModule.useToken;
const EXPRESSIVE_GRADIENT_PINK_START = (Native).colors.EXPRESSIVE_GRADIENT_PINK_START;
const value3 = Reflect.apply(useToken, UseTokenModule, [EXPRESSIVE_GRADIENT_PINK_START, 'dark']);
useToken = UseTokenModule.useToken;
const EXPRESSIVE_GRADIENT_TENURE_BADGE_DIAMOND_END = (Native).colors.EXPRESSIVE_GRADIENT_TENURE_BADGE_DIAMOND_END;
const value4 = Reflect.apply(useToken, UseTokenModule, [EXPRESSIVE_GRADIENT_TENURE_BADGE_DIAMOND_END, 'dark']);
useToken = UseTokenModule.useToken;
const BACKGROUND_BASE_LOWEST = (Native).colors.BACKGROUND_BASE_LOWEST;
const value5 = Reflect.apply(useToken, UseTokenModule, [BACKGROUND_BASE_LOWEST, 'dark']);
const env0_3 = value5;
const items2 = [ColorUtilsModule.hexOpacityToRgba(value3, 1)];
items2[1] = ColorUtilsModule.hexOpacityToRgba(value4, 0.5);
useToken = UseTokenModule.useToken;
const BACKGROUND_BRAND = (Native).colors.BACKGROUND_BRAND;
const value7 = Reflect.apply(useToken, UseTokenModule, [BACKGROUND_BRAND]);
const value8 = (QuestHooksModule).useQuestOrbRewardMultiplier(questId);
const shouldReceiveQuestOrbMultiplier2 = (QuestOrbMultiplierUtilsModule).shouldReceiveQuestOrbMultiplier(orbMultiplierEligibility);
const QuestOrbMultiplierEligibilityType = (QuestOrbMultiplierUtilsModule).QuestOrbMultiplierEligibilityType;
const CREPE = QuestOrbMultiplierEligibilityType.CREPE;
const value9 = orbMultiplierEligibility === CREPE;
const value10 = env0_3.useMemo(_fun104128, [value9, value5, value7, isThemeDark2]);
if (value8 == null) {
return null;
}
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (IndexNativeModule).t;
const r5 = shouldReceiveQuestOrbMultiplier2 ? Reflect.apply(formatToPlainString, intl, [t.l2UfLG,
{bonusOrbMultiplier: value8}]) : Reflect.apply(formatToPlainString, intl, [t['G+mKoo'],
{bonusOrbMultiplier: value8}]);
const jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
const value13 = !value9;
const r2 = (
value9
? value13
: ((NitroWheelIcon) => <NitroWheelIcon size="xs" color="white" />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)
);
const Text = (TextModule).Text;
const fragment = (
<>
{r2}
<Text variant="text-xs/semibold" color="always-white">
{r5}
</Text>
</>
);
const PressableOpacity = (PressablesModule).PressableOpacity;
return (
<PressableOpacity
onPress={onPress_104129}
activeOpacity={0.8}
accessibilityRole="button"
accessibilityLabel={r5}
>
<View style={[styles.fullGradientContainer, {backgroundColor: value10}]}>
{
value9
? value13
: ((Component) => <Component style={styles.fullGradient} colors={items2} start={env0_8} end={env0_9} />)(importDefault(4589) /* metro dependency 4589 */)
}
<View style={styles.fullGradientContent}>
{fragment}
</View>
</View>
</View>
</PressableOpacity>
);
}
</PressableOpacity>
);
function _fun104128() { // fn#104128, offset: 0x0228701f, size: 33 bytes, params: 1, frame: 3
return result ? env0_4 : env0_2 ? 'transparent' : env0_3;
}
function _fun104128() { // fn#104128, offset: 0x0228701f, size: 33 bytes, params: 1, frame: 3
return result ? env0_4 : env0_2 ? 'transparent' : env0_3;
}
function QuestOrbMultiplierPerkPillOnPress() { // fn#104129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13832:1734, owner: QuestOrbMultiplierPerkPill.onPress, offset: 0x02287040, size: 62 bytes, params: 1, frame: 14
const value = environment.__proto__;
(OpenQuestOrbMultiplierPerkInfoActionSheet)(env0_5,
orbMultiplierEligibility);
if (onPress != null) {
onPress();
}
}
function QuestOrbMultiplierPerkPillOnPress() { // fn#104129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13832:1734, owner: QuestOrbMultiplierPerkPill.onPress, offset: 0x02287040, size: 62 bytes, params: 1, frame: 14
const value = environment.__proto__;
(importDefault(13636) /* metro dependency 13636: openQuestOrbMultiplierPerkInfoActionSheet */)(env0_5,
orbMultiplierEligibility);
if (onPress != null) {
onPress();
}
}
global.__d(_fun104126, 13635, [31, 27, 33, 4501, 697, 4048, 3866, 3860, 4000, 9483, 9503, 1244, 7954, 4573, 5278,
13636, 4589,
2]) /* metro module 13635, dependencies: [31, 27, 33, 4501, 697, 4048, 3866, 3860, 4000, 9483, 9503, 1244, 7954, 4573, 5278, 13636, 4589, 2] */;
@@ -1,451 +1,568 @@
/* Metro module 10184; source: modules/quests/native/QuestOrbsRewardModal.native.tsx; dependencies: [57, 5, 31, 27, 4502, 1878, 7030, 6528, 661, 663, 33, 5080, 10184, 1962, 4501, 697, 5287, 5312, 1244, 5475, 7897, 478, 10142, 9543, 10143, 10185, 10186, 10187, 566, 10069, 676, 9500, 7717, 5120, 6789, 9480, 6531, 9511, 6618, 4573, 10076, 4578, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import FastImage from '../../../components_native/common/FastImage.tsx'; /* Metro dependency 5475 */
import AppStateStore from '../../../stores/native/AppStateStore.tsx'; /* Metro dependency 7030 */
import Quest_reward_mobile_bg_staticPng from '../../../external/discord_assets/assets/orbs/quest_reward_mobile_bg_static.png.js'; /* Metro dependency 10142 */
import Static_idle_orbPng from '../../../external/discord_assets/assets/orbs/static_idle_orb.png.js'; /* Metro dependency 10185 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../external/discord_common/js/shared/utils/PlatformUtils.tsx'; /* Metro dependency 478 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as CollectiblesShopConstantsModule from '../../collectibles/CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as ConstantsIOSModule from '../../../ConstantsIOS.tsx'; /* Metro dependency 676 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as CollectiblesActionCreatorsModule from '../../collectibles/CollectiblesActionCreators.tsx'; /* Metro dependency 5120 */
import * as Module05287Module from '../../../by-id/module-05287.js'; /* Metro dependency 5287 */
import * as XSmallIconModule from '../../../design/components/Icon/native/redesign/generated/XSmallIcon.tsx'; /* Metro dependency 5312 */
import * as QuestConstantsModule from '../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as DeviceOrientationModule from '../../device/native/DeviceOrientation.tsx'; /* Metro dependency 7717 */
import * as APNGPlayerAndroidModule from '../../image/native/APNGPlayer.android.tsx'; /* Metro dependency 7897 */
import * as ExperimentsModule from '../experiments/index.tsx'; /* Metro dependency 9511 */
import * as HooksModule from '../../virtual_currency/hooks/index.tsx'; /* Metro dependency 10069 */
import * as OrbsIconModule from '../../../design/components/Icon/native/redesign/generated/OrbsIcon.tsx'; /* Metro dependency 10076 */
function _fun79254(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:6, offset: 0x01e4acdd, size: 649 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importDefault(5) /* metro dependency 5 */;
const value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_6 = value2.ActivityIndicator;
const env0_7 = value2.StyleSheet;
const env0_8 = value2.View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const appStateStore = importDefault(7030) /* metro dependency 7030: AppStateStore */;
const env0_12 = (require(6528) /* metro dependency 6528: QuestConstants */).RewardFilterTypes;
const env0_13 = (require(661) /* metro dependency 661: Constants */).Orientation;
const env0_14 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
const value3 = require(33) /* metro dependency 33 */;
const env0_15 = value3.jsx;
const env0_16 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.closeButton = {'alignSelf': 'flex-start', 'marginHorizontal': null, 'zIndex': 999, marginHorizontal: PX_16};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object2.closeButtonIcon = {tintColor: WHITE};
const env0_17 = Reflect.apply(createStyles, createStylesModule, [object2]);
const env0_18 = createStylesModule.createStyles(_fun79262);
const value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const PX_16 = (Native).space.PX_16;
object.closeButton = {'alignSelf': 'flex-start', 'marginHorizontal': null, 'zIndex': 999, marginHorizontal: PX_16};
const WHITE = (Native).colors.WHITE;
object.closeButtonIcon = {tintColor: WHITE};
const env0_17 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const env0_18 = CreateStylesModule.createStyles(_fun79262);
const env0_20 = value.memo(_fun79266);
const env0_21 = value.memo(_fun79268);
const env0_22 = value.memo(_fun79270);
const env0_23 = value.memo(_fun79271);
const env0_24 = createStylesModule.createStyles({animatedOrb: {'position': 'absolute', 'height': '130%',
const env0_24 = CreateStylesModule.createStyles({animatedOrb: {'position': 'absolute', 'height': '130%',
'width': '130%', 'left': '-15%', 'top': '-15%', 'pointerEvents': 'none'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestOrbsRewardModal.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestOrbsRewardModal.native.tsx');
exports.default = _default_79272;
exports.openQuestOrbsRewardModal = openQuestOrbsRewardModal;
}
function StaticOrb() { // fn#79255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:2726, offset: 0x01e4af66, size: 124 bytes, params: 1, frame: 21
const styles = useStyles();
return (
<View style={{'width': '100%', 'height': '100%'}}>
{((Component) => <Component source={{uri: importDefault(10185) /* metro dependency 10185: static_idle_orbPng */}} style={styles.animatedOrb} fade={false} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
</View>
);
}
function AnimatedOrbContainer({isAppActive}) { // fn#79256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:2879, offset: 0x01e4afe2, size: 511 bytes, params: 2, frame: 28
const styles = useStyles();
let binding = env0_5;
const [property, env0_1] = env0_3Binding(binding.useState(false), 2);
var [property2, env0_3] = env0_3Binding(env0_5.useState(false), 2);
const [property3, env0_4] = env0_3Binding(env0_5.useState(true), 2);
const value8 = env0_5.useCallback(_fun79257, []);
const value9 = env0_5.useCallback(_fun79258, []);
env0_5.useEffect(_fun79259, [property, property2]);
const items2 = [!property && !property2 && <View style={{height: '100%'}} />];
binding = env0_22;
items2[1] = ((Component) => <Component uri={importDefault(10186) /* metro dependency 10186: quest_reward_mobile_idle_darkPng */} style={[styles.animatedOrb,
(property3 || !property2) && ({opacity: 0})]} onLoad={value9} animate={!property3 && isAppActive} />)(binding);
items2[2] = property3 && ((Component) => <Component uri={importDefault(10187) /* metro dependency 10187: quest_reward_mobile_entry_darkPng */} style={[styles.animatedOrb]} onLoad={value8} animate={isAppActive} />)(env0_22);
return (
<View style={{'width': '100%', 'height': '100%'}}>
{items2}
</View>
);
}
function _fun79262() { // fn#79262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:542, offset: 0x01e4b234, size: 350 bytes, params: 1, frame: 18
const object2 = {};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.root = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
object2.background = StyleSheet.absoluteFillObject;
const object4 = {'justifyContent': 'center', 'alignItems': 'center'};
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
copyDataProperties(object4, StyleSheet.absoluteFillObject, BACKGROUND_BASE_LOW);
object2.loading = object4;
object2.header = {'flexDirection': 'row', 'alignItems': 'flex-end', 'justifyContent': 'flex-end'};
object2.main = {flex: 2};
object2.animation = {flex: 3};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.body = {'flex': 2, 'flexDirection': 'column', 'justifyContent': 'center', gap: PX_16};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.title = {textAlign: 'center', marginHorizontal: PX_32};
const object5 = {};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object5.padding = PX_24;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.gap = PX_16;
object2.buttonsContainer = object5;
object2.orbsIconAndroid = {transform: [{translateY: 3}]};
object2.orbsIconIOS = {'marginTop': 0, 'marginRight': 3};
return object2;
}
function CancelButton_79263() { // fn#79263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1212, offset: 0x01e4b392, size: 150 bytes, params: 1, frame: 19
const styles = useStyles();
const HeaderBackButton = (require(5287) /* metro dependency 5287 */).HeaderBackButton;
const object2 = {onPress: onPress_79264, backImage: backImage};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq);
object2.labelVisible = false;
object2.style = styles.closeButton;
return <HeaderBackButton {...object2} />;
}
function _fun79266({uri, onLoad, animate}) { // fn#79266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1483, offset: 0x01e4b4a2, size: 184 bytes, params: 2, frame: 20
animate = animate === undefined || animate;
env0_5.useEffect(_fun79267, [uri]);
return ((Component) => <Component source={{uri: uri}} style={{'width': '100%',
'height': '100%'}} resizeMode="cover" enableAnimation={animate} onLoad={onLoad} usesSmallCache={false} fade={false} key={'orb-animate-' + animate} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
function _fun79268({uri, onLoad, animate}) { // fn#79268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1743, offset: 0x01e4b587, size: 193 bytes, params: 2, frame: 23
animate = animate === undefined || animate;
const value2 = env0_5.useRef(null);
env0_5.useEffect(_fun79269, [animate,
(require(7897) /* metro dependency 7897: APNGPlayerAndroid */).useAPNGPlayerControls(value2)]);
const APNGPlayer = (require(7897) /* metro dependency 7897: APNGPlayerAndroid */).APNGPlayer;
return (
<APNGPlayer
ref={value2}
url={uri}
autoplay={false}
style={{'width': '100%', 'height': '100%'}}
onLoad={onLoad}
/>
);
}
function _fun79270({uri, style, onLoad, animate}) { // fn#79270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:2000, offset: 0x01e4b670, size: 141 bytes, params: 2, frame: 19
animate = animate === undefined || animate;
const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */;
return (
<View
style={style}
renderToHardwareTextureAndroid
needsOffscreenAlphaCompositing
>
{((Component) => <Component uri={uri} onLoad={onLoad} animate={animate} />)(platformUtilsModule.isAndroid() ? env0_21 : env0_20)}
</View>
);
}
function _fun79271({useReducedMotion, style, onStaticBgLoad, onAnimatedBgLoad, isAppActive}) { // fn#79271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:2223, offset: 0x01e4b6fd, size: 250 bytes, params: 2, frame: 26
var VideoComponent;
var object;
const Fragment = env0_5.Fragment;
const value2 = ((Component) => <Component source={{uri: importDefault(10142) /* metro dependency 10142: quest_reward_mobile_bg_staticPng */}} style={style} resizeMode="cover" onLoad={onStaticBgLoad} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
let r5 = !useReducedMotion && isAppActive;
if (r5) {
VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
object = {};
object.uri = importDefault(10143) /* metro dependency 10143: quest_reward_mobile_bgMp4 */;
r5 = <VideoComponent source={object} style={style} resizeMode="cover" onLoad={onAnimatedBgLoad} disableFocus playInBackground preventsDisplaySleepDuringVideoPlayback={false} />;
function StaticOrb() { // fn#79255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:2726, offset: 0x01e4af66, size: 124 bytes, params: 1, frame: 21
const styles = useStyles();
return (
<View style={{'width': '100%', 'height': '100%'}}>
{((Component) => <Component source={{uri: Static_idle_orbPng}} style={styles.animatedOrb} fade={false} />)(FastImage)}
</View>
);
}
return (
<Fragment>
{value2}
{r5}
</Fragment>
);
}
function _default_79272({quest}) { // fn#79272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:3484, offset: 0x01e4b7f7, size: 1752 bytes, params: 2, frame: 40
var r29;
var r14;
var moduleValue5;
var SafeAreaPaddingView;
var items3;
var Heading;
var title;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items4;
var Text;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
var object;
var primary;
var string;
var items5;
var secondary;
var value28;
var object2;
const env0_3 = undefined;
let env0_5 = undefined;
const styles = useStyles();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const hooksModule = require(10069) /* metro dependency 10069: hooks */;
const useFetchVirtualCurrencyBalance = hooksModule.useFetchVirtualCurrencyBalance;
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, hooksModule, []).balance;
const [property, env0_1] = env0_3(env0_5.useState(false), 2);
const [property2, env0_2] = env0_3(env0_5.useState(false), 2);
const state = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore], function() {
return AppStateStore.getState();
});
const AppStates = (require(676) /* metro dependency 676: ConstantsIOS */).AppStates;
const ACTIVE = AppStates.ACTIVE;
const value8 = state === ACTIVE;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const userStatus = quest.userStatus;
const orbQuantityClaimed = userStatus?.orbQuantityClaimed;
if (orbQuantityClaimed != null) {
r29 = orbQuantityClaimed;
} else {
moduleValue5 = require(9500) /* metro dependency 9500: QuestRewardUtils */;
r29 = moduleValue5.getQuestOrbRewardQuantityForUser(quest.config, currentUser);
}
env0_5.useEffect(function() {
require(dependencyMap[32]).lockOrientation(Orientation.PORTRAIT);
return _fun79277;
}, []);
const value10 = env0_5.useCallback(_fun79278, []);
const value11 = env0_5.useCallback(_fun79279, []);
const value12 = env0_5.useCallback(_fun79280, []);
const value13 = env0_5.useCallback(function() {
importDefault(dependencyMap[11]).popWithKey('QuestOrbsRewardModal');
var moduleValue = require(dependencyMap[35]);
var object = {};
object.filter = RewardFilterTypes.VIRTUAL_CURRENCY;
object.fromContent = require(dependencyMap[36]).QuestContent.REWARD_MODAL;
moduleValue.openQuestHome(object);
}, []);
const experimentsModule = require(9511) /* metro dependency 9511: experiments */;
const useMobileQuestOrbRewardModalCtaPriorityExperiment = experimentsModule.useMobileQuestOrbRewardModalCtaPriorityExperiment;
const variant = Reflect.apply(useMobileQuestOrbRewardModalCtaPriorityExperiment, experimentsModule, []).variant;
env0_5 = variant;
const value14 = (balance ?? 0) >= 4100;
const value15 = env0_5.useMemo(_fun79282, [variant, value14, value13, value12]);
const env0_8 = (require(478) /* metro dependency 478: PlatformUtils */).isAndroid() ? styles.orbsIconAndroid : styles.orbsIconIOS;
const items2 = [<View style={StyleSheet.absoluteFill} accessible={false} accessibilityElementsHidden importantForAccessibility="no-hide-descendants">{((Component) => <Component useReducedMotion={useReducedMotion} style={styles.background} onStaticBgLoad={value10} onAnimatedBgLoad={value11} isAppActive={value8} />)(env0_23)}</View>];
items2[1] = !property && (useReducedMotion || !property2) && <View style={styles.loading}><ActivityIndicator animating /></View>;
let r5 = property || !useReducedMotion && property2;
if (r5) {
SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
var safeAreaPaddingViewProps = {'style': null, 'top': true, 'bottom': true, 'left': true, 'right': true,
style: [styles.main]};
items3 = [<View style={styles.header}><CancelButton_79263 /></View>];
var viewBinding5Props = {'style': null, 'accessible': false, 'accessibilityElementsHidden': true,
'importantForAccessibility': 'no-hide-descendants', style: styles.animation};
r14 = useReducedMotion ? <StaticOrb /> : <AnimatedOrbContainer isAppActive={value8} />;
items3[1] = <View {...viewBinding5Props}>{r14}</View>;
var viewBinding6Props = {style: styles.body};
Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
title = styles.title;
format = intl.format;
items4 = [<Heading variant="heading-xl/bold" color="white" style={title}>{Reflect.apply(format, intl, [t.FIilK5,
{count: r29 ?? 0}])}</Heading>];
Text = (require(4573) /* metro dependency 4573: Text */).Text;
title = styles.title;
format = intl.format;
items4[1] = <Text variant="text-md/normal" color="white" style={title}>{value14 ? Reflect.apply(format, intl,
[t['2dz2AL'], {balanceHook: balanceHook_79283, profileDecoHook: profileDecoHook}]) : Reflect.apply(format,
intl,
[t.rKHvlX, {balanceHook: balanceHook}])}</Text>;
items3[2] = <View {...viewBinding6Props}>{items4}</View>;
var viewBinding7Props = {style: styles.buttonsContainer};
object = {'onPress': null, 'variant': 'primary', 'size': 'lg'};
primary = value15.primary;
object.onPress = primary.handler;
string = intl.string;
primary = value15.primary;
object.text = Reflect.apply(string, intl, [primary.text]);
items5 = [<Button {...object} />];
secondary = value15.secondary;
value28 = secondary != null;
if (value28) {
object2 = {'onPress': null, 'variant': 'secondary', 'size': 'lg'};
secondary = value15.secondary;
object2.onPress = secondary.handler;
string = intl.string;
secondary = value15.secondary;
object2.text = Reflect.apply(string, intl, [secondary.text]);
r14 = <Button {...object2} />;
} else {
r14 = value28;
function AnimatedOrbContainer({isAppActive}) { // fn#79256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:2879, offset: 0x01e4afe2, size: 511 bytes, params: 2, frame: 28
const styles = useStyles();
let binding = env0_5;
const [property, env0_1] = env0_3Binding(binding.useState(false), 2);
var [property2, env0_3] = env0_3Binding(env0_5.useState(false), 2);
const [property3, env0_4] = env0_3Binding(env0_5.useState(true), 2);
const value8 = env0_5.useCallback(_fun79257, []);
const value9 = env0_5.useCallback(_fun79258, []);
env0_5.useEffect(_fun79259, [property, property2]);
const items2 = [
!property && !property2 && <View style={{height: '100%'}} />,
];
binding = env0_22;
items2[1] = ((Component) => <Component uri={importDefault(10186) /* metro dependency 10186: quest_reward_mobile_idle_darkPng */} style={[styles.animatedOrb,
(property3 || !property2) && ({opacity: 0})]} onLoad={value9} animate={!property3 && isAppActive} />)(binding);
items2[2] = property3 && ((Component) => <Component uri={importDefault(10187) /* metro dependency 10187: quest_reward_mobile_entry_darkPng */} style={[styles.animatedOrb]} onLoad={value8} animate={isAppActive} />)(env0_22);
return (
<View style={{'width': '100%', 'height': '100%'}}>
{items2}
</View>
);
function _fun79257() { // fn#79257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:3073, offset: 0x01d4f9cc, size: 18 bytes, params: 1, frame: 11
env0_1(true);
}
items5[1] = r14;
items3[3] = <View {...viewBinding7Props}>{items5}</View>;
r5 = <SafeAreaPaddingView {...safeAreaPaddingViewProps}>{items3}</SafeAreaPaddingView>;
}
items2[2] = r5;
return (
<View style={styles.root}>
{items2}
</View>
);
}
function openQuestOrbsRewardModal({quest}) { // fn#79286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:7109, offset: 0x01e4c31d, size: 80 bytes, params: 2, frame: 16
const defaultImport = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
defaultImport.pushLazy(env0_4(_fun79288), {quest: quest}, 'QuestOrbsRewardModal');
}
function _fun79259() { // fn#79259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:3144, offset: 0x01e4b1f3, size: 65 bytes, params: 1, frame: 14
if (env0_0) {
if (env0_2) {
var env0_0 = global.setTimeout(_fun79260, 1450);
return _fun79261;
function _fun79258() { // fn#79258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:3107, offset: 0x01e4b1e1, size: 18 bytes, params: 1, frame: 11
env0_3(true);
}
}
}
function CancelButton_79263OnPress() { // fn#79264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1271, owner: CancelButton_79263.onPress, offset: 0x01e4b428, size: 44 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('QuestOrbsRewardModal');
}
function _fun79259() { // fn#79259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:3144, offset: 0x01e4b1f3, size: 65 bytes, params: 1, frame: 14
if (env0_0) {
if (env0_2) {
var env0_0 = global.setTimeout(_fun79260, 1450);
return _fun79261;
}
}
function _fun79260() { // fn#79260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:3176, offset: 0x0101b7c8, size: 18 bytes, params: 1, frame: 11
env1_4(false);
}
function CancelButton_79263BackImage() { // fn#79265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1310, owner: CancelButton_79263.backImage, offset: 0x01e4b454, size: 78 bytes, params: 1, frame: 15
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
return <XSmallIcon size="lg" style={[styles.closeButtonIcon]} />;
}
function _fun79261() { // fn#79261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:3201, offset: 0x016d7e7e, size: 24 bytes, params: 1, frame: 11
return global.clearTimeout(env0_0);
}
function _fun79267() { // fn#79267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1543, offset: 0x01e4b55a, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value.preload(uri);
}
function _fun79269() { // fn#79269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1860, offset: 0x01e4b648, size: 40 bytes, params: 1, frame: 9
const animateBinding = animate;
const binding = env0_1;
if (animateBinding) {
binding.play();
} else {
binding.stop();
}
}
function _fun79276() { // fn#79276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:3978, offset: 0x01e4bee2, size: 57 bytes, params: 1, frame: 12
const deviceOrientationModule = require(7717) /* metro dependency 7717: DeviceOrientation */;
const lockOrientation = deviceOrientationModule.lockOrientation;
const PORTRAIT = Orientation.PORTRAIT;
Reflect.apply(lockOrientation, deviceOrientationModule, [PORTRAIT]);
return _fun79277;
}
function _fun79279() { // fn#79279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:4124, offset: 0x01e4bf40, size: 18 bytes, params: 1, frame: 11
env0_2(true);
}
function _fun79280() { // fn#79280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:4158, offset: 0x01e4bf52, size: 139 bytes, params: 1, frame: 18
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('QuestOrbsRewardModal');
const collectiblesActionCreatorsModule = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
const openCollectiblesShopMobile = collectiblesActionCreatorsModule.openCollectiblesShopMobile;
const object2 = {};
let MOBILE_ORBS_REWARD_CLAIM_MODAL = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).MOBILE_ORBS_REWARD_CLAIM_MODAL;
object2.analyticsLocations = [MOBILE_ORBS_REWARD_CLAIM_MODAL];
MOBILE_ORBS_REWARD_CLAIM_MODAL = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).MOBILE_ORBS_REWARD_CLAIM_MODAL;
object2.analyticsSource = MOBILE_ORBS_REWARD_CLAIM_MODAL;
const ORBS = CollectiblesMobileShopScreen.ORBS;
object2.screen = ORBS;
Reflect.apply(openCollectiblesShopMobile, collectiblesActionCreatorsModule, [object2]);
}
function _fun79282() { // fn#79282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:4618, offset: 0x01e4c051, size: 418 bytes, params: 1, frame: 19
var object3;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const variantBinding = variant;
const MobileQuestOrbRewardModalCtaPriorityVariant = (require(9511) /* metro dependency 9511: experiments */).MobileQuestOrbRewardModalCtaPriorityVariant;
const EARN_ORBS_PRIMARY = MobileQuestOrbRewardModalCtaPriorityVariant.EARN_ORBS_PRIMARY;
if (EARN_ORBS_PRIMARY === variantBinding) {
object3 = {};
object3.primary = {text: t.uJAMFX, handler: env0_4};
object3.secondary = {text: t.GPdvqY, handler: env0_3};
} else {
var EARN_ORBS_ONLY = MobileQuestOrbRewardModalCtaPriorityVariant.EARN_ORBS_ONLY;
if (EARN_ORBS_ONLY === variantBinding) {
return {primary: {text: t.uJAMFX, handler: env0_4}, secondary: null};
}
var binding = env0_6;
object3 = {};
var object4 = {};
if (binding) {
object4.text = t.GPdvqY;
object4.handler = env0_3;
object3.primary = object4;
object3.secondary = {text: t.uJAMFX, handler: env0_4};
} else {
object4.text = t.uJAMFX;
object4.handler = env0_4;
object3.primary = object4;
object3.secondary = {text: t.GPdvqY, handler: env0_3};
}
}
return object3;
}
function _default_79272BalanceHook() { // fn#79283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:6186, owner: _default_79272.balanceHook, offset: 0x01e4c1f3, size: 182 bytes, params: 1, frame: 22
const value = environment.__proto__;
const Fragment = env1_5.Fragment;
const OrbsIcon = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
return (
<Fragment key="balance">
<OrbsIcon
size="xs"
color={WHITE}
style={env0_8}
}
function _fun79262() { // fn#79262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:542, offset: 0x01e4b234, size: 350 bytes, params: 1, frame: 18
const object = {};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.root = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
object.background = StyleSheet.absoluteFillObject;
const object3 = {'justifyContent': 'center', 'alignItems': 'center'};
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.backgroundColor = BACKGROUND_BASE_LOW;
copyDataProperties(object3, StyleSheet.absoluteFillObject, BACKGROUND_BASE_LOW);
object.loading = object3;
object.header = {'flexDirection': 'row', 'alignItems': 'flex-end', 'justifyContent': 'flex-end'};
object.main = {flex: 2};
object.animation = {flex: 3};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.body = {'flex': 2, 'flexDirection': 'column', 'justifyContent': 'center', gap: PX_16};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object.title = {textAlign: 'center', marginHorizontal: PX_32};
const object6 = {};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object6.padding = PX_24;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.gap = PX_16;
object.buttonsContainer = object6;
object.orbsIconAndroid = {transform: [{translateY: 3}]};
object.orbsIconIOS = {'marginTop': 0, 'marginRight': 3};
return object;
}
function CancelButton_79263() { // fn#79263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1212, offset: 0x01e4b392, size: 150 bytes, params: 1, frame: 19
const styles = useStyles();
const HeaderBackButton = (Module05287Module).HeaderBackButton;
const object = {onPress: onPress_79264, backImage: backImage_79265};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq);
object.labelVisible = false;
object.style = styles.closeButton;
return <HeaderBackButton {...object} />;
function CancelButton_79263OnPress() { // fn#79264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1271, owner: CancelButton_79263.onPress, offset: 0x01e4b428, size: 44 bytes, params: 1, frame: 12
const value = environment.__proto__;
(ModalActionCreators).popWithKey('QuestOrbsRewardModal');
}
function CancelButton_79263BackImage() { // fn#79265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1310, owner: CancelButton_79263.backImage, offset: 0x01e4b454, size: 78 bytes, params: 1, frame: 15
const XSmallIcon = (XSmallIconModule).XSmallIcon;
return <XSmallIcon size="lg" style={[styles.closeButtonIcon]} />;
}
}
function _fun79266({uri, onLoad, animate}) { // fn#79266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1483, offset: 0x01e4b4a2, size: 184 bytes, params: 2, frame: 20
animate = animate === undefined || animate;
env0_5.useEffect(_fun79267, [uri]);
return ((Component) => <Component source={{uri: uri}} style={{'width': '100%',
'height': '100%'}} resizeMode="cover" enableAnimation={animate} onLoad={onLoad} usesSmallCache={false} fade={false} key={'orb-animate-' + animate} />)(FastImage);
function _fun79267() { // fn#79267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1543, offset: 0x01e4b55a, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value.preload(uri);
}
}
function _fun79268({uri, onLoad, animate}) { // fn#79268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1743, offset: 0x01e4b587, size: 193 bytes, params: 2, frame: 23
animate = animate === undefined || animate;
const value2 = env0_5.useRef(null);
env0_5.useEffect(_fun79269, [animate,
(APNGPlayerAndroidModule).useAPNGPlayerControls(value2)]);
const APNGPlayer = (APNGPlayerAndroidModule).APNGPlayer;
return (
<APNGPlayer
ref={value2}
url={uri}
autoplay={false}
style={{'width': '100%', 'height': '100%'}}
onLoad={onLoad}
/>
{env0_7 && <View style={{width: 2}} />}
{balance}
</Fragment>
);
}
);
function _fun79269() { // fn#79269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1860, offset: 0x01e4b648, size: 40 bytes, params: 1, frame: 9
const animateBinding = animate;
const binding = env0_1;
if (animateBinding) {
binding.play();
} else {
binding.stop();
}
}
function profileDecoHook() { // fn#79284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:6340, owner: _default_79272.profileDecoHook, offset: 0x01e4c2a9, size: 116 bytes, params: 1, frame: 19
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Text
variant="text-md/semibold"
color="white"
key="profileDeco"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pGDUH9)}
</Text>
);
}
function* _fun79288() { // fn#79288, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:7144, offset: 0x01e4c378, size: 74 bytes, params: 1, frame: 14
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const binding = env2_0;
const binding2 = env2_2;
yield binding(binding2[13])(binding2[12], binding2.paths);
value = undefined;
if (false) {
return value;
function _fun79270({uri, style, onLoad, animate}) { // fn#79270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:2000, offset: 0x01e4b670, size: 141 bytes, params: 2, frame: 19
animate = animate === undefined || animate;
return (
<View
style={style}
renderToHardwareTextureAndroid
needsOffscreenAlphaCompositing
>
{((Component) => <Component uri={uri} onLoad={onLoad} animate={animate} />)(PlatformUtilsModule.isAndroid() ? env0_21 : env0_20)}
</View>
);
}
function _fun79271({useReducedMotion, style, onStaticBgLoad, onAnimatedBgLoad, isAppActive}) { // fn#79271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:2223, offset: 0x01e4b6fd, size: 250 bytes, params: 2, frame: 26
var VideoComponent;
var object2;
const Fragment = env0_5.Fragment;
const value2 = ((Component) => <Component source={{uri: Quest_reward_mobile_bg_staticPng}} style={style} resizeMode="cover" onLoad={onStaticBgLoad} />)(FastImage);
let r5 = !useReducedMotion && isAppActive;
if (r5) {
VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
object2 = {};
object2.uri = importDefault(10143) /* metro dependency 10143: quest_reward_mobile_bgMp4 */;
r5 = (
<VideoComponent
source={object2}
style={style}
resizeMode="cover"
onLoad={onAnimatedBgLoad}
disableFocus
playInBackground
preventsDisplaySleepDuringVideoPlayback={false}
/>
);
}
return (
<Fragment>
{value2}
{r5}
</Fragment>
);
}
function _default_79272({quest}) { // fn#79272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:3484, offset: 0x01e4b7f7, size: 1752 bytes, params: 2, frame: 40
var r29;
var r14;
var moduleValue5;
var SafeAreaPaddingView;
var items3;
var Heading;
var title;
const intl = (IndexNativeModule).intl;
var format;
const t = (IndexNativeModule).t;
var items4;
var Text;
const Button = (ButtonNativeModule).Button;
var object3;
var primary;
var string;
var items5;
var secondary;
var value28;
var object4;
const env0_3 = undefined;
let env0_5 = undefined;
const styles = useStyles();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const useFetchVirtualCurrencyBalance = HooksModule.useFetchVirtualCurrencyBalance;
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, HooksModule, []).balance;
const [property, env0_1] = env0_3(env0_5.useState(false), 2);
const [property2, env0_2] = env0_3(env0_5.useState(false), 2);
const state = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore], function() {
return AppStateStore.getState();
});
const AppStates = (ConstantsIOSModule).AppStates;
const ACTIVE = AppStates.ACTIVE;
const value8 = state === ACTIVE;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const userStatus = quest.userStatus;
const orbQuantityClaimed = userStatus?.orbQuantityClaimed;
if (orbQuantityClaimed != null) {
r29 = orbQuantityClaimed;
} else {
moduleValue5 = require(9500) /* metro dependency 9500: QuestRewardUtils */;
r29 = moduleValue5.getQuestOrbRewardQuantityForUser(quest.config, currentUser);
}
env0_5.useEffect(function() {
require(dependencyMap[32]).lockOrientation(Orientation.PORTRAIT);
return _fun79277;
}, []);
const value10 = env0_5.useCallback(_fun79278, []);
const value11 = env0_5.useCallback(_fun79279, []);
const value12 = env0_5.useCallback(_fun79280, []);
const value13 = env0_5.useCallback(function() {
importDefault(dependencyMap[11]).popWithKey('QuestOrbsRewardModal');
var moduleValue = require(dependencyMap[35]);
var object = {};
object.filter = RewardFilterTypes.VIRTUAL_CURRENCY;
object.fromContent = require(dependencyMap[36]).QuestContent.REWARD_MODAL;
moduleValue.openQuestHome(object);
}, []);
const useMobileQuestOrbRewardModalCtaPriorityExperiment = ExperimentsModule.useMobileQuestOrbRewardModalCtaPriorityExperiment;
const variant = Reflect.apply(useMobileQuestOrbRewardModalCtaPriorityExperiment, ExperimentsModule, []).variant;
env0_5 = variant;
const value14 = (balance ?? 0) >= 4100;
const value15 = env0_5.useMemo(_fun79282, [variant, value14, value13, value12]);
const env0_8 = (require(478) /* metro dependency 478: PlatformUtils */).isAndroid() ? styles.orbsIconAndroid : styles.orbsIconIOS;
const items2 = [
<View
style={StyleSheet.absoluteFill}
accessible={false}
accessibilityElementsHidden
importantForAccessibility="no-hide-descendants"
>
{((Component) => <Component useReducedMotion={useReducedMotion} style={styles.background} onStaticBgLoad={value10} onAnimatedBgLoad={value11} isAppActive={value8} />)(env0_23)}
</View>,
];
items2[1] = !property && (useReducedMotion || !property2) && <View style={styles.loading}><ActivityIndicator animating /></View>;
let r5 = property || !useReducedMotion && property2;
if (r5) {
SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
var safeAreaPaddingViewProps = {'style': null, 'top': true, 'bottom': true, 'left': true, 'right': true,
style: [styles.main]};
items3 = [
<View style={styles.header}>
<CancelButton_79263 />
</View>,
];
var viewBinding5Props = {'style': null, 'accessible': false, 'accessibilityElementsHidden': true,
'importantForAccessibility': 'no-hide-descendants', style: styles.animation};
r14 = (
useReducedMotion
? (
<StaticOrb />
)
: (
<AnimatedOrbContainer isAppActive={value8} />
)
);
items3[1] = (
<View {...viewBinding5Props}>
{r14}
</View>
);
var viewBinding6Props = {style: styles.body};
Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
title = styles.title;
format = intl.format;
items4 = [
<Heading
variant="heading-xl/bold"
color="white"
style={title}
>
{Reflect.apply(format, intl, [t.FIilK5, {count: r29 ?? 0}])}
</Heading>,
];
Text = (require(4573) /* metro dependency 4573: Text */).Text;
title = styles.title;
format = intl.format;
items4[1] = (
<Text
variant="text-md/normal"
color="white"
style={title}
>
{value14 ? Reflect.apply(format, intl, [t['2dz2AL'], {balanceHook: balanceHook_79283,
profileDecoHook: profileDecoHook}]) : Reflect.apply(format, intl, [t.rKHvlX,
{balanceHook: balanceHook}])}
</Text>
);
items3[2] = (
<View {...viewBinding6Props}>
{items4}
</View>
);
var viewBinding7Props = {style: styles.buttonsContainer};
object3 = {'onPress': null, 'variant': 'primary', 'size': 'lg'};
primary = value15.primary;
object3.onPress = primary.handler;
string = intl.string;
primary = value15.primary;
object3.text = Reflect.apply(string, intl, [primary.text]);
items5 = [
<Button {...object3} />,
];
secondary = value15.secondary;
value28 = secondary != null;
if (value28) {
object4 = {'onPress': null, 'variant': 'secondary', 'size': 'lg'};
secondary = value15.secondary;
object4.onPress = secondary.handler;
string = intl.string;
secondary = value15.secondary;
object4.text = Reflect.apply(string, intl, [secondary.text]);
r14 = <Button {...object4} />;
} else {
r14 = value28;
}
items5[1] = r14;
items3[3] = (
<View {...viewBinding7Props}>
{items5}
</View>
);
r5 = (
<SafeAreaPaddingView {...safeAreaPaddingViewProps}>
{items3}
</SafeAreaPaddingView>
);
}
items2[2] = r5;
return (
<View style={styles.root}>
{items2}
</View>
);
function _fun79276() { // fn#79276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:3978, offset: 0x01e4bee2, size: 57 bytes, params: 1, frame: 12
const lockOrientation = DeviceOrientationModule.lockOrientation;
const PORTRAIT = Orientation.PORTRAIT;
Reflect.apply(lockOrientation, DeviceOrientationModule, [PORTRAIT]);
return _fun79277;
function _fun79277() { // fn#79277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:4020, offset: 0x01e4bf1b, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(DeviceOrientationModule).restoreDefaultOrientation();
}
}
function _fun79278() { // fn#79278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:4090, offset: 0x01d4f9cc, size: 18 bytes, params: 1, frame: 11
env0_1(true);
}
function _fun79279() { // fn#79279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:4124, offset: 0x01e4bf40, size: 18 bytes, params: 1, frame: 11
env0_2(true);
}
function _fun79280() { // fn#79280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:4158, offset: 0x01e4bf52, size: 139 bytes, params: 1, frame: 18
(ModalActionCreators).popWithKey('QuestOrbsRewardModal');
const openCollectiblesShopMobile = CollectiblesActionCreatorsModule.openCollectiblesShopMobile;
const object = {};
let MOBILE_ORBS_REWARD_CLAIM_MODAL = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).MOBILE_ORBS_REWARD_CLAIM_MODAL;
object.analyticsLocations = [MOBILE_ORBS_REWARD_CLAIM_MODAL];
MOBILE_ORBS_REWARD_CLAIM_MODAL = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).MOBILE_ORBS_REWARD_CLAIM_MODAL;
object.analyticsSource = MOBILE_ORBS_REWARD_CLAIM_MODAL;
const ORBS = CollectiblesMobileShopScreen.ORBS;
object.screen = ORBS;
Reflect.apply(openCollectiblesShopMobile, CollectiblesActionCreatorsModule, [object]);
}
function _fun79282() { // fn#79282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:4618, offset: 0x01e4c051, size: 418 bytes, params: 1, frame: 19
var object;
const t = (IndexNativeModule).t;
const variantBinding = variant;
const MobileQuestOrbRewardModalCtaPriorityVariant = (ExperimentsModule).MobileQuestOrbRewardModalCtaPriorityVariant;
const EARN_ORBS_PRIMARY = MobileQuestOrbRewardModalCtaPriorityVariant.EARN_ORBS_PRIMARY;
if (EARN_ORBS_PRIMARY === variantBinding) {
object = {};
object.primary = {text: t.uJAMFX, handler: Module00005};
object.secondary = {text: t.GPdvqY, handler: env0_3};
} else {
var EARN_ORBS_ONLY = MobileQuestOrbRewardModalCtaPriorityVariant.EARN_ORBS_ONLY;
if (EARN_ORBS_ONLY === variantBinding) {
return {primary: {text: t.uJAMFX, handler: Module00005}, secondary: null};
}
var binding = ReactNativeModule.ActivityIndicator;
object = {};
var object2 = {};
if (binding) {
object2.text = t.GPdvqY;
object2.handler = env0_3;
object.primary = object2;
object.secondary = {text: t.uJAMFX, handler: Module00005};
} else {
object2.text = t.uJAMFX;
object2.handler = Module00005;
object.primary = object2;
object.secondary = {text: t.GPdvqY, handler: env0_3};
}
}
return object;
}
function _default_79272BalanceHook() { // fn#79283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:6186, owner: _default_79272.balanceHook, offset: 0x01e4c1f3, size: 182 bytes, params: 1, frame: 22
const value = environment.__proto__;
const Fragment = env1_5.Fragment;
const OrbsIcon = (OrbsIconModule).OrbsIcon;
const WHITE = (Native).colors.WHITE;
return (
<Fragment key="balance">
<OrbsIcon
size="xs"
color={WHITE}
style={env0_8}
/>
{ReactNativeModule.StyleSheet && <View style={{width: 2}} />}
{balance}
</Fragment>
);
}
function profileDecoHook() { // fn#79284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:6340, owner: _default_79272.profileDecoHook, offset: 0x01e4c2a9, size: 116 bytes, params: 1, frame: 19
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<Text
variant="text-md/semibold"
color="white"
key="profileDeco"
>
{intl.string((IndexNativeModule).t.pGDUH9)}
</Text>
);
}
function _default_79272BalanceHook_79285() { // fn#79285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:6521, owner: _default_79272.balanceHook, offset: 0x01e4c1f3, size: 182 bytes, params: 1, frame: 22
const value = environment.__proto__;
const Fragment = env1_5.Fragment;
const OrbsIcon = (OrbsIconModule).OrbsIcon;
const WHITE = (Native).colors.WHITE;
return (
<Fragment key="balance">
<OrbsIcon
size="xs"
color={WHITE}
style={env0_8}
/>
{ReactNativeModule.StyleSheet && <View style={{width: 2}} />}
{balance}
</Fragment>
);
}
}
function openQuestOrbsRewardModal({quest}) { // fn#79286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:7109, offset: 0x01e4c31d, size: 80 bytes, params: 2, frame: 16
const defaultImport = ModalActionCreators;
defaultImport.pushLazy(Module00005(_fun79288), {quest: quest}, 'QuestOrbsRewardModal');
function* _fun79288() { // fn#79288, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:7144, offset: 0x01e4c378, size: 74 bytes, params: 1, frame: 14
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const binding = env2_0;
const binding2 = env2_2;
yield binding(binding2[13])(binding2[12], binding2.paths);
value = undefined;
if (false) {
return value;
}
return value.default;
}
}
return value.default;
}
function _fun79277() { // fn#79277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:4020, offset: 0x01e4bf1b, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation();
}
global.__d(_fun79254, 10184, [57, 5, 31, 27, 4502, 1878, 7030, 6528, 661, 663, 33, 5080, 10184, 1962, 4501, 697,
5287, 5312, 1244, 5475, 7897, 478, 10142, 9543, 10143, 10185, 10186, 10187, 566, 10069, 676, 9500, 7717, 5120,
6789, 9480, 6531, 9511, 6618, 4573, 10076, 4578,
2]) /* metro module 10184, dependencies: [57, 5, 31, 27, 4502, 1878, 7030, 6528, 661, 663, 33, 5080, 10184, 1962, 4501, 697, 5287, 5312, 1244, 5475, 7897, 478, 10142, 9543, 10143, 10185, 10186, 10187, 566, 10069, 676, 9500, 7717, 5120, 6789, 9480, 6531, 9511, 6618, 4573, 10076, 4578, 2] */;
@@ -1,16 +1,40 @@
/* Metro module 15387; source: modules/quests/native/QuestProgressBottomSheet.tsx; dependencies: [5, 31, 27, 7093, 6528, 8044, 33, 4501, 697, 566, 10183, 6531, 8341, 8639, 1244, 8750, 6777, 7116, 10718, 9483, 9950, 13593, 8087, 4080, 9480, 9212, 9505, 6275, 5475, 4589, 676, 9542, 9176, 13623, 4572, 4573, 4578, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import defaultImport3 from '../../../by-id/module-04589-LinearGradient.js'; /* Metro dependency 4589 */
import QuestStore from '../QuestStore.tsx'; /* Metro dependency 7093 */
import FramesActionCreatorsNative from '../../frames/FramesActionCreators.native.tsx'; /* Metro dependency 8087 */
import Module09176 from '../../../by-id/module-09176.js'; /* Metro dependency 9176 */
import QuestContextMenu from './QuestContextMenu.tsx'; /* Metro dependency 13623 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsIOSModule from '../../../ConstantsIOS.tsx'; /* Metro dependency 676 */
import * as StackNativeModule from '../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as QuestConstantsModule from '../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestTypesModule from '../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as UseGetOrFetchApplicationsModule from '../../applications/useGetOrFetchApplications.tsx'; /* Metro dependency 6777 */
import * as QuestTaskUtilsModule from '../utils/QuestTaskUtils.tsx'; /* Metro dependency 7116 */
import * as ActivityPanelConstantsModule from '../../activities/panel/ActivityPanelConstants.tsx'; /* Metro dependency 8044 */
import * as IconButtonNativeModule from '../../../design/components/Button/native/IconButton.native.tsx'; /* Metro dependency 8341 */
import * as UseIsScreenLandscapeNativeModule from '../../screen/useIsScreenLandscape.native.tsx'; /* Metro dependency 8750 */
import * as QuestHooksModule from '../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as QuestCopyUtilsModule from '../utils/QuestCopyUtils.tsx'; /* Metro dependency 9505 */
import * as QuestCopyHooksModule from '../hooks/QuestCopyHooks.tsx'; /* Metro dependency 9950 */
import * as QuestBottomSheetFooterModule from './QuestBottomSheet/QuestBottomSheetFooter.tsx'; /* Metro dependency 13593 */
function _fun117646(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:6, offset: 0x024bc0c6, size: 344 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.StyleSheet;
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
const env0_8 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
const env0_9 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
@@ -20,246 +44,285 @@ function _fun117646(global, require, importDefault, importAll, module, exports,
object.gradientEnd = importDefault(dependencyMap[8]).colors.MOBILE_ACTIONSHEET_GRADIENT_BACKGROUND_DEFAULT;
return object;
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestProgressBottomSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestProgressBottomSheet.tsx');
exports.default = QuestProgressBottomSheetConnected;
}
function contextMenuButton(a0) { // fn#117647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:1370, offset: 0x024bc21e, size: 164 bytes, params: 2, frame: 18
const IconButton = (IconButtonNativeModule).IconButton;
const iconButtonProps = {...a0};
iconButtonProps['icon'] = importDefault(8639) /* metro dependency 8639 */;
iconButtonProps['variant'] = 'secondary-overlay';
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
iconButtonProps['accessibilityLabel'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['UKOtz+']);
iconButtonProps['size'] = 'sm';
return <IconButton {...iconButtonProps} />;
}
function contextMenuButton(a0) { // fn#117647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:1370, offset: 0x024bc21e, size: 164 bytes, params: 2, frame: 18
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const iconButtonProps = {...a0};
iconButtonProps['icon'] = importDefault(8639) /* metro dependency 8639 */;
iconButtonProps['variant'] = 'secondary-overlay';
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
iconButtonProps['accessibilityLabel'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['UKOtz+']);
iconButtonProps['size'] = 'sm';
return <IconButton {...iconButtonProps} />;
}
function QuestProgressBottomSheet({quest}) { // fn#117648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:1551, offset: 0x024bc2c2, size: 1900 bytes, params: 2, frame: 44
var object2;
const value3 = (require(8750) /* metro dependency 8750: useIsScreenLandscapeNative */).useIsScreenLandscape();
const styles = useStyles(value3);
const gradientEnd = env0_13().gradientEnd;
const useGetOrFetchApplicationsModule = require(6777) /* metro dependency 6777: useGetOrFetchApplications */;
const useGetOrFetchApplication = useGetOrFetchApplicationsModule.useGetOrFetchApplication;
const questTaskUtilsModule = require(7116) /* metro dependency 7116: QuestTaskUtils */;
const getActivityApplicationId = questTaskUtilsModule.getActivityApplicationId;
const url = (importDefault(10718) /* metro dependency 10718: useEmbeddedActivityBackground */)({applicationId: Reflect.apply(useGetOrFetchApplication,
useGetOrFetchApplicationsModule, [Reflect.apply(getActivityApplicationId, questTaskUtilsModule, [quest])])?.id,
size: 600, names: ['embedded_cover']}).url;
const value5 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const EAYZAr = t.EAYZAr;
const value6 = Reflect.apply(formatToPlainString, intl, [EAYZAr, {questName: quest.config.messages.questName}]);
const questCopyHooksModule = require(9950) /* metro dependency 9950: QuestCopyHooks */;
const useQuestsInstructionsToWinReward = questCopyHooksModule.useQuestsInstructionsToWinReward;
object2 = {quest: quest, taskDetails: value5};
let QUEST_ACTIVITY_BOTTOM_SHEET = QuestsExperimentLocations.QUEST_ACTIVITY_BOTTOM_SHEET;
object2.location = QUEST_ACTIVITY_BOTTOM_SHEET;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
let RUNNING_ACTIVITY = QuestContent.RUNNING_ACTIVITY;
object2.sourceQuestContent = RUNNING_ACTIVITY;
const value7 = Reflect.apply(useQuestsInstructionsToWinReward, questCopyHooksModule, [object2]);
const userStatus = quest.userStatus;
const r24 = userStatus?.completedAt != null && quest.userStatus?.claimedAt == null;
const questBottomSheetFooterModule = require(13593) /* metro dependency 13593: QuestBottomSheetFooter */;
const useQuestRewardClaimHandler = questBottomSheetFooterModule.useQuestRewardClaimHandler;
object2 = {quest: quest};
RUNNING_ACTIVITY = QuestContent.RUNNING_ACTIVITY;
object2.questContent = RUNNING_ACTIVITY;
RUNNING_ACTIVITY = QuestContent.RUNNING_ACTIVITY;
object2.sourceQuestContent = RUNNING_ACTIVITY;
const {isClaiming, claim, isLoading} = Reflect.apply(useQuestRewardClaimHandler, questBottomSheetFooterModule,
[object2]);
const value12 = env0_4.useCallback(env0_3(_fun117650), [claim]);
const value13 = env0_4.useCallback(_fun117651, [quest.id]);
const value14 = env0_4.useCallback(_fun117652, [quest.id]);
const value15 = env0_4.useCallback(_fun117653, []);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const items2 = [url != null && ((Component) => <Component source={{uri: url}} style={styles.heroImg} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
const defaultImport3 = importDefault(4589) /* metro dependency 4589 */;
const {START, END} = (require(676) /* metro dependency 676: ConstantsIOS */).VerticalGradient;
items2[1] = ((Component) => <Component style={styles.heroGradient} start={START} end={END} colors={['rgba(0, 0, 0, 0)',
gradientEnd]} />)(defaultImport3);
items2[2] = <View style={styles.gameTileContainer}>{((Component) => <Component quest={quest} height={value3 ? 56 : 80} width={value3 ? 56 : 80} />)(importDefault(9542) /* metro dependency 9542: QuestRewardTile */)}</View>;
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const iconButtonProps = {icon: importDefault(9176) /* metro dependency 9176 */, onPress: value14,
variant: 'secondary-overlay', size: 'sm'};
const string = intl.string;
const RDE0Sc = (require(1244) /* metro dependency 1244: indexNative */).t.RDE0Sc;
iconButtonProps.accessibilityLabel = Reflect.apply(string, intl, [RDE0Sc]);
const iconButton = <IconButton {...iconButtonProps} />;
const QuestContextMenu = importDefault(13623) /* metro dependency 13623: QuestContextMenu */;
QUEST_ACTIVITY_BOTTOM_SHEET = QuestsExperimentLocations.QUEST_ACTIVITY_BOTTOM_SHEET;
RUNNING_ACTIVITY = QuestContent.RUNNING_ACTIVITY;
items2[3] = <View style={styles.contextMenuContainer}>{iconButton}<QuestContextMenu quest={quest} showShareLink location={QUEST_ACTIVITY_BOTTOM_SHEET} sourceQuestContent={RUNNING_ACTIVITY}>{contextMenuButton}</QuestContextMenu></View>;
const view = <View style={styles.heroContainer}>{items2}</View>;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const stack = <Stack direction="vertical" spacing={PX_8} style={styles.textContainer}><Text variant={value3 ? 'heading-md/bold' : 'heading-lg/bold'} color="mobile-text-heading-primary">{value6}</Text><Text style={styles.questDescription} variant={value3 ? 'text-sm/normal' : 'text-md/normal'} color="text-muted">{value7}</Text></Stack>;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<BottomSheet handleDisabled startExpanded>
{view}
<View style={styles.contentContainer}>
{stack}
<Stack
direction="vertical"
spacing={PX_12}
style={styles.buttonsContainer}
>
<Button
size="lg"
text={intl.string(r24 ? t.cfY4PE : t.LLLLPD)}
onPress={r24 ? value12 : value13}
loading={isClaiming || isLoading}
grow
/>
<Button
size="lg"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
onPress={value15}
variant="secondary"
grow
/>
</Stack>
</View>
</BottomSheet>
);
}
function _fun117654(a0) { // fn#117654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:276, offset: 0x024bcbae, size: 654 bytes, params: 2, frame: 21
const object6 = {};
const object9 = {display: 'flex'};
const value2 = undefined;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object9.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object9.paddingBottom = PX_16;
object6.contentContainer = object9;
const object10 = {};
object10.height = a0 ? 125 : 140;
object10.position = 'relative';
object10.marginBottom = a0 ? 0 : 52 + (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.heroContainer = object10;
const object11 = {resizeMode: 'cover'};
copyDataProperties(object11, StyleSheet.absoluteFillObject, undefined);
let lg = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object11['borderTopLeftRadius'] = lg;
lg = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object11['borderTopRightRadius'] = lg;
object6.heroImg = object11;
const object12 = {};
copyDataProperties(object12, StyleSheet.absoluteFillObject, lg);
object12['borderTopLeftRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object12['borderTopRightRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object6.heroGradient = object12;
const PX_12 = a0 ? (importDefault(697) /* metro dependency 697: native */).space.PX_12 : -52;
object6.gameTileContainer = {'position': 'absolute', 'bottom': null, 'left': 0, 'right': 0, 'alignItems': 'center',
bottom: PX_12};
const object13 = {'position': 'absolute', 'top': null, 'right': null, 'display': 'flex', 'flexDirection': 'row',
'gap': null, 'alignItems': 'center'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object13.top = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object13.right = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object13.gap = PX_16;
object6.contextMenuContainer = object13;
const object14 = {alignItems: 'center'};
PX_16 = a0 ? value2 : (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object14.paddingTop = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object14.gap = PX_8;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object14.marginBottom = PX_16;
object14.textAlign = 'center';
object6.textContainer = object14;
object6.questDescription = {textAlign: 'center'};
PX_16 = a0 ? value2 : (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.buttonsContainer = {paddingTop: PX_16};
return object6;
}
function QuestProgressBottomSheetConnected({questId}) { // fn#117656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:4466, offset: 0x024bce69, size: 201 bytes, params: 2, frame: 19
var r0;
var QuestContentImpressionTrackerNative;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
var RUNNING_ACTIVITY;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [QuestStore];
const quest = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
return QuestStore.getQuest(questId);
}]);
if (quest == null) {
r0 = null;
} else {
QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
object = {overrideVisibility: true, questOrQuests: quest};
function QuestProgressBottomSheet({quest}) { // fn#117648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:1551, offset: 0x024bc2c2, size: 1900 bytes, params: 2, frame: 44
const value3 = (UseIsScreenLandscapeNativeModule).useIsScreenLandscape();
const styles = useStyles(value3);
const gradientEnd = env0_13().gradientEnd;
const useGetOrFetchApplication = UseGetOrFetchApplicationsModule.useGetOrFetchApplication;
const getActivityApplicationId = QuestTaskUtilsModule.getActivityApplicationId;
const url = (importDefault(10718) /* metro dependency 10718: useEmbeddedActivityBackground */)({applicationId: Reflect.apply(useGetOrFetchApplication,
UseGetOrFetchApplicationsModule, [Reflect.apply(getActivityApplicationId, QuestTaskUtilsModule, [quest])])?.id,
size: 600, names: ['embedded_cover']}).url;
const value5 = (QuestHooksModule).useQuestTaskDetails(quest);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const EAYZAr = t.EAYZAr;
const value6 = Reflect.apply(formatToPlainString, intl, [EAYZAr, {questName: quest.config.messages.questName}]);
const useQuestsInstructionsToWinReward = QuestCopyHooksModule.useQuestsInstructionsToWinReward;
object = {quest: quest, taskDetails: value5};
let QUEST_ACTIVITY_BOTTOM_SHEET = QuestsExperimentLocations.QUEST_ACTIVITY_BOTTOM_SHEET;
object.location = QUEST_ACTIVITY_BOTTOM_SHEET;
const QuestContent = (QuestTypesModule).QuestContent;
let RUNNING_ACTIVITY = QuestContent.RUNNING_ACTIVITY;
object.sourceQuestContent = RUNNING_ACTIVITY;
const value7 = Reflect.apply(useQuestsInstructionsToWinReward, QuestCopyHooksModule, [object]);
const userStatus = quest.userStatus;
const r24 = userStatus?.completedAt != null && quest.userStatus?.claimedAt == null;
const useQuestRewardClaimHandler = QuestBottomSheetFooterModule.useQuestRewardClaimHandler;
object = {quest: quest};
RUNNING_ACTIVITY = QuestContent.RUNNING_ACTIVITY;
object.questContent = RUNNING_ACTIVITY;
RUNNING_ACTIVITY = QuestContent.RUNNING_ACTIVITY;
object.sourceQuestContent = RUNNING_ACTIVITY;
r0 = <QuestContentImpressionTrackerNative {...object}>{children_117658}</QuestContentImpressionTrackerNative>;
}
return r0;
}
function* _fun117650() { // fn#117650, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:2440, offset: 0x024bca39, size: 86 bytes, params: 1, frame: 15
var value4;
if (true) {
__proto__ = environment.__proto__;
yield importDefault();
if (false) {
return undefined;
const {isClaiming, claim, isLoading} = Reflect.apply(useQuestRewardClaimHandler, QuestBottomSheetFooterModule,
[object]);
const value12 = ReactModule.useCallback(Module00005(_fun117650), [claim]);
const value13 = ReactModule.useCallback(_fun117651, [quest.id]);
const value14 = ReactModule.useCallback(_fun117652, [quest.id]);
const value15 = ReactModule.useCallback(_fun117653, []);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const items2 = [
url != null && ((Component) => <Component source={{uri: url}} style={styles.heroImg} />)(importDefault(5475) /* metro dependency 5475: FastImage */),
];
const {START, END} = (ConstantsIOSModule).VerticalGradient;
items2[1] = ((Component) => <Component style={styles.heroGradient} start={START} end={END} colors={['rgba(0, 0, 0, 0)',
gradientEnd]} />)(defaultImport3);
items2[2] = (
<View style={styles.gameTileContainer}>
{((Component) => <Component quest={quest} height={value3 ? 56 : 80} width={value3 ? 56 : 80} />)(importDefault(9542) /* metro dependency 9542: QuestRewardTile */)}
</View>
);
const IconButton = (IconButtonNativeModule).IconButton;
const iconButtonProps = {icon: Module09176, onPress: value14,
variant: 'secondary-overlay', size: 'sm'};
const string = intl.string;
const RDE0Sc = (require(1244) /* metro dependency 1244: indexNative */).t.RDE0Sc;
iconButtonProps.accessibilityLabel = Reflect.apply(string, intl, [RDE0Sc]);
const iconButton = <IconButton {...iconButtonProps} />;
QUEST_ACTIVITY_BOTTOM_SHEET = QuestsExperimentLocations.QUEST_ACTIVITY_BOTTOM_SHEET;
RUNNING_ACTIVITY = QuestContent.RUNNING_ACTIVITY;
items2[3] = (
<View style={styles.contextMenuContainer}>
{iconButton}
<QuestContextMenu
quest={quest}
showShareLink
location={QUEST_ACTIVITY_BOTTOM_SHEET}
sourceQuestContent={RUNNING_ACTIVITY}
>
{contextMenuButton}
</QuestContextMenu>
</View>
);
const view = (
<View style={styles.heroContainer}>
{items2}
</View>
);
const Stack = (StackNativeModule).Stack;
const PX_8 = (Native).space.PX_8;
const Text = (TextModule).Text;
const stack = (
<Stack
direction="vertical"
spacing={PX_8}
style={styles.textContainer}
>
<Text variant={value3 ? 'heading-md/bold' : 'heading-lg/bold'} color="mobile-text-heading-primary">
{value6}
</Text>
<Text
style={styles.questDescription}
variant={value3 ? 'text-sm/normal' : 'text-md/normal'}
color="text-muted"
>
{value7}
</Text>
</Stack>
);
const PX_12 = (Native).space.PX_12;
const Button = (ButtonNativeModule).Button;
return (
<BottomSheet handleDisabled startExpanded>
{view}
<View style={styles.contentContainer}>
{stack}
<Stack
direction="vertical"
spacing={PX_12}
style={styles.buttonsContainer}
>
<Button
size="lg"
text={intl.string(r24 ? t.cfY4PE : t.LLLLPD)}
onPress={r24 ? value12 : value13}
loading={isClaiming || isLoading}
grow
/>
<Button
size="lg"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
onPress={value15}
variant="secondary"
grow
/>
</Stack>
</View>
</BottomSheet>
);
function* _fun117650() { // fn#117650, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:2440, offset: 0x024bca39, size: 86 bytes, params: 1, frame: 15
var value4;
if (true) {
__proto__ = environment.__proto__;
yield importDefault();
if (false) {
return undefined;
}
if (__proto__) {
__proto__ = environment.__proto__.__proto__;
value4 = env2_1(env2_2[22]);
value4.updateFramePanelMode(env2_9.PIP);
}
}
}
if (__proto__) {
__proto__ = environment.__proto__.__proto__;
value4 = env2_1(env2_2[22]);
value4.updateFramePanelMode(env2_9.PIP);
function _fun117651() { // fn#117651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:2527, offset: 0x024bca8f, size: 145 bytes, params: 1, frame: 15
let value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
const defaultImport2 = FramesActionCreatorsNative;
const updateFramePanelMode = defaultImport2.updateFramePanelMode;
const PIP = ActivityPanelModes.PIP;
Reflect.apply(updateFramePanelMode, defaultImport2, [PIP]);
value = require(9480) /* metro dependency 9480: QuestUtilsNative */;
const openQuestHome = value.openQuestHome;
const object = {};
object.scrollToQuestId = quest.id;
const QuestContent = (QuestTypesModule).QuestContent;
const QUEST_BOTTOM_SHEET = QuestContent.QUEST_BOTTOM_SHEET;
object.fromContent = QUEST_BOTTOM_SHEET;
Reflect.apply(openQuestHome, value, [object]);
}
function _fun117652() { // fn#117652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:2723, offset: 0x024bcb20, size: 105 bytes, params: 1, frame: 15
let value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
value = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
const showShareActionSheet = value.showShareActionSheet;
const getQuestUrl = QuestCopyUtilsModule.getQuestUrl;
Reflect.apply(showShareActionSheet, value, [{message: Reflect.apply(getQuestUrl, QuestCopyUtilsModule,
[quest.id])}]);
}
function _fun117653() { // fn#117653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:2850, offset: 0x024bcb89, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
}
function _fun117654(a0) { // fn#117654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:276, offset: 0x024bcbae, size: 654 bytes, params: 2, frame: 21
const object = {};
const object2 = {display: 'flex'};
const value2 = undefined;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.paddingBottom = PX_16;
object.contentContainer = object2;
const object3 = {};
object3.height = a0 ? 125 : 140;
object3.position = 'relative';
object3.marginBottom = a0 ? 0 : 52 + (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.heroContainer = object3;
const object4 = {resizeMode: 'cover'};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
let lg = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object4['borderTopLeftRadius'] = lg;
lg = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object4['borderTopRightRadius'] = lg;
object.heroImg = object4;
const object5 = {};
copyDataProperties(object5, StyleSheet.absoluteFillObject, lg);
object5['borderTopLeftRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object5['borderTopRightRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.heroGradient = object5;
const PX_12 = a0 ? (importDefault(697) /* metro dependency 697: native */).space.PX_12 : -52;
object.gameTileContainer = {'position': 'absolute', 'bottom': null, 'left': 0, 'right': 0, 'alignItems': 'center',
bottom: PX_12};
const object7 = {'position': 'absolute', 'top': null, 'right': null, 'display': 'flex', 'flexDirection': 'row',
'gap': null, 'alignItems': 'center'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.top = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.right = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.gap = PX_16;
object.contextMenuContainer = object7;
const object8 = {alignItems: 'center'};
PX_16 = a0 ? value2 : (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.paddingTop = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object8.gap = PX_8;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.marginBottom = PX_16;
object8.textAlign = 'center';
object.textContainer = object8;
object.questDescription = {textAlign: 'center'};
PX_16 = a0 ? value2 : (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.buttonsContainer = {paddingTop: PX_16};
return object;
}
function QuestProgressBottomSheetConnected({questId}) { // fn#117656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:4466, offset: 0x024bce69, size: 201 bytes, params: 2, frame: 19
var r0;
var QuestContentImpressionTrackerNative;
const QuestContent = (QuestTypesModule).QuestContent;
var RUNNING_ACTIVITY;
const useStateFromStores = FluxModule.useStateFromStores;
let object = [QuestStore];
const quest = Reflect.apply(useStateFromStores, FluxModule, [object, function() {
return QuestStore.getQuest(questId);
}]);
if (quest == null) {
r0 = null;
} else {
QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
object = {overrideVisibility: true, questOrQuests: quest};
RUNNING_ACTIVITY = QuestContent.RUNNING_ACTIVITY;
object.questContent = RUNNING_ACTIVITY;
RUNNING_ACTIVITY = QuestContent.RUNNING_ACTIVITY;
object.sourceQuestContent = RUNNING_ACTIVITY;
r0 = (
<QuestContentImpressionTrackerNative {...object}>
{children_117658}
</QuestContentImpressionTrackerNative>
);
}
return r0;
function QuestProgressBottomSheetConnectedChildren() { // fn#117658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:4805, owner: QuestProgressBottomSheetConnected.children, offset: 0x024bcf32, size: 35 bytes, params: 1, frame: 13
return <QuestProgressBottomSheet quest={quest} />;
}
}
}
function _fun117651() { // fn#117651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:2527, offset: 0x024bca8f, size: 145 bytes, params: 1, frame: 15
let value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
const defaultImport2 = importDefault(8087) /* metro dependency 8087: FramesActionCreatorsNative */;
const updateFramePanelMode = defaultImport2.updateFramePanelMode;
const PIP = ActivityPanelModes.PIP;
Reflect.apply(updateFramePanelMode, defaultImport2, [PIP]);
value = require(9480) /* metro dependency 9480: QuestUtilsNative */;
const openQuestHome = value.openQuestHome;
const object2 = {};
object2.scrollToQuestId = quest.id;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const QUEST_BOTTOM_SHEET = QuestContent.QUEST_BOTTOM_SHEET;
object2.fromContent = QUEST_BOTTOM_SHEET;
Reflect.apply(openQuestHome, value, [object2]);
}
function _fun117652() { // fn#117652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:2723, offset: 0x024bcb20, size: 105 bytes, params: 1, frame: 15
let value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
value = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
const showShareActionSheet = value.showShareActionSheet;
const questCopyUtilsModule = require(9505) /* metro dependency 9505: QuestCopyUtils */;
const getQuestUrl = questCopyUtilsModule.getQuestUrl;
Reflect.apply(showShareActionSheet, value, [{message: Reflect.apply(getQuestUrl, questCopyUtilsModule,
[quest.id])}]);
}
function _fun117653() { // fn#117653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:2850, offset: 0x024bcb89, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function QuestProgressBottomSheetConnectedChildren() { // fn#117658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:4805, owner: QuestProgressBottomSheetConnected.children, offset: 0x024bcf32, size: 35 bytes, params: 1, frame: 13
return <QuestProgressBottomSheet quest={quest} />;
}
global.__d(_fun117646, 15387, [5, 31, 27, 7093, 6528, 8044, 33, 4501, 697, 566, 10183, 6531, 8341, 8639, 1244, 8750,
6777, 7116, 10718, 9483, 9950, 13593, 8087, 4080, 9480, 9212, 9505, 6275, 5475, 4589, 676, 9542, 9176, 13623,
4572, 4573, 4578,
2]) /* metro module 15387, dependencies: [5, 31, 27, 7093, 6528, 8044, 33, 4501, 697, 566, 10183, 6531, 8341, 8639, 1244, 8750, 6777, 7116, 10718, 9483, 9950, 13593, 8087, 4080, 9480, 9212, 9505, 6275, 5475, 4589, 676, 9542, 9176, 13623, 4572, 4573, 4578, 2] */;
@@ -1,243 +1,272 @@
/* Metro module 13620; source: modules/quests/native/QuestProgressIndicator.tsx; dependencies: [31, 27, 4502, 33, 4017, 7744, 4501, 697, 566, 4504, 5278, 1244, 6760, 13621, 9542, 2] */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as Module07744Module from '../../../by-id/module-07744.js'; /* Metro dependency 7744 */
function _fun104023(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:6, offset: 0x0227bf12, size: 371 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(31) /* metro dependency 31 */;
let value = ReactModule;
const env0_3 = value.useMemo;
const env0_4 = value.useEffect;
const env0_5 = value.useRef;
value = importDefault(31) /* metro dependency 31 */;
const env0_7 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const value2 = require(33) /* metro dependency 33 */;
const env0_9 = value2.jsx;
const env0_10 = value2.jsxs;
const env0_11 = ['#666777', '#535564'];
const reanimatedRexport = importDefault(4017) /* metro dependency 4017: ReanimatedRexport */;
const createAnimatedComponent = reanimatedRexport.createAnimatedComponent;
const Circle = (require(7744) /* metro dependency 7744 */).Circle;
const env0_12 = Reflect.apply(createAnimatedComponent, reanimatedRexport, [Circle]);
const env0_13 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun104024);
const createAnimatedComponent = ReanimatedRexport.createAnimatedComponent;
const Circle = (Module07744Module).Circle;
const env0_12 = Reflect.apply(createAnimatedComponent, ReanimatedRexport, [Circle]);
const env0_13 = (CreateStylesModule).createStyles(_fun104024);
object = {code: 'function QuestProgressIndicatorTsx1(){const{glowOpacity}=this.__closure;return{shadowOpacity:glowOpacity.get()};}'};
object = {code: 'function QuestProgressIndicatorTsx2(){const{circumference,animatedProgress}=this.__closure;return{strokeDashoffset:circumference-circumference*animatedProgress.get()};}'};
object = {code: 'function QuestProgressIndicatorTsx3(){const{underlayOpacity,styles}=this.__closure;return{opacity:underlayOpacity.get(),...styles.opacityMask};}'};
value = value.memo(QuestProgressIndicator);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestProgressIndicator.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestProgressIndicator.tsx');
exports.default = value;
}
function _fun104024(a0) { // fn#104024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:303, offset: 0x0227c085, size: 291 bytes, params: 2, frame: 15
const object2 = {};
object2.wrapper = {position: 'relative'};
object2.container = {'position': 'relative', 'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center',
'zIndex': 1};
object2.completionGlow = {'shadowOffset': null, 'shadowRadius': 20, 'shadowOpacity': 0, 'elevation': 4,
'shadowColor': '#30C77399', shadowOffset: {'width': 0, 'height': 0}};
object2.canvas = {transform: [{rotate: '-90deg'}]};
const object3 = {position: 'absolute', height: 0.78 * a0, width: 0.78 * a0};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.overflow = 'hidden';
object2.imageContainer = object3;
const GREEN_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_300;
object2.progressPath = {color: GREEN_300};
object2.confetti = {'position': 'absolute', 'pointerEvents': 'none'};
const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
object2.opacityMask = {'backgroundColor': null, 'position': 'absolute', 'top': 0, 'left': 0, 'right': 0,
'bottom': 0, 'zIndex': 2, backgroundColor: CARD_BACKGROUND_DEFAULT};
return object2;
}
function QuestProgressIndicator({quest, size, progress, loading, hasConfetti, withAnimation, onPress, accessibilityLabel}) { // fn#104025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:1422, offset: 0x0227c1a8, size: 1735 bytes, params: 2, frame: 51
var r8;
var intl;
loading = !(loading === undefined) && loading;
hasConfetti = !(hasConfetti === undefined) && hasConfetti;
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const property = ({'x-sm': 3, 'sm': 3, 'md': 3, 'md-lg': 4, 'lg': 6})[size];
const property2 = ({'x-sm': 40, 'sm': 64, 'md': 70, 'md-lg': 100, 'lg': 128})[size];
const property3 = ({'x-sm': 1.6, 'sm': 1, 'md': 1.4, 'md-lg': 1.5, 'lg': 1.6})[size];
const value7 = property2 / 2 - property / 2;
let Math = global.Math;
const PI = Math.PI;
const value8 = 2 * PI * value7;
const styles = useStyles(property2);
const env0_6 = styles;
const value9 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(progress);
const value12 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(loading ? 0.7 : 0);
const userStatus = quest.userStatus;
const value14 = userStatus?.completedAt != null;
const value15 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(value14 ? 1 : 0);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = QuestProgressIndicatorI;
closure.__closure = {glowOpacity: value15};
closure.__workletHash = 17183837725505;
closure.__initData = env0_14;
const value16 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue6 = reanimatedRexportModule;
const useAnimatedProps = moduleValue6.useAnimatedProps;
closure = QuestProgressIndicatorG;
closure.__closure = {circumference: value8, animatedProgress: value9};
closure.__workletHash = 17281152506254;
closure.__initData = env0_15;
const value17 = Reflect.apply(useAnimatedProps, moduleValue6, [closure]);
const moduleValue7 = reanimatedRexportModule;
useAnimatedStyle = moduleValue7.useAnimatedStyle;
closure = QuestProgressIndicatorM;
closure.__closure = {underlayOpacity: value12, styles: styles};
closure.__workletHash = 4427598698568;
closure.__initData = env0_16;
const value18 = Reflect.apply(useAnimatedStyle, moduleValue7, [closure]);
useEffect(_fun104030, [value9, progress, useReducedMotion]);
useEffect(_fun104032, [value12, loading]);
const value19 = useRef(null);
const env0_11 = value19;
const value20 = useMemo(_fun104034, [styles.confetti, property3, property2]);
useEffect(_fun104035, [value14, value15, useReducedMotion]);
const PressableComponent = onPress == null ? env0_6.Fragment : (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
Math = global.Math;
const value21 = Math.round(100 * progress);
const r2Props = {...(onPress == null ? {} : {onPress: onPress})};
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.wrapper];
items2[1] = styles.completionGlow;
items2[2] = value16;
if (accessibilityLabel != null) {
r8 = accessibilityLabel;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r8 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Gj8Jqn,
{percent: value21});
function _fun104024(a0) { // fn#104024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:303, offset: 0x0227c085, size: 291 bytes, params: 2, frame: 15
const object = {};
object.wrapper = {position: 'relative'};
object.container = {'position': 'relative', 'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center',
'zIndex': 1};
object.completionGlow = {'shadowOffset': null, 'shadowRadius': 20, 'shadowOpacity': 0, 'elevation': 4,
'shadowColor': '#30C77399', shadowOffset: {'width': 0, 'height': 0}};
object.canvas = {transform: [{rotate: '-90deg'}]};
const object4 = {position: 'absolute', height: 0.78 * a0, width: 0.78 * a0};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object4.overflow = 'hidden';
object.imageContainer = object4;
const GREEN_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_300;
object.progressPath = {color: GREEN_300};
object.confetti = {'position': 'absolute', 'pointerEvents': 'none'};
const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
object.opacityMask = {'backgroundColor': null, 'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0,
'zIndex': 2, backgroundColor: CARD_BACKGROUND_DEFAULT};
return object;
}
const object = {'min': 0, 'max': 100};
object.now = value21;
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const view = <View3 style={value18} />;
const Svg = (require(7744) /* metro dependency 7744 */).Svg;
const Defs = (require(7744) /* metro dependency 7744 */).Defs;
const LinearGradient = (require(7744) /* metro dependency 7744 */).LinearGradient;
const Stop = (require(7744) /* metro dependency 7744 */).Stop;
const binding = env0_11;
const items4 = [<Defs><LinearGradient id="underlayGradient" x1="0" y1="0.5" x2="1" y2="0.5"><Stop offset="0" stopColor={binding[0]} /><Stop offset="1" stopColor={binding[1]} /></LinearGradient></Defs>];
const Circle = (require(7744) /* metro dependency 7744 */).Circle;
items4[1] = <Circle cx={property2 / 2} cy={property2 / 2} r={value7} fill="none" stroke="url(#underlayGradient)" strokeWidth={property} />;
items4[2] = ((Component) => <Component cx={property2 / 2} cy={property2 / 2} r={value7} fill="none" stroke={styles.progressPath.color} strokeWidth={property} strokeDasharray={value8} strokeLinecap="round" animatedProps={value17} />)(env0_12);
return (
<PressableComponent {...r2Props}>
<View2
style={items2}
accessible
accessibilityRole="progressbar"
accessibilityLabel={r8}
accessibilityValue={object}
>
{view}
<View style={styles.container}>
<Svg
height={property2}
width={property2}
style={styles.canvas}
>
{items4}
</Svg>
{hasConfetti ? ((Component) => <Component ref={value19} style={value20} source={require(13621) /* metro dependency 13621 */} autoPlay={false} loop={false} />)(importDefault(6760) /* metro dependency 6760: LottieAnimationView */) : null}
<View style={styles.imageContainer}>
{((Component) => <Component quest={quest} height={0.78 * property2} width={0.78 * property2} withAnimation={withAnimation} accessibilityLabelPrefix={accessibilityLabel} />)(importDefault(9542) /* metro dependency 9542: QuestRewardTile */)}
function QuestProgressIndicator({quest, size, progress, loading, hasConfetti, withAnimation, onPress, accessibilityLabel}) { // fn#104025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:1422, offset: 0x0227c1a8, size: 1735 bytes, params: 2, frame: 51
var r8;
var intl;
loading = !(loading === undefined) && loading;
hasConfetti = !(hasConfetti === undefined) && hasConfetti;
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const property = ({'x-sm': 3, 'sm': 3, 'md': 3, 'md-lg': 4, 'lg': 6})[size];
const property2 = ({'x-sm': 40, 'sm': 64, 'md': 70, 'md-lg': 100, 'lg': 128})[size];
const property3 = ({'x-sm': 1.6, 'sm': 1, 'md': 1.4, 'md-lg': 1.5, 'lg': 1.6})[size];
const value7 = property2 / 2 - property / 2;
let Math = global.Math;
const PI = Math.PI;
const value8 = 2 * PI * value7;
const styles = useStyles(property2);
const styles2 = styles;
const value9 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(progress);
const value12 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(loading ? 0.7 : 0);
const userStatus = quest.userStatus;
const value14 = userStatus?.completedAt != null;
const value15 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(value14 ? 1 : 0);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = QuestProgressIndicatorI;
closure.__closure = {glowOpacity: value15};
closure.__workletHash = 17183837725505;
closure.__initData = env0_14;
const value16 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue6 = reanimatedRexportModule;
const useAnimatedProps = moduleValue6.useAnimatedProps;
closure = QuestProgressIndicatorG;
closure.__closure = {circumference: value8, animatedProgress: value9};
closure.__workletHash = 17281152506254;
closure.__initData = env0_15;
const value17 = Reflect.apply(useAnimatedProps, moduleValue6, [closure]);
const moduleValue7 = reanimatedRexportModule;
useAnimatedStyle = moduleValue7.useAnimatedStyle;
closure = QuestProgressIndicatorM;
closure.__closure = {underlayOpacity: value12, styles: styles};
closure.__workletHash = 4427598698568;
closure.__initData = env0_16;
const value18 = Reflect.apply(useAnimatedStyle, moduleValue7, [closure]);
useEffect(_fun104030, [value9, progress, useReducedMotion]);
useEffect(_fun104032, [value12, loading]);
const value19 = useRef(null);
const env0_11 = value19;
const value20 = useMemo(_fun104034, [styles.confetti, property3, property2]);
useEffect(_fun104035, [value14, value15, useReducedMotion]);
const PressableComponent = onPress == null ? styles2.Fragment : (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
Math = global.Math;
const value21 = Math.round(100 * progress);
const r2Props = {...(onPress == null ? {} : {onPress: onPress})};
const View2 = (ReanimatedRexport).View;
const items2 = [styles.wrapper];
items2[1] = styles.completionGlow;
items2[2] = value16;
if (accessibilityLabel != null) {
r8 = accessibilityLabel;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r8 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Gj8Jqn,
{percent: value21});
}
const object2 = {'min': 0, 'max': 100};
object2.now = value21;
const View3 = (ReanimatedRexport).View;
const view = <View3 style={value18} />;
const Svg = (Module07744Module).Svg;
const Defs = (Module07744Module).Defs;
const LinearGradient = (Module07744Module).LinearGradient;
const Stop = (Module07744Module).Stop;
const binding = env0_11;
const items4 = [
<Defs>
<LinearGradient
id="underlayGradient"
x1="0"
y1="0.5"
x2="1"
y2="0.5"
>
<Stop offset="0" stopColor={binding[0]} />
<Stop offset="1" stopColor={binding[1]} />
</LinearGradient>
</Defs>,
];
const Circle = (Module07744Module).Circle;
items4[1] = (
<Circle
cx={property2 / 2}
cy={property2 / 2}
r={value7}
fill="none"
stroke="url(#underlayGradient)"
strokeWidth={property}
/>
);
items4[2] = ((Component) => <Component cx={property2 / 2} cy={property2 / 2} r={value7} fill="none" stroke={styles.progressPath.color} strokeWidth={property} strokeDasharray={value8} strokeLinecap="round" animatedProps={value17} />)(env0_12);
return (
<PressableComponent {...r2Props}>
<View2
style={items2}
accessible
accessibilityRole="progressbar"
accessibilityLabel={r8}
accessibilityValue={object2}
>
{view}
<View style={styles.container}>
<Svg
height={property2}
width={property2}
style={styles.canvas}
>
{items4}
</Svg>
{
hasConfetti
? ((Component) => <Component ref={value19} style={value20} source={require(13621) /* metro dependency 13621 */} autoPlay={false} loop={false} />)(importDefault(6760) /* metro dependency 6760: LottieAnimationView */)
: null
}
<View style={styles.imageContainer}>
{((Component) => <Component quest={quest} height={0.78 * property2} width={0.78 * property2} withAnimation={withAnimation} accessibilityLabelPrefix={accessibilityLabel} />)(importDefault(9542) /* metro dependency 9542: QuestRewardTile */)}
</View>
</View>
</View>
</View2>
</PressableComponent>
);
}
function QuestProgressIndicatorI() { // fn#104027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:1978, owner: QuestProgressIndicator.I, offset: 0x0227c86f, size: 25 bytes, params: 1, frame: 10
const object2 = {};
object2.shadowOpacity = env0_10.get();
return object2;
}
function QuestProgressIndicatorG() { // fn#104028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2115, owner: QuestProgressIndicator.G, offset: 0x0227c888, size: 37 bytes, params: 1, frame: 11
const binding = env0_5;
const binding2 = env0_7;
const get = binding2.get;
return {strokeDashoffset: binding - binding * Reflect.apply(get, binding2, [])};
}
function QuestProgressIndicatorM() { // fn#104029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2280, owner: QuestProgressIndicator.M, offset: 0x0227c8ad, size: 41 bytes, params: 1, frame: 13
const object2 = {};
const binding = env0_8;
object2.opacity = binding.get();
copyDataProperties(object2, styles.opacityMask, binding);
return object2;
}
function _fun104030() { // fn#104030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2413, offset: 0x0227c8d6, size: 89 bytes, params: 1, frame: 17
const binding = env0_7;
const set = binding.set;
const timingModule = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, binding, [timingModule.withTiming(progress, {duration: useReducedMotion ? 0 : 500})]);
return _fun104031;
}
function _fun104032() { // fn#104032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2513, offset: 0x0227c95c, size: 95 bytes, params: 1, frame: 16
const binding = env0_8;
const set = binding.set;
const timingModule = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, binding, [timingModule.withTiming(loading ? 0.7 : 0, {duration: 500})]);
return _fun104033;
}
function _fun104034() { // fn#104034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2628, offset: 0x0227c9e8, size: 78 bytes, params: 1, frame: 13
const object2 = {};
copyDataProperties(object2, styles.confetti, undefined);
object2['width'] = env0_3;
object2['height'] = env0_3;
object2['transform'] = [{scale: env0_4}];
return object2;
}
function _fun104035() { // fn#104035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2711, offset: 0x0227ca36, size: 154 bytes, params: 1, frame: 16
var binding;
var set;
var value2;
var moduleValue;
var current;
if (useReducedMotion) {
env0_10.set(0);
current = env0_11.current;
if (current != null) {
current.reset();
</View2>
</PressableComponent>
);
function QuestProgressIndicatorI() { // fn#104027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:1978, owner: QuestProgressIndicator.I, offset: 0x0227c86f, size: 25 bytes, params: 1, frame: 10
const object = {};
object.shadowOpacity = JsxRuntimeModule.jsxs.get();
return object;
}
} else if (env0_9) {
binding = env0_10;
set = binding.set;
value2 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, binding, [moduleValue.withTiming(1, {duration: 500})]);
current = env0_11.current;
if (current != null) {
current.play();
function QuestProgressIndicatorG() { // fn#104028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2115, owner: QuestProgressIndicator.G, offset: 0x0227c888, size: 37 bytes, params: 1, frame: 11
const binding = env0_5;
const get = ReactNativeModule.View.get;
return {strokeDashoffset: binding - binding * Reflect.apply(get, ReactNativeModule.View, [])};
}
} else {
env0_10.set(0);
current = env0_11.current;
if (current != null) {
current.reset();
function QuestProgressIndicatorM() { // fn#104029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2280, owner: QuestProgressIndicator.M, offset: 0x0227c8ad, size: 41 bytes, params: 1, frame: 13
const object = {};
const binding = env0_8;
object.opacity = binding.get();
copyDataProperties(object, styles.opacityMask, binding);
return object;
}
function _fun104030() { // fn#104030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2413, offset: 0x0227c8d6, size: 89 bytes, params: 1, frame: 17
const set = ReactNativeModule.View.set;
Reflect.apply(set, ReactNativeModule.View, [TimingModule.withTiming(progress, {duration: useReducedMotion ? 0 : 500})]);
return _fun104031;
function _fun104031() { // fn#104031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2466, offset: 0x0227c92f, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(ReanimatedRexportModule).cancelAnimation(env1_7);
}
}
function _fun104032() { // fn#104032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2513, offset: 0x0227c95c, size: 95 bytes, params: 1, frame: 16
const binding = env0_8;
const set = binding.set;
Reflect.apply(set, binding, [TimingModule.withTiming(loading ? 0.7 : 0, {duration: 500})]);
return _fun104033;
function _fun104033() { // fn#104033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2567, offset: 0x0227c9bb, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(ReanimatedRexportModule).cancelAnimation(env1_8);
}
}
function _fun104034() { // fn#104034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2628, offset: 0x0227c9e8, size: 78 bytes, params: 1, frame: 13
const object = {};
copyDataProperties(object, styles.confetti, undefined);
object['width'] = env0_3;
object['height'] = env0_3;
object['transform'] = [{scale: env0_4}];
return object;
}
function _fun104035() { // fn#104035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2711, offset: 0x0227ca36, size: 154 bytes, params: 1, frame: 16
var binding;
var set;
var value2;
var moduleValue;
var current;
if (useReducedMotion) {
JsxRuntimeModule.jsxs.set(0);
current = env0_11.current;
if (current != null) {
current.reset();
}
} else if (JsxRuntimeModule.jsx) {
binding = JsxRuntimeModule.jsxs;
set = binding.set;
value2 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, binding, [moduleValue.withTiming(1, {duration: 500})]);
current = env0_11.current;
if (current != null) {
current.play();
}
} else {
JsxRuntimeModule.jsxs.set(0);
current = env0_11.current;
if (current != null) {
current.reset();
}
}
}
}
}
function _fun104031() { // fn#104031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2466, offset: 0x0227c92f, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).cancelAnimation(env1_7);
}
function _fun104033() { // fn#104033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2567, offset: 0x0227c9bb, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).cancelAnimation(env1_8);
}
global.__d(_fun104023, 13620, [31, 27, 4502, 33, 4017, 7744, 4501, 697, 566, 4504, 5278, 1244, 6760, 13621, 9542,
2]) /* metro module 13620, dependencies: [31, 27, 4502, 33, 4017, 7744, 4501, 697, 566, 4504, 5278, 1244, 6760, 13621, 9542, 2] */;
@@ -1,209 +1,252 @@
/* Metro module 9947; source: modules/quests/native/QuestRewardCodeClaimBottomSheet.native.tsx; dependencies: [31, 27, 7093, 6528, 33, 4501, 697, 1585, 566, 9948, 3857, 1244, 8947, 4080, 9500, 6797, 4060, 9950, 6275, 6758, 4573, 6622, 6231, 6238, 4578, 10183, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ToastActionCreators from '../../toast/native/ToastActionCreators.tsx'; /* Metro dependency 3857 */
import QuestStore from '../QuestStore.tsx'; /* Metro dependency 7093 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CopyIconModule from '../../../design/components/Icon/native/redesign/generated/CopyIcon.tsx'; /* Metro dependency 4060 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as TableRowGroupNativeModule from '../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as QuestConstantsModule from '../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as BottomSheetTitleHeaderNativeModule from '../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as QuestRewardUtilsModule from '../utils/QuestRewardUtils.tsx'; /* Metro dependency 9500 */
import * as RewardCodeClaimHooksModule from '../hooks/RewardCodeClaimHooks.tsx'; /* Metro dependency 9948 */
import * as QuestCopyHooksModule from '../hooks/QuestCopyHooks.tsx'; /* Metro dependency 9950 */
function _fun77854(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:6, offset: 0x01e0e463, size: 264 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.ActivityIndicator;
const env0_5 = value.View;
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
const env0_7 = (require(6528) /* metro dependency 6528: QuestConstants */).REWARD_CODE_PLACEHOLDER;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun77863);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestRewardCodeClaimBottomSheet.native.tsx');
const env0_10 = (CreateStylesModule).createStyles(_fun77863);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestRewardCodeClaimBottomSheet.native.tsx');
exports.default = QuestRewardCodeClaimBottomSheetConnected;
}
function QuestRewardCodeClaimBottomSheet({quest, questContent, questContentPosition, sourceQuestContent}) { // fn#77855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:530, offset: 0x01e0e56b, size: 1446 bytes, params: 2, frame: 49
var object2;
const styles = useStyles((importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom);
const {rewardCode, isFetchingRewardCode,
isClaimingReward} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([QuestStore],
function() {
var object = {};
var questBinding = quest;
object.rewardCode = QuestStore.getRewardCode(questBinding.id);
object.isFetchingRewardCode = QuestStore.isFetchingRewardCode(questBinding.id);
object.isClaimingReward = QuestStore.isClaimingReward(questBinding.id);
return object;
});
const {claimCode, fetchCode,
hasError} = (require(9948) /* metro dependency 9948: RewardCodeClaimHooks */).useClaimOrFetchRewardCode({isClaimingReward: isClaimingReward,
isFetchingRewardCode: isFetchingRewardCode, quest: quest, questContent: questContent, rewardCode: rewardCode});
let binding = env0_3;
binding.useEffect(_fun77857, [hasError]);
const questRewardUtilsModule = require(9500) /* metro dependency 9500: QuestRewardUtils */;
const isTieredRewardCodeQuest2 = questRewardUtilsModule.isTieredRewardCodeQuest({quest: quest});
var env0_3 = isTieredRewardCodeQuest2;
binding = env0_3;
const useMemo = binding.useMemo;
const value6 = env0_3.useMemo(_fun77859, [Reflect.apply(useMemo, binding, [_fun77858, [isTieredRewardCodeQuest2,
quest, rewardCode?.tier]]), rewardCode]);
const rewardCodeClaimHooksModule = require(9948) /* metro dependency 9948: RewardCodeClaimHooks */;
const useClaimRewardCodePrimaryCtaClickHandler = rewardCodeClaimHooksModule.useClaimRewardCodePrimaryCtaClickHandler;
object2 = {claimCode: claimCode, fetchCode: fetchCode, hasError: hasError};
object2.onDismiss = (importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet;
object2.quest = quest;
object2.questContent = questContent;
object2.questContentPosition = questContentPosition;
object2.redemptionLink = value6;
object2.sourceQuestContent = sourceQuestContent;
const value7 = Reflect.apply(useClaimRewardCodePrimaryCtaClickHandler, rewardCodeClaimHooksModule, [object2]);
const value8 = env0_3.useCallback(_fun77860, [rewardCode]);
const rewardCodeRedemptionInstructions = (require(9950) /* metro dependency 9950: QuestCopyHooks */).getRewardCodeRedemptionInstructions({quest: quest,
rewardCode: rewardCode});
let r20 = isFetchingRewardCode || isClaimingReward;
r20 = !r20 ? rewardCode?.code == null : r20;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
object2 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.header = <BottomSheetTitleHeader title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.srzsU2)} />;
object2.startExpanded = true;
const r12 = rewardCode != null && rewardCodeRedemptionInstructions != null && ((Text) => <Text style={styles.redemptionInstructions} variant="text-md/normal" color="text-default">{(importDefault(6622) /* metro dependency 6622: MarkupUtils */).parse(rewardCodeRedemptionInstructions,
true, {allowLinks: true})}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
const r25 = rewardCode?.code == null && styles.codeCopyWrapperLoading;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const view = <View>{r12}<View><View style={r25}><TableRowGroup hasIcons={false}><TableRow label={rewardCode?.code} trailing={rewardCode?.code != null && ((Icon) => <Icon IconComponent={(require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={rewardCode?.code != null ? value8 : undefined} /></TableRowGroup></View>{rewardCode?.code == null && <ActivityIndicator style={styles.claimingIndicator} size={24} />}</View></View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<BottomSheet {...object2}>
<View style={styles.wrapper}>
{view}
<View style={styles.footer}>
<Button
disabled={r20}
onPress={value7}
grow
text={value6 == null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['23SS+z']) : value6 !== '' ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+zx47d']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['23SS+z'])}
/>
function QuestRewardCodeClaimBottomSheet({quest, questContent, questContentPosition, sourceQuestContent}) { // fn#77855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:530, offset: 0x01e0e56b, size: 1446 bytes, params: 2, frame: 49
const styles = useStyles((UseSafeAreaInsetsNative)().bottom);
const {rewardCode, isFetchingRewardCode,
isClaimingReward} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([QuestStore],
function() {
var object = {};
var questStoreBinding = QuestStore;
var questBinding = quest;
object.rewardCode = questStoreBinding.getRewardCode(questBinding.id);
object.isFetchingRewardCode = QuestStore.isFetchingRewardCode(questBinding.id);
object.isClaimingReward = QuestStore.isClaimingReward(questBinding.id);
return object;
});
const {claimCode, fetchCode,
hasError} = (RewardCodeClaimHooksModule).useClaimOrFetchRewardCode({isClaimingReward: isClaimingReward,
isFetchingRewardCode: isFetchingRewardCode, quest: quest, questContent: questContent, rewardCode: rewardCode});
let binding = isTieredRewardCodeQuest22;
binding.useEffect(_fun77857, [hasError]);
const isTieredRewardCodeQuest2 = QuestRewardUtilsModule.isTieredRewardCodeQuest({quest: quest});
var isTieredRewardCodeQuest22 = isTieredRewardCodeQuest2;
binding = isTieredRewardCodeQuest22;
const useMemo = binding.useMemo;
const value6 = isTieredRewardCodeQuest22.useMemo(_fun77859, [Reflect.apply(useMemo, binding, [_fun77858,
[isTieredRewardCodeQuest2, quest, rewardCode?.tier]]), rewardCode]);
const useClaimRewardCodePrimaryCtaClickHandler = RewardCodeClaimHooksModule.useClaimRewardCodePrimaryCtaClickHandler;
object = {claimCode: claimCode, fetchCode: fetchCode, hasError: hasError};
object.onDismiss = (importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet;
object.quest = quest;
object.questContent = questContent;
object.questContentPosition = questContentPosition;
object.redemptionLink = value6;
object.sourceQuestContent = sourceQuestContent;
const value7 = Reflect.apply(useClaimRewardCodePrimaryCtaClickHandler, RewardCodeClaimHooksModule, [object]);
const value8 = isTieredRewardCodeQuest22.useCallback(_fun77860, [rewardCode]);
const rewardCodeRedemptionInstructions = (QuestCopyHooksModule).getRewardCodeRedemptionInstructions({quest: quest,
rewardCode: rewardCode});
let r20 = isFetchingRewardCode || isClaimingReward;
r20 = !r20 ? rewardCode?.code == null : r20;
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
object = {};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.header = (
<BottomSheetTitleHeader title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.srzsU2)} />
);
object.startExpanded = true;
const r12 = rewardCode != null && rewardCodeRedemptionInstructions != null && ((Text) => <Text style={styles.redemptionInstructions} variant="text-md/normal" color="text-default">{(importDefault(6622) /* metro dependency 6622: MarkupUtils */).parse(rewardCodeRedemptionInstructions,
true, {allowLinks: true})}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
const r25 = rewardCode?.code == null && styles.codeCopyWrapperLoading;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const view = (
<View>
{r12}
<View>
<View style={r25}>
<TableRowGroup hasIcons={false}>
<TableRow
label={rewardCode?.code}
trailing={rewardCode?.code != null && ((Icon) => <Icon IconComponent={(require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)}
onPress={rewardCode?.code != null ? value8 : undefined}
/>
</TableRowGroup>
</View>
{rewardCode?.code == null && <ActivityIndicator style={styles.claimingIndicator} size={24} />}
</View>
</View>
</BottomSheet>
);
}
function _fun77863(a0) { // fn#77863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:242, offset: 0x01e0edfb, size: 152 bytes, params: 2, frame: 15
const object = {display: 'flex'};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingHorizontal = PX_16;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object.gap = PX_24;
return {wrapper: object, footer: {paddingBottom: a0}, claimingIndicator: {'position': 'absolute', 'left': '50%',
'top': '50%', 'marginLeft': -12, 'marginTop': -12}, codeCopyWrapperLoading: {opacity: 0.5},
redemptionInstructions: {marginBottom: 24}};
}
function QuestRewardCodeClaimBottomSheetConnected({questId, questContent, questContentPosition, sourceQuestContent}) { // fn#77864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:3259, offset: 0x01e0ee93, size: 222 bytes, params: 2, frame: 21
var r0;
const quest = (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore], function() {
return QuestStore.getQuest(questId);
});
if (quest == null) {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
r0 = null;
} else {
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
r0 = <QuestContentImpressionTrackerNative overrideVisibility questOrQuests={quest} questContent={questContent} questContentPosition={questContentPosition} sourceQuestContent={sourceQuestContent}>{children_77866}</QuestContentImpressionTrackerNative>;
}
return r0;
}
function _fun77857() { // fn#77857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:1078, offset: 0x01e0eb6c, size: 158 bytes, params: 1, frame: 18
var defaultImport;
var open;
var object2;
var intl;
var value;
if (hasError) {
value = environment.__proto__;
defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
open = defaultImport.open;
object2 = {key: 'CLAIM_QUEST_REWARD_ERROR'};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CKsXk3);
object2.icon = importDefault(8947) /* metro dependency 8947 */;
Reflect.apply(open, defaultImport, [object2]);
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
value.hideActionSheet();
}
}
function _fun77858() { // fn#77858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:1295, offset: 0x01e0ec0a, size: 103 bytes, params: 1, frame: 16
var r0;
const binding = env0_3;
const value3 = undefined;
const questRewardUtilsModule = require(9500) /* metro dependency 9500: QuestRewardUtils */;
const getRewardCodeQuestReward = questRewardUtilsModule.getRewardCodeQuestReward;
const object2 = {};
object2.quest = quest;
if (binding) {
object2.idx = rewardCode == null ? value3 : rewardCode.tier;
r0 = Reflect.apply(getRewardCodeQuestReward, questRewardUtilsModule, [object2]);
} else {
object2.idx = 0;
r0 = Reflect.apply(getRewardCodeQuestReward, questRewardUtilsModule, [object2]);
}
return r0;
}
function _fun77859() { // fn#77859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:1466, offset: 0x01e0ec71, size: 157 bytes, params: 1, frame: 16
const value2 = undefined;
if ((env0_4 == null ? value2 : env0_4.redemptionLink) != null) {
if (env0_4.redemptionLink !== '') {
return (rewardCode == null ? value2 : rewardCode.code) == null || rewardCode.code === '' ? env0_4.redemptionLink : env0_4.redemptionLink.replace(REWARD_CODE_PLACEHOLDER,
global.encodeURIComponent(rewardCode.code));
);
const Button = (ButtonNativeModule).Button;
return (
<BottomSheet {...object}>
<View style={styles.wrapper}>
{view}
<View style={styles.footer}>
<Button
disabled={r20}
onPress={value7}
grow
text={value6 == null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['23SS+z']) : value6 !== '' ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+zx47d']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['23SS+z'])}
/>
</View>
</View>
</BottomSheet>
);
function _fun77857() { // fn#77857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:1078, offset: 0x01e0eb6c, size: 158 bytes, params: 1, frame: 18
var defaultImport;
var open;
var object;
var intl;
var value;
if (hasError) {
value = environment.__proto__;
defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
open = defaultImport.open;
object = {key: 'CLAIM_QUEST_REWARD_ERROR'};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CKsXk3);
object.icon = importDefault(8947) /* metro dependency 8947 */;
Reflect.apply(open, defaultImport, [object]);
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
value.hideActionSheet();
}
}
}
return value2;
}
function _fun77860() { // fn#77860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:1893, offset: 0x01e0ed0e, size: 72 bytes, params: 1, frame: 13
var environment;
var value2;
var moduleValue;
if (rewardCode != null) {
value2 = environment.__proto__;
moduleValue = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
moduleValue.copy(rewardCode.code, function() {
var defaultImport = importDefault(dependencyMap[10]);
var object = {key: 'TOAST_QUEST_REWARD_CODE_COPIED'};
object.content = require(dependencyMap[11]).intl.string(require(dependencyMap[11]).t.MSaeTe);
object.icon = _fun77862;
return defaultImport.open(object);
function _fun77858() { // fn#77858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:1295, offset: 0x01e0ec0a, size: 103 bytes, params: 1, frame: 16
var r0;
const value3 = undefined;
const getRewardCodeQuestReward = QuestRewardUtilsModule.getRewardCodeQuestReward;
const object = {};
object.quest = quest;
if (ReactModule) {
object.idx = rewardCode == null ? value3 : rewardCode.tier;
r0 = Reflect.apply(getRewardCodeQuestReward, QuestRewardUtilsModule, [object]);
} else {
object.idx = 0;
r0 = Reflect.apply(getRewardCodeQuestReward, QuestRewardUtilsModule, [object]);
}
return r0;
}
function _fun77859() { // fn#77859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:1466, offset: 0x01e0ec71, size: 157 bytes, params: 1, frame: 16
const value2 = undefined;
if ((env0_4 == null ? value2 : env0_4.redemptionLink) != null) {
if (env0_4.redemptionLink !== '') {
return (rewardCode == null ? value2 : rewardCode.code) == null || rewardCode.code === '' ? env0_4.redemptionLink : env0_4.redemptionLink.replace(REWARD_CODE_PLACEHOLDER,
global.encodeURIComponent(rewardCode.code));
}
}
return value2;
}
function _fun77860() { // fn#77860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:1893, offset: 0x01e0ed0e, size: 72 bytes, params: 1, frame: 13
var environment;
var value2;
var moduleValue;
if (rewardCode != null) {
value2 = environment.__proto__;
moduleValue = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
moduleValue.copy(rewardCode.code, function() {
var defaultImport = importDefault(dependencyMap[10]);
var object = {key: 'TOAST_QUEST_REWARD_CODE_COPIED'};
object.content = require(dependencyMap[11]).intl.string(require(dependencyMap[11]).t.MSaeTe);
object.icon = _fun77862;
return defaultImport.open(object);
});
}
function _fun77861() { // fn#77861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:1929, offset: 0x01e0ed56, size: 120 bytes, params: 1, frame: 17
const defaultImport = ToastActionCreators;
const open = defaultImport.open;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const MSaeTe = (IndexNativeModule).t.MSaeTe;
return Reflect.apply(open, defaultImport, [{key: 'TOAST_QUEST_REWARD_CODE_COPIED', content: Reflect.apply(string,
intl, [MSaeTe]), icon: icon_77862}]);
function icon_77862() { // fn#77862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:2038, offset: 0x01e0edce, size: 45 bytes, params: 1, frame: 13
const CopyIcon = (CopyIconModule).CopyIcon;
return <CopyIcon />;
}
}
}
}
function _fun77863(a0) { // fn#77863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:242, offset: 0x01e0edfb, size: 152 bytes, params: 2, frame: 15
const object2 = {display: 'flex'};
const PX_16 = (Native).space.PX_16;
object2.paddingHorizontal = PX_16;
const PX_24 = (Native).space.PX_24;
object2.gap = PX_24;
return {wrapper: object2, footer: {paddingBottom: a0}, claimingIndicator: {'position': 'absolute', 'left': '50%',
'top': '50%', 'marginLeft': -12, 'marginTop': -12}, codeCopyWrapperLoading: {opacity: 0.5},
redemptionInstructions: {marginBottom: 24}};
}
function QuestRewardCodeClaimBottomSheetConnected({questId, questContent, questContentPosition, sourceQuestContent}) { // fn#77864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:3259, offset: 0x01e0ee93, size: 222 bytes, params: 2, frame: 21
var r0;
const quest = (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore], function() {
return QuestStore.getQuest(questId);
});
if (quest == null) {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
r0 = null;
} else {
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
r0 = (
<QuestContentImpressionTrackerNative
overrideVisibility
questOrQuests={quest}
questContent={questContent}
questContentPosition={questContentPosition}
sourceQuestContent={sourceQuestContent}
>
{children_77866}
</QuestContentImpressionTrackerNative>
);
}
return r0;
function QuestRewardCodeClaimBottomSheetConnectedChildren() { // fn#77866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:3642, owner: QuestRewardCodeClaimBottomSheetConnected.children, offset: 0x01e0ef8c, size: 62 bytes, params: 1, frame: 14
return (
<QuestRewardCodeClaimBottomSheet
quest={quest}
questContent={questContent}
questContentPosition={questContentPosition}
sourceQuestContent={sourceQuestContent}
/>
);
}
}
}
function QuestRewardCodeClaimBottomSheetConnectedChildren() { // fn#77866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:3642, owner: QuestRewardCodeClaimBottomSheetConnected.children, offset: 0x01e0ef8c, size: 62 bytes, params: 1, frame: 14
return (
<QuestRewardCodeClaimBottomSheet
quest={quest}
questContent={questContent}
questContentPosition={questContentPosition}
sourceQuestContent={sourceQuestContent}
/>
);
}
function _fun77861() { // fn#77861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:1929, offset: 0x01e0ed56, size: 120 bytes, params: 1, frame: 17
const defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
const open = defaultImport.open;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const MSaeTe = (require(1244) /* metro dependency 1244: indexNative */).t.MSaeTe;
return Reflect.apply(open, defaultImport, [{key: 'TOAST_QUEST_REWARD_CODE_COPIED', content: Reflect.apply(string,
intl, [MSaeTe]), icon: icon_77862}]);
}
function icon_77862() { // fn#77862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:2038, offset: 0x01e0edce, size: 45 bytes, params: 1, frame: 13
const CopyIcon = (require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon;
return <CopyIcon />;
}
global.__d(_fun77854, 9947, [31, 27, 7093, 6528, 33, 4501, 697, 1585, 566, 9948, 3857, 1244, 8947, 4080, 9500, 6797,
4060, 9950, 6275, 6758, 4573, 6622, 6231, 6238, 4578, 10183,
2]) /* metro module 9947, dependencies: [31, 27, 7093, 6528, 33, 4501, 697, 1585, 566, 9948, 3857, 1244, 8947, 4080, 9500, 6797, 4060, 9950, 6275, 6758, 4573, 6622, 6231, 6238, 4578, 10183, 2] */;
@@ -1,115 +1,136 @@
/* Metro module 9482; source: modules/quests/native/QuestRewardDetailsBottomSheet.native.tsx; dependencies: [31, 27, 1878, 33, 4501, 697, 9480, 4080, 9483, 9500, 7098, 1244, 566, 6275, 4572, 9542, 4573, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import QuestRewardTile from './QuestRewardTile.tsx'; /* Metro dependency 9542 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as StackNativeModule from '../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as QuestRewardTypesModule from '../../../external/discord_common/js/shared/shared-constants/QuestRewardTypes.tsx'; /* Metro dependency 7098 */
import * as QuestUtilsNativeModule from './QuestUtils.native.tsx'; /* Metro dependency 9480 */
import * as QuestHooksModule from '../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as QuestRewardUtilsModule from '../utils/QuestRewardUtils.tsx'; /* Metro dependency 9500 */
function _fun73739(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:6, offset: 0x01d7654a, size: 341 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.paddingBottom = PX_8;
object3.wrapper = object4;
object3.rewardDetailsCopy = {flexShrink: 1};
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object3.separator = {height: 1, backgroundColor: BORDER_STRONG};
const env0_9 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestRewardDetailsBottomSheet.native.tsx');
object = {};
const object2 = {};
const PX_16 = (Native).space.PX_16;
object2.paddingHorizontal = PX_16;
const PX_8 = (Native).space.PX_8;
object2.paddingBottom = PX_8;
object.wrapper = object2;
object.rewardDetailsCopy = {flexShrink: 1};
const BORDER_STRONG = (Native).colors.BORDER_STRONG;
object.separator = {height: 1, backgroundColor: BORDER_STRONG};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestRewardDetailsBottomSheet.native.tsx');
exports.default = QuestRewardDetailsBottomSheetConnected;
}
function QuestRewardDetailsBottomSheet({quest}) { // fn#73740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:377, offset: 0x01d7669f, size: 776 bytes, params: 2, frame: 36
const styles = useStyles();
const value3 = env0_3.useMemo(_fun73742, [quest, env0_3.useMemo(_fun73741, [quest.config])]);
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const defaultRewardName = (require(9500) /* metro dependency 9500: QuestRewardUtils */).getDefaultRewardName(quest.config,
currentUser);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const object = {direction: 'vertical'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.spacing = PX_16;
object.style = styles.wrapper;
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const value5 = ((Component) => <Component quest={quest} height={56} width={56} withAnimation />)(importDefault(9542) /* metro dependency 9542: QuestRewardTile */);
const Stack3 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<BottomSheet startExpanded>
<Stack {...object}>
<Stack2
align="center"
direction="horizontal"
spacing={PX_16}
>
{value5}
<Stack3
direction="vertical"
spacing={PX_4}
style={styles.rewardDetailsCopy}
function QuestRewardDetailsBottomSheet({quest}) { // fn#73740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:377, offset: 0x01d7669f, size: 776 bytes, params: 2, frame: 36
const styles = useStyles();
const value3 = ReactModule.useMemo(_fun73742, [quest, ReactModule.useMemo(_fun73741, [quest.config])]);
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const defaultRewardName = (QuestRewardUtilsModule).getDefaultRewardName(quest.config,
currentUser);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const Stack = (StackNativeModule).Stack;
const object2 = {direction: 'vertical'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.spacing = PX_16;
object2.style = styles.wrapper;
const Stack2 = (StackNativeModule).Stack;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const value5 = ((Component) => <Component quest={quest} height={56} width={56} withAnimation />)(QuestRewardTile);
const Stack3 = (StackNativeModule).Stack;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<BottomSheet startExpanded>
<Stack {...object2}>
<Stack2
align="center"
direction="horizontal"
spacing={PX_16}
>
<Text variant="eyebrow" color="text-subtle">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['jyYgZ+'])}
</Text>
<Text variant="heading-lg/semibold" color="text-strong">
{defaultRewardName}
</Text>
</Stack3>
</Stack2>
{value3 != null && <><View style={styles.separator} /><Text variant="text-md/normal" color="text-subtle">{value3}</Text></>}
</Stack>
</BottomSheet>
);
}
{value5}
<Stack3
direction="vertical"
spacing={PX_4}
style={styles.rewardDetailsCopy}
>
<Text variant="eyebrow" color="text-subtle">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['jyYgZ+'])}
</Text>
<Text variant="heading-lg/semibold" color="text-strong">
{defaultRewardName}
</Text>
</Stack3>
</Stack2>
{value3 != null && <><View style={styles.separator} /><Text variant="text-md/normal" color="text-subtle">{value3}</Text></>}
</Stack>
</BottomSheet>
);
function _fun73741() { // fn#73741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:450, offset: 0x01d769a7, size: 51 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(9500) /* metro dependency 9500: QuestRewardUtils */;
return value.isCollectibleQuestRewardPremiumExtendable(quest.config);
}
function QuestRewardDetailsBottomSheetConnected({questId}) { // fn#73744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:1772, offset: 0x01d76ada, size: 106 bytes, params: 2, frame: 15
const value3 = (require(9483) /* metro dependency 9483: QuestHooks */).useNonNullableQuest(questId,
env0_3.useCallback(_fun73745, []));
return value3 == null ? null : <QuestRewardDetailsBottomSheet quest={value3} />;
}
function _fun73742() { // fn#73742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:540, offset: 0x01d769da, size: 256 bytes, params: 1, frame: 16
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const getQuestPrimaryReward = QuestRewardUtilsModule.getQuestPrimaryReward;
const type = Reflect.apply(getQuestPrimaryReward, QuestRewardUtilsModule, [quest]).type;
const QuestRewardTypes = (QuestRewardTypesModule).QuestRewardTypes;
const COLLECTIBLE = QuestRewardTypes.COLLECTIBLE;
if (COLLECTIBLE === type) {
return intl.string(env0_1 ? t['66YyBJ'] : t.ABD2CN);
}
const FRACTIONAL_PREMIUM = QuestRewardTypes.FRACTIONAL_PREMIUM;
if (FRACTIONAL_PREMIUM === type) {
return intl.string(t.maMtqM);
}
return null;
}
function _fun73741() { // fn#73741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:450, offset: 0x01d769a7, size: 51 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(9500) /* metro dependency 9500: QuestRewardUtils */;
return value.isCollectibleQuestRewardPremiumExtendable(quest.config);
}
function _fun73742() { // fn#73742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:540, offset: 0x01d769da, size: 256 bytes, params: 1, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const questRewardUtilsModule = require(9500) /* metro dependency 9500: QuestRewardUtils */;
const getQuestPrimaryReward = questRewardUtilsModule.getQuestPrimaryReward;
const type = Reflect.apply(getQuestPrimaryReward, questRewardUtilsModule, [quest]).type;
const QuestRewardTypes = (require(7098) /* metro dependency 7098: QuestRewardTypes */).QuestRewardTypes;
const COLLECTIBLE = QuestRewardTypes.COLLECTIBLE;
if (COLLECTIBLE === type) {
return intl.string(env0_1 ? t['66YyBJ'] : t.ABD2CN);
}
const FRACTIONAL_PREMIUM = QuestRewardTypes.FRACTIONAL_PREMIUM;
if (FRACTIONAL_PREMIUM === type) {
return intl.string(t.maMtqM);
function QuestRewardDetailsBottomSheetConnected({questId}) { // fn#73744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:1772, offset: 0x01d76ada, size: 106 bytes, params: 2, frame: 15
const value3 = (QuestHooksModule).useNonNullableQuest(questId,
ReactModule.useCallback(_fun73745, []));
return (
value3 == null
? null
: (
<QuestRewardDetailsBottomSheet quest={value3} />
)
);
function _fun73745() { // fn#73745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:1854, offset: 0x01d76b44, size: 63 bytes, params: 1, frame: 13
const value = environment.__proto__;
(QuestUtilsNativeModule).showQuestUnavailableAlert();
(ActionSheetActionCreators).hideActionSheet();
}
}
return null;
}
function _fun73745() { // fn#73745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:1854, offset: 0x01d76b44, size: 63 bytes, params: 1, frame: 13
const value = environment.__proto__;
(require(9480) /* metro dependency 9480: QuestUtilsNative */).showQuestUnavailableAlert();
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
global.__d(_fun73739, 9482, [31, 27, 1878, 33, 4501, 697, 9480, 4080, 9483, 9500, 7098, 1244, 566, 6275, 4572, 9542,
4573,
2]) /* metro module 9482, dependencies: [31, 27, 1878, 33, 4501, 697, 9480, 4080, 9483, 9500, 7098, 1244, 566, 6275, 4572, 9542, 4573, 2] */;
+118 -98
View File
@@ -1,16 +1,18 @@
/* Metro module 9542; source: modules/quests/native/QuestRewardTile.tsx; dependencies: [57, 31, 27, 4502, 33, 4501, 697, 477, 566, 9500, 9495, 9543, 5475, 2] */
import React from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as AssetUtilsModule from '../lib/AssetUtils.tsx'; /* Metro dependency 9495 */
import * as QuestRewardUtilsModule from '../utils/QuestRewardUtils.tsx'; /* Metro dependency 9500 */
function _fun74440(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:6, offset: 0x01d8d9ce, size: 253 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importDefault(31) /* metro dependency 31 */;
const env0_5 = (require(31) /* metro dependency 31 */).useMemo;
const value = require(27) /* metro dependency 27 */;
const env0_6 = value.AppState;
const env0_7 = value.View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
var object2 = {'borderRadius': null, 'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center',
'overflow': 'hidden'};
@@ -18,104 +20,122 @@ function _fun74440(global, require, importDefault, importAll, module, exports, d
return {container: object2, video: {'overflow': 'hidden', 'height': '100%', 'width': '100%'},
image: {'height': '100%', 'width': '100%'}};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestRewardTile.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestRewardTile.tsx');
exports.default = QuestRewardTile;
}
function QuestRewardTile({quest, height, width, style, paused, withAnimation, accessibilityLabelPrefix}) { // fn#74442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:517, offset: 0x01d8db31, size: 666 bytes, params: 2, frame: 27
var r4;
var r9;
var value;
var VideoComponent;
paused = !(paused === undefined) && paused;
if (withAnimation !== undefined) {
r4 = withAnimation;
} else {
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isIOS();
r4 = value;
}
let env0_4 = undefined;
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value2 = useMemo(_fun74444, [quest]);
let name = value2.name;
name = name != null ? value2.name : value2.messages.name;
const value3 = useMemo(_fun74445, [quest]);
const env0_3 = value3;
const styles = useStyles();
const binding = env0_4;
const useState = binding.useState;
const value5 = env0_3(Reflect.apply(useState, binding, [AppState.currentState === 'active']), 2);
const property = value5[0];
env0_4 = value5[1];
binding.useEffect(_fun74446, [value3.isAnimated]);
const value6 = binding.useMemo(_fun74449, [value3, width, height]);
items3 = [accessibilityLabelPrefix, name];
const filter = items3.filter;
const Boolean = global.Boolean;
const value8 = Reflect.apply(filter, items3, [Boolean]).join(', ');
const items2 = [styles.container];
items2[1] = {height: height, width: width};
items2[2] = style;
if (value3.isAnimated) {
if (r4) {
VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
value = !property;
r9 = property ? paused : value;
r9 = !r9 ? useReducedMotion : r9;
value = <VideoComponent style={styles.video} source={{uri: value3.url}} disableFocus preventsDisplaySleepDuringVideoPlayback={false} importantForAccessibility="no-hide-descendants" poster={value6} resizeMode="cover" paused={r9} muted />;
function QuestRewardTile({quest, height, width, style, paused, withAnimation, accessibilityLabelPrefix}) { // fn#74442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:517, offset: 0x01d8db31, size: 666 bytes, params: 2, frame: 27
var r4;
var r9;
var value;
var VideoComponent;
paused = !(paused === undefined) && paused;
if (withAnimation !== undefined) {
r4 = withAnimation;
} else {
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isIOS();
r4 = value;
}
let env0_4 = undefined;
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value2 = useMemo(_fun74444, [quest]);
let name = value2.name;
name = name != null ? value2.name : value2.messages.name;
const value3 = useMemo(_fun74445, [quest]);
const env0_3 = value3;
const styles = useStyles();
const binding = env0_4;
const useState = binding.useState;
const value5 = env0_3(Reflect.apply(useState, binding, [AppState.currentState === 'active']), 2);
const property = value5[0];
env0_4 = value5[1];
binding.useEffect(_fun74446, [value3.isAnimated]);
const value6 = binding.useMemo(_fun74449, [value3, width, height]);
items2 = [accessibilityLabelPrefix, name];
const filter = items2.filter;
const Boolean = global.Boolean;
const value8 = Reflect.apply(filter, items2, [Boolean]).join(', ');
const items3 = [styles.container];
items3[1] = {height: height, width: width};
items3[2] = style;
if (value3.isAnimated) {
if (r4) {
VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
value = !property;
r9 = property ? paused : value;
r9 = !r9 ? useReducedMotion : r9;
value = (
<VideoComponent
style={styles.video}
source={{uri: value3.url}}
disableFocus
preventsDisplaySleepDuringVideoPlayback={false}
importantForAccessibility="no-hide-descendants"
poster={value6}
resizeMode="cover"
paused={r9}
muted
/>
);
r4 = value;
} else {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: value6}} style={styles.image} />)(value);
r4 = value;
}
} else {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: value6}} style={styles.image} />)(value);
r4 = value;
}
} else {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: value6}} style={styles.image} />)(value);
r4 = value;
return (
<View accessibilityLabel={value8} style={items3}>
{r4}
</View>
);
function _fun74444() { // fn#74444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:717, offset: 0x01d8ddcb, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (QuestRewardUtilsModule).getQuestPrimaryReward(quest);
}
function _fun74445() { // fn#74445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:811, offset: 0x01d8ddf8, size: 75 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const REWARD = QuestAssetType.REWARD;
return Reflect.apply(getQuestAsset, value, [questBinding, REWARD, undefined, true]);
}
function _fun74446() { // fn#74446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:970, offset: 0x01d8de43, size: 65 bytes, params: 1, frame: 14
var environment;
if (env0_3.isAnimated) {
value = environment.__proto__;
var env0_0 = AppState.addEventListener('change', _fun74447);
return _fun74448;
}
function _fun74447(a0) { // fn#74447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:1027, offset: 0x01d8de84, size: 27 bytes, params: 2, frame: 12
env1_4(a0 === 'active');
}
function _fun74448() { // fn#74448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:1056, offset: 0x00cd0cb3, size: 21 bytes, params: 1, frame: 9
env0_0.remove();
}
}
function _fun74449() { // fn#74449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:1109, offset: 0x01d8de9f, size: 73 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (AssetUtilsModule).getScaledImageUrl({assetUrl: env0_3.url,
width: width, height: height});
}
}
return (
<View accessibilityLabel={value8} style={items2}>
{r4}
</View>
);
}
function _fun74444() { // fn#74444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:717, offset: 0x01d8ddcb, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(9500) /* metro dependency 9500: QuestRewardUtils */).getQuestPrimaryReward(quest);
}
function _fun74445() { // fn#74445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:811, offset: 0x01d8ddf8, size: 75 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const REWARD = QuestAssetType.REWARD;
return Reflect.apply(getQuestAsset, value, [questBinding, REWARD, undefined, true]);
}
function _fun74446() { // fn#74446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:970, offset: 0x01d8de43, size: 65 bytes, params: 1, frame: 14
var environment;
if (env0_3.isAnimated) {
value = environment.__proto__;
var env0_0 = AppState.addEventListener('change', _fun74447);
return _fun74448;
}
}
function _fun74449() { // fn#74449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:1109, offset: 0x01d8de9f, size: 73 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (require(9495) /* metro dependency 9495: AssetUtils */).getScaledImageUrl({assetUrl: env0_3.url,
width: width, height: height});
}
function _fun74447(a0) { // fn#74447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:1027, offset: 0x01d8de84, size: 27 bytes, params: 2, frame: 12
env1_4(a0 === 'active');
}
global.__d(_fun74440, 9542, [57, 31, 27, 4502, 33, 4501, 697, 477, 566, 9500, 9495, 9543, 5475,
2]) /* metro module 9542, dependencies: [57, 31, 27, 4502, 33, 4501, 697, 477, 566, 9500, 9495, 9543, 5475, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,304 +1,317 @@
/* Metro module 13596; source: modules/quests/native/VideoQuestModal/VideoQuestModal.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 13597, 7717, 7110, 13573, 8621, 4017, 4577, 1585, 8141, 13598, 6618, 13601, 13629, 9480, 9483, 10183, 6531, 10121, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ReanimatedNativeView from '../../../core/native/ReanimatedNativeView.tsx'; /* Metro dependency 8141 */
import UseStateFromSharedValue from '../../../reanimated/native/useStateFromSharedValue.tsx'; /* Metro dependency 8621 */
import VideoQuestModalContext from './VideoQuestModalContext.tsx'; /* Metro dependency 13597 */
import QuestModalContentCloudBackground from '../QuestModalContentCloudBackground.tsx'; /* Metro dependency 13598 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as QuestTypesModule from '../../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as SafeAreaViewModule from '../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as DeviceOrientationModule from '../../../device/native/DeviceOrientation.tsx'; /* Metro dependency 7717 */
import * as QuestUtilsNativeModule from '../QuestUtils.native.tsx'; /* Metro dependency 9480 */
import * as QuestHooksModule from '../../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as QuestContentImpressionTrackerNativeModule from '../QuestContentImpressionTracker.native.tsx'; /* Metro dependency 10183 */
import * as QuestDockGestureContextModule from '../QuestDock/QuestDockGestureContext.tsx'; /* Metro dependency 13573 */
import * as VideoQuestModalContextModule from './VideoQuestModalContext.tsx'; /* Metro dependency 13597 */
function _fun103329(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:6, offset: 0x0226266f, size: 577 bytes, params: 8, frame: 29
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.View;
const StyleSheet = value2.StyleSheet;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const value3 = require(33) /* metro dependency 33 */;
const env0_7 = value3.jsx;
const env0_8 = value3.jsxs;
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const env0_9 = {'mass': 1.9, 'damping': 18, 'stiffness': 80, 'overshootClamping': true};
object3 = {WATCH_VIDEO: 0};
object3[0] = 'WATCH_VIDEO';
object3.POST_WATCH_VIDEO = 1;
object3[1] = 'POST_WATCH_VIDEO';
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object5 = {wrapper: {'flexDirection': 'column', 'flexGrow': 1, 'flexShrink': 1, 'zIndex': 1}};
object5.contentWrapper = {flex: 1};
const object7 = {};
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
object7['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object = {WATCH_VIDEO: 0};
object[0] = 'WATCH_VIDEO';
object.POST_WATCH_VIDEO = 1;
object[1] = 'POST_WATCH_VIDEO';
const createStyles = CreateStylesModule.createStyles;
const object2 = {wrapper: {'flexDirection': 'column', 'flexGrow': 1, 'flexShrink': 1, 'zIndex': 1}};
object2.contentWrapper = {flex: 1};
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
object4['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object7['backgroundColor'] = BACKGROUND_BASE_LOWEST;
object5.contentBackground = object7;
object5.modalContentWrapper = {zIndex: 2};
const object8 = {};
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
object8['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object8['flex'] = 1;
object8['overflow'] = 'hidden';
object8['pointerEvents'] = 'none';
object8['zIndex'] = 1;
object5.backgroundWrapper = object8;
const env0_11 = Reflect.apply(createStyles, createStylesModule, [object5]);
object4['backgroundColor'] = BACKGROUND_BASE_LOWEST;
object2.contentBackground = object4;
object2.modalContentWrapper = {zIndex: 2};
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object6['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object6['flex'] = 1;
object6['overflow'] = 'hidden';
object6['pointerEvents'] = 'none';
object6['zIndex'] = 1;
object2.backgroundWrapper = object6;
const env0_11 = Reflect.apply(createStyles, CreateStylesModule, [object2]);
const env0_12 = {code: 'function VideoQuestModalTsx1(){const{withSpring,clamp,postWatchAnimationState,BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG,interpolate,CLOUDS_BACKGROUND_INVISIBLE_OFFSET_Y}=this.__closure;return{opacity:withSpring(clamp(postWatchAnimationState.get(),0,1),BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG),transform:[{translateY:withSpring(interpolate(postWatchAnimationState.get(),[0,1],[CLOUDS_BACKGROUND_INVISIBLE_OFFSET_Y,0]),BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG)}]};}'};
const env0_13 = {code: 'function VideoQuestModalTsx2(){const{withSpring,interpolate,postWatchAnimationState,safeAreaInsets,BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG}=this.__closure;return{transform:[{translateY:withSpring(interpolate(postWatchAnimationState.get(),[0,1],[safeAreaInsets.top,0]),BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG)}],opacity:withSpring(postWatchAnimationState.get(),BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG)};}'};
const env0_14 = value.memo(_fun103330);
value = value.memo(VideoQuestModal);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModal.tsx');
exports.default = value;
exports.VideoQuestModalSteps = object3;
}
function _fun103330({onClose, initialStep, sourceQuestContent}) { // fn#103330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:1689, offset: 0x022628b0, size: 1314 bytes, params: 2, frame: 38
var object2;
var r12;
var value;
const {quest,
videoSessionId} = (require(13597) /* metro dependency 13597: VideoQuestModalContext */).useVideoQuestModalContext();
const env0_3 = videoSessionId;
const userStatus = quest.userStatus;
const value4 = userStatus?.completedAt != null;
let binding = env0_4;
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding,
[initialStep ?? (value4 ? env0_10.POST_WATCH_VIDEO : env0_10.WATCH_VIDEO)]);
binding = env0_3;
const value6 = binding(value5, 2);
const property = value6[0];
const env0_6 = value6[1];
const binding3 = env0_4;
useState = binding3.useState;
const value9 = binding(Reflect.apply(useState, binding3, [false]), 2);
const property2 = value9[0];
const env0_7 = value9[1];
const value10 = binding3.useCallback(_fun103331, [quest.id, videoSessionId, sourceQuestContent]);
const useContext = binding3.useContext;
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
const windowDimensions = Reflect.apply(useContext, binding3, [QuestDockGestureContext]).windowDimensions;
const styles = useStyles();
const height = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(windowDimensions).height;
binding3.useLayoutEffect(_fun103332, [value4, initialStep]);
let closure = _fun103333;
const value11 = binding3.useCallback(closure, []);
const value12 = binding3.useCallback(_fun103334, [value10]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useSharedValue = reanimatedRexportModule.useSharedValue;
let POST_WATCH_VIDEO = env0_10.POST_WATCH_VIDEO;
const value13 = Reflect.apply(useSharedValue, reanimatedRexportModule, [property !== POST_WATCH_VIDEO ? 0 : 1]);
const env0_9 = value13;
const moduleValue3 = reanimatedRexportModule;
let useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = M_103335;
object2 = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
clamp: reanimatedRexportModule.clamp, postWatchAnimationState: value13};
binding = env0_9;
object2.BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG = binding;
object2.interpolate = reanimatedRexportModule.interpolate;
object2.CLOUDS_BACKGROUND_INVISIBLE_OFFSET_Y = -100;
closure.__closure = object2;
closure.__workletHash = 11571705142399;
closure.__initData = env0_12;
const value14 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const value15 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
var env0_10 = value15;
const moduleValue4 = reanimatedRexportModule;
useAnimatedStyle = moduleValue4.useAnimatedStyle;
closure = U_103336;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
interpolate: reanimatedRexportModule.interpolate, postWatchAnimationState: value13, safeAreaInsets: value15,
BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG: binding};
closure.__workletHash = 9769051401109;
closure.__initData = env0_13;
const value16 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
env0_4.useEffect(_fun103337, [value13, property]);
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
const view = <View style={[styles.backgroundWrapper,
{height: height}]}><ReanimatedNativeView style={[styles.contentBackground,
{top: value15.top}]} /><ReanimatedNativeView style={[styles.contentBackground,
value16]} /><ReanimatedNativeView style={value14}>{((Component) => <Component align="top" />)(importDefault(13598) /* metro dependency 13598: QuestModalContentCloudBackground */)}</ReanimatedNativeView></View>;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const items6 = [styles.wrapper];
items6[1] = {height: height};
const WATCH_VIDEO = env0_10.WATCH_VIDEO;
const items7 = [property === WATCH_VIDEO && ((Component) => <Component isFullscreen={property2} onNavigateToPostWatchVideo={value12} onClose={onClose} onEnd={value12} setIsFullscreen={value10} sourceQuestContent={sourceQuestContent} />)(importDefault(13601) /* metro dependency 13601: VideoQuestModalContentInProgress */)];
POST_WATCH_VIDEO = env0_10.POST_WATCH_VIDEO;
const value21 = property === POST_WATCH_VIDEO;
if (value21) {
value = importDefault(13629) /* metro dependency 13629: VideoQuestModalContentCompleted */;
value = ((Component) => <Component onClose={onClose} onRestartVideo={value11} sourceQuestContent={sourceQuestContent} />)(value);
r12 = value;
} else {
r12 = value21;
}
items7[1] = r12;
return (
<View>
<ReanimatedNativeView style={styles.modalContentWrapper}>
{view}
<SafeAreaPaddingView top style={items6}>
<View style={styles.contentWrapper}>
{items7}
</View>
</SafeAreaPaddingView>
</ReanimatedNativeView>
</View>
);
}
function VideoQuestModal({questId, questContentPosition, onClose, videoSessionId, initialStep, sourceQuestContent}) { // fn#103338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4201, offset: 0x0226309a, size: 278 bytes, params: 2, frame: 22
const binding = sourceQuestContent;
const useCallback = binding.useCallback;
const value3 = (require(9483) /* metro dependency 9483: QuestHooks */).useNonNullableQuest(questId,
Reflect.apply(useCallback, binding, [_fun103339, [onClose]]));
const value4 = binding.useMemo(_fun103340, [onClose, value3, videoSessionId, questContentPosition, initialStep,
sourceQuestContent]);
binding.useLayoutEffect(_fun103344, []);
if (value3 == null || value4 == null) {
return null;
} else {
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
return (
<Modal
hideTitle
initialRouteName="watch_mobile_video_quest"
screens={value4}
/>
exports.VideoQuestModalSteps = object;
function _fun103330({onClose, initialStep, sourceQuestContent}) { // fn#103330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:1689, offset: 0x022628b0, size: 1314 bytes, params: 2, frame: 38
var r12;
var value;
const {quest,
videoSessionId} = (VideoQuestModalContextModule).useVideoQuestModalContext();
const videoSessionId2 = videoSessionId;
const userStatus = quest.userStatus;
const value4 = userStatus?.completedAt != null;
let binding = env0_4;
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding,
[initialStep ?? (value4 ? env0_10.POST_WATCH_VIDEO : env0_10.WATCH_VIDEO)]);
binding = videoSessionId2;
const value6 = binding(value5, 2);
const property = value6[0];
const env0_6 = value6[1];
const binding3 = env0_4;
useState = binding3.useState;
const value9 = binding(Reflect.apply(useState, binding3, [false]), 2);
const property2 = value9[0];
const env0_7 = value9[1];
const value10 = binding3.useCallback(_fun103331, [quest.id, videoSessionId, sourceQuestContent]);
const useContext = binding3.useContext;
const QuestDockGestureContext = (QuestDockGestureContextModule).QuestDockGestureContext;
const windowDimensions = Reflect.apply(useContext, binding3, [QuestDockGestureContext]).windowDimensions;
const styles = useStyles();
const height = (UseStateFromSharedValue)(windowDimensions).height;
binding3.useLayoutEffect(_fun103332, [value4, initialStep]);
let closure = _fun103333;
const value11 = binding3.useCallback(closure, []);
const value12 = binding3.useCallback(_fun103334, [value10]);
const useSharedValue = ReanimatedRexportModule.useSharedValue;
let POST_WATCH_VIDEO = env0_10.POST_WATCH_VIDEO;
const value13 = Reflect.apply(useSharedValue, ReanimatedRexportModule, [property !== POST_WATCH_VIDEO ? 0 : 1]);
const env0_9 = value13;
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = M_103335;
object = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
clamp: ReanimatedRexportModule.clamp, postWatchAnimationState: value13};
binding = env0_9;
object.BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG = binding;
object.interpolate = ReanimatedRexportModule.interpolate;
object.CLOUDS_BACKGROUND_INVISIBLE_OFFSET_Y = -100;
closure.__closure = object;
closure.__workletHash = 11571705142399;
closure.__initData = env0_12;
const value14 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const value15 = (UseSafeAreaInsetsNative)();
var env0_10 = value15;
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = U_103336;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
interpolate: ReanimatedRexportModule.interpolate, postWatchAnimationState: value13, safeAreaInsets: value15,
BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG: binding};
closure.__workletHash = 9769051401109;
closure.__initData = env0_13;
const value16 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
env0_4.useEffect(_fun103337, [value13, property]);
const view = (
<View style={[styles.backgroundWrapper, {height: height}]}>
<ReanimatedNativeView style={[styles.contentBackground, {top: value15.top}]} />
<ReanimatedNativeView style={[styles.contentBackground, value16]} />
<ReanimatedNativeView style={value14}>
{((Component) => <Component align="top" />)(QuestModalContentCloudBackground)}
</ReanimatedNativeView>
</View>
);
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const items6 = [styles.wrapper];
items6[1] = {height: height};
const WATCH_VIDEO = env0_10.WATCH_VIDEO;
const items7 = [
property === WATCH_VIDEO && ((Component) => <Component isFullscreen={property2} onNavigateToPostWatchVideo={value12} onClose={onClose} onEnd={value12} setIsFullscreen={value10} sourceQuestContent={sourceQuestContent} />)(importDefault(13601) /* metro dependency 13601: VideoQuestModalContentInProgress */),
];
POST_WATCH_VIDEO = env0_10.POST_WATCH_VIDEO;
const value21 = property === POST_WATCH_VIDEO;
if (value21) {
value = importDefault(13629) /* metro dependency 13629: VideoQuestModalContentCompleted */;
value = ((Component) => <Component onClose={onClose} onRestartVideo={value11} sourceQuestContent={sourceQuestContent} />)(value);
r12 = value;
} else {
r12 = value21;
}
items7[1] = r12;
return (
<View>
<ReanimatedNativeView style={styles.modalContentWrapper}>
{view}
<SafeAreaPaddingView top style={items6}>
<View style={styles.contentWrapper}>
{items7}
</View>
</SafeAreaPaddingView>
</ReanimatedNativeView>
</View>
);
function _fun103331(a0) { // fn#103331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2018, offset: 0x02262dd2, size: 175 bytes, params: 2, frame: 17
const lockOrientation = DeviceOrientationModule.lockOrientation;
if (a0) {
Reflect.apply(lockOrientation, DeviceOrientationModule, ['LANDSCAPE', true]);
} else {
Reflect.apply(lockOrientation, DeviceOrientationModule, ['PORTRAIT', true]);
}
env0_7(a0);
(require(7110) /* metro dependency 7110: AnalyticsActions */).trackQuestEvent({questId: quest.id,
event: a0 ? AnalyticEvents.QUEST_VIDEO_FULLSCREEN_ENTERED : AnalyticEvents.QUEST_VIDEO_FULLSCREEN_EXITED,
properties: {video_session_id: videoSessionId}, sourceQuestContent: sourceQuestContent});
}
function _fun103332() { // fn#103332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2400, offset: 0x02262e81, size: 51 bytes, params: 1, frame: 12
var binding;
if (result && initialStep == null) {
binding = env0_6;
value = environment.__proto__;
binding(env1_10.POST_WATCH_VIDEO);
}
}
function _fun103333() { // fn#103333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2473, offset: 0x02262eb4, size: 29 bytes, params: 1, frame: 11
const binding = env0_6;
const WATCH_VIDEO = env1_10.WATCH_VIDEO;
binding(WATCH_VIDEO);
}
function _fun103334() { // fn#103334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2518, offset: 0x02262ed1, size: 40 bytes, params: 1, frame: 12
(0, JsxRuntimeModule.jsxs)(false);
const binding = env0_6;
const POST_WATCH_VIDEO = env1_10.POST_WATCH_VIDEO;
binding(POST_WATCH_VIDEO);
}
function M_103335() { // fn#103335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2644, offset: 0x02262ef9, size: 196 bytes, params: 1, frame: 25
const object = {};
let value = environment.__proto__;
let withSpring = SpringModule.withSpring;
const clamp = ReanimatedRexportModule.clamp;
let binding = env0_9;
const value4 = Reflect.apply(clamp, ReanimatedRexportModule, [binding.get(), 0, 1]);
binding = env1_9;
object.opacity = Reflect.apply(withSpring, SpringModule, [value4, binding]);
const object2 = {};
value = SpringModule;
withSpring = value.withSpring;
object2.translateY = Reflect.apply(withSpring, value, [ReanimatedRexportModule.interpolate(env0_9.get(), [0, 1], [-100, 0]),
binding]);
object.transform = [object2];
return object;
}
function U_103336() { // fn#103336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:3110, offset: 0x02262fbd, size: 174 bytes, params: 1, frame: 25
const object = {};
let value = environment.__proto__;
let withSpring = SpringModule.withSpring;
const interpolate = ReanimatedRexportModule.interpolate;
let binding = env0_9;
let get = binding.get;
const value4 = Reflect.apply(interpolate, ReanimatedRexportModule, [Reflect.apply(get, binding, []), [0, 1],
[env0_10.top, 0]]);
binding = env1_9;
object.transform = [{translateY: Reflect.apply(withSpring, SpringModule, [value4, binding])}];
value = SpringModule;
withSpring = value.withSpring;
const binding2 = env0_9;
get = binding2.get;
object.opacity = Reflect.apply(withSpring, value, [Reflect.apply(get, binding2, []), binding]);
return object;
}
function _fun103337() { // fn#103337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:3486, offset: 0x0226306b, size: 47 bytes, params: 1, frame: 13
const binding = env0_9;
const set = binding.set;
const value = environment.__proto__;
const POST_WATCH_VIDEO = env1_10.POST_WATCH_VIDEO;
Reflect.apply(set, binding, [ReactNativeModule.View !== POST_WATCH_VIDEO ? 0 : 1]);
}
}
}
function _fun103331(a0) { // fn#103331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2018, offset: 0x02262dd2, size: 175 bytes, params: 2, frame: 17
const deviceOrientationModule = require(7717) /* metro dependency 7717: DeviceOrientation */;
const lockOrientation = deviceOrientationModule.lockOrientation;
if (a0) {
Reflect.apply(lockOrientation, deviceOrientationModule, ['LANDSCAPE', true]);
} else {
Reflect.apply(lockOrientation, deviceOrientationModule, ['PORTRAIT', true]);
function VideoQuestModal({questId, questContentPosition, onClose, videoSessionId, initialStep, sourceQuestContent}) { // fn#103338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4201, offset: 0x0226309a, size: 278 bytes, params: 2, frame: 22
const binding = sourceQuestContent;
const useCallback = binding.useCallback;
const value3 = (QuestHooksModule).useNonNullableQuest(questId,
Reflect.apply(useCallback, binding, [_fun103339, [onClose]]));
const value4 = binding.useMemo(_fun103340, [onClose, value3, videoSessionId, questContentPosition, initialStep,
sourceQuestContent]);
binding.useLayoutEffect(_fun103344, []);
if (value3 == null || value4 == null) {
return null;
} else {
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
return (
<Modal
hideTitle
initialRouteName="watch_mobile_video_quest"
screens={value4}
/>
);
}
function _fun103339() { // fn#103339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4357, offset: 0x022631b0, size: 48 bytes, params: 1, frame: 11
const value = environment.__proto__;
(QuestUtilsNativeModule).showQuestUnavailableAlert();
onClose();
}
function _fun103340() { // fn#103340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4459, offset: 0x022631e0, size: 69 bytes, params: 1, frame: 5
const value = null;
return value == ReactNativeModule.View ? value : {['watch_mobile_video_quest']: {fullscreen: true, headerLeft: function() {
return null;
}, render: render_103342}};
function render_103342() { // fn#103342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4523, offset: 0x02263225, size: 208 bytes, params: 1, frame: 22
const Provider = (VideoQuestModalContext).Provider;
const object2 = {};
const binding = env1_5;
object2.quest = binding;
object2.videoSessionId = videoSessionId;
const QuestDockGestureContextProvider = (QuestDockGestureContextModule).QuestDockGestureContextProvider;
const QuestContentImpressionTrackerNative = (QuestContentImpressionTrackerNativeModule).QuestContentImpressionTrackerNative;
const QuestContent = (QuestTypesModule).QuestContent;
const VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
return (
<Provider value={object2}>
<QuestDockGestureContextProvider>
<QuestContentImpressionTrackerNative
overrideVisibility
questContent={VIDEO_MODAL_MOBILE}
questOrQuests={binding}
questContentPosition={questContentPosition}
sourceQuestContent={sourceQuestContent}
>
{children_103343}
</QuestContentImpressionTrackerNative>
</QuestDockGestureContextProvider>
</Provider>
);
function render_103342Children() { // fn#103343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4835, owner: render_103342.children, offset: 0x022632f5, size: 53 bytes, params: 1, frame: 14
return ((Component) => <Component initialStep={initialStep} onClose={onClose} sourceQuestContent={sourceQuestContent} />)(env3_14);
}
}
}
function _fun103344() { // fn#103344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4956, offset: 0x0226332a, size: 60 bytes, params: 1, frame: 17
const value = environment.__proto__;
(DeviceOrientationModule).lockOrientation('PORTRAIT', true);
return (DeviceOrientationModule).restoreDefaultOrientation;
}
}
env0_7(a0);
(require(7110) /* metro dependency 7110: AnalyticsActions */).trackQuestEvent({questId: quest.id,
event: a0 ? AnalyticEvents.QUEST_VIDEO_FULLSCREEN_ENTERED : AnalyticEvents.QUEST_VIDEO_FULLSCREEN_EXITED,
properties: {video_session_id: videoSessionId}, sourceQuestContent: sourceQuestContent});
}
function _fun103332() { // fn#103332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2400, offset: 0x02262e81, size: 51 bytes, params: 1, frame: 12
var binding;
if (result && initialStep == null) {
binding = env0_6;
value = environment.__proto__;
binding(env1_10.POST_WATCH_VIDEO);
}
}
function _fun103333() { // fn#103333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2473, offset: 0x02262eb4, size: 29 bytes, params: 1, frame: 11
const binding = env0_6;
const WATCH_VIDEO = env1_10.WATCH_VIDEO;
binding(WATCH_VIDEO);
}
function _fun103334() { // fn#103334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2518, offset: 0x02262ed1, size: 40 bytes, params: 1, frame: 12
env0_8(false);
const binding = env0_6;
const POST_WATCH_VIDEO = env1_10.POST_WATCH_VIDEO;
binding(POST_WATCH_VIDEO);
}
function M_103335() { // fn#103335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2644, offset: 0x02262ef9, size: 196 bytes, params: 1, frame: 25
const object3 = {};
let value = environment.__proto__;
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const clamp = reanimatedRexportModule.clamp;
let binding = env0_9;
const value4 = Reflect.apply(clamp, reanimatedRexportModule, [binding.get(), 0, 1]);
binding = env1_9;
object3.opacity = Reflect.apply(withSpring, springModule, [value4, binding]);
const object4 = {};
value = springModule;
withSpring = value.withSpring;
const moduleValue3 = reanimatedRexportModule;
object4.translateY = Reflect.apply(withSpring, value, [moduleValue3.interpolate(env0_9.get(), [0, 1], [-100, 0]),
binding]);
object3.transform = [object4];
return object3;
}
function U_103336() { // fn#103336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:3110, offset: 0x02262fbd, size: 174 bytes, params: 1, frame: 25
const object2 = {};
let value = environment.__proto__;
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = reanimatedRexportModule.interpolate;
let binding = env0_9;
let get = binding.get;
const value4 = Reflect.apply(interpolate, reanimatedRexportModule, [Reflect.apply(get, binding, []), [0, 1],
[env0_10.top, 0]]);
binding = env1_9;
object2.transform = [{translateY: Reflect.apply(withSpring, springModule, [value4, binding])}];
value = springModule;
withSpring = value.withSpring;
const binding2 = env0_9;
get = binding2.get;
object2.opacity = Reflect.apply(withSpring, value, [Reflect.apply(get, binding2, []), binding]);
return object2;
}
function _fun103337() { // fn#103337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:3486, offset: 0x0226306b, size: 47 bytes, params: 1, frame: 13
const binding = env0_9;
const set = binding.set;
const binding2 = env0_5;
const value = environment.__proto__;
const POST_WATCH_VIDEO = env1_10.POST_WATCH_VIDEO;
Reflect.apply(set, binding, [binding2 !== POST_WATCH_VIDEO ? 0 : 1]);
}
function _fun103339() { // fn#103339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4357, offset: 0x022631b0, size: 48 bytes, params: 1, frame: 11
const value = environment.__proto__;
(require(9480) /* metro dependency 9480: QuestUtilsNative */).showQuestUnavailableAlert();
onClose();
}
function _fun103340() { // fn#103340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4459, offset: 0x022631e0, size: 69 bytes, params: 1, frame: 5
const value = null;
return value == env0_5 ? value : {['watch_mobile_video_quest']: {fullscreen: true, headerLeft: function() {
return null;
}, render: render_103342}};
}
function _fun103344() { // fn#103344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4956, offset: 0x0226332a, size: 60 bytes, params: 1, frame: 17
const value = environment.__proto__;
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('PORTRAIT', true);
return (require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation;
}
function render_103342() { // fn#103342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4523, offset: 0x02263225, size: 208 bytes, params: 1, frame: 22
const Provider = (importDefault(13597) /* metro dependency 13597: VideoQuestModalContext */).Provider;
const object = {};
const binding = env1_5;
object.quest = binding;
object.videoSessionId = videoSessionId;
const QuestDockGestureContextProvider = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContextProvider;
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
return (
<Provider value={object}>
<QuestDockGestureContextProvider>
<QuestContentImpressionTrackerNative
overrideVisibility
questContent={VIDEO_MODAL_MOBILE}
questOrQuests={binding}
questContentPosition={questContentPosition}
sourceQuestContent={sourceQuestContent}
>
{children_103343}
</QuestContentImpressionTrackerNative>
</QuestDockGestureContextProvider>
</Provider>
);
}
function render_103342Children() { // fn#103343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4835, owner: render_103342.children, offset: 0x022632f5, size: 53 bytes, params: 1, frame: 14
return ((Component) => <Component initialStep={initialStep} onClose={onClose} sourceQuestContent={sourceQuestContent} />)(env3_14);
}
global.__d(_fun103329, 13596, [57, 31, 27, 661, 33, 4501, 697, 13597, 7717, 7110, 13573, 8621, 4017, 4577, 1585,
8141, 13598, 6618, 13601, 13629, 9480, 9483, 10183, 6531, 10121,
2]) /* metro module 13596, dependencies: [57, 31, 27, 661, 33, 4501, 697, 13597, 7717, 7110, 13573, 8621, 4017, 4577, 1585, 8141, 13598, 6618, 13601, 13629, 9480, 9483, 10183, 6531, 10121, 2] */;
@@ -1,30 +1,37 @@
/* Metro module 13618; source: modules/quests/native/VideoQuestModal/VideoQuestModalCloseButton.tsx; dependencies: [33, 697, 5278, 1244, 5312, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as XSmallIconModule from '../../../../design/components/Icon/native/redesign/generated/XSmallIcon.tsx'; /* Metro dependency 5312 */
function _fun104018(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13815:6, offset: 0x0227ba1b, size: 123 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalCloseButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalCloseButton.tsx');
exports.default = VideoQuestModalCloseButton;
function VideoQuestModalCloseButton({onClose, iconColor = importDefault(dependencyMap[1]).colors.MOBILE_TEXT_HEADING_PRIMARY, style}) { // fn#104019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13815:116, offset: 0x0227ba96, size: 236 bytes, params: 2, frame: 21
const PressableOpacity = (PressablesModule).PressableOpacity;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const cpT0Cq = (IndexNativeModule).t.cpT0Cq;
const items2 = [{'flexShrink': 0, 'minWidth': 24, 'minHeight': 24}, style];
const XSmallIcon = (XSmallIconModule).XSmallIcon;
return (
<PressableOpacity
accessibilityLabel={Reflect.apply(string, intl, [cpT0Cq])}
accessibilityRole="button"
hitSlop={12}
onPress={onClose}
style={items2}
>
<XSmallIcon color={iconColor} />
</PressableOpacity>
);
}
}
function VideoQuestModalCloseButton({onClose, iconColor = importDefault(dependencyMap[1]).colors.MOBILE_TEXT_HEADING_PRIMARY, style}) { // fn#104019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13815:116, offset: 0x0227ba96, size: 236 bytes, params: 2, frame: 21
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const cpT0Cq = (require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq;
const items2 = [{'flexShrink': 0, 'minWidth': 24, 'minHeight': 24}, style];
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
return (
<PressableOpacity
accessibilityLabel={Reflect.apply(string, intl, [cpT0Cq])}
accessibilityRole="button"
hitSlop={12}
onPress={onClose}
style={items2}
>
<XSmallIcon color={iconColor} />
</PressableOpacity>
);
}
global.__d(_fun104018, 13618, [33, 697, 5278, 1244, 5312,
2]) /* metro module 13618, dependencies: [33, 697, 5278, 1244, 5312, 2] */;
@@ -1,229 +1,353 @@
/* Metro module 13629; source: modules/quests/native/VideoQuestModal/VideoQuestModalContentCompleted.tsx; dependencies: [31, 27, 33, 4501, 697, 13597, 9495, 9513, 13627, 13593, 7589, 4017, 4577, 7114, 9212, 9505, 7717, 13573, 6618, 4572, 4573, 1244, 13618, 8141, 13619, 1305, 5278, 10234, 5475, 4578, 9798, 2] */
import ReanimatedNativeView from '../../../core/native/ReanimatedNativeView.tsx'; /* Metro dependency 8141 */
import VideoQuestModalCloseButton from './VideoQuestModalCloseButton.tsx'; /* Metro dependency 13618 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as StackNativeModule from '../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as SafeAreaViewModule from '../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as QuestUtilsModule from '../../utils/QuestUtils.tsx'; /* Metro dependency 7114 */
import * as DeviceOrientationModule from '../../../device/native/DeviceOrientation.tsx'; /* Metro dependency 7717 */
import * as ContentImpressionTrackerHooksModule from '../../lib/analytics/ContentImpressionTrackerHooks.tsx'; /* Metro dependency 9513 */
import * as RetryIconModule from '../../../../design/components/Icon/native/redesign/generated/RetryIcon.tsx'; /* Metro dependency 10234 */
import * as QuestDockGestureContextModule from '../QuestDock/QuestDockGestureContext.tsx'; /* Metro dependency 13573 */
import * as QuestBottomSheetFooterModule from '../QuestBottomSheet/QuestBottomSheetFooter.tsx'; /* Metro dependency 13593 */
import * as VideoQuestModalContextModule from './VideoQuestModalContext.tsx'; /* Metro dependency 13597 */
import * as UseVideoQuestClickCtaAndMaybeCloseModalModule from './useVideoQuestClickCtaAndMaybeCloseModal.tsx'; /* Metro dependency 13627 */
function _fun104081(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:6, offset: 0x02283a77, size: 589 bytes, params: 8, frame: 26
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.ActivityIndicator;
const env0_5 = value2.View;
const value3 = require(33) /* metro dependency 33 */;
const env0_6 = value3.jsx;
const env0_7 = value3.jsxs;
let value = ReactModule;
const env0_8 = {'mass': 1.9, 'damping': 18, 'stiffness': 80, 'overshootClamping': false};
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {wrapper: {'flexGrow': 1, 'flexShrink': 1}, headerContentCopy: {'flexGrow': 1, 'flexShrink': 1}};
object2.closeButton = {opacity: 0.5};
const createStyles = CreateStylesModule.createStyles;
object = {wrapper: {'flexGrow': 1, 'flexShrink': 1}, headerContentCopy: {'flexGrow': 1, 'flexShrink': 1}};
object.closeButton = {opacity: 0.5};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.content = {padding: PX_16};
object2.contentRewardsAnimatedWrapper = {flex: 1};
object2.contentRewardsWrapper = {flex: 1};
object2.contentRewards = {alignItems: 'center'};
object2.contentRewardsCopy = {textAlign: 'center'};
object.content = {padding: PX_16};
object.contentRewardsAnimatedWrapper = {flex: 1};
object.contentRewardsWrapper = {flex: 1};
object.contentRewards = {alignItems: 'center'};
object.contentRewardsCopy = {textAlign: 'center'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.contentEndCardHeader = {marginBottom: PX_16};
object2.contentEndCardHeaderCopy = {'flexGrow': 1, 'flexShrink': 1};
const object3 = {borderTopWidth: 1};
object.contentEndCardHeader = {marginBottom: PX_16};
object.contentEndCardHeaderCopy = {'flexGrow': 1, 'flexShrink': 1};
const object6 = {borderTopWidth: 1};
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object3.borderTopColor = BORDER_STRONG;
object6.borderTopColor = BORDER_STRONG;
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object3.paddingTop = PX_24;
object2.contentEndCard = object3;
const object4 = {height: 210};
object6.paddingTop = PX_24;
object.contentEndCard = object6;
const object7 = {height: 210};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.marginBottom = PX_24;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object2.image = object4;
const object5 = {flexGrow: 0};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.ctaPrimary = object5;
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {code: 'function VideoQuestModalContentCompletedTsx1(){const{withDelay,ANIMATION_DELAY,withSpring,isComponentMounted,ANIMATED_CONTENT_SPRING_CONFIG,interpolate,ANIMATED_CONTENT_OFFSET_Y}=this.__closure;return{opacity:withDelay(ANIMATION_DELAY,withSpring(isComponentMounted.get(),ANIMATED_CONTENT_SPRING_CONFIG)),transform:[{translateY:withDelay(ANIMATION_DELAY,withSpring(interpolate(isComponentMounted.get(),[0,1],[ANIMATED_CONTENT_OFFSET_Y,0]),ANIMATED_CONTENT_SPRING_CONFIG))}]};}'};
object7.marginBottom = PX_24;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object.image = object7;
const object8 = {flexGrow: 0};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.ctaPrimary = object8;
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: 'function VideoQuestModalContentCompletedTsx1(){const{withDelay,ANIMATION_DELAY,withSpring,isComponentMounted,ANIMATED_CONTENT_SPRING_CONFIG,interpolate,ANIMATED_CONTENT_OFFSET_Y}=this.__closure;return{opacity:withDelay(ANIMATION_DELAY,withSpring(isComponentMounted.get(),ANIMATED_CONTENT_SPRING_CONFIG)),transform:[{translateY:withDelay(ANIMATION_DELAY,withSpring(interpolate(isComponentMounted.get(),[0,1],[ANIMATED_CONTENT_OFFSET_Y,0]),ANIMATED_CONTENT_SPRING_CONFIG))}]};}'};
value = value.memo(VideoQuestModalContentCompleted);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalContentCompleted.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalContentCompleted.tsx');
exports.default = value;
}
function VideoQuestModalContentCompleted({onClose, onRestartVideo, sourceQuestContent}) { // fn#104082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:1402, offset: 0x02283cc4, size: 2510 bytes, params: 2, frame: 49
var object2;
var r14;
var r10;
var items5;
var string;
var ShinyButton;
var object19;
const styles = useStyles();
const videoQuestModalContextModule = require(13597) /* metro dependency 13597: VideoQuestModalContext */;
const useVideoQuestModalContext = videoQuestModalContextModule.useVideoQuestModalContext;
const quest = Reflect.apply(useVideoQuestModalContext, videoQuestModalContextModule, []).quest;
let binding = env0_3;
const value3 = binding.useMemo(_fun104083, [quest]);
const value5 = (require(13627) /* metro dependency 13627: useVideoQuestClickCtaAndMaybeCloseModal */).useVideoQuestClickCtaAndMaybeCloseModal({quest: quest,
onClose: onClose, sourceQuestContent: sourceQuestContent,
impressionId: (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId()});
const questBottomSheetFooterModule = require(13593) /* metro dependency 13593: QuestBottomSheetFooter */;
const useQuestRewardClaimHandler = questBottomSheetFooterModule.useQuestRewardClaimHandler;
object2 = {quest: quest};
object2.onSuccess = (importDefault(7589) /* metro dependency 7589: ProductPurchaseSuccessActionCreators */).close;
object2.sourceQuestContent = sourceQuestContent;
const {isLoading, isClaiming, claim} = Reflect.apply(useQuestRewardClaimHandler, questBottomSheetFooterModule,
[object2]);
const userStatus = quest.userStatus;
const value7 = userStatus?.claimedAt != null;
const value8 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = VideoQuestModalContentCompletedT;
closure.__closure = {withDelay: reanimatedRexportModule.withDelay, ANIMATION_DELAY: 125,
withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, isComponentMounted: value8,
ANIMATED_CONTENT_SPRING_CONFIG: env0_8, interpolate: reanimatedRexportModule.interpolate,
ANIMATED_CONTENT_OFFSET_Y: 75};
closure.__workletHash = 2704439293952;
closure.__initData = env0_10;
const value9 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
binding = env0_3;
binding.useEffect(_fun104085, [value8]);
const questUtilsModule = require(7114) /* metro dependency 7114: QuestUtils */;
const isShareableQuest2 = questUtilsModule.isShareableQuest(quest.config);
const value10 = binding.useCallback(_fun104086, [isShareableQuest2, quest.id]);
binding.useLayoutEffect(_fun104087, []);
const useContext = binding.useContext;
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
const windowDimensions = Reflect.apply(useContext, binding, [QuestDockGestureContext]).windowDimensions;
let get = windowDimensions.get;
const value11 = Reflect.apply(get, windowDimensions, []).height < 800;
get = windowDimensions.get;
const value12 = Reflect.apply(get, windowDimensions, []).height < 760;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const EAYZAr = t.EAYZAr;
const items2 = [<Stack align="center" direction="horizontal" justify="space-between" style={styles.content}><Text variant="heading-sm/semibold" color="text-subtle" style={styles.headerContentCopy}>{Reflect.apply(formatToPlainString,
intl, [EAYZAr,
{questName: quest.config.messages.questName}])}</Text>{((Component) => <Component onClose={onClose} style={styles.closeButton} />)(importDefault(13618) /* metro dependency 13618: VideoQuestModalCloseButton */)}</Stack>];
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
const items3 = [styles.contentRewardsAnimatedWrapper, value9];
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
const items4 = [styles.content];
items4[1] = styles.contentRewardsWrapper;
if (isLoading) {
if (isClaiming) {
var viewBindingProps = {style: styles.contentRewards};
items5 = [((Component) => <Component withQuestName={false} withRewardAvailableCopy={false} size={value12 ? 'md' : value11 ? 'md-lg' : 'lg'} withRewardTileAnimation />)(importDefault(13619) /* metro dependency 13619: VideoQuestModalReward */)];
string = intl.string;
items5[1] = <Text color="text-strong" style={styles.contentRewardsCopy} variant="heading-lg/semibold">{value7 ? Reflect.apply(string,
intl, [t['EMp8/M']]) : Reflect.apply(string, intl, [t.qyKLdg])}</Text>;
r14 = <View {...viewBindingProps}>{items5}</View>;
function VideoQuestModalContentCompleted({onClose, onRestartVideo, sourceQuestContent}) { // fn#104082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:1402, offset: 0x02283cc4, size: 2510 bytes, params: 2, frame: 49
var r14;
var r10;
var items5;
var string;
var ShinyButton;
var object2;
const styles = useStyles();
const useVideoQuestModalContext = VideoQuestModalContextModule.useVideoQuestModalContext;
const quest = Reflect.apply(useVideoQuestModalContext, VideoQuestModalContextModule, []).quest;
let binding = env0_3;
const value3 = binding.useMemo(_fun104083, [quest]);
const value5 = (UseVideoQuestClickCtaAndMaybeCloseModalModule).useVideoQuestClickCtaAndMaybeCloseModal({quest: quest,
onClose: onClose, sourceQuestContent: sourceQuestContent,
impressionId: (ContentImpressionTrackerHooksModule).useQuestImpressionId()});
const useQuestRewardClaimHandler = QuestBottomSheetFooterModule.useQuestRewardClaimHandler;
object = {quest: quest};
object.onSuccess = (importDefault(7589) /* metro dependency 7589: ProductPurchaseSuccessActionCreators */).close;
object.sourceQuestContent = sourceQuestContent;
const {isLoading, isClaiming, claim} = Reflect.apply(useQuestRewardClaimHandler, QuestBottomSheetFooterModule,
[object]);
const userStatus = quest.userStatus;
const value7 = userStatus?.claimedAt != null;
const value8 = (ReanimatedRexportModule).useSharedValue(0);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const VideoQuestModalContentCompletedT2 = VideoQuestModalContentCompletedT;
VideoQuestModalContentCompletedT2.__closure = {withDelay: ReanimatedRexportModule.withDelay, ANIMATION_DELAY: 125,
withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, isComponentMounted: value8,
ANIMATED_CONTENT_SPRING_CONFIG: env0_8, interpolate: ReanimatedRexportModule.interpolate,
ANIMATED_CONTENT_OFFSET_Y: 75};
VideoQuestModalContentCompletedT2.__workletHash = 2704439293952;
VideoQuestModalContentCompletedT2.__initData = env0_10;
const value9 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [VideoQuestModalContentCompletedT2]);
binding = env0_3;
binding.useEffect(_fun104085, [value8]);
const isShareableQuest2 = QuestUtilsModule.isShareableQuest(quest.config);
const value10 = binding.useCallback(_fun104086, [isShareableQuest2, quest.id]);
binding.useLayoutEffect(_fun104087, []);
const useContext = binding.useContext;
const QuestDockGestureContext = (QuestDockGestureContextModule).QuestDockGestureContext;
const windowDimensions = Reflect.apply(useContext, binding, [QuestDockGestureContext]).windowDimensions;
let get = windowDimensions.get;
const value11 = Reflect.apply(get, windowDimensions, []).height < 800;
get = windowDimensions.get;
const value12 = Reflect.apply(get, windowDimensions, []).height < 760;
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const Stack = (StackNativeModule).Stack;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const EAYZAr = t.EAYZAr;
const items2 = [
<Stack
align="center"
direction="horizontal"
justify="space-between"
style={styles.content}
>
<Text
variant="heading-sm/semibold"
color="text-subtle"
style={styles.headerContentCopy}
>
{Reflect.apply(formatToPlainString, intl, [EAYZAr, {questName: quest.config.messages.questName}])}
</Text>
{((Component) => <Component onClose={onClose} style={styles.closeButton} />)(VideoQuestModalCloseButton)}
</Stack>,
];
const items3 = [styles.contentRewardsAnimatedWrapper, value9];
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
const items4 = [styles.content];
items4[1] = styles.contentRewardsWrapper;
if (isLoading) {
if (isClaiming) {
var viewBindingProps = {style: styles.contentRewards};
items5 = [
((Component) => <Component withQuestName={false} withRewardAvailableCopy={false} size={value12 ? 'md' : value11 ? 'md-lg' : 'lg'} withRewardTileAnimation />)(importDefault(13619) /* metro dependency 13619: VideoQuestModalReward */),
];
string = intl.string;
items5[1] = (
<Text
color="text-strong"
style={styles.contentRewardsCopy}
variant="heading-lg/semibold"
>
{value7 ? Reflect.apply(string, intl, [t['EMp8/M']]) : Reflect.apply(string, intl, [t.qyKLdg])}
</Text>
);
r14 = (
<View {...viewBindingProps}>
{items5}
</View>
);
} else {
r14 = <ActivityIndicator />;
}
} else {
r14 = <ActivityIndicator />;
var viewBindingProps = {style: styles.contentRewards};
items5 = [
((Component) => <Component withQuestName={false} withRewardAvailableCopy={false} size={value12 ? 'md' : value11 ? 'md-lg' : 'lg'} withRewardTileAnimation />)(importDefault(13619) /* metro dependency 13619: VideoQuestModalReward */),
];
string = intl.string;
items5[1] = (
<Text
color="text-strong"
style={styles.contentRewardsCopy}
variant="heading-lg/semibold"
>
{value7 ? Reflect.apply(string, intl, [t['EMp8/M']]) : Reflect.apply(string, intl, [t.qyKLdg])}
</Text>
);
r14 = (
<View {...viewBindingProps}>
{items5}
</View>
);
}
} else {
var viewBindingProps = {style: styles.contentRewards};
items5 = [((Component) => <Component withQuestName={false} withRewardAvailableCopy={false} size={value12 ? 'md' : value11 ? 'md-lg' : 'lg'} withRewardTileAnimation />)(importDefault(13619) /* metro dependency 13619: VideoQuestModalReward */)];
const items6 = [r14];
if (value7) {
r14 = !value7;
} else {
ShinyButton = (require(1305) /* metro dependency 1305: native */).ShinyButton;
r14 = (
<ShinyButton
loading={isClaiming}
onPress={claim}
style={styles.ctaPrimary}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cfY4PE)}
color={(require(1305) /* metro dependency 1305: native */).ButtonColors.GREY}
/>
);
}
items6[1] = r14;
items2[1] = (
<ReanimatedNativeView style={items3}>
<Stack
align="center"
justify="center"
spacing={PX_24}
style={items4}
>
{items6}
</Stack>
</ReanimatedNativeView>
);
const items7 = [styles.content];
items7[1] = styles.contentEndCard;
const Stack2 = (StackNativeModule).Stack;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
const stack = (
<Stack2 spacing={PX_4} style={styles.contentEndCardHeaderCopy}>
<Text
variant="heading-md/semibold"
color="mobile-text-heading-primary"
accessibilityRole="header"
>
{quest.config.messages.gameTitle}
</Text>
<Text variant="text-sm/medium" color="text-subtle">
{quest.config.messages.gamePublisher}
</Text>
</Stack2>
);
const PressableOpacity = (PressablesModule).PressableOpacity;
string = intl.string;
items5[1] = <Text color="text-strong" style={styles.contentRewardsCopy} variant="heading-lg/semibold">{value7 ? Reflect.apply(string,
intl, [t['EMp8/M']]) : Reflect.apply(string, intl, [t.qyKLdg])}</Text>;
r14 = <View {...viewBindingProps}>{items5}</View>;
const YsCuyF = (require(1244) /* metro dependency 1244: indexNative */).t.YsCuyF;
const RetryIcon = (RetryIconModule).RetryIcon;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
const stack2 = (
<Stack
direction="horizontal"
justify="space-between"
style={styles.contentEndCardHeader}
>
{stack}
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={Reflect.apply(string, intl, [YsCuyF])}
onPress={onRestartVideo}
>
<RetryIcon color={INTERACTIVE_TEXT_DEFAULT} />
</PressableOpacity>
</Stack>
);
const value28 = value3 != null;
if (value28) {
r10 = (
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.r8BzFT,
{gameTitle: quest.config.messages.gameTitle})}
onPress={value5}
>
{((Component) => <Component style={styles.image} source={{uri: value3.url}} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
</PressableOpacity>
);
} else {
r10 = value28;
}
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const Button = (ButtonNativeModule).Button;
items2[2] = (
<View style={items7}>
{stack2}
{r10}
<Stack
direction="horizontal"
spacing={PX_16}
align="center"
>
<Button
grow
onPress={value5}
text={(require(9505) /* metro dependency 9505: QuestCopyUtils */).getExternalCtaLabel(quest)}
/>
{isShareableQuest2 && <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Ej3B3Y)} onPress={value10}>{((ShareIcon) => <ShareIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(9798) /* metro dependency 9798: ShareIcon */).ShareIcon)}</PressableOpacity>}
</Stack>
</View>
);
return (
<SafeAreaPaddingView bottom style={styles.wrapper}>
{items2}
</SafeAreaPaddingView>
);
function _fun104083() { // fn#104083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:1571, offset: 0x02284692, size: 75 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const VIDEO_PLAYER_THUMBNAIL = QuestAssetType.VIDEO_PLAYER_THUMBNAIL;
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_THUMBNAIL, undefined, true]);
}
function VideoQuestModalContentCompletedT() { // fn#104084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:2048, owner: VideoQuestModalContentCompleted.T, offset: 0x022846dd, size: 206 bytes, params: 1, frame: 24
const object = {};
let value = environment.__proto__;
let withDelay = ReanimatedRexportModule.withDelay;
let withSpring = SpringModule.withSpring;
let binding = env0_1;
const value3 = binding.get();
binding = env1_8;
object.opacity = Reflect.apply(withDelay, ReanimatedRexportModule, [125, Reflect.apply(withSpring, SpringModule,
[value3, binding])]);
const object2 = {};
value = ReanimatedRexportModule;
withDelay = value.withDelay;
withSpring = SpringModule.withSpring;
object2.translateY = Reflect.apply(withDelay, value, [125, Reflect.apply(withSpring, SpringModule,
[ReanimatedRexportModule.interpolate(env0_1.get(), [0, 1], [75, 0]), binding])]);
object.transform = [object2];
return object;
}
function _fun104085() { // fn#104085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:2517, offset: 0x01b81401, size: 24 bytes, params: 1, frame: 11
env0_1.set(1);
}
function _fun104086() { // fn#104086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:2597, offset: 0x022847ab, size: 95 bytes, params: 1, frame: 17
var value2;
var moduleValue;
var showShareActionSheet;
var moduleValue2;
if (env0_2) {
value2 = environment.__proto__;
moduleValue = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
showShareActionSheet = moduleValue.showShareActionSheet;
moduleValue2 = require(9505) /* metro dependency 9505: QuestCopyUtils */;
Reflect.apply(showShareActionSheet, moduleValue, [{message: moduleValue2.getQuestUrl(quest.id)},
'Video Quest Modal']);
}
}
function _fun104087() { // fn#104087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:2724, offset: 0x0228480a, size: 45 bytes, params: 1, frame: 14
const value = environment.__proto__;
(DeviceOrientationModule).lockOrientation('PORTRAIT', true);
}
}
const items6 = [r14];
if (value7) {
r14 = !value7;
} else {
ShinyButton = (require(1305) /* metro dependency 1305: native */).ShinyButton;
r14 = <ShinyButton loading={isClaiming} onPress={claim} style={styles.ctaPrimary} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cfY4PE)} color={(require(1305) /* metro dependency 1305: native */).ButtonColors.GREY} />;
}
items6[1] = r14;
items2[1] = <ReanimatedNativeView style={items3}><Stack align="center" justify="center" spacing={PX_24} style={items4}>{items6}</Stack></ReanimatedNativeView>;
const items7 = [styles.content];
items7[1] = styles.contentEndCard;
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
const stack = <Stack2 spacing={PX_4} style={styles.contentEndCardHeaderCopy}><Text variant="heading-md/semibold" color="mobile-text-heading-primary" accessibilityRole="header">{quest.config.messages.gameTitle}</Text><Text variant="text-sm/medium" color="text-subtle">{quest.config.messages.gamePublisher}</Text></Stack2>;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
string = intl.string;
const YsCuyF = (require(1244) /* metro dependency 1244: indexNative */).t.YsCuyF;
const RetryIcon = (require(10234) /* metro dependency 10234: RetryIcon */).RetryIcon;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
const stack2 = <Stack direction="horizontal" justify="space-between" style={styles.contentEndCardHeader}>{stack}<PressableOpacity accessibilityRole="button" accessibilityLabel={Reflect.apply(string,
intl,
[YsCuyF])} onPress={onRestartVideo}><RetryIcon color={INTERACTIVE_TEXT_DEFAULT} /></PressableOpacity></Stack>;
const value28 = value3 != null;
if (value28) {
r10 = <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.r8BzFT,
{gameTitle: quest.config.messages.gameTitle})} onPress={value5}>{((Component) => <Component style={styles.image} source={{uri: value3.url}} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</PressableOpacity>;
} else {
r10 = value28;
}
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[2] = <View style={items7}>{stack2}{r10}<Stack direction="horizontal" spacing={PX_16} align="center"><Button grow onPress={value5} text={(require(9505) /* metro dependency 9505: QuestCopyUtils */).getExternalCtaLabel(quest)} />{isShareableQuest2 && <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Ej3B3Y)} onPress={value10}>{((ShareIcon) => <ShareIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(9798) /* metro dependency 9798: ShareIcon */).ShareIcon)}</PressableOpacity>}</Stack></View>;
return (
<SafeAreaPaddingView bottom style={styles.wrapper}>
{items2}
</SafeAreaPaddingView>
);
}
function _fun104083() { // fn#104083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:1571, offset: 0x02284692, size: 75 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const VIDEO_PLAYER_THUMBNAIL = QuestAssetType.VIDEO_PLAYER_THUMBNAIL;
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_THUMBNAIL, undefined, true]);
}
function VideoQuestModalContentCompletedT() { // fn#104084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:2048, owner: VideoQuestModalContentCompleted.T, offset: 0x022846dd, size: 206 bytes, params: 1, frame: 24
const object3 = {};
let value = environment.__proto__;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let withDelay = reanimatedRexportModule.withDelay;
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
let binding = env0_1;
const value3 = binding.get();
binding = env1_8;
object3.opacity = Reflect.apply(withDelay, reanimatedRexportModule, [125, Reflect.apply(withSpring, springModule,
[value3, binding])]);
const object4 = {};
value = reanimatedRexportModule;
withDelay = value.withDelay;
const moduleValue3 = springModule;
withSpring = moduleValue3.withSpring;
const moduleValue4 = reanimatedRexportModule;
object4.translateY = Reflect.apply(withDelay, value, [125, Reflect.apply(withSpring, moduleValue3,
[moduleValue4.interpolate(env0_1.get(), [0, 1], [75, 0]), binding])]);
object3.transform = [object4];
return object3;
}
function _fun104086() { // fn#104086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:2597, offset: 0x022847ab, size: 95 bytes, params: 1, frame: 17
var value2;
var moduleValue;
var showShareActionSheet;
var moduleValue2;
if (env0_2) {
value2 = environment.__proto__;
moduleValue = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
showShareActionSheet = moduleValue.showShareActionSheet;
moduleValue2 = require(9505) /* metro dependency 9505: QuestCopyUtils */;
Reflect.apply(showShareActionSheet, moduleValue, [{message: moduleValue2.getQuestUrl(quest.id)},
'Video Quest Modal']);
}
}
function _fun104087() { // fn#104087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:2724, offset: 0x0228480a, size: 45 bytes, params: 1, frame: 14
const value = environment.__proto__;
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('PORTRAIT', true);
}
global.__d(_fun104081, 13629, [31, 27, 33, 4501, 697, 13597, 9495, 9513, 13627, 13593, 7589, 4017, 4577, 7114, 9212,
9505, 7717, 13573, 6618, 4572, 4573, 1244, 13618, 8141, 13619, 1305, 5278, 10234, 5475, 4578, 9798,
2]) /* metro module 13629, dependencies: [31, 27, 33, 4501, 697, 13597, 9495, 9513, 13627, 13593, 7589, 4017, 4577, 7114, 9212, 9505, 7717, 13573, 6618, 4572, 4573, 1244, 13618, 8141, 13619, 1305, 5278, 10234, 5475, 4578, 9798, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,18 +1,23 @@
/* Metro module 13597; source: modules/quests/native/VideoQuestModal/VideoQuestModalContext.tsx; dependencies: [31, 44, 2] */
import Module00044 from '../../../../by-id/module-00044.js'; /* Metro dependency 44 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun103345(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13787:6, offset: 0x02263366, size: 152 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
let value = ReactModule;
value = value.createContext({'quest': null, 'videoSessionId': ''});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalContext.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalContext.tsx');
exports.default = value;
exports.useVideoQuestModalContext = useVideoQuestModalContext;
function useVideoQuestModalContext() { // fn#103346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13787:302, offset: 0x022633fe, size: 64 bytes, params: 1, frame: 14
const value2 = env0_2.useContext(env0_3);
(Module00044)(value2 != null,
'useVideoQuestModalContext must be used within a VideoQuestModalProvider');
return value2;
}
}
function useVideoQuestModalContext() { // fn#103346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13787:302, offset: 0x022633fe, size: 64 bytes, params: 1, frame: 14
const value2 = env0_2.useContext(env0_3);
(importDefault(44) /* metro dependency 44 */)(value2 != null,
'useVideoQuestModalContext must be used within a VideoQuestModalProvider');
return value2;
}
global.__d(_fun103345, 13597, [31, 44, 2]) /* metro module 13597, dependencies: [31, 44, 2] */;
@@ -1,91 +1,108 @@
/* Metro module 13625; source: modules/quests/native/VideoQuestModal/VideoQuestModalHeader.tsx; dependencies: [31, 27, 7095, 33, 4501, 697, 13597, 9483, 7116, 3769, 9522, 4573, 1244, 13618, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as Module03769Module from '../../../../by-id/module-03769.js'; /* Metro dependency 3769 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as VideoQuestUIStoreModule from '../../VideoQuestUIStore.tsx'; /* Metro dependency 7095 */
import * as QuestHooksModule from '../../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as VideoQuestModalContextModule from './VideoQuestModalContext.tsx'; /* Metro dependency 13597 */
function _fun104063(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13822:6, offset: 0x02282e41, size: 365 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(7095) /* metro dependency 7095: VideoQuestUIStore */).useVideoQuestUIStore;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {videoContentHeaderWrapper: {'flexDirection': 'row', 'justifyContent': 'space-between',
object = {videoContentHeaderWrapper: {'flexDirection': 'row', 'justifyContent': 'space-between',
'alignItems': 'flex-start'}};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.videoContentHeading = {'flexDirection': 'column', 'flexShrink': 1, gap: PX_4};
object2.subheader = {opacity: 0.6};
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object2.textShadow = {'margin': -15, 'padding': 15, 'textShadowColor': null, 'textShadowOffset': null,
const PX_4 = (Native).space.PX_4;
object.videoContentHeading = {'flexDirection': 'column', 'flexShrink': 1, gap: PX_4};
object.subheader = {opacity: 0.6};
const BLACK = (Native).colors.BLACK;
object.textShadow = {'margin': -15, 'padding': 15, 'textShadowColor': null, 'textShadowOffset': null,
'textShadowRadius': 15, textShadowColor: BLACK, textShadowOffset: {'width': 0, 'height': 0}};
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalHeader.tsx');
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalHeader.tsx');
exports.default = VideoQuestModalHeader;
}
function VideoQuestModalHeader({closeButtonIconColor, onClose, style, showCurrentVideoTime, withTextShadow}) { // fn#104064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13822:544, offset: 0x02282fae, size: 625 bytes, params: 2, frame: 35
const r14 = showCurrentVideoTime !== undefined && showCurrentVideoTime;
let r17 = withTextShadow !== undefined && withTextShadow;
const styles = useStyles();
const videoQuestModalContextModule = require(13597) /* metro dependency 13597: VideoQuestModalContext */;
const useVideoQuestModalContext = videoQuestModalContextModule.useVideoQuestModalContext;
const quest = Reflect.apply(useVideoQuestModalContext, videoQuestModalContextModule, []).quest;
const value5 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
const value6 = useVideoQuestUIStore(_fun104065, (require(3769) /* metro dependency 3769 */).shallow);
const userStatus = quest.userStatus;
const value7 = userStatus?.completedAt != null;
const r12 = value7 ? r14 ? (require(9522) /* metro dependency 9522: VideoQuestUtils */).getVideoQuestProgressRemainingAccessibilityLabel(value5,
value7) : undefined : (require(9522) /* metro dependency 9522: VideoQuestUtils */).getVideoQuestProgressRemainingAccessibilityLabel(value5,
value7);
const items2 = [styles.videoContentHeaderWrapper, style];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const r7 = r17 && styles.textShadow;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const EQa7os = (require(1244) /* metro dependency 1244: indexNative */).t.EQa7os;
const text = <Text variant="heading-md/semibold" color="white" style={r7}>{Reflect.apply(formatToPlainString, intl,
[EQa7os, {questName: quest.config.messages.questName}])}</Text>;
r17 = r17 && styles.textShadow;
return (
<View style={items2}>
<View style={styles.videoContentHeading}>
{text}
<Text
variant="heading-sm/semibold"
color="white"
accessibilityLabel={r12}
style={[styles.subheader, r17]}
>
{value7 ? r14 ? value6 : quest.config.messages.gamePublisher : value6}
</Text>
function VideoQuestModalHeader({closeButtonIconColor, onClose, style, showCurrentVideoTime, withTextShadow}) { // fn#104064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13822:544, offset: 0x02282fae, size: 625 bytes, params: 2, frame: 35
const r14 = showCurrentVideoTime !== undefined && showCurrentVideoTime;
let r17 = withTextShadow !== undefined && withTextShadow;
const styles = useStyles();
const useVideoQuestModalContext = VideoQuestModalContextModule.useVideoQuestModalContext;
const quest = Reflect.apply(useVideoQuestModalContext, VideoQuestModalContextModule, []).quest;
const value5 = (QuestHooksModule).useQuestTaskDetails(quest);
const value6 = useVideoQuestUIStore(_fun104065, (Module03769Module).shallow);
const userStatus = quest.userStatus;
const value7 = userStatus?.completedAt != null;
const r12 = value7 ? r14 ? (require(9522) /* metro dependency 9522: VideoQuestUtils */).getVideoQuestProgressRemainingAccessibilityLabel(value5,
value7) : undefined : (require(9522) /* metro dependency 9522: VideoQuestUtils */).getVideoQuestProgressRemainingAccessibilityLabel(value5,
value7);
const items2 = [styles.videoContentHeaderWrapper, style];
const Text = (TextModule).Text;
const r7 = r17 && styles.textShadow;
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const EQa7os = (IndexNativeModule).t.EQa7os;
const text = (
<Text
variant="heading-md/semibold"
color="white"
style={r7}
>
{Reflect.apply(formatToPlainString, intl, [EQa7os, {questName: quest.config.messages.questName}])}
</Text>
);
r17 = r17 && styles.textShadow;
return (
<View style={items2}>
<View style={styles.videoContentHeading}>
{text}
<Text
variant="heading-sm/semibold"
color="white"
accessibilityLabel={r12}
style={[styles.subheader, r17]}
>
{value7 ? r14 ? value6 : quest.config.messages.gamePublisher : value6}
</Text>
</View>
{((Component) => <Component iconColor={closeButtonIconColor} onClose={onClose} />)(importDefault(13618) /* metro dependency 13618: VideoQuestModalCloseButton */)}
</View>
{((Component) => <Component iconColor={closeButtonIconColor} onClose={onClose} />)(importDefault(13618) /* metro dependency 13618: VideoQuestModalCloseButton */)}
</View>
);
}
);
function _fun104065({videoProgress}) { // fn#104065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13822:795, offset: 0x0228321f, size: 166 bytes, params: 2, frame: 17
var r0;
var object;
var progressSeconds;
const property = videoProgress[quest.id];
if (property != null) {
r0 = property;
} else {
object = {};
progressSeconds = env0_1.progressSeconds;
object.timestampSec = progressSeconds;
object.duration = env0_1.targetSeconds;
progressSeconds = env0_1.progressSeconds;
object.maxTimestampSec = progressSeconds;
r0 = object;
}
let value = environment.__proto__;
value = Reflect.apply((require(7116) /* metro dependency 7116: QuestTaskUtils */).parseMinutesAndSecondsFromSeconds,
value, [r0.duration - r0.timestampSec]);
const questTaskUtilsModule = require(7116) /* metro dependency 7116: QuestTaskUtils */;
return questTaskUtilsModule.formatWatchTaskTime(value.minutes, value.seconds);
}
function _fun104065({videoProgress}) { // fn#104065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13822:795, offset: 0x0228321f, size: 166 bytes, params: 2, frame: 17
var r0;
var object2;
var progressSeconds;
const property = videoProgress[quest.id];
if (property != null) {
r0 = property;
} else {
object2 = {};
progressSeconds = env0_1.progressSeconds;
object2.timestampSec = progressSeconds;
object2.duration = env0_1.targetSeconds;
progressSeconds = env0_1.progressSeconds;
object2.maxTimestampSec = progressSeconds;
r0 = object2;
}
let value = environment.__proto__;
value = Reflect.apply((require(7116) /* metro dependency 7116: QuestTaskUtils */).parseMinutesAndSecondsFromSeconds,
value, [r0.duration - r0.timestampSec]);
const questTaskUtilsModule = require(7116) /* metro dependency 7116: QuestTaskUtils */;
return questTaskUtilsModule.formatWatchTaskTime(value.minutes, value.seconds);
}
global.__d(_fun104063, 13625, [31, 27, 7095, 33, 4501, 697, 13597, 9483, 7116, 3769, 9522, 4573, 1244, 13618,
2]) /* metro module 13625, dependencies: [31, 27, 7095, 33, 4501, 697, 13597, 9483, 7116, 3769, 9522, 4573, 1244, 13618, 2] */;
@@ -1,67 +1,81 @@
/* Metro module 13619; source: modules/quests/native/VideoQuestModal/VideoQuestModalReward.tsx; dependencies: [31, 33, 4501, 13597, 9483, 9480, 4572, 697, 13620, 4573, 1244, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import QuestProgressIndicator from '../QuestProgressIndicator.tsx'; /* Metro dependency 13620 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as StackNativeModule from '../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as QuestUtilsNativeModule from '../QuestUtils.native.tsx'; /* Metro dependency 9480 */
import * as QuestHooksModule from '../../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as VideoQuestModalContextModule from './VideoQuestModalContext.tsx'; /* Metro dependency 13597 */
function _fun104020(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13816:6, offset: 0x0227bb82, size: 204 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(33) /* metro dependency 33 */;
const env0_4 = value2.jsx;
const env0_5 = value2.jsxs;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({questName: {textAlign: 'center'}});
let value = ReactModule;
const env0_6 = (CreateStylesModule).createStyles({questName: {textAlign: 'center'}});
value = value.memo(VideoQuestModalReward);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalReward.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalReward.tsx');
exports.default = value;
}
function VideoQuestModalReward({style, withQuestName, withRewardAvailableCopy, size, withRewardTileAnimation}) { // fn#104021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13816:204, offset: 0x0227bc4e, size: 651 bytes, params: 2, frame: 32
const Text = (TextModule).Text;
var object2;
var questName;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var EAYZAr;
let r10 = withQuestName === undefined || withQuestName;
let r8 = withRewardAvailableCopy === undefined || withRewardAvailableCopy;
const r21 = size === undefined ? 'lg' : size;
const useVideoQuestModalContext = VideoQuestModalContextModule.useVideoQuestModalContext;
const quest = Reflect.apply(useVideoQuestModalContext, VideoQuestModalContextModule, []).quest;
const value2 = (QuestHooksModule).useQuestTaskDetails(quest);
const value3 = env0_3.useCallback(_fun104022, [quest.id]);
const styles = useStyles();
const Stack = (StackNativeModule).Stack;
const PX_24 = (Native).space.PX_24;
const value4 = ((Component) => <Component hasConfetti quest={quest} size={r21} progress={value2.percentComplete} onPress={value3} withAnimation={withRewardTileAnimation} />)(QuestProgressIndicator);
const Stack2 = (StackNativeModule).Stack;
const PX_4 = (Native).space.PX_4;
if (r10) {
object2 = {'variant': 'heading-lg/semibold', 'color': 'text-strong'};
questName = styles.questName;
object2.style = questName;
formatToPlainString = intl.formatToPlainString;
EAYZAr = (require(1244) /* metro dependency 1244: indexNative */).t.EAYZAr;
questName = quest.config.messages.questName;
r10 = (
<Text {...object2}>
{Reflect.apply(formatToPlainString, intl, [EAYZAr, {questName: questName}])}
</Text>
);
}
r8 = r8 && <Text variant="heading-sm/medium" color="text-subtle">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1Wvve2'])}</Text>;
return (
<Stack
justify="center"
align="center"
spacing={PX_24}
style={style}
>
{value4}
<Stack2 align="center" spacing={PX_4}>
{r10}
{r8}
</Stack2>
</Stack>
);
function _fun104022() { // fn#104022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13816:481, offset: 0x0227bed9, size: 57 bytes, params: 1, frame: 13
const value = environment.__proto__;
(QuestUtilsNativeModule).openRewardDetailsBottomSheet({questId: quest.id});
}
function VideoQuestModalReward({style, withQuestName, withRewardAvailableCopy, size, withRewardTileAnimation}) { // fn#104021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13816:204, offset: 0x0227bc4e, size: 651 bytes, params: 2, frame: 32
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var object;
var questName;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var EAYZAr;
let r10 = withQuestName === undefined || withQuestName;
let r8 = withRewardAvailableCopy === undefined || withRewardAvailableCopy;
const r21 = size === undefined ? 'lg' : size;
const videoQuestModalContextModule = require(13597) /* metro dependency 13597: VideoQuestModalContext */;
const useVideoQuestModalContext = videoQuestModalContextModule.useVideoQuestModalContext;
const quest = Reflect.apply(useVideoQuestModalContext, videoQuestModalContextModule, []).quest;
const value2 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
const value3 = env0_3.useCallback(_fun104022, [quest.id]);
const styles = useStyles();
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
const value4 = ((Component) => <Component hasConfetti quest={quest} size={r21} progress={value2.percentComplete} onPress={value3} withAnimation={withRewardTileAnimation} />)(importDefault(13620) /* metro dependency 13620: QuestProgressIndicator */);
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
if (r10) {
object = {'variant': 'heading-lg/semibold', 'color': 'text-strong'};
questName = styles.questName;
object.style = questName;
formatToPlainString = intl.formatToPlainString;
EAYZAr = (require(1244) /* metro dependency 1244: indexNative */).t.EAYZAr;
questName = quest.config.messages.questName;
r10 = <Text {...object}>{Reflect.apply(formatToPlainString, intl, [EAYZAr, {questName: questName}])}</Text>;
}
r8 = r8 && <Text variant="heading-sm/medium" color="text-subtle">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1Wvve2'])}</Text>;
return (
<Stack
justify="center"
align="center"
spacing={PX_24}
style={style}
>
{value4}
<Stack2 align="center" spacing={PX_4}>
{r10}
{r8}
</Stack2>
</Stack>
);
}
function _fun104022() { // fn#104022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13816:481, offset: 0x0227bed9, size: 57 bytes, params: 1, frame: 13
const value = environment.__proto__;
(require(9480) /* metro dependency 9480: QuestUtilsNative */).openRewardDetailsBottomSheet({questId: quest.id});
}
global.__d(_fun104020, 13619, [31, 33, 4501, 13597, 9483, 9480, 4572, 697, 13620, 4573, 1244,
2]) /* metro module 13619, dependencies: [31, 33, 4501, 13597, 9483, 9480, 4572, 697, 13620, 4573, 1244, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,48 +1,53 @@
/* Metro module 13528; source: modules/quests/native/VideoQuestModal/VideoQuestPlayerControlButton.tsx; dependencies: [31, 33, 4501, 697, 674, 5278, 4564, 2] */
import Module00674 from '../../../../by-id/module-00674.js'; /* Metro dependency 674 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
function _fun102846(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13718:6, offset: 0x0224b179, size: 330 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.disabled = {opacity: 0.5};
const object5 = {};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object5.overflow = 'hidden';
object2.container = object5;
const object6 = {};
const value3 = importDefault(674) /* metro dependency 674 */;
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
object.disabled = {opacity: 0.5};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.overflow = 'hidden';
object.container = object3;
const object4 = {};
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
object6.backgroundColor = value3(BLACK).alpha(0.5).hex();
object4.backgroundColor = Module00674(BLACK).alpha(0.5).hex();
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.padding = PX_12;
object2.blur = object6;
const env0_4 = Reflect.apply(createStyles, createStylesModule, [object2]);
object4.padding = PX_12;
object.blur = object4;
const env0_4 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(_fun102847);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestPlayerControlButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestPlayerControlButton.tsx');
exports.VideoQuestPlayerControlButton = value;
function _fun102847(a0) { // fn#102847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13718:348, offset: 0x0224b2c3, size: 210 bytes, params: 2, frame: 22
const style = a0.style;
const children = a0.children;
let value = Object.create(null);
value.style = 0;
value.children = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const styles = useStyles();
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {style: [styles.container, value2.disabled && styles.disabled, style], ...value2};
value = importDefault(4564) /* metro dependency 4564: VisualEffectView */;
value = ((Component) => <Component style={styles.blur} blurAmount={0.2} blurStyle="default" blurTheme="dark">{children}</Component>)(value);
return (
<PressableOpacity {...pressableOpacityProps}>
{value}
</PressableOpacity>
);
}
}
function _fun102847(a0) { // fn#102847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13718:348, offset: 0x0224b2c3, size: 210 bytes, params: 2, frame: 22
const style = a0.style;
const children = a0.children;
let value = Object.create(null);
value.style = 0;
value.children = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const styles = useStyles();
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {style: [styles.container, value2.disabled && styles.disabled, style], ...value2};
value = importDefault(4564) /* metro dependency 4564: VisualEffectView */;
value = ((Component) => <Component style={styles.blur} blurAmount={0.2} blurStyle="default" blurTheme="dark">{children}</Component>)(value);
return (
<PressableOpacity {...pressableOpacityProps}>
{value}
</PressableOpacity>
);
}
global.__d(_fun102846, 13528, [31, 33, 4501, 697, 674, 5278, 4564,
2]) /* metro module 13528, dependencies: [31, 33, 4501, 697, 674, 5278, 4564, 2] */;
@@ -1,466 +1,484 @@
/* Metro module 13602; source: modules/quests/native/VideoQuestModal/VideoQuestPlayerRefactor.tsx; dependencies: [57, 31, 7095, 6528, 33, 13597, 9483, 9495, 3769, 13523, 13603, 7116, 9564, 13606, 1582, 9522, 9484, 13614, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import VideoQuestUIStore from '../../VideoQuestUIStore.tsx'; /* Metro dependency 7095 */
import UseVideoQuestPlayerAnalytics from './hooks/useVideoQuestPlayerAnalytics.tsx'; /* Metro dependency 13603 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as Module03769Module from '../../../../by-id/module-03769.js'; /* Metro dependency 3769 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestTaskUtilsModule from '../../utils/QuestTaskUtils.tsx'; /* Metro dependency 7116 */
import * as QuestHooksModule from '../../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as AndroidRNVHttpEngineExperimentModule from '../../../media_uploads/experiments/AndroidRNVHttpEngineExperiment.tsx'; /* Metro dependency 9564 */
import * as AdVideoPlayerModule from '../AdVideoPlayer.tsx'; /* Metro dependency 13523 */
import * as VideoQuestModalContextModule from './VideoQuestModalContext.tsx'; /* Metro dependency 13597 */
import * as VideoQuestCaptionsModule from './captions/VideoQuestCaptions.tsx'; /* Metro dependency 13614 */
function _fun103379(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:6, offset: 0x02265caa, size: 230 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const videoQuestUIStore = importDefault(7095) /* metro dependency 7095: VideoQuestUIStore */;
const env0_6 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(_fun103380);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestPlayerRefactor.tsx');
const PlayerState = (require(13523) /* metro dependency 13523: AdVideoPlayer */).PlayerState;
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestPlayerRefactor.tsx');
const PlayerState = (AdVideoPlayerModule).PlayerState;
exports.PlayerState = PlayerState;
exports.VideoQuestPlayer = value;
}
function _fun103380({style, onLoad, onEnd, onToggleFullscreen, orientation, contentInsets, handleToggleCaptions, handleOpenTranscript, isFullscreen, externallyPaused, captionsEnabled, sourceQuestContent, hasCaptionAsset, hasTranscriptAsset}) { // fn#103380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:186, offset: 0x02265d90, size: 1883 bytes, params: 2, frame: 57
const env0_3 = orientation;
const env0_4 = contentInsets;
captionsEnabled = !(captionsEnabled === undefined) && captionsEnabled;
hasCaptionAsset = hasCaptionAsset === undefined || hasCaptionAsset;
hasTranscriptAsset = hasTranscriptAsset === undefined || hasTranscriptAsset;
const {quest,
videoSessionId} = (require(13597) /* metro dependency 13597: VideoQuestModalContext */).useVideoQuestModalContext();
const value7 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
const userStatus = quest.userStatus;
const value8 = userStatus?.completedAt != null;
let binding = env0_4;
const value9 = binding.useMemo(_fun103381, [quest]);
const value10 = binding.useMemo(_fun103382, [quest]);
const r17 = value10?.url != null ? (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType.VIDEO_PLAYER_VIDEO_HLS : (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType.VIDEO_PLAYER_VIDEO;
binding = env0_4;
let useState = binding.useState;
let targetSeconds = value7.targetSeconds;
const value11 = Reflect.apply(useState, binding, [targetSeconds]);
const binding2 = env0_3;
const value12 = binding2(value11, 2);
const property = value12[0];
const env0_11 = value12[1];
targetSeconds = value7.targetSeconds;
const value13 = VideoQuestUIStore(function(a0) {
return a0.setVideoProgress;
});
const value14 = VideoQuestUIStore(_fun103384, (require(3769) /* metro dependency 3769 */).shallow);
const value15 = binding.useRef(null);
useState = binding.useState;
const PlayerState = (require(13523) /* metro dependency 13523: AdVideoPlayer */).PlayerState;
const LOADING = PlayerState.LOADING;
const value16 = binding2(Reflect.apply(useState, binding, [LOADING]), 2);
const property2 = value16[0];
const env0_15 = value16[1];
const env0_16 = binding.useRef(value7.progressSeconds);
const defaultImport = importDefault(13603) /* metro dependency 13603: useVideoQuestPlayerAnalytics */;
let id = quest.id;
const {handleBufferAnalytics, handleEndAnalytics, handleErrorAnalytics, handleLoadAnalytics,
handleLoadStartAnalytics, handlePausePlaybackAnalytics, handleProgressAnalytics, handleReadyForDisplayAnalytics,
handleResumePlaybackAnalytics, handleSeekAnalytics} = defaultImport({duration: property,
isQuestCompleted: value8, playerState: property2, questId: id, videoSessionId: videoSessionId,
videoAssetId: r17, sourceQuestContent: sourceQuestContent});
const env0_27 = binding.useRef(null);
id = quest.id;
const gameTitle = quest.config.messages.gameTitle;
const r45 = value10?.url ?? value9?.url;
const defaultWatchVideoTask = (require(7116) /* metro dependency 7116: QuestTaskUtils */).getDefaultWatchVideoTask(quest.config);
const videoTitle = defaultWatchVideoTask == null ? undefined : defaultWatchVideoTask.messages.videoTitle;
const r18 = value10?.url != null ? 'hls' : 'mp4';
const value21 = (require(9564) /* metro dependency 9564: AndroidRNVHttpEngineExperiment */).useRnvHttpEngine();
binding = env0_4;
binding.useEffect(_fun103385, [id, gameTitle, targetSeconds, r45, videoTitle, r18]);
const value22 = binding.useCallback(_fun103387, []);
const value23 = binding.useCallback(_fun103388, [handleReadyForDisplayAnalytics]);
const value24 = binding.useCallback(_fun103389, [handleLoadAnalytics, onLoad]);
const value25 = binding.useCallback(_fun103390, [property, handleSeekAnalytics, quest.id, value13]);
const env0_33 = binding.useRef(0);
const env0_34 = binding.useRef(0);
const value26 = binding.useCallback(_fun103391, [quest, value7.taskType, handleProgressAnalytics, value13]);
const value27 = binding.useCallback(_fun103392, [property, quest, handleEndAnalytics, onEnd]);
const value28 = binding.useCallback(_fun103393, [handleLoadStartAnalytics]);
const value29 = binding.useCallback(_fun103394, [handleErrorAnalytics]);
const value30 = binding.useCallback(_fun103395, []);
const value31 = binding.useCallback(_fun103396, []);
const value32 = binding.useCallback(_fun103397, [handleResumePlaybackAnalytics]);
const value33 = binding.useCallback(_fun103398, [handlePausePlaybackAnalytics]);
const value34 = binding.useCallback(_fun103399, [handleBufferAnalytics]);
const value35 = binding.useCallback(_fun103400, [quest, captionsEnabled, contentInsets]);
const value36 = binding.useMemo(_fun103401, [value10, value9]);
const value37 = binding.useCallback(function() {
if (onToggleFullscreen != null) {
onToggleFullscreen({orientation: orientation});
}
}, [onToggleFullscreen, orientation]);
if (value36 == null) {
return null;
}
const value38 = orientation === 'landscape';
const AdVideoPlayer = (require(13523) /* metro dependency 13523: AdVideoPlayer */).AdVideoPlayer;
return (
<AdVideoPlayer
source={value36}
httpEngine={value21}
initialProgress={value14}
contentDuration={targetSeconds}
allowUnrestrictedSeeking={value8}
disableResumeOnLoad={value8}
style={style}
isFullscreen={isFullscreen}
externallyPaused={externallyPaused}
contentInsets={contentInsets}
renderCaptions={value35}
onLoadStart={value28}
onLoad={value24}
onReadyForDisplay={value23}
onSeek={value25}
onBuffer={value34}
onError={value29}
onEnd={value27}
onPlayerStateChange={value22}
onResumePlayback={value32}
onPausePlayback={value33}
onProgress={value26}
onVideoTracks={value30}
onVideoLayout={value31}
videoRef={value15}
bufferingSpinnerPlacement={value38 ? 'center' : 'top-left'}
captionsEnabled={captionsEnabled}
showCaptionsButton={value38 && hasCaptionAsset}
showTranscriptButton={value38 && hasTranscriptAsset}
showFullscreenButton={value38}
showProgress={value38}
onToggleCaptions={handleToggleCaptions}
onOpenTranscript={handleOpenTranscript}
onToggleFullscreen={value37}
/>
);
}
function _fun103381() { // fn#103381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:616, offset: 0x022664eb, size: 75 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const VIDEO_PLAYER_VIDEO = QuestAssetType.VIDEO_PLAYER_VIDEO;
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_VIDEO, undefined, true]);
}
function _fun103382() { // fn#103382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:716, offset: 0x02266536, size: 75 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const VIDEO_PLAYER_VIDEO_HLS = QuestAssetType.VIDEO_PLAYER_VIDEO_HLS;
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_VIDEO_HLS, undefined, true]);
}
function _fun103384({videoProgress}) { // fn#103384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:1031, offset: 0x0226658c, size: 76 bytes, params: 2, frame: 4
var r0;
var object2;
var progressSeconds;
const property = videoProgress[quest.id];
if (property != null) {
r0 = property;
} else {
object2 = {};
progressSeconds = env0_7.progressSeconds;
object2.timestampSec = progressSeconds;
object2.duration = env0_10;
progressSeconds = env0_7.progressSeconds;
object2.maxTimestampSec = progressSeconds;
r0 = object2;
}
return r0;
}
function _fun103385() { // fn#103385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:1993, offset: 0x022665d8, size: 336 bytes, params: 1, frame: 17
var constants;
var binding;
var MobileMuxWrapper;
var value4;
var mobileMuxWrapper;
if (env0_30 != null) {
if (env0_30.length === 0) {
return undefined;
}
var current = env0_14.current;
if (current == null) {
return undefined;
}
var moduleValue = require(13606) /* metro dependency 13606: videoQoe */;
var getVideoQoEMetricsConfig = moduleValue.getVideoQoEMetricsConfig;
var object2 = {};
var VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
object2.location = VIDEO_MODAL_MOBILE;
if (Reflect.apply(getVideoQoEMetricsConfig, moduleValue, [object2]).externalAnalyticsEnabled) {
constants = (require(1582) /* metro dependency 1582: ClientInfoUtils */).getConstants();
object2 = {};
current = env0_14.current;
object2.videoRef = current;
object2.feature = 'quests';
object2.appVersion = constants.Version;
object2.releaseChannel = constants.ReleaseChannel;
object2.contentMetadata = {contentId: env0_30, videoStreamType: env0_32, contentType: 'quests',
durationMs: 1000 * targetSeconds, title: videoTitle, questId: id, gameName: gameTitle};
binding = env0_27;
MobileMuxWrapper = (require(13606) /* metro dependency 13606: videoQoe */).MobileMuxWrapper;
value4 = Object.create(MobileMuxWrapper.prototype, {constructor: {value: MobileMuxWrapper}});
mobileMuxWrapper = new MobileMuxWrapper(object2);
binding.current = mobileMuxWrapper instanceof Object ? mobileMuxWrapper : value4;
current = env0_27.current;
current.initialize();
return _fun103386;
}
}
}
function _fun103387(a0) { // fn#103387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2596, offset: 0x02266778, size: 19 bytes, params: 2, frame: 11
env0_15(a0);
}
function _fun103388() { // fn#103388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2629, offset: 0x0226678b, size: 40 bytes, params: 1, frame: 10
handleReadyForDisplayAnalytics();
const current = env0_27.current;
if (current != null) {
current.onReadyForDisplay();
}
}
function _fun103389(a0) { // fn#103389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2715, offset: 0x022667b3, size: 199 bytes, params: 2, frame: 19
const duration = a0.duration;
const videoTracks = a0.videoTracks;
const trackId = a0.trackId;
const naturalSize = a0.naturalSize;
env0_11(duration);
handleLoadAnalytics();
let current = env0_27.current;
if (current != null) {
current.onLoad(duration);
}
if (naturalSize != null) {
current = env0_27.current;
if (current != null) {
current.updateVideoSourceDimensions(naturalSize.width, naturalSize.height);
}
}
if (videoTracks != null && videoTracks.length > 0 && trackId != null && trackId.length > 0) {
current = env0_27.current;
if (current != null) {
current.onVideoTrackChange(trackId, videoTracks);
}
}
if (onLoad != null) {
onLoad(a0);
}
}
function _fun103390(a0) { // fn#103390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3045, offset: 0x0226687a, size: 131 bytes, params: 2, frame: 17
env0_16.current = a0.currentTime;
if (env0_10 > 0) {
env0_13(quest.id, a0.currentTime, env0_10);
}
handleSeekAnalytics();
let current = env0_27.current;
if (current != null) {
current.updatePlayheadTime(a0.currentTime);
}
current = env0_27.current;
if (current != null) {
current.onSeek();
}
}
function _fun103391(a0) { // fn#103391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3271, offset: 0x022668fd, size: 345 bytes, params: 2, frame: 17
var value2;
var moduleValue;
var sendVideoProgress;
var questBinding;
var handleProgressAnalyticsBinding;
var progress;
var seekableDuration;
var value5;
var moduleValue2;
var updateOptimisticProgress;
var id;
var taskType;
let binding = env0_16;
let currentTime = a0.currentTime;
binding.current = currentTime;
currentTime = a0.currentTime;
let current = env0_33.current;
if (currentTime >= current) {
value2 = environment.__proto__;
moduleValue = require(9522) /* metro dependency 9522: VideoQuestUtils */;
sendVideoProgress = moduleValue.sendVideoProgress;
questBinding = quest;
currentTime = a0.currentTime;
Reflect.apply(sendVideoProgress, moduleValue, [questBinding, currentTime]);
handleProgressAnalyticsBinding = handleProgressAnalytics;
progress = a0.progress;
seekableDuration = a0.seekableDuration;
currentTime = a0.currentTime;
handleProgressAnalyticsBinding(progress, seekableDuration, currentTime);
binding = env0_33;
currentTime = a0.currentTime;
binding.current = currentTime + 6 + 2 * global.Math.random();
}
currentTime = a0.currentTime;
if (currentTime >= env0_34.current) {
value5 = environment.__proto__;
moduleValue2 = require(9484) /* metro dependency 9484: QuestActionCreators */;
updateOptimisticProgress = moduleValue2.updateOptimisticProgress;
function _fun103380({style, onLoad, onEnd, onToggleFullscreen, orientation, contentInsets, handleToggleCaptions, handleOpenTranscript, isFullscreen, externallyPaused, captionsEnabled, sourceQuestContent, hasCaptionAsset, hasTranscriptAsset}) { // fn#103380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:186, offset: 0x02265d90, size: 1883 bytes, params: 2, frame: 57
const orientation2 = orientation;
const contentInsets2 = contentInsets;
captionsEnabled = !(captionsEnabled === undefined) && captionsEnabled;
hasCaptionAsset = hasCaptionAsset === undefined || hasCaptionAsset;
hasTranscriptAsset = hasTranscriptAsset === undefined || hasTranscriptAsset;
const {quest,
videoSessionId} = (VideoQuestModalContextModule).useVideoQuestModalContext();
const value7 = (QuestHooksModule).useQuestTaskDetails(quest);
const userStatus = quest.userStatus;
const value8 = userStatus?.completedAt != null;
let binding = contentInsets2;
const value9 = binding.useMemo(_fun103381, [quest]);
const value10 = binding.useMemo(_fun103382, [quest]);
const r17 = value10?.url != null ? (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType.VIDEO_PLAYER_VIDEO_HLS : (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType.VIDEO_PLAYER_VIDEO;
binding = contentInsets2;
let useState = binding.useState;
let targetSeconds = value7.targetSeconds;
const value11 = Reflect.apply(useState, binding, [targetSeconds]);
const binding2 = orientation2;
const value12 = binding2(value11, 2);
const property = value12[0];
const env0_11 = value12[1];
targetSeconds = value7.targetSeconds;
const videoQuestUIStoreBinding = VideoQuestUIStore;
const value13 = videoQuestUIStoreBinding(function(a0) {
return a0.setVideoProgress;
});
const value14 = videoQuestUIStoreBinding(_fun103384, (Module03769Module).shallow);
const value15 = binding.useRef(null);
useState = binding.useState;
const PlayerState = (AdVideoPlayerModule).PlayerState;
const LOADING = PlayerState.LOADING;
const value16 = binding2(Reflect.apply(useState, binding, [LOADING]), 2);
const property2 = value16[0];
const env0_15 = value16[1];
const env0_16 = binding.useRef(value7.progressSeconds);
const defaultImport = UseVideoQuestPlayerAnalytics;
let id = quest.id;
const {handleBufferAnalytics, handleEndAnalytics, handleErrorAnalytics, handleLoadAnalytics,
handleLoadStartAnalytics, handlePausePlaybackAnalytics, handleProgressAnalytics, handleReadyForDisplayAnalytics,
handleResumePlaybackAnalytics, handleSeekAnalytics} = defaultImport({duration: property,
isQuestCompleted: value8, playerState: property2, questId: id, videoSessionId: videoSessionId,
videoAssetId: r17, sourceQuestContent: sourceQuestContent});
const env0_27 = binding.useRef(null);
id = quest.id;
taskType = env0_7.taskType;
currentTime = a0.currentTime;
Reflect.apply(updateOptimisticProgress, moduleValue2, [id, taskType, currentTime]);
binding = env0_34;
currentTime = a0.currentTime;
binding.current = currentTime + 1;
}
env0_13(quest.id, a0.currentTime, a0.seekableDuration);
current = env0_27.current;
if (current != null) {
current.onProgress(a0.currentTime);
}
}
function _fun103392() { // fn#103392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3722, offset: 0x02266a56, size: 127 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(9522) /* metro dependency 9522: VideoQuestUtils */;
value.sendVideoProgress(quest, env0_10);
handleEndAnalytics();
let current = env0_27.current;
if (current != null) {
current.onProgress(env0_10);
}
current = env0_27.current;
if (current != null) {
current.onEnd();
}
if (onEnd != null) {
onEnd();
}
}
function _fun103393() { // fn#103393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3885, offset: 0x02266ad5, size: 63 bytes, params: 1, frame: 12
handleLoadStartAnalytics();
let current = env0_27.current;
if (current != null) {
current.onLoadStart();
}
current = env0_27.current;
if (current != null) {
current.onPlay();
}
}
function _fun103394(a0) { // fn#103394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4000, offset: 0x02266b14, size: 45 bytes, params: 2, frame: 12
handleErrorAnalytics(a0);
const current = env0_27.current;
if (current != null) {
current.onError(a0);
}
}
function _fun103395({videoTracks, selectedVideoTrackId}) { // fn#103395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4075, offset: 0x02266b41, size: 91 bytes, params: 2, frame: 15
var current;
if (videoTracks != null && videoTracks.length > 0 && selectedVideoTrackId != null && selectedVideoTrackId.length > 0) {
current = env0_27.current;
if (current != null) {
current.onVideoTrackChange(selectedVideoTrackId, videoTracks);
const gameTitle = quest.config.messages.gameTitle;
const r45 = value10?.url ?? value9?.url;
const defaultWatchVideoTask = (QuestTaskUtilsModule).getDefaultWatchVideoTask(quest.config);
const videoTitle = defaultWatchVideoTask == null ? undefined : defaultWatchVideoTask.messages.videoTitle;
const r18 = value10?.url != null ? 'hls' : 'mp4';
const value21 = (AndroidRNVHttpEngineExperimentModule).useRnvHttpEngine();
binding = contentInsets2;
binding.useEffect(_fun103385, [id, gameTitle, targetSeconds, r45, videoTitle, r18]);
const value22 = binding.useCallback(_fun103387, []);
const value23 = binding.useCallback(_fun103388, [handleReadyForDisplayAnalytics]);
const value24 = binding.useCallback(_fun103389, [handleLoadAnalytics, onLoad]);
const value25 = binding.useCallback(_fun103390, [property, handleSeekAnalytics, quest.id, value13]);
const env0_33 = binding.useRef(0);
const env0_34 = binding.useRef(0);
const value26 = binding.useCallback(_fun103391, [quest, value7.taskType, handleProgressAnalytics, value13]);
const value27 = binding.useCallback(_fun103392, [property, quest, handleEndAnalytics, onEnd]);
const value28 = binding.useCallback(_fun103393, [handleLoadStartAnalytics]);
const value29 = binding.useCallback(_fun103394, [handleErrorAnalytics]);
const value30 = binding.useCallback(_fun103395, []);
const value31 = binding.useCallback(_fun103396, []);
const value32 = binding.useCallback(_fun103397, [handleResumePlaybackAnalytics]);
const value33 = binding.useCallback(_fun103398, [handlePausePlaybackAnalytics]);
const value34 = binding.useCallback(_fun103399, [handleBufferAnalytics]);
const value35 = binding.useCallback(_fun103400, [quest, captionsEnabled, contentInsets]);
const value36 = binding.useMemo(_fun103401, [value10, value9]);
const value37 = binding.useCallback(function() {
if (onToggleFullscreen != null) {
onToggleFullscreen({orientation: orientation});
}
}, [onToggleFullscreen, orientation]);
if (value36 == null) {
return null;
}
const value38 = orientation === 'landscape';
const AdVideoPlayer = (AdVideoPlayerModule).AdVideoPlayer;
return (
<AdVideoPlayer
source={value36}
httpEngine={value21}
initialProgress={value14}
contentDuration={targetSeconds}
allowUnrestrictedSeeking={value8}
disableResumeOnLoad={value8}
style={style}
isFullscreen={isFullscreen}
externallyPaused={externallyPaused}
contentInsets={contentInsets}
renderCaptions={value35}
onLoadStart={value28}
onLoad={value24}
onReadyForDisplay={value23}
onSeek={value25}
onBuffer={value34}
onError={value29}
onEnd={value27}
onPlayerStateChange={value22}
onResumePlayback={value32}
onPausePlayback={value33}
onProgress={value26}
onVideoTracks={value30}
onVideoLayout={value31}
videoRef={value15}
bufferingSpinnerPlacement={value38 ? 'center' : 'top-left'}
captionsEnabled={captionsEnabled}
showCaptionsButton={value38 && hasCaptionAsset}
showTranscriptButton={value38 && hasTranscriptAsset}
showFullscreenButton={value38}
showProgress={value38}
onToggleCaptions={handleToggleCaptions}
onOpenTranscript={handleOpenTranscript}
onToggleFullscreen={value37}
/>
);
function _fun103381() { // fn#103381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:616, offset: 0x022664eb, size: 75 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const VIDEO_PLAYER_VIDEO = QuestAssetType.VIDEO_PLAYER_VIDEO;
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_VIDEO, undefined, true]);
}
}
}
function _fun103396(a0) { // fn#103396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4242, offset: 0x02266b9c, size: 103 bytes, params: 2, frame: 15
var width;
var height;
var current;
const value = undefined;
let layout = a0 == null || a0.nativeEvent == null ? value : a0.nativeEvent.layout;
if (layout != null) {
layout = a0.nativeEvent.layout;
width = layout.width;
height = layout.height;
if (width > 0) {
if (height > 0) {
function _fun103382() { // fn#103382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:716, offset: 0x02266536, size: 75 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const VIDEO_PLAYER_VIDEO_HLS = QuestAssetType.VIDEO_PLAYER_VIDEO_HLS;
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_VIDEO_HLS, undefined, true]);
}
function _fun103384({videoProgress}) { // fn#103384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:1031, offset: 0x0226658c, size: 76 bytes, params: 2, frame: 4
var r0;
var object;
var progressSeconds;
const property = videoProgress[quest.id];
if (property != null) {
r0 = property;
} else {
object = {};
progressSeconds = JsxRuntimeModule.jsx.progressSeconds;
object.timestampSec = progressSeconds;
object.duration = env0_10;
progressSeconds = JsxRuntimeModule.jsx.progressSeconds;
object.maxTimestampSec = progressSeconds;
r0 = object;
}
return r0;
}
function _fun103385() { // fn#103385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:1993, offset: 0x022665d8, size: 336 bytes, params: 1, frame: 17
var constants;
var binding;
var MobileMuxWrapper;
var value4;
var mobileMuxWrapper;
if (env0_30 != null) {
if (env0_30.length === 0) {
return undefined;
}
var current = env0_14.current;
if (current == null) {
return undefined;
}
var moduleValue = require(13606) /* metro dependency 13606: videoQoe */;
var getVideoQoEMetricsConfig = moduleValue.getVideoQoEMetricsConfig;
var object = {};
var VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
object.location = VIDEO_MODAL_MOBILE;
if (Reflect.apply(getVideoQoEMetricsConfig, moduleValue, [object]).externalAnalyticsEnabled) {
constants = (require(1582) /* metro dependency 1582: ClientInfoUtils */).getConstants();
object = {};
current = env0_14.current;
object.videoRef = current;
object.feature = 'quests';
object.appVersion = constants.Version;
object.releaseChannel = constants.ReleaseChannel;
object.contentMetadata = {contentId: env0_30, videoStreamType: env0_32, contentType: 'quests',
durationMs: 1000 * targetSeconds, title: videoTitle, questId: id, gameName: gameTitle};
binding = env0_27;
MobileMuxWrapper = (require(13606) /* metro dependency 13606: videoQoe */).MobileMuxWrapper;
value4 = Object.create(MobileMuxWrapper.prototype, {constructor: {value: MobileMuxWrapper}});
mobileMuxWrapper = new MobileMuxWrapper(object);
binding.current = mobileMuxWrapper instanceof Object ? mobileMuxWrapper : value4;
current = env0_27.current;
current.initialize();
return _fun103386;
}
}
function _fun103386() { // fn#103386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2455, offset: 0x02266728, size: 80 bytes, params: 1, frame: 13
let current = env1_27.current;
if (current != null) {
current = env1_27.current;
current.onProgress(env1_16.current);
current = env1_27.current;
current.destroy();
env1_27.current = null;
}
}
}
function _fun103387(a0) { // fn#103387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2596, offset: 0x02266778, size: 19 bytes, params: 2, frame: 11
env0_15(a0);
}
function _fun103388() { // fn#103388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2629, offset: 0x0226678b, size: 40 bytes, params: 1, frame: 10
handleReadyForDisplayAnalytics();
const current = env0_27.current;
if (current != null) {
current.onReadyForDisplay();
}
}
function _fun103389(a0) { // fn#103389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2715, offset: 0x022667b3, size: 199 bytes, params: 2, frame: 19
const duration = a0.duration;
const videoTracks = a0.videoTracks;
const trackId = a0.trackId;
const naturalSize = a0.naturalSize;
env0_11(duration);
handleLoadAnalytics();
let current = env0_27.current;
if (current != null) {
current.onLoad(duration);
}
if (naturalSize != null) {
current = env0_27.current;
if (current != null) {
current.updateVideoDimensions(width, height);
current.updateVideoSourceDimensions(naturalSize.width, naturalSize.height);
}
}
if (videoTracks != null && videoTracks.length > 0 && trackId != null && trackId.length > 0) {
current = env0_27.current;
if (current != null) {
current.onVideoTrackChange(trackId, videoTracks);
}
}
if (onLoad != null) {
onLoad(a0);
}
}
function _fun103390(a0) { // fn#103390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3045, offset: 0x0226687a, size: 131 bytes, params: 2, frame: 17
env0_16.current = a0.currentTime;
if (env0_10 > 0) {
env0_13(quest.id, a0.currentTime, env0_10);
}
handleSeekAnalytics();
let current = env0_27.current;
if (current != null) {
current.updatePlayheadTime(a0.currentTime);
}
current = env0_27.current;
if (current != null) {
current.onSeek();
}
}
function _fun103391(a0) { // fn#103391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3271, offset: 0x022668fd, size: 345 bytes, params: 2, frame: 17
var value2;
var moduleValue;
var sendVideoProgress;
var questBinding;
var handleProgressAnalyticsBinding;
var progress;
var seekableDuration;
var value5;
var moduleValue2;
var updateOptimisticProgress;
var id;
var taskType;
let binding = env0_16;
let currentTime = a0.currentTime;
binding.current = currentTime;
currentTime = a0.currentTime;
let current = env0_33.current;
if (currentTime >= current) {
value2 = environment.__proto__;
moduleValue = require(9522) /* metro dependency 9522: VideoQuestUtils */;
sendVideoProgress = moduleValue.sendVideoProgress;
questBinding = quest;
currentTime = a0.currentTime;
Reflect.apply(sendVideoProgress, moduleValue, [questBinding, currentTime]);
handleProgressAnalyticsBinding = handleProgressAnalytics;
progress = a0.progress;
seekableDuration = a0.seekableDuration;
currentTime = a0.currentTime;
handleProgressAnalyticsBinding(progress, seekableDuration, currentTime);
binding = env0_33;
currentTime = a0.currentTime;
binding.current = currentTime + 6 + 2 * global.Math.random();
}
currentTime = a0.currentTime;
if (currentTime >= env0_34.current) {
value5 = environment.__proto__;
moduleValue2 = require(9484) /* metro dependency 9484: QuestActionCreators */;
updateOptimisticProgress = moduleValue2.updateOptimisticProgress;
id = quest.id;
taskType = JsxRuntimeModule.jsx.taskType;
currentTime = a0.currentTime;
Reflect.apply(updateOptimisticProgress, moduleValue2, [id, taskType, currentTime]);
binding = env0_34;
currentTime = a0.currentTime;
binding.current = currentTime + 1;
}
env0_13(quest.id, a0.currentTime, a0.seekableDuration);
current = env0_27.current;
if (current != null) {
current.onProgress(a0.currentTime);
}
}
function _fun103392() { // fn#103392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3722, offset: 0x02266a56, size: 127 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(9522) /* metro dependency 9522: VideoQuestUtils */;
value.sendVideoProgress(quest, env0_10);
handleEndAnalytics();
let current = env0_27.current;
if (current != null) {
current.onProgress(env0_10);
}
current = env0_27.current;
if (current != null) {
current.onEnd();
}
if (onEnd != null) {
onEnd();
}
}
function _fun103393() { // fn#103393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3885, offset: 0x02266ad5, size: 63 bytes, params: 1, frame: 12
handleLoadStartAnalytics();
let current = env0_27.current;
if (current != null) {
current.onLoadStart();
}
current = env0_27.current;
if (current != null) {
current.onPlay();
}
}
function _fun103394(a0) { // fn#103394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4000, offset: 0x02266b14, size: 45 bytes, params: 2, frame: 12
handleErrorAnalytics(a0);
const current = env0_27.current;
if (current != null) {
current.onError(a0);
}
}
function _fun103395({videoTracks, selectedVideoTrackId}) { // fn#103395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4075, offset: 0x02266b41, size: 91 bytes, params: 2, frame: 15
var current;
if (videoTracks != null && videoTracks.length > 0 && selectedVideoTrackId != null && selectedVideoTrackId.length > 0) {
current = env0_27.current;
if (current != null) {
current.onVideoTrackChange(selectedVideoTrackId, videoTracks);
}
}
}
function _fun103396(a0) { // fn#103396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4242, offset: 0x02266b9c, size: 103 bytes, params: 2, frame: 15
var width;
var height;
var current;
const value = undefined;
let layout = a0 == null || a0.nativeEvent == null ? value : a0.nativeEvent.layout;
if (layout != null) {
layout = a0.nativeEvent.layout;
width = layout.width;
height = layout.height;
if (width > 0) {
if (height > 0) {
current = env0_27.current;
if (current != null) {
current.updateVideoDimensions(width, height);
}
}
}
}
return value;
}
function _fun103397() { // fn#103397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4451, offset: 0x02266c03, size: 40 bytes, params: 1, frame: 10
handleResumePlaybackAnalytics();
const current = env0_27.current;
if (current != null) {
current.onPlay();
}
}
function _fun103398() { // fn#103398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4526, offset: 0x02266c2b, size: 40 bytes, params: 1, frame: 10
handlePausePlaybackAnalytics();
const current = env0_27.current;
if (current != null) {
current.onPause();
}
}
function _fun103399(a0) { // fn#103399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4602, offset: 0x02266c53, size: 45 bytes, params: 2, frame: 12
handleBufferAnalytics(a0);
const current = env0_27.current;
if (current != null) {
current.onBuffer(a0);
}
}
function _fun103400(a0) { // fn#103400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4678, offset: 0x02266c80, size: 234 bytes, params: 2, frame: 20
let value = environment.__proto__;
value = undefined;
const VideoQuestCaptions = (VideoQuestCaptionsModule).VideoQuestCaptions;
const questBinding = quest;
const captionsEnabledBinding = captionsEnabled;
const top = contentInsets == null ? value : contentInsets.top;
const value3 = 0;
return (
<VideoQuestCaptions
quest={questBinding}
currentTime={a0}
visible={captionsEnabledBinding}
style={{
top: top ?? value3,
bottom: (contentInsets == null ? value : contentInsets.bottom) ?? value3,
left: (contentInsets == null ? value : contentInsets.left) ?? value3,
right: (contentInsets == null ? value : contentInsets.right) ?? value3,
}}
/>
);
}
function _fun103401() { // fn#103401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4967, offset: 0x02266d6a, size: 64 bytes, params: 1, frame: 6
var url;
var r0;
const value2 = null;
if (value2 == env0_8) {
r0 = value2;
} else {
url = value2 == env0_9 ? undefined : env0_9.url;
url = value2 == url ? env0_8.url : url;
r0 = {uri: url};
}
return r0;
}
}
return value;
}
function _fun103397() { // fn#103397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4451, offset: 0x02266c03, size: 40 bytes, params: 1, frame: 10
handleResumePlaybackAnalytics();
const current = env0_27.current;
if (current != null) {
current.onPlay();
}
}
function _fun103398() { // fn#103398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4526, offset: 0x02266c2b, size: 40 bytes, params: 1, frame: 10
handlePausePlaybackAnalytics();
const current = env0_27.current;
if (current != null) {
current.onPause();
}
}
function _fun103399(a0) { // fn#103399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4602, offset: 0x02266c53, size: 45 bytes, params: 2, frame: 12
handleBufferAnalytics(a0);
const current = env0_27.current;
if (current != null) {
current.onBuffer(a0);
}
}
function _fun103400(a0) { // fn#103400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4678, offset: 0x02266c80, size: 234 bytes, params: 2, frame: 20
let value = environment.__proto__;
value = undefined;
const VideoQuestCaptions = (require(13614) /* metro dependency 13614: VideoQuestCaptions */).VideoQuestCaptions;
const questBinding = quest;
const captionsEnabledBinding = captionsEnabled;
const top = contentInsets == null ? value : contentInsets.top;
const value3 = 0;
return (
<VideoQuestCaptions
quest={questBinding}
currentTime={a0}
visible={captionsEnabledBinding}
style={{top: top ?? value3, bottom: (contentInsets == null ? value : contentInsets.bottom) ?? value3,
left: (contentInsets == null ? value : contentInsets.left) ?? value3,
right: (contentInsets == null ? value : contentInsets.right) ?? value3}}
/>
);
}
function _fun103401() { // fn#103401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4967, offset: 0x02266d6a, size: 64 bytes, params: 1, frame: 6
var url;
var r0;
const value2 = null;
if (value2 == env0_8) {
r0 = value2;
} else {
url = value2 == env0_9 ? undefined : env0_9.url;
url = value2 == url ? env0_8.url : url;
r0 = {uri: url};
}
return r0;
}
function _fun103386() { // fn#103386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2455, offset: 0x02266728, size: 80 bytes, params: 1, frame: 13
let current = env1_27.current;
if (current != null) {
current = env1_27.current;
current.onProgress(env1_16.current);
current = env1_27.current;
current.destroy();
env1_27.current = null;
}
}
global.__d(_fun103379, 13602, [57, 31, 7095, 6528, 33, 13597, 9483, 9495, 3769, 13523, 13603, 7116, 9564, 13606,
1582, 9522, 9484, 13614,
2]) /* metro module 13602, dependencies: [57, 31, 7095, 6528, 33, 13597, 9483, 9495, 3769, 13523, 13603, 7116, 9564, 13606, 1582, 9522, 9484, 13614, 2] */;
Loaded 100 of 22448 files, more files were not shown because too many files have changed in this diff. Show more