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

File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+267 -249
View File
@@ -1,4 +1,12 @@
/* Metro module 7092; source: modules/quests/BountyStore.tsx; dependencies: [6, 7, 15, 17, 18, 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 */
function _fun56578(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:6, offset: 0x013cc255, size: 386 bytes, params: 8, frame: 19
const _arrayLikeToArray_56581 = function(a0, a1) {
var r0;
@@ -43,16 +51,11 @@ function _fun56578(global, require, importDefault, importAll, module, exports, d
}
return value;
};
const closure = initializeState;
const initializeState2 = initializeState;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_6 = importDefault(6) /* metro dependency 6 */;
const env0_7 = importDefault(7) /* metro dependency 7 */;
const env0_8 = importDefault(15) /* metro dependency 15 */;
const env0_9 = importDefault(17) /* metro dependency 17 */;
const env0_10 = importDefault(18) /* metro dependency 18 */;
closure();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
initializeState2();
const Store = (Flux).Store;
let value = _fun56586(Store);
value.displayName = 'BountyStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: function() {
@@ -68,267 +71,282 @@ function _fun56578(global, require, importDefault, importAll, module, exports, d
var Map = global.Map;
env0_5 = new Map();
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/BountyStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/BountyStore.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_56579(a0, a1) { // fn#56579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:162, offset: 0x013cc3d7, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_56579(a0, a1) { // fn#56579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:162, offset: 0x013cc3d7, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun56580;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_56581(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 _fun56580;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_56581(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_56581(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_56581(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun56580;
}
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 _fun56580() { // fn#56580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:733, 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 _isNativeReflectConstruct_56582() { // fn#56582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:1072, offset: 0x013cc549, size: 94 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_56582_isNativeReflectConstruct = function() {
return !!result;
})();
}
function initializeState() { // fn#56585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:1265, offset: 0x013cc5a7, size: 143 bytes, params: 1, frame: 11
env0_1 = [];
let Set = global.Set;
let set = new Set();
Set = global.Set;
set = new Set();
let Map = global.Map;
let map = new Map();
Map = global.Map;
map = new Map();
}
function _fun56586(a0) { // fn#56586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:1366, offset: 0x013cc636, size: 237 bytes, params: 2, frame: 16
const BountyStore2 = BountyStore;
Inherits(BountyStore2, a0);
return CreateClass(BountyStore2, [{key: 'isFetchingQuestHomeBounties', get: get_56588}, {key: 'questHomeBounties',
get: get_56589}, {key: 'isBountyCompleted', value: value_56590}, {key: 'getCompletedBountyCount',
value: value_56591}, {key: 'isClaimingBountyReward', value: value_56592}, {key: 'areAllBountiesCompleted',
value: value_56593}, {key: 'getAdDecisionByPlacementAndAdCreativeId', value: value_56595},
{key: 'getBountyVideoProgress', value: value_56596}]);
function BountyStore() { // fn#56587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:1378, offset: 0x013cc723, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_6(this, BountyStore);
const value3 = env1_9(BountyStore);
return env1_8(this, _isNativeReflectConstruct_56582() ? global.Reflect.construct(value3, arguments,
env1_9(this).constructor) : value3.apply(this, arguments));
}
function get_56588() { // fn#56588, offset: 0x00e6cfe6, size: 9 bytes, params: 1, frame: 1
return env1_0;
}
function get_56589() { // fn#56589, offset: 0x013cc794, size: 9 bytes, params: 1, frame: 1
return env1_1;
}
function value_56590(a0) { // fn#56590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:1770, offset: 0x013cc79d, size: 22 bytes, params: 2, frame: 11
return env1_2.has(a0);
}
function value_56591(a0) { // fn#56591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:1837, offset: 0x013cc7b3, size: 92 bytes, params: 2, frame: 17
var r2;
var r3;
var r7;
var r0;
var value5;
var binding;
var has;
var id;
var value6;
var value7;
const value2 = _createForOfIteratorHelperLoose_56579(a0);
const value3 = value2();
let done = value3.done;
const value4 = 0;
if (done) {
r0 = value4;
} else {
r2 = value4;
r3 = value3;
while (true) {
value5 = r3.value;
binding = env1_2;
has = binding.has;
id = value5.id;
if (Reflect.apply(has, binding, [id])) {
value6 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
r7 = value6;
} else {
r7 = r2;
}
value7 = value2();
done = value7.done;
if (done) {
r0 = r7;
break;
}
r2 = r7;
r3 = value7;
continue;
}
}
r5 = r6;
return r0;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
function value_56592(a0) { // fn#56592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:1994, offset: 0x013cc80f, size: 22 bytes, params: 2, frame: 11
return env1_3.has(a0);
}
return _fun56580;
}
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 _isNativeReflectConstruct_56582() { // fn#56582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:1072, offset: 0x013cc549, size: 94 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_56582_isNativeReflectConstruct = function() {
return !!result;
})();
}
function value_56593() { // fn#56593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:2061, offset: 0x013cc825, size: 27 bytes, params: 1, frame: 11
return env1_1.every(_fun56594);
function _fun56594({id}) { // fn#56594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:2088, offset: 0x013cc840, size: 27 bytes, params: 2, frame: 11
return env2_2.has(id);
}
function initializeState() { // fn#56585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:1265, offset: 0x013cc5a7, size: 143 bytes, params: 1, frame: 11
env0_1 = [];
let Set = global.Set;
let set = new Set();
Set = global.Set;
set = new Set();
let Map = global.Map;
let map = new Map();
Map = global.Map;
map = new Map();
}
}
function _fun56586(a0) { // fn#56586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:1366, offset: 0x013cc636, size: 237 bytes, params: 2, frame: 16
const closure = BountyStore;
env0_10(closure, a0);
return env0_7(closure, [{key: 'isFetchingQuestHomeBounties', get: get_56588}, {key: 'questHomeBounties',
get: get_56589}, {key: 'isBountyCompleted', value: value_56590}, {key: 'getCompletedBountyCount',
value: value_56591}, {key: 'isClaimingBountyReward', value: value_56592}, {key: 'areAllBountiesCompleted',
value: value_56593}, {key: 'getAdDecisionByPlacementAndAdCreativeId', value: value_56595},
{key: 'getBountyVideoProgress', value: value_56596}]);
}
function BOUNTIES_FETCH_QUEST_HOME_BOUNTIES_SUCCESS({bounties, placement, adDecisionsByAdCreativeId}) { // fn#56599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:2584, offset: 0x013cc8b7, size: 145 bytes, params: 2, frame: 15
const Set = global.Set;
const set = new Set();
let Map = global.Map;
let map = new Map();
Map = global.Map;
const binding = env0_4;
const value6 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map(binding);
(map instanceof Object ? map : value6).set(placement, adDecisionsByAdCreativeId);
}
function BOUNTIES_FETCH_QUEST_HOME_BOUNTIES_FAILURE({placement}) { // fn#56600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:2780, offset: 0x013cc948, size: 106 bytes, params: 2, frame: 13
env0_1 = [];
const Set = global.Set;
const set = new Set();
const Map = global.Map;
const binding = env0_4;
const value4 = Object.create(Map.prototype, {constructor: {value: Map}});
const map = new Map(binding);
(map instanceof Object ? map : value4).delete(placement);
}
function BOUNTIES_CLAIM_REWARD_BEGIN({bountyId}) { // fn#56601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:2914, offset: 0x013cc9b2, size: 62 bytes, params: 2, frame: 13
const Set = global.Set;
const binding = env0_3;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(binding);
(set instanceof Object ? set : value2).add(bountyId);
}
function BOUNTIES_CLAIM_REWARD_SUCCESS({bountyId}) { // fn#56602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:3027, offset: 0x013cc9f0, size: 106 bytes, params: 2, frame: 14
let Set = global.Set;
let binding = env0_3;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
let set = new Set(binding);
(set instanceof Object ? set : value2).delete(bountyId);
Set = global.Set;
binding = env0_2;
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set(binding);
(set instanceof Object ? set : value4).add(bountyId);
}
function BOUNTIES_CLAIM_REWARD_FAILURE({bountyId}) { // fn#56603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:3175, offset: 0x013cca5a, size: 62 bytes, params: 2, frame: 13
const Set = global.Set;
const binding = env0_3;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(binding);
(set instanceof Object ? set : value2).delete(bountyId);
}
function BOUNTIES_VIDEO_PROGRESS_UPDATE({bountyId, timestampSec, maxTimestampSec, duration}) { // fn#56604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:3294, offset: 0x013cca98, size: 96 bytes, params: 2, frame: 17
const Map = global.Map;
const map = new Map(env0_5);
map.set(bountyId, {timestampSec: timestampSec, maxTimestampSec: maxTimestampSec, duration: duration});
}
function BountyStore() { // fn#56587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:1378, offset: 0x013cc723, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_6(this, BountyStore);
const value3 = env1_9(BountyStore);
return env1_8(this, _isNativeReflectConstruct_56582() ? global.Reflect.construct(value3, arguments,
env1_9(this).constructor) : value3.apply(this, arguments));
}
function get_56589() { // fn#56589, offset: 0x013cc794, size: 9 bytes, params: 1, frame: 1
return env1_1;
}
function value_56591(a0) { // fn#56591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:1837, offset: 0x013cc7b3, size: 92 bytes, params: 2, frame: 17
var r2;
var r3;
var r7;
var r0;
var value5;
var binding;
var has;
var id;
var value6;
var value7;
const value2 = _createForOfIteratorHelperLoose_56579(a0);
const value3 = value2();
let done = value3.done;
const value4 = 0;
if (done) {
r0 = value4;
} else {
r2 = value4;
r3 = value3;
while (true) {
value5 = r3.value;
binding = env1_2;
has = binding.has;
id = value5.id;
if (Reflect.apply(has, binding, [id])) {
value6 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
r7 = value6;
function value_56595(a0, a1) { // fn#56595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:2160, offset: 0x013cc85b, size: 58 bytes, params: 3, frame: 13
var r1;
let value = environment.__proto__;
value = env1_4.get(a0);
const value2 = null;
if (value2 == value) {
r1 = undefined;
} else {
r7 = r2;
value = value.get(a1);
r1 = value;
}
value7 = value2();
done = value7.done;
if (done) {
r0 = r7;
break;
}
r2 = r7;
r3 = value7;
continue;
return value2 != r1 ? r1 : value2;
}
function value_56596(a0) { // fn#56596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:2279, offset: 0x013cc895, size: 34 bytes, params: 2, frame: 11
let value = environment.__proto__;
value = env1_5.get(a0);
const value2 = null;
return value2 != value ? value : value2;
}
}
return r0;
}
function value_56592(a0) { // fn#56592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:1994, offset: 0x013cc80f, size: 22 bytes, params: 2, frame: 11
return env1_3.has(a0);
}
function value_56593() { // fn#56593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:2061, offset: 0x013cc825, size: 27 bytes, params: 1, frame: 11
return env1_1.every(_fun56594);
}
function value_56595(a0, a1) { // fn#56595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:2160, offset: 0x013cc85b, size: 58 bytes, params: 3, frame: 13
var r1;
let value = environment.__proto__;
value = env1_4.get(a0);
const value2 = null;
if (value2 == value) {
r1 = undefined;
} else {
value = value.get(a1);
r1 = value;
function BOUNTIES_FETCH_QUEST_HOME_BOUNTIES_SUCCESS({bounties, placement, adDecisionsByAdCreativeId}) { // fn#56599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:2584, offset: 0x013cc8b7, size: 145 bytes, params: 2, frame: 15
const Set = global.Set;
const set = new Set();
let Map = global.Map;
let map = new Map();
Map = global.Map;
const binding = env0_4;
const value6 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map(binding);
(map instanceof Object ? map : value6).set(placement, adDecisionsByAdCreativeId);
}
return value2 != r1 ? r1 : value2;
}
function value_56596(a0) { // fn#56596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:2279, offset: 0x013cc895, size: 34 bytes, params: 2, frame: 11
let value = environment.__proto__;
value = env1_5.get(a0);
const value2 = null;
return value2 != value ? value : value2;
}
function _fun56594({id}) { // fn#56594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:2088, offset: 0x013cc840, size: 27 bytes, params: 2, frame: 11
return env2_2.has(id);
function BOUNTIES_FETCH_QUEST_HOME_BOUNTIES_FAILURE({placement}) { // fn#56600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:2780, offset: 0x013cc948, size: 106 bytes, params: 2, frame: 13
env0_1 = [];
const Set = global.Set;
const set = new Set();
const Map = global.Map;
const binding = env0_4;
const value4 = Object.create(Map.prototype, {constructor: {value: Map}});
const map = new Map(binding);
(map instanceof Object ? map : value4).delete(placement);
}
function BOUNTIES_CLAIM_REWARD_BEGIN({bountyId}) { // fn#56601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:2914, offset: 0x013cc9b2, size: 62 bytes, params: 2, frame: 13
const Set = global.Set;
const binding = env0_3;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(binding);
(set instanceof Object ? set : value2).add(bountyId);
}
function BOUNTIES_CLAIM_REWARD_SUCCESS({bountyId}) { // fn#56602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:3027, offset: 0x013cc9f0, size: 106 bytes, params: 2, frame: 14
let Set = global.Set;
let binding = env0_3;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
let set = new Set(binding);
(set instanceof Object ? set : value2).delete(bountyId);
Set = global.Set;
binding = env0_2;
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set(binding);
(set instanceof Object ? set : value4).add(bountyId);
}
function BOUNTIES_CLAIM_REWARD_FAILURE({bountyId}) { // fn#56603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:3175, offset: 0x013cca5a, size: 62 bytes, params: 2, frame: 13
const Set = global.Set;
const binding = env0_3;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(binding);
(set instanceof Object ? set : value2).delete(bountyId);
}
function BOUNTIES_VIDEO_PROGRESS_UPDATE({bountyId, timestampSec, maxTimestampSec, duration}) { // fn#56604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:3294, offset: 0x013cca98, size: 96 bytes, params: 2, frame: 17
const Map = global.Map;
const map = new Map(env0_5);
map.set(bountyId, {timestampSec: timestampSec, maxTimestampSec: maxTimestampSec, duration: duration});
}
}
global.__d(_fun56578, 7092, [6, 7, 15, 17, 18, 566, 694,
2]) /* metro module 7092, dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */;
+109 -105
View File
@@ -1,9 +1,12 @@
/* Metro module 7094; source: modules/quests/ConsoleQuestUIStore.tsx; dependencies: [629, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00629Module from '../../by-id/module-00629.js'; /* Metro dependency 629 */
function _fun56707(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7272:6, offset: 0x013cf492, size: 121 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let env0_0 = [];
let value = require(629) /* metro dependency 629 */;
let value = Module00629Module;
value = value.create(function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
@@ -11,116 +14,117 @@ function _fun56707(global, require, importDefault, importAll, module, exports, d
return {errorHintsByQuestId: new Map(), setErrorHints: _fun56709, getErrorHints: _fun56711,
clearErrorHints: _fun56712, clearErrorHintsByType: _fun56714, reset: _fun56717};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/ConsoleQuestUIStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/ConsoleQuestUIStore.tsx');
exports.default = value;
exports.useConsoleQuestUIStore = value;
}
function _fun56708(a0, a1) { // fn#56708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7272:119, offset: 0x013cf50b, size: 109 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
const Map = global.Map;
return {errorHintsByQuestId: new Map(), setErrorHints: setErrorHints, getErrorHints: getErrorHints,
clearErrorHints: function(a0) {
a0(_fun56713);
}, clearErrorHintsByType: clearErrorHintsByType, reset: reset_56717};
function setErrorHints(a0, a1) { // fn#56709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7272:170, offset: 0x013cf578, size: 37 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
env0_0(_fun56710);
function _fun56710(a0) { // fn#56710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7272:181, offset: 0x013cf59d, size: 150 bytes, params: 2, frame: 17
var errorHintsByQuestId;
var Map;
var map;
var set;
var binding;
var items2;
if (require.length !== 0) {
Map = global.Map;
errorHintsByQuestId = a0.errorHintsByQuestId;
map = new Map();
if (require.length === 0) {
map.delete(env0_0);
} else {
set = map.set;
binding = env0_0;
items2 = [];
arraySpread(items2, require, 0, 0);
Reflect.apply(set, map, [binding, items2]);
}
return {errorHintsByQuestId: map};
}
if (Reflect.apply(a0.errorHintsByQuestId.has, errorHintsByQuestId, [env0_0])) {
Map = global.Map;
errorHintsByQuestId = a0.errorHintsByQuestId;
map = new Map();
if (require.length === 0) {
map.delete(env0_0);
} else {
set = map.set;
binding = env0_0;
items2 = [];
arraySpread(items2, require, 0, 0);
Reflect.apply(set, map, [binding, items2]);
}
return {errorHintsByQuestId: map};
}
return a0;
}
function _fun56708(a0, a1) { // fn#56708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7272:119, offset: 0x013cf50b, size: 109 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
const Map = global.Map;
return {errorHintsByQuestId: new Map(), setErrorHints: setErrorHints, getErrorHints: getErrorHints,
clearErrorHints: function(a0) {
a0(_fun56713);
}, clearErrorHintsByType: clearErrorHintsByType, reset: reset_56717};
}
function setErrorHints(a0, a1) { // fn#56709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7272:170, offset: 0x013cf578, size: 37 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
env0_0(_fun56710);
}
function getErrorHints(a0) { // fn#56711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7272:368, offset: 0x013cf633, size: 47 bytes, params: 2, frame: 11
return require().errorHintsByQuestId.get(a0) ?? env1_0;
}
function clearErrorHints(a0) { // fn#56712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7272:447, offset: 0x013cf662, size: 30 bytes, params: 2, frame: 11
a0(_fun56713);
}
function clearErrorHintsByType(a0, a1) { // fn#56714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7272:606, offset: 0x013cf6d8, size: 37 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
env0_0(_fun56715);
}
function reset_56717() { // fn#56717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7272:854, offset: 0x013cf7aa, size: 51 bytes, params: 1, frame: 12
const binding = env0_0;
const Map = global.Map;
binding({errorHintsByQuestId: new Map()});
}
function _fun56710(a0) { // fn#56710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7272:181, offset: 0x013cf59d, size: 150 bytes, params: 2, frame: 17
var errorHintsByQuestId;
var Map;
var map;
var set;
var binding;
var items;
if (require.length !== 0) {
Map = global.Map;
errorHintsByQuestId = a0.errorHintsByQuestId;
map = new Map();
if (require.length === 0) {
map.delete(env0_0);
} else {
set = map.set;
binding = env0_0;
items = [];
arraySpread(items, require, 0, 0);
Reflect.apply(set, map, [binding, items]);
}
return {errorHintsByQuestId: map};
}
if (Reflect.apply(a0.errorHintsByQuestId.has, errorHintsByQuestId, [env0_0])) {
Map = global.Map;
errorHintsByQuestId = a0.errorHintsByQuestId;
map = new Map();
if (require.length === 0) {
map.delete(env0_0);
} else {
set = map.set;
binding = env0_0;
items = [];
arraySpread(items, require, 0, 0);
Reflect.apply(set, map, [binding, items]);
function getErrorHints(a0) { // fn#56711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7272:368, offset: 0x013cf633, size: 47 bytes, params: 2, frame: 11
return require().errorHintsByQuestId.get(a0) ?? env1_0;
}
return {errorHintsByQuestId: map};
function clearErrorHints(a0) { // fn#56712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7272:447, offset: 0x013cf662, size: 30 bytes, params: 2, frame: 11
a0(_fun56713);
function _fun56713(a0) { // fn#56713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7272:454, offset: 0x013cf680, size: 88 bytes, params: 2, frame: 13
var map;
const errorHintsByQuestId = a0.errorHintsByQuestId;
if (errorHintsByQuestId.has(env0_0)) {
map = new global.Map(a0.errorHintsByQuestId);
map.delete(env0_0);
return {errorHintsByQuestId: map};
}
return a0;
}
}
function clearErrorHintsByType(a0, a1) { // fn#56714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7272:606, offset: 0x013cf6d8, size: 37 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
env0_0(_fun56715);
function _fun56715(a0) { // fn#56715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7272:617, offset: 0x013cf6fd, size: 152 bytes, params: 2, frame: 15
const value2 = a0.errorHintsByQuestId.get(env0_0);
if (value2 == null) {
return a0;
}
const value3 = value2.filter(function({type}) {
return type !== require;
});
if (value3.length === value2.length) {
return a0;
}
const Map = global.Map;
const map = new Map(a0.errorHintsByQuestId);
if (value3.length === 0) {
map.delete(env0_0);
} else {
map.set(env0_0, value3);
}
return {errorHintsByQuestId: map};
}
}
function reset_56717() { // fn#56717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7272:854, offset: 0x013cf7aa, size: 51 bytes, params: 1, frame: 12
const binding = env0_0;
const Map = global.Map;
binding({errorHintsByQuestId: new Map()});
}
}
return a0;
}
function _fun56713(a0) { // fn#56713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7272:454, offset: 0x013cf680, size: 88 bytes, params: 2, frame: 13
var map;
const errorHintsByQuestId = a0.errorHintsByQuestId;
if (errorHintsByQuestId.has(env0_0)) {
map = new global.Map(a0.errorHintsByQuestId);
map.delete(env0_0);
return {errorHintsByQuestId: map};
}
return a0;
}
function _fun56715(a0) { // fn#56715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7272:617, offset: 0x013cf6fd, size: 152 bytes, params: 2, frame: 15
const value2 = a0.errorHintsByQuestId.get(env0_0);
if (value2 == null) {
return a0;
}
const value3 = value2.filter(function({type}) {
return type !== require;
});
if (value3.length === value2.length) {
return a0;
}
const Map = global.Map;
const map = new Map(a0.errorHintsByQuestId);
if (value3.length === 0) {
map.delete(env0_0);
} else {
map.set(env0_0, value3);
}
return {errorHintsByQuestId: map};
}
global.__d(_fun56707, 7094, [629, 2]) /* metro module 7094, dependencies: [629, 2] */;
@@ -1,107 +1,118 @@
/* Metro module 9494; source: modules/quests/EarnedDecisionRoundtripTracker.tsx; dependencies: [6, 7, 4401, 661, 4873, 683, 7071, 4876, 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 NetworkStore from '../../stores/NetworkStore.tsx'; /* Metro dependency 4401 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun74105(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9680:6, offset: 0x01d80ac7, size: 207 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 networkStore = importDefault(4401) /* metro dependency 4401: NetworkStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
let value = _fun74107();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/EarnedDecisionRoundtripTracker.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/EarnedDecisionRoundtripTracker.tsx');
exports.default = value;
}
function trackRoundtrip_74106(a0) { // fn#74106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9680:151, offset: 0x01d80b96, size: 355 bytes, params: 2, frame: 22
var r10;
var apiResponseTimestamp;
var signalStrength;
var defaultImport;
var track;
var EARNED_DECISION_ROUNDTRIP;
var object2;
const Math = global.Math;
let value = Math.random();
if (!(value > 0.1)) {
apiResponseTimestamp = a0.apiResponseTimestamp;
value = null;
r10 = value == apiResponseTimestamp ? value : a0.apiResponseTimestamp - a0.initialSendTimestamp;
signalStrength = require(dependencyMap[4]).getSignalStrength();
defaultImport = importDefault(dependencyMap[5]);
track = defaultImport.track;
EARNED_DECISION_ROUNDTRIP = AnalyticEvents.EARNED_DECISION_ROUNDTRIP;
object2 = {};
copyDataProperties(object2, importDefault(dependencyMap[6])(), dependencyMap);
object2['endpoint'] = a0.endpoint;
object2['was_successful'] = a0.wasSuccessful;
object2['api_latency_ms'] = r10;
object2['mobile_network_type'] = NetworkStore.getType();
value = value != signalStrength;
copyDataProperties(object2, value && ({mobile_signal_strength_level: signalStrength}), dependencyMap);
object2['caller_source'] = a0.callerSource;
object2['request_id'] = a0.requestId;
object2['fetched_at'] = a0.fetchedAt;
value = require(dependencyMap[7]);
value = value.isForegrounded();
object2['is_foregrounded'] = value;
Reflect.apply(track, defaultImport, [EARNED_DECISION_ROUNDTRIP, object2]);
function trackRoundtrip_74106(a0) { // fn#74106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9680:151, offset: 0x01d80b96, size: 355 bytes, params: 2, frame: 22
var r10;
var apiResponseTimestamp;
var signalStrength;
var defaultImport;
var track;
var EARNED_DECISION_ROUNDTRIP;
var object;
const Math = global.Math;
let value = Math.random();
if (!(value > 0.1)) {
apiResponseTimestamp = a0.apiResponseTimestamp;
value = null;
r10 = value == apiResponseTimestamp ? value : a0.apiResponseTimestamp - a0.initialSendTimestamp;
signalStrength = require(dependencyMap[4]).getSignalStrength();
defaultImport = importDefault(dependencyMap[5]);
track = defaultImport.track;
EARNED_DECISION_ROUNDTRIP = AnalyticEvents.EARNED_DECISION_ROUNDTRIP;
object = {};
copyDataProperties(object, importDefault(dependencyMap[6])(), dependencyMap);
object['endpoint'] = a0.endpoint;
object['was_successful'] = a0.wasSuccessful;
object['api_latency_ms'] = r10;
object['mobile_network_type'] = NetworkStore.getType();
value = value != signalStrength;
copyDataProperties(object, value && ({mobile_signal_strength_level: signalStrength}), dependencyMap);
object['caller_source'] = a0.callerSource;
object['request_id'] = a0.requestId;
object['fetched_at'] = a0.fetchedAt;
value = require(dependencyMap[7]);
value = value.isForegrounded();
object['is_foregrounded'] = value;
Reflect.apply(track, defaultImport, [EARNED_DECISION_ROUNDTRIP, object]);
}
}
}
function _fun74107() { // fn#74107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9680:648, offset: 0x01d80cf9, size: 86 bytes, params: 1, frame: 15
return env0_4(EarnedDecisionRoundtripTracker, [{key: 'recordEarnedRequestAttempt', value: function(a0, a1) {
var env0_0 = this;
var env0_1 = a0;
var object = {'initialSendTimestamp': null, 'endpoint': '/quests/earned-decision', 'apiResponseTimestamp': null,
'wasSuccessful': false, 'callerSource': null, 'requestId': null, 'fetchedAt': null};
object.initialSendTimestamp = global.Date.now();
object.callerSource = a1;
this.pendingRequests.set(a0, object);
global.setTimeout(_fun74110, 30000);
}}, {key: 'recordEarnedRequestApiResponse', value: value_74111}]);
}
function _fun74107() { // fn#74107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9680:648, offset: 0x01d80cf9, size: 86 bytes, params: 1, frame: 15
return CreateClass(EarnedDecisionRoundtripTracker, [{key: 'recordEarnedRequestAttempt', value: function(a0, a1) {
var env0_0 = this;
var env0_1 = a0;
var object = {'initialSendTimestamp': null, 'endpoint': '/quests/earned-decision', 'apiResponseTimestamp': null,
'wasSuccessful': false, 'callerSource': null, 'requestId': null, 'fetchedAt': null};
object.initialSendTimestamp = global.Date.now();
object.callerSource = a1;
this.pendingRequests.set(a0, object);
global.setTimeout(_fun74110, 30000);
}}, {key: 'recordEarnedRequestApiResponse', value: value_74111}]);
function EarnedDecisionRoundtripTracker() { // fn#74108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9680:669, offset: 0x01d801cc, size: 61 bytes, params: 1, frame: 13
const value = environment.__proto__;
env1_3(this, EarnedDecisionRoundtripTracker);
const Map = global.Map;
this.pendingRequests = new Map();
}
function value_74109(a0, a1) { // fn#74109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9680:822, offset: 0x01d80d4f, size: 108 bytes, params: 3, frame: 16
const env0_1 = a0;
const object2 = {'initialSendTimestamp': null, 'endpoint': '/quests/earned-decision', 'apiResponseTimestamp': null,
'wasSuccessful': false, 'callerSource': null, 'requestId': null, 'fetchedAt': null};
const Date = global.Date;
object2.initialSendTimestamp = Date.now();
object2.callerSource = a1;
this.pendingRequests.set(a0, object2);
global.setTimeout(_fun74110, 30000);
}
function value_74109(a0, a1) { // fn#74109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9680:822, offset: 0x01d80d4f, size: 108 bytes, params: 3, frame: 16
const env0_1 = a0;
const object = {'initialSendTimestamp': null, 'endpoint': '/quests/earned-decision', 'apiResponseTimestamp': null,
'wasSuccessful': false, 'callerSource': null, 'requestId': null, 'fetchedAt': null};
const Date = global.Date;
object.initialSendTimestamp = Date.now();
object.callerSource = a1;
this.pendingRequests.set(a0, object);
global.setTimeout(_fun74110, 30000);
function _fun74110() { // fn#74110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9680:1041, offset: 0x01d80dbb, size: 75 bytes, params: 1, frame: 12
var value3;
const value2 = env0_0.pendingRequests.get(env0_1);
if (value2 != null) {
value3 = environment.__proto__.__proto__;
trackRoundtrip_74106(value2);
env0_0.pendingRequests.delete(env0_1);
}
}
function value_74111(a0, {wasSuccessful, requestId, fetchedAt}) { // fn#74111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9680:1193, offset: 0x01d80e06, size: 158 bytes, params: 3, frame: 19
var value2;
var trackRoundtrip_74106Binding;
var object2;
requestId = requestId === undefined ? null : requestId;
fetchedAt = fetchedAt === undefined ? null : fetchedAt;
let value = this.pendingRequests.get(a0);
if (value != null) {
value2 = environment.__proto__;
trackRoundtrip_74106Binding = trackRoundtrip_74106;
object2 = {};
copyDataProperties(object2, value, undefined);
value = global.Date.now();
object2['apiResponseTimestamp'] = value;
object2['wasSuccessful'] = wasSuccessful;
object2['requestId'] = requestId;
object2['fetchedAt'] = fetchedAt;
trackRoundtrip_74106Binding(object2);
this.pendingRequests.delete(a0);
}
}
}
function value_74111(a0, {wasSuccessful, requestId, fetchedAt}) { // fn#74111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9680:1193, offset: 0x01d80e06, size: 158 bytes, params: 3, frame: 19
var value2;
var trackRoundtrip_74106Binding;
var object;
requestId = requestId === undefined ? null : requestId;
fetchedAt = fetchedAt === undefined ? null : fetchedAt;
let value = this.pendingRequests.get(a0);
if (value != null) {
value2 = environment.__proto__;
trackRoundtrip_74106Binding = trackRoundtrip_74106;
object = {};
copyDataProperties(object, value, undefined);
value = global.Date.now();
object['apiResponseTimestamp'] = value;
object['wasSuccessful'] = wasSuccessful;
object['requestId'] = requestId;
object['fetchedAt'] = fetchedAt;
trackRoundtrip_74106Binding(object);
this.pendingRequests.delete(a0);
}
}
function _fun74110() { // fn#74110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9680:1041, offset: 0x01d80dbb, size: 75 bytes, params: 1, frame: 12
var value3;
const value2 = env0_0.pendingRequests.get(env0_1);
if (value2 != null) {
value3 = environment.__proto__.__proto__;
trackRoundtrip_74106(value2);
env0_0.pendingRequests.delete(env0_1);
}
}
global.__d(_fun74105, 9494, [6, 7, 4401, 661, 4873, 683, 7071, 4876,
2]) /* metro module 9494, dependencies: [6, 7, 4401, 661, 4873, 683, 7071, 4876, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,95 +1,99 @@
/* Metro module 9492; source: modules/quests/QuestBarRenderDelayTracker.tsx; dependencies: [6, 7, 661, 4826, 4831, 683, 9493, 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 * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun74090(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9678:6, offset: 0x01d805b7, size: 180 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 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
let value = _fun74091();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/QuestBarRenderDelayTracker.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/QuestBarRenderDelayTracker.tsx');
exports.default = value;
}
function _fun74091() { // fn#74091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9678:153, offset: 0x01d8066b, size: 163 bytes, params: 1, frame: 15
return env0_4(QuestBarRenderDelayTracker, [{key: 'clearTimeoutTimer', value: function() {
if (this.timeoutTimer != null) {
global.clearTimeout(this.timeoutTimer);
function _fun74091() { // fn#74091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9678:153, offset: 0x01d8066b, size: 163 bytes, params: 1, frame: 15
return CreateClass(QuestBarRenderDelayTracker, [{key: 'clearTimeoutTimer', value: function() {
if (this.timeoutTimer != null) {
global.clearTimeout(this.timeoutTimer);
this.timeoutTimer = null;
}
}}, {key: 'sendMetric', value: value_74094}, {key: 'startTracking', value: function(a0) {
var env0_0 = this;
var env0_1 = a0;
this.clearTracking();
this.startTime = global.performance.now();
this.questId = a0;
this.timeoutTimer = global.setTimeout(_fun74096, 30000);
}}, {key: 'stopTracking', value: value_74097}, {key: 'clearTracking', value: function() {
this.clearTimeoutTimer();
this.startTime = null;
this.questId = null;
}}]);
function QuestBarRenderDelayTracker() { // fn#74092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9678:174, offset: 0x01d8070e, size: 47 bytes, params: 1, frame: 13
env1_3(this, QuestBarRenderDelayTracker);
this.startTime = null;
this.questId = null;
this.timeoutTimer = null;
}
}}, {key: 'sendMetric', value: value_74094}, {key: 'startTracking', value: function(a0) {
var env0_0 = this;
var env0_1 = a0;
this.clearTracking();
this.startTime = global.performance.now();
this.questId = a0;
this.timeoutTimer = global.setTimeout(_fun74096, 30000);
}}, {key: 'stopTracking', value: value_74097}, {key: 'clearTracking', value: function() {
this.clearTimeoutTimer();
this.startTime = null;
this.questId = null;
}}]);
}
function QuestBarRenderDelayTracker() { // fn#74092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9678:174, offset: 0x01d8070e, size: 47 bytes, params: 1, frame: 13
env1_3(this, QuestBarRenderDelayTracker);
this.startTime = null;
this.questId = null;
this.timeoutTimer = null;
}
function value_74094(a0, a1, a2) { // fn#74094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9678:461, offset: 0x01d8076b, size: 229 bytes, params: 4, frame: 22
var defaultImport;
var distribution;
var QUEST_BAR_RENDER_DELAY;
var defaultImport2;
var track;
const Math = global.Math;
let value = Math.random();
if (!(value > 0.1)) {
value = environment.__proto__;
defaultImport = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
distribution = defaultImport.distribution;
QUEST_BAR_RENDER_DELAY = (require(4831) /* metro dependency 4831: MetricEvents */).MetricEvents.QUEST_BAR_RENDER_DELAY;
Reflect.apply(distribution, defaultImport, [{name: QUEST_BAR_RENDER_DELAY, tags: ['quest_id:' + a0,
'timeout:' + a1]}, a2]);
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport2.track;
QUEST_BAR_RENDER_DELAY = AnalyticEvents.QUEST_BAR_RENDER_DELAY;
Reflect.apply(track, defaultImport2, [QUEST_BAR_RENDER_DELAY, {quest_id: a0, timeout: a1, duration: a2}]);
}
}
function value_74095(a0) { // fn#74095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9678:713, offset: 0x01d80850, size: 90 bytes, params: 2, frame: 15
const env0_1 = a0;
this.clearTracking();
const performance = global.performance;
this.startTime = performance.now();
this.questId = a0;
this.timeoutTimer = global.setTimeout(_fun74096, 30000);
}
function value_74097(a0) { // fn#74097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9678:886, offset: 0x01d808c7, size: 187 bytes, params: 2, frame: 20
let value = a1;
const r4 = value !== undefined ? value : false;
if (this.startTime !== null) {
if (this.questId === a0) {
value = environment.__proto__;
value = importDefault(9493) /* metro dependency 9493: DiscordAppStateNative */;
value = value.getState();
if (value === 'active') {
value = 30000;
value = global.Math.min(r4 ? value : global.Math.round(global.performance.now() - this.startTime),
value);
this.sendMetric(a0, r4, value);
function value_74094(a0, a1, a2) { // fn#74094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9678:461, offset: 0x01d8076b, size: 229 bytes, params: 4, frame: 22
var defaultImport;
var distribution;
var QUEST_BAR_RENDER_DELAY;
var defaultImport2;
var track;
const Math = global.Math;
let value = Math.random();
if (!(value > 0.1)) {
value = environment.__proto__;
defaultImport = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
distribution = defaultImport.distribution;
QUEST_BAR_RENDER_DELAY = (require(4831) /* metro dependency 4831: MetricEvents */).MetricEvents.QUEST_BAR_RENDER_DELAY;
Reflect.apply(distribution, defaultImport, [{name: QUEST_BAR_RENDER_DELAY, tags: ['quest_id:' + a0,
'timeout:' + a1]}, a2]);
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport2.track;
QUEST_BAR_RENDER_DELAY = AnalyticEvents.QUEST_BAR_RENDER_DELAY;
Reflect.apply(track, defaultImport2, [QUEST_BAR_RENDER_DELAY, {quest_id: a0, timeout: a1, duration: a2}]);
}
this.clearTracking();
}
function value_74095(a0) { // fn#74095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9678:713, offset: 0x01d80850, size: 90 bytes, params: 2, frame: 15
const env0_1 = a0;
this.clearTracking();
const performance = global.performance;
this.startTime = performance.now();
this.questId = a0;
this.timeoutTimer = global.setTimeout(_fun74096, 30000);
function _fun74096() { // fn#74096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9678:824, offset: 0x01d808aa, size: 29 bytes, params: 1, frame: 13
env0_0.stopTracking(env0_1, true);
}
}
function value_74097(a0) { // fn#74097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9678:886, offset: 0x01d808c7, size: 187 bytes, params: 2, frame: 20
let value = a1;
const r4 = value !== undefined ? value : false;
if (this.startTime !== null) {
if (this.questId === a0) {
value = environment.__proto__;
value = importDefault(9493) /* metro dependency 9493: DiscordAppStateNative */;
value = value.getState();
if (value === 'active') {
value = 30000;
value = global.Math.min(r4 ? value : global.Math.round(global.performance.now() - this.startTime),
value);
this.sendMetric(a0, r4, value);
}
this.clearTracking();
}
}
}
}
}
function _fun74096() { // fn#74096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9678:824, offset: 0x01d808aa, size: 29 bytes, params: 1, frame: 13
env0_0.stopTracking(env0_1, true);
}
global.__d(_fun74090, 9492, [6, 7, 661, 4826, 4831, 683, 9493,
2]) /* metro module 9492, dependencies: [6, 7, 661, 4826, 4831, 683, 9493, 2] */;
+52 -41
View File
@@ -1,28 +1,38 @@
/* Metro module 6528; source: modules/quests/QuestConstants.tsx; dependencies: [6529, 672, 6530, 507, 6531, 6535, 22, 2, 6536] */
import Durations from '../../utils/Durations.tsx'; /* Metro dependency 672 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00022Module from '../../by-id/module-00022.js'; /* Metro dependency 22 */
import * as HTTPUtilsModule from '../../external/discord_common/js/packages/http-utils/HTTPUtils.tsx'; /* Metro dependency 507 */
import * as QuestVariantsModule from '../../external/discord_common/js/shared/shared-constants/QuestVariants.tsx'; /* Metro dependency 6529 */
import * as QuestsModule from '../../external/discord_common/js/shared/shared-constants/Quests.tsx'; /* Metro dependency 6530 */
import * as QuestTypesModule from './QuestTypes.tsx'; /* Metro dependency 6531 */
import * as FirstPartyQuestTaskTypesModule from '../../external/discord_common/js/shared/shared-constants/FirstPartyQuestTaskTypes.tsx'; /* Metro dependency 6535 */
import * as DismissibleQuestContentFlagsModule from '../../external/discord_common/js/shared/shared-constants/DismissibleQuestContentFlags.tsx'; /* Metro dependency 6536 */
function _fun51399(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6706:6, offset: 0x01234080, size: 2641 bytes, params: 8, frame: 42
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let Set = global.Set;
const QuestVariants = (require(6529) /* metro dependency 6529: QuestVariants */).QuestVariants;
const QuestVariants = (QuestVariantsModule).QuestVariants;
const NITRO_2_POINT_0_CTA = QuestVariants.NITRO_2_POINT_0_CTA;
const ORBS_MULTIPLIER_QUEST = QuestVariants.ORBS_MULTIPLIER_QUEST;
const XBOX_GAME_PASS_QUEST = QuestVariants.XBOX_GAME_PASS_QUEST;
let set = new Set([NITRO_2_POINT_0_CTA, ORBS_MULTIPLIER_QUEST, XBOX_GAME_PASS_QUEST]);
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const Millis = (Durations).Millis;
const MINUTE = Millis.MINUTE;
const Quests = (require(6530) /* metro dependency 6530: Quests */).Quests;
const Quests = (QuestsModule).Quests;
const ConsecutiveHeartbeatPeriodMinutes = Quests.ConsecutiveHeartbeatPeriodMinutes;
const value2 = MINUTE * ConsecutiveHeartbeatPeriodMinutes;
const aPIBaseURL = (require(507) /* metro dependency 507: HTTPUtils */).getAPIBaseURL();
const aPIBaseURL = (HTTPUtilsModule).getAPIBaseURL();
const r16 = aPIBaseURL.indexOf('localhost') !== -1 ? '' + aPIBaseURL + '/_cdn_storage/' : aPIBaseURL.indexOf('127.0.0.1') === -1 ? 'https://cdn.discordapp.com/' : '' + aPIBaseURL + '/_cdn_storage/';
const value9 = r16 + 'quests/';
Set = global.Set;
const {DESKTOP_ACCOUNT_PANEL_AREA, MOBILE_HOME_DOCK_AREA, QUEST_HOME_BANNER_DESKTOP, QUEST_HOME_MOBILE_CAROUSEL,
VIDEO_MODAL_MOBILE} = (require(6531) /* metro dependency 6531: QuestTypes */).QuestPlacement;
VIDEO_MODAL_MOBILE} = (QuestTypesModule).QuestPlacement;
set = new Set([DESKTOP_ACCOUNT_PANEL_AREA, MOBILE_HOME_DOCK_AREA, QUEST_HOME_BANNER_DESKTOP,
QUEST_HOME_MOBILE_CAROUSEL, VIDEO_MODAL_MOBILE]);
Set = global.Set;
const FirstPartyQuestTaskTypes = (require(6535) /* metro dependency 6535: FirstPartyQuestTaskTypes */).FirstPartyQuestTaskTypes;
const FirstPartyQuestTaskTypes = (FirstPartyQuestTaskTypesModule).FirstPartyQuestTaskTypes;
let STREAM_ON_DESKTOP = FirstPartyQuestTaskTypes.STREAM_ON_DESKTOP;
let PLAY_ON_DESKTOP = FirstPartyQuestTaskTypes.PLAY_ON_DESKTOP;
let PLAY_ON_XBOX = FirstPartyQuestTaskTypes.PLAY_ON_XBOX;
@@ -43,25 +53,24 @@ function _fun51399(global, require, importDefault, importAll, module, exports, d
PLAY_ON_PLAYSTATION = FirstPartyQuestTaskTypes.PLAY_ON_PLAYSTATION;
PLAY_ACTIVITY = FirstPartyQuestTaskTypes.PLAY_ACTIVITY;
set = new Set([STREAM_ON_DESKTOP, PLAY_ON_DESKTOP, PLAY_ON_XBOX, PLAY_ON_PLAYSTATION, PLAY_ACTIVITY]);
const object = {VIDEO: 'task_video', PLAY: 'task_play'};
const object2 = {VIRTUAL_CURRENCY: 'reward_virtual_currency', COLLECTIBLE: 'reward_collectible',
const object3 = {VIDEO: 'task_video', PLAY: 'task_play'};
const object4 = {VIRTUAL_CURRENCY: 'reward_virtual_currency', COLLECTIBLE: 'reward_collectible',
IN_GAME: 'reward_in_game'};
const PLAY = object.PLAY;
const PLAY = object3.PLAY;
const items6 = [{group: 'task', filter: PLAY}];
const VIDEO = object.VIDEO;
const VIDEO = object3.VIDEO;
items6[1] = {group: 'task', filter: VIDEO};
const VIRTUAL_CURRENCY = object2.VIRTUAL_CURRENCY;
const VIRTUAL_CURRENCY = object4.VIRTUAL_CURRENCY;
items6[2] = {group: 'reward', filter: VIRTUAL_CURRENCY};
const COLLECTIBLE = object2.COLLECTIBLE;
const COLLECTIBLE = object4.COLLECTIBLE;
items6[3] = {group: 'reward', filter: COLLECTIBLE};
const IN_GAME = object2.IN_GAME;
const IN_GAME = object4.IN_GAME;
items6[4] = {group: 'reward', filter: IN_GAME};
const env0_2 = ['reward', 'task'];
Object = global.Object;
const entries = Object.entries;
const value18 = require(22) /* metro dependency 22 */;
const value20 = Reflect.apply(entries, Object, [value18.groupBy(items6, 'group')]).sort(_fun51400);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/QuestConstants.tsx');
const value20 = Reflect.apply(entries, Object, [Module00022Module.groupBy(items6, 'group')]).sort(_fun51400);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/QuestConstants.tsx');
exports.QuestsExperimentLocations = {ACTIVITY_PANEL: 'quests_bar_activity_panel', QUESTS_MANAGER: 'quests_manager',
QUESTS_CONSOLE_OPTIMISTIC_UPDATES_MANAGER: 'quests_console_optimistic_updates_manager',
USER_SETTINGS_GIFT_INVENTORY: 'user_settings_gift_inventory',
@@ -89,7 +98,7 @@ function _fun51399(global, require, importDefault, importAll, module, exports, d
NITRO_HOME_MARKETING: 'nitro_home_marketing', NITRO_HOME_TAB: 'nitro_home_tab',
QUEST_ORB_MULTIPLIER_TAB_TOOLTIP: 'quest_orb_multiplier_tab_tooltip',
PLAY_QUEST_CONNECTION_MODAL: 'play_quest_connection_modal'};
const DismissibleQuestContentFlags = (require(6536) /* metro dependency 6536: DismissibleQuestContentFlags */).DismissibleQuestContentFlags;
const DismissibleQuestContentFlags = (DismissibleQuestContentFlagsModule).DismissibleQuestContentFlags;
exports.DismissibleQuestContentFlags = DismissibleQuestContentFlags;
exports.QuestVariants = QuestVariants;
exports.NitroQuestVariants = set;
@@ -131,32 +140,34 @@ function _fun51399(global, require, importDefault, importAll, module, exports, d
exports.EMPTY_AD_DECISION_DATA = {is_targeted: false};
exports.QuestHomeSortMethods = {SUGGESTED: 'suggested', MOST_RECENT: 'most_recent', EXPIRING_SOON: 'expiring_soon',
RECENTLY_ENROLLED: 'recently_enrolled'};
exports.TaskFilterTypes = object;
exports.RewardFilterTypes = object2;
exports.TaskFilterTypes = object3;
exports.RewardFilterTypes = object4;
exports.getQuestHomeFilterOptionItem = getQuestHomeFilterOptionItem;
exports.SORTED_QUEST_HOME_FILTER_GROUPS = value20;
}
function _fun51400(a0, a1) { // fn#51400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6706:5051, offset: 0x01234ad1, size: 79 bytes, params: 3, frame: 13
const binding = env0_2;
const value2 = 0;
const value3 = binding.indexOf(a0[value2]);
const value = env0_2.indexOf(a1[value2]);
return value3 < value ? -1 : value < value3 ? 1 : value2;
}
function getQuestHomeFilterOptionItem(a0) { // fn#51401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6706:6940, offset: 0x01234b20, size: 116 bytes, params: 2, frame: 14
var r0;
const Object = global.Object;
var value;
const value2 = Object.values(env0_0);
if (value2.includes(a0)) {
r0 = {group: 'task', filter: a0};
} else {
value = global.Object.values(env0_1);
value = value.includes(a0);
r0 = value ? {group: 'reward', filter: a0} : null;
function _fun51400(a0, a1) { // fn#51400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6706:5051, offset: 0x01234ad1, size: 79 bytes, params: 3, frame: 13
const binding = env0_2;
const value2 = 0;
const value3 = binding.indexOf(a0[value2]);
const value = env0_2.indexOf(a1[value2]);
return value3 < value ? -1 : value < value3 ? 1 : value2;
}
return r0;
function getQuestHomeFilterOptionItem(a0) { // fn#51401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6706:6940, offset: 0x01234b20, size: 116 bytes, params: 2, frame: 14
var r0;
const Object = global.Object;
var value;
const value2 = Object.values(env0_0);
if (value2.includes(a0)) {
r0 = {group: 'task', filter: a0};
} else {
value = global.Object.values(env0_1);
value = value.includes(a0);
r0 = value ? {group: 'reward', filter: a0} : null;
}
return r0;
}
}
global.__d(_fun51399, 6528, [6529, 672, 6530, 507, 6531, 6535, 22, 2,
6536]) /* metro module 6528, dependencies: [6529, 672, 6530, 507, 6531, 6535, 22, 2, 6536] */;
@@ -1,171 +1,186 @@
/* Metro module 9490; source: modules/quests/QuestDecisionRoundtripTracker.tsx; dependencies: [6, 7, 4401, 7093, 661, 4873, 683, 7071, 4876, 7108, 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 NetworkStore from '../../stores/NetworkStore.tsx'; /* Metro dependency 4401 */
import QuestStore from './QuestStore.tsx'; /* Metro dependency 7093 */
import NewAdRequestBehaviorExperiment from './experiments/NewAdRequestBehaviorExperiment.tsx'; /* Metro dependency 7108 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun74080(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9676:6, offset: 0x01d7fec2, size: 223 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 networkStore = importDefault(4401) /* metro dependency 4401: NetworkStore */;
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
let value = _fun74082();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/QuestDecisionRoundtripTracker.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/QuestDecisionRoundtripTracker.tsx');
exports.default = value;
}
function trackRoundtrip_74081(a0, a1, a2) { // fn#74081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9676:161, offset: 0x01d7ffa1, size: 469 bytes, params: 4, frame: 22
var r9;
var decision_id;
var fetchedAt;
var apiResponseTimestamp;
var value4;
var signalStrength;
var defaultImport;
var track;
var QUEST_DECISION_ROUNDTRIP;
var object2;
var previousAdDecision;
const Math = global.Math;
let value = Math.random();
if (!(value > 0.1)) {
apiResponseTimestamp = a0.apiResponseTimestamp;
value = null;
r9 = value == apiResponseTimestamp ? value : a0.apiResponseTimestamp - a0.initialSendTimestamp;
value4 = undefined;
signalStrength = require(dependencyMap[5]).getSignalStrength();
defaultImport = importDefault(dependencyMap[6]);
track = defaultImport.track;
QUEST_DECISION_ROUNDTRIP = AnalyticEvents.QUEST_DECISION_ROUNDTRIP;
object2 = {};
copyDataProperties(object2, importDefault(dependencyMap[7])(), dependencyMap);
object2['endpoint'] = a0.endpoint;
object2['was_successful'] = a0.wasSuccessful;
object2['api_latency_ms'] = r9;
object2['mobile_network_type'] = NetworkStore.getType();
copyDataProperties(object2, value != signalStrength && ({mobile_signal_strength_level: signalStrength}),
dependencyMap);
object2['caller_source'] = a0.callerSource;
object2['ad_request_id'] = a0.adRequestId;
object2['fetched_at'] = a2;
previousAdDecision = a0.previousAdDecision;
decision_id = value == previousAdDecision || value == previousAdDecision.adDecisionData ? value4 : previousAdDecision.adDecisionData.decision_id;
r9 = value != decision_id ? decision_id : value;
object2['previous_ad_request_id'] = r9;
previousAdDecision = a0.previousAdDecision;
fetchedAt = value == previousAdDecision ? value4 : previousAdDecision.fetchedAt;
object2['previous_fetched_at'] = value != fetchedAt ? fetchedAt : value;
object2['transition_case'] = a1;
value = require(dependencyMap[8]);
value = value.isForegrounded();
object2['is_foregrounded'] = value;
Reflect.apply(track, defaultImport, [QUEST_DECISION_ROUNDTRIP, object2]);
}
}
function _fun74082() { // fn#74082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9676:893, offset: 0x01d80176, size: 86 bytes, params: 1, frame: 15
return env0_4(QuestDecisionRoundtripTracker, [{key: 'recordQuestRequestAttempt', value: value_74084},
{key: 'recordQuestRequestApiResponse', value: value_74086}]);
}
function value_74084(a0, a1) { // fn#74084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9676:1064, offset: 0x01d80209, size: 233 bytes, params: 3, frame: 19
var object2;
var environment;
var r7;
let value = a2;
const env0_1 = a0;
const r4 = value !== undefined ? value : null;
value = environment.__proto__;
const defaultImport = importDefault(7108) /* metro dependency 7108: NewAdRequestBehaviorExperiment */;
const getConfig = defaultImport.getConfig;
const enableNewRequestBehavior = Reflect.apply(getConfig, defaultImport,
[{location: 'recordQuestRequestAttempt'}]).enableNewRequestBehavior;
const value2 = null;
if (enableNewRequestBehavior) {
if (value2 != r4) {
value = QuestStore.questAdDecisionByPlacement.get(r4);
r7 = value2 != value ? value : value2;
} else {
r7 = value2;
function trackRoundtrip_74081(a0, a1, a2) { // fn#74081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9676:161, offset: 0x01d7ffa1, size: 469 bytes, params: 4, frame: 22
var r9;
var decision_id;
var fetchedAt;
var apiResponseTimestamp;
var value4;
var signalStrength;
var defaultImport;
var track;
var QUEST_DECISION_ROUNDTRIP;
var object;
var previousAdDecision;
const Math = global.Math;
let value = Math.random();
if (!(value > 0.1)) {
apiResponseTimestamp = a0.apiResponseTimestamp;
value = null;
r9 = value == apiResponseTimestamp ? value : a0.apiResponseTimestamp - a0.initialSendTimestamp;
value4 = undefined;
signalStrength = require(dependencyMap[5]).getSignalStrength();
defaultImport = importDefault(dependencyMap[6]);
track = defaultImport.track;
QUEST_DECISION_ROUNDTRIP = AnalyticEvents.QUEST_DECISION_ROUNDTRIP;
object = {};
copyDataProperties(object, importDefault(dependencyMap[7])(), dependencyMap);
object['endpoint'] = a0.endpoint;
object['was_successful'] = a0.wasSuccessful;
object['api_latency_ms'] = r9;
object['mobile_network_type'] = NetworkStore.getType();
copyDataProperties(object, value != signalStrength && ({mobile_signal_strength_level: signalStrength}),
dependencyMap);
object['caller_source'] = a0.callerSource;
object['ad_request_id'] = a0.adRequestId;
object['fetched_at'] = a2;
previousAdDecision = a0.previousAdDecision;
decision_id = value == previousAdDecision || value == previousAdDecision.adDecisionData ? value4 : previousAdDecision.adDecisionData.decision_id;
r9 = value != decision_id ? decision_id : value;
object['previous_ad_request_id'] = r9;
previousAdDecision = a0.previousAdDecision;
fetchedAt = value == previousAdDecision ? value4 : previousAdDecision.fetchedAt;
object['previous_fetched_at'] = value != fetchedAt ? fetchedAt : value;
object['transition_case'] = a1;
value = require(dependencyMap[8]);
value = value.isForegrounded();
object['is_foregrounded'] = value;
Reflect.apply(track, defaultImport, [QUEST_DECISION_ROUNDTRIP, object]);
}
} else {
r7 = value2;
}
object2 = {'initialSendTimestamp': null, 'endpoint': null, 'apiResponseTimestamp': null, 'wasSuccessful': false,
'callerSource': null, 'adRequestId': null};
const Date = global.Date;
object2.initialSendTimestamp = Date.now();
object2.endpoint = a0;
object2.callerSource = a1;
object2.previousAdDecision = r7;
object2.placement = r4;
this.pendingRequests.set(a0, object2);
global.setTimeout(_fun74085, 30000);
}
function value_74086(a0, {wasSuccessful, adRequestId, currentQuestId, currentFetchedAt}) { // fn#74086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9676:1602, offset: 0x01d80343, size: 305 bytes, params: 3, frame: 25
var environment;
var r5;
var r6;
var value7;
var defaultImport;
var getConfig;
var object2;
var value9;
var trackRoundtrip_74081Binding;
adRequestId = adRequestId === undefined ? null : adRequestId;
currentQuestId = currentQuestId === undefined ? null : currentQuestId;
currentFetchedAt = currentFetchedAt === undefined ? null : currentFetchedAt;
const value5 = this.pendingRequests.get(a0);
if (value5 != null) {
value7 = environment.__proto__;
defaultImport = importDefault(7108) /* metro dependency 7108: NewAdRequestBehaviorExperiment */;
getConfig = defaultImport.getConfig;
object2 = {location: 'recordQuestRequestApiResponse'};
if (Reflect.apply(getConfig, defaultImport, [object2]).enableNewRequestBehavior) {
value9 = ((a0, a1) => {
var closure = _fun74088;
var value = undefined;
var value2 = closure(a0);
var value3 = closure(a1);
function _fun74082() { // fn#74082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9676:893, offset: 0x01d80176, size: 86 bytes, params: 1, frame: 15
return CreateClass(QuestDecisionRoundtripTracker, [{key: 'recordQuestRequestAttempt', value: value_74084},
{key: 'recordQuestRequestApiResponse', value: value_74086}]);
function QuestDecisionRoundtripTracker() { // fn#74083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9676:914, offset: 0x01d801cc, size: 61 bytes, params: 1, frame: 13
const value = environment.__proto__;
env1_3(this, QuestDecisionRoundtripTracker);
const Map = global.Map;
this.pendingRequests = new Map();
}
function value_74084(a0, a1) { // fn#74084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9676:1064, offset: 0x01d80209, size: 233 bytes, params: 3, frame: 19
var environment;
var r7;
let value = a2;
const env0_1 = a0;
const r4 = value !== undefined ? value : null;
value = environment.__proto__;
const defaultImport = NewAdRequestBehaviorExperiment;
const getConfig = defaultImport.getConfig;
const enableNewRequestBehavior = Reflect.apply(getConfig, defaultImport,
[{location: 'recordQuestRequestAttempt'}]).enableNewRequestBehavior;
const value2 = null;
if (enableNewRequestBehavior) {
if (value2 != r4) {
value = QuestStore.questAdDecisionByPlacement.get(r4);
r7 = value2 != value ? value : value2;
} else {
r7 = value2;
}
} else {
r7 = value2;
}
object = {'initialSendTimestamp': null, 'endpoint': null, 'apiResponseTimestamp': null, 'wasSuccessful': false,
'callerSource': null, 'adRequestId': null};
const Date = global.Date;
object.initialSendTimestamp = Date.now();
object.endpoint = a0;
object.callerSource = a1;
object.previousAdDecision = r7;
object.placement = r4;
this.pendingRequests.set(a0, object);
global.setTimeout(_fun74085, 30000);
function _fun74085() { // fn#74085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9676:1436, offset: 0x01d802f2, size: 81 bytes, params: 1, frame: 16
var value3;
const value2 = env0_0.pendingRequests.get(env0_1);
if (value2 != null) {
value3 = environment.__proto__.__proto__;
trackRoundtrip_74081(value2, 'timeout', null);
env0_0.pendingRequests.delete(env0_1);
}
}
}
function value_74086(a0, {wasSuccessful, adRequestId, currentQuestId, currentFetchedAt}) { // fn#74086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9676:1602, offset: 0x01d80343, size: 305 bytes, params: 3, frame: 25
var environment;
var r5;
var r6;
var value7;
var defaultImport;
var getConfig;
var object;
var value9;
var trackRoundtrip_74081Binding;
adRequestId = adRequestId === undefined ? null : adRequestId;
currentQuestId = currentQuestId === undefined ? null : currentQuestId;
currentFetchedAt = currentFetchedAt === undefined ? null : currentFetchedAt;
const value5 = this.pendingRequests.get(a0);
if (value5 != null) {
value7 = environment.__proto__;
defaultImport = importDefault(7108) /* metro dependency 7108: NewAdRequestBehaviorExperiment */;
getConfig = defaultImport.getConfig;
object = {location: 'recordQuestRequestApiResponse'};
if (Reflect.apply(getConfig, defaultImport, [object]).enableNewRequestBehavior) {
value9 = ((a0, a1) => {
var closure = _fun74088;
var value = undefined;
var value2 = closure(a0);
var value3 = closure(a1);
return value2 !== 'quest' ? '' + value2 + '_to_' + value3 : value3 === 'quest' ? (a0 == null ? value : a0.questId) !== (a1 == null ? value : a1.questId) ? 'different_quest' : 'same_quest' : '' + value2 + '_to_' + value3;
})(value5.previousAdDecision, currentFetchedAt === null ? null : {questId: currentQuestId,
adCreativeId: currentQuestId, fetchedAt: currentFetchedAt, ttlMillis: 0,
adDecisionData: adRequestId != null ? {decision_id: adRequestId} : undefined});
r5 = currentFetchedAt;
r6 = value9;
} else {
r5 = null;
r6 = 'legacy';
}
trackRoundtrip_74081Binding = trackRoundtrip_74081;
object = {};
copyDataProperties(object, value5, undefined);
object['apiResponseTimestamp'] = global.Date.now();
object['wasSuccessful'] = wasSuccessful;
object['adRequestId'] = adRequestId;
trackRoundtrip_74081Binding(object, r6, r5);
this.pendingRequests.delete(a0);
}
function computeTransitionCase(a0, a1) { // fn#74087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9676:1961, owner: value_74086.computeTransitionCase, offset: 0x01d80474, size: 124 bytes, params: 3, frame: 18
const closure = function(a0) {
return a0 == null ? 'null' : a0.questId == null ? 'no_serve' : 'quest';
};
const value = undefined;
const value2 = closure(a0);
const value3 = closure(a1);
return value2 !== 'quest' ? '' + value2 + '_to_' + value3 : value3 === 'quest' ? (a0 == null ? value : a0.questId) !== (a1 == null ? value : a1.questId) ? 'different_quest' : 'same_quest' : '' + value2 + '_to_' + value3;
})(value5.previousAdDecision, currentFetchedAt === null ? null : {questId: currentQuestId,
adCreativeId: currentQuestId, fetchedAt: currentFetchedAt, ttlMillis: 0,
adDecisionData: adRequestId != null ? {decision_id: adRequestId} : undefined});
r5 = currentFetchedAt;
r6 = value9;
} else {
r5 = null;
r6 = 'legacy';
}
}
trackRoundtrip_74081Binding = trackRoundtrip_74081;
object2 = {};
copyDataProperties(object2, value5, undefined);
object2['apiResponseTimestamp'] = global.Date.now();
object2['wasSuccessful'] = wasSuccessful;
object2['adRequestId'] = adRequestId;
trackRoundtrip_74081Binding(object2, r6, r5);
this.pendingRequests.delete(a0);
}
}
function _fun74085() { // fn#74085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9676:1436, offset: 0x01d802f2, size: 81 bytes, params: 1, frame: 16
var value3;
const value2 = env0_0.pendingRequests.get(env0_1);
if (value2 != null) {
value3 = environment.__proto__.__proto__;
trackRoundtrip_74081(value2, 'timeout', null);
env0_0.pendingRequests.delete(env0_1);
}
}
function computeTransitionCase(a0, a1) { // fn#74087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9676:1961, owner: value_74086.computeTransitionCase, offset: 0x01d80474, size: 124 bytes, params: 3, frame: 18
const closure = function(a0) {
return a0 == null ? 'null' : a0.questId == null ? 'no_serve' : 'quest';
};
const value = undefined;
const value2 = closure(a0);
const value3 = closure(a1);
return value2 !== 'quest' ? '' + value2 + '_to_' + value3 : value3 === 'quest' ? (a0 == null ? value : a0.questId) !== (a1 == null ? value : a1.questId) ? 'different_quest' : 'same_quest' : '' + value2 + '_to_' + value3;
function computeTransitionCaseGetState(a0) { // fn#74088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9676:2010, owner: value_74086.computeTransitionCase.getState, offset: 0x01d804f0, size: 44 bytes, params: 2, frame: 4
return a0 == null ? 'null' : a0.questId == null ? 'no_serve' : 'quest';
}
global.__d(_fun74080, 9490, [6, 7, 4401, 7093, 661, 4873, 683, 7071, 4876, 7108,
2]) /* metro module 9490, dependencies: [6, 7, 4401, 7093, 661, 4873, 683, 7071, 4876, 7108, 2] */;
@@ -1,11 +1,14 @@
/* Metro module 9481; source: modules/quests/QuestHomeNavigationStore.tsx; dependencies: [4024, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun73737(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9667:6, offset: 0x01d764cc, size: 110 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const zustandStore = (require(4024) /* metro dependency 4024: ZustandStore */).createZustandStore(function() {
return {'sort': null, 'filter': null, 'scrollToQuestId': null};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/QuestHomeNavigationStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/QuestHomeNavigationStore.tsx');
exports.default = zustandStore;
}
global.__d(_fun73737, 9481, [4024, 2]) /* metro module 9481, dependencies: [4024, 2] */;
File diff suppressed because it is too large. Load diff
+10 -4
View File
@@ -1,24 +1,29 @@
/* Metro module 6531; source: modules/quests/QuestTypes.tsx; dependencies: [6532, 2, 6533, 6534] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as QuestRewardCodePlatformsModule from '../../external/discord_common/js/shared/shared-constants/QuestRewardCodePlatforms.tsx'; /* Metro dependency 6532 */
import * as QuestContentModule from '../../external/discord_common/js/shared/shared-constants/QuestContent.tsx'; /* Metro dependency 6533 */
import * as QuestPlacementModule from '../../external/discord_common/js/shared/shared-constants/QuestPlacement.tsx'; /* Metro dependency 6534 */
function _fun51404(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6709:6, offset: 0x01234f66, size: 400 bytes, params: 8, frame: 23
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Set = global.Set;
Object = global.Object;
const values = Object.values;
const QuestRewardCodePlatforms = (require(6532) /* metro dependency 6532: QuestRewardCodePlatforms */).QuestRewardCodePlatforms;
const QuestRewardCodePlatforms = (QuestRewardCodePlatformsModule).QuestRewardCodePlatforms;
let value = Reflect.apply(values, Object, [QuestRewardCodePlatforms]);
value = value.filter(function(a0) {
return typeof a0 === 'number';
});
const set = new Set(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/QuestTypes.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/QuestTypes.tsx');
exports.QuestsVisibleMessagesChangedSource = {FIRST_LAYOUT: 'FIRST_LAYOUT', SCROLL: 'SCROLL',
VISIBILITY_CHANGED: 'VISIBILITY_CHANGED'};
exports.QUEST_REWARD_CODE_PLATFORMS_SET = set;
exports.QuestRewardCodePlatforms = QuestRewardCodePlatforms;
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
const QuestContent = (QuestContentModule).QuestContent;
exports.QuestContent = QuestContent;
const QuestPlacement = (require(6534) /* metro dependency 6534: QuestPlacement */).QuestPlacement;
const QuestPlacement = (QuestPlacementModule).QuestPlacement;
exports.QuestPlacement = QuestPlacement;
exports.QuestConsoleStartErrorLocal = {GENERIC: 'generic', RATE_LIMITED: 'rate_limited'};
exports.TaskPlatformScreen = {DESKTOP: 'desktop', CONSOLE: 'console', SELECT: 'select'};
@@ -26,3 +31,4 @@ function _fun51404(global, require, importDefault, importAll, module, exports, d
ANOTHER_MODAL_OPENED: 'ANOTHER_MODAL_OPENED', PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE'};
}
global.__d(_fun51404, 6531, [6532, 2, 6533, 6534]) /* metro module 6531, dependencies: [6532, 2, 6533, 6534] */;
+22 -18
View File
@@ -1,30 +1,34 @@
/* Metro module 7115; source: modules/quests/QuestUtmStore.tsx; dependencies: [629, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00629Module from '../../by-id/module-00629.js'; /* Metro dependency 629 */
function _fun56875(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7293:6, offset: 0x013d44e9, size: 111 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(629) /* metro dependency 629 */;
let value = Module00629Module;
value = value.create(function(a0) {
var env0_0 = a0;
return {utmSourceCurrent: undefined, utmMediumCurrent: undefined, utmCampaignCurrent: undefined,
utmContentCurrent: undefined, setUtmCurrentContext: _fun56877, getUtmCurrentContext: _fun56878};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/QuestUtmStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/QuestUtmStore.tsx');
exports.default = value;
function _fun56876(a0) { // fn#56876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7293:114, offset: 0x013d4558, size: 55 bytes, params: 2, frame: 4
const env0_0 = a0;
return {utmSourceCurrent: undefined, utmMediumCurrent: undefined, utmCampaignCurrent: undefined,
utmContentCurrent: undefined, setUtmCurrentContext: setUtmCurrentContext,
getUtmCurrentContext: getUtmCurrentContext};
function setUtmCurrentContext({utmSourceCurrent, utmMediumCurrent, utmCampaignCurrent, utmContentCurrent}) { // fn#56877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7293:239, offset: 0x013d458f, size: 65 bytes, params: 2, frame: 14
return env0_0({utmSourceCurrent: utmSourceCurrent, utmMediumCurrent: utmMediumCurrent,
utmCampaignCurrent: utmCampaignCurrent, utmContentCurrent: utmContentCurrent});
}
function getUtmCurrentContext() { // fn#56878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7293:428, offset: 0x013d45d0, size: 19 bytes, params: 1, frame: 9
return env1_0.getState();
}
}
}
function _fun56876(a0) { // fn#56876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7293:114, offset: 0x013d4558, size: 55 bytes, params: 2, frame: 4
const env0_0 = a0;
return {utmSourceCurrent: undefined, utmMediumCurrent: undefined, utmCampaignCurrent: undefined,
utmContentCurrent: undefined, setUtmCurrentContext: setUtmCurrentContext,
getUtmCurrentContext: getUtmCurrentContext};
}
function setUtmCurrentContext({utmSourceCurrent, utmMediumCurrent, utmCampaignCurrent, utmContentCurrent}) { // fn#56877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7293:239, offset: 0x013d458f, size: 65 bytes, params: 2, frame: 14
return env0_0({utmSourceCurrent: utmSourceCurrent, utmMediumCurrent: utmMediumCurrent,
utmCampaignCurrent: utmCampaignCurrent, utmContentCurrent: utmContentCurrent});
}
function getUtmCurrentContext() { // fn#56878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7293:428, offset: 0x013d45d0, size: 19 bytes, params: 1, frame: 9
return env1_0.getState();
}
global.__d(_fun56875, 7115, [629, 2]) /* metro module 7115, dependencies: [629, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 9951; source: modules/quests/SponsoredQuestUtils.native.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun77937(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10137:6, offset: 0x01e133ae, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/SponsoredQuestUtils.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/SponsoredQuestUtils.native.tsx');
exports.createGameSheetHook = function(a0) {
a0.quest;
a0.sourceQuestContent;
@@ -12,17 +14,22 @@ function _fun77937(global, require, importDefault, importAll, module, exports, d
a0.onGameSheetClosed;
return _fun77939;
};
function createGameSheetHook(a0) { // fn#77938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10137:193, offset: 0x01e13405, size: 50 bytes, params: 2, frame: 2
a0.quest;
a0.sourceQuestContent;
a0.applications;
a0.popoutTargetElementRef;
a0.onGameSheetOpened;
a0.onGameSheetClosed;
return function(a0) {
return a0;
};
}
}
function createGameSheetHook(a0) { // fn#77938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10137:193, offset: 0x01e13405, size: 50 bytes, params: 2, frame: 2
a0.quest;
a0.sourceQuestContent;
a0.applications;
a0.popoutTargetElementRef;
a0.onGameSheetOpened;
a0.onGameSheetClosed;
return function(a0) {
return a0;
};
function _fun77939(a0) { // fn#77939, offset: 0x00c37049, size: 5 bytes, params: 2, frame: 1
return a0;
}
global.__d(_fun77937, 9951, [2]) /* metro module 9951, dependencies: [2] */;
@@ -1,18 +1,21 @@
/* Metro module 15385; source: modules/quests/UnenrolledActivityQuestStore.tsx; dependencies: [6, 7, 15, 17, 18, 21, 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 */
function _fun117616(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15582:6, offset: 0x024bae13, size: 350 bytes, params: 8, frame: 19
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 */;
let Set = global.Set;
Object.create(Set.prototype, {constructor: {value: Set}});
new Set();
Set = global.Set;
let set = new Set();
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
set = _fun117620(PersistedStore);
set.displayName = 'UnenrolledActivityQuestStore';
set.persistKey = 'UnenrolledActivityQuestStore';
@@ -22,87 +25,114 @@ function _fun117616(global, require, importDefault, importAll, module, exports,
env0_8 = a0.autoEnroll;
return true;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/UnenrolledActivityQuestStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/UnenrolledActivityQuestStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_117617() { // fn#117617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15582:148, offset: 0x024baf71, 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_117617() { // fn#117617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15582:148, offset: 0x024baf71, 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_117617_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_117617_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun117620(a0) { // fn#117620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15582:412, offset: 0x024bafd3, size: 149 bytes, params: 2, frame: 16
const closure = UnenrolledActivityQuestStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function(a0) {
var r2;
var r3;
var property = global.Set;
var value = undefined;
r2 = a0 == null ? value : a0.dismissedQuestIds;
r2 = r2 ?? [];
var value3 = new property();
r3 = a0 == null ? value : a0.autoEnroll;
env1_8 = r3 != null && r3;
return value;
}}, {key: 'getState', value: value_117623}, {key: 'isDismissed', value: value_117624}, {key: 'getDismissedQuestIds',
value: value_117625}]);
}
function _fun117620(a0) { // fn#117620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15582:412, offset: 0x024bafd3, size: 149 bytes, params: 2, frame: 16
const UnenrolledActivityQuestStore2 = UnenrolledActivityQuestStore;
Inherits(UnenrolledActivityQuestStore2, a0);
return CreateClass(UnenrolledActivityQuestStore2, [{key: 'initialize', value: function(a0) {
var r2;
var r3;
var property = global.Set;
var value = undefined;
r2 = a0 == null ? value : a0.dismissedQuestIds;
r2 = r2 ?? [];
var value3 = new property();
r3 = a0 == null ? value : a0.autoEnroll;
env1_8 = r3 != null && r3;
return value;
}}, {key: 'getState', value: value_117623}, {key: 'isDismissed', value: value_117624}, {key: 'getDismissedQuestIds',
value: value_117625}]);
function UnenrolledActivityQuestStore() { // fn#117621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15582:424, offset: 0x01081bdc, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, UnenrolledActivityQuestStore);
const value3 = env1_5(UnenrolledActivityQuestStore);
return env1_4(this, _isNativeReflectConstruct_117617() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_117623() { // fn#117623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15582:930, offset: 0x024bb0cb, size: 38 bytes, params: 1, frame: 15
const binding = env1_7;
const items2 = [];
arraySpread(items2, binding, 0, undefined);
return {dismissedQuestIds: items2, autoEnroll: env1_8};
}
function value_117624(a0) { // fn#117624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15582:1014, offset: 0x010f296e, size: 31 bytes, params: 2, frame: 12
var r0;
let value = a0 != null;
if (value) {
value = environment.__proto__;
value = env1_7.has(a0);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function value_117625() { // fn#117625, offset: 0x00fbd9cb, size: 9 bytes, params: 1, frame: 1
return env1_7;
}
function UNENROLLED_ACTIVITY_QUEST_DISMISS({questId}) { // fn#117626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15582:1280, offset: 0x024bb0f1, size: 189 bytes, params: 2, frame: 15
var value2;
var value3;
var slice;
var Math;
var value4;
var Set;
var value5;
var set;
if (env0_7.size >= 20) {
value2 = global.Array.from(env0_7);
value3 = value2.sort((importDefault(21) /* metro dependency 21: SnowflakeUtils */).compare);
slice = value3.slice;
Math = global.Math;
value4 = Reflect.apply(slice, value3, [Math.floor(10)]);
Set = global.Set;
value5 = value4.map(function(a0) {
return a0.toString();
});
set = new Set();
}
env0_7.add(questId);
return true;
}
function value_117623() { // fn#117623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15582:930, offset: 0x024bb0cb, size: 38 bytes, params: 1, frame: 15
const binding = env1_7;
const items2 = [];
arraySpread(items2, binding, 0, undefined);
return {dismissedQuestIds: items2, autoEnroll: env1_8};
function UNENROLLED_ACTIVITY_QUEST_DISMISS({questId}) { // fn#117626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15582:1280, offset: 0x024bb0f1, size: 189 bytes, params: 2, frame: 15
var value2;
var value3;
var slice;
var Math;
var value4;
var Set;
var value5;
var set;
if (env0_7.size >= 20) {
value2 = global.Array.from(env0_7);
value3 = value2.sort((importDefault(21) /* metro dependency 21: SnowflakeUtils */).compare);
slice = value3.slice;
Math = global.Math;
value4 = Reflect.apply(slice, value3, [Math.floor(10)]);
Set = global.Set;
value5 = value4.map(function(a0) {
return a0.toString();
});
set = new Set();
}
env0_7.add(questId);
return true;
}
}
global.__d(_fun117616, 15385, [6, 7, 15, 17, 18, 21, 566, 694,
2]) /* metro module 15385, dependencies: [6, 7, 15, 17, 18, 21, 566, 694, 2] */;
+159 -128
View File
@@ -1,148 +1,179 @@
/* Metro module 7095; source: modules/quests/VideoQuestUIStore.tsx; dependencies: [29, 685, 4025, 7096, 690, 7097, 2] */
import ObjectWithoutProperties from '../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00685Module from '../../by-id/module-00685.js'; /* Metro dependency 685 */
import * as ReactBatchUpdatesNativeModule from '../../external/discord_common/js/shared/utils/ReactBatchUpdates.native.tsx'; /* Metro dependency 690 */
import * as Module04025Module from '../../by-id/module-04025.js'; /* Metro dependency 4025 */
import * as DiscordVideoPlayerTypesModule from '../../external/discord_common/js/packages/video-player/DiscordVideoPlayerTypes.tsx'; /* Metro dependency 7096 */
function _fun56718(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:6, offset: 0x013cf7dd, size: 363 bytes, params: 8, frame: 25
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(29) /* metro dependency 29 */;
let value = require(685) /* metro dependency 685 */;
let value = Module00685Module;
value = value.createWithEqualityFn();
const value2 = require(4025) /* metro dependency 4025 */;
const persist = value2.persist;
const object = {name: 'videoQuestUIState'};
object.storage = value2.createJSONStorage(function() {
const persist = Module04025Module.persist;
const object2 = {name: 'videoQuestUIState'};
object2.storage = Module04025Module.createJSONStorage(function() {
return importDefault(dependencyMap[5]);
});
object.partialize = function(a0) {
object2.partialize = function(a0) {
return {volume: a0.volume, muted: a0.muted, videoProgress: a0.videoProgress};
};
object.version = 0;
value = value(Reflect.apply(persist, value2, [_fun56720, object]));
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/VideoQuestUIStore.tsx');
object2.version = 0;
value = value(Reflect.apply(persist, Module04025Module, [_fun56720, object2]));
(FileImportTrackerModule).fileFinishedImporting('modules/quests/VideoQuestUIStore.tsx');
exports.default = value;
exports.DEFAULT_VIDEO_PROGRESS = {'timestampSec': 0, 'duration': 10, 'maxTimestampSec': 0};
exports.VideoProgressState = {UNKNOWN: 'UNKNOWN', NOT_STARTED: 'NOT_STARTED', IN_PROGRESS: 'IN_PROGRESS',
COMPLETED: 'COMPLETED'};
exports.FetchStatus = {NONE: 'NONE', FETCHING: 'FETCHING', SUCCESS: 'SUCCESS', FAILURE: 'FAILURE'};
exports.useVideoQuestUIStore = value;
function _fun56720(a0, a1) { // fn#56720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:748, offset: 0x013cf948, size: 181 bytes, params: 3, frame: 13
const env0_0 = a0;
const env0_1 = a1;
const DEFAULT_VIDEO_VOLUME = (DiscordVideoPlayerTypesModule).DEFAULT_VIDEO_VOLUME;
return {'volume': null, 'muted': false, 'transcriptEnabled': false, 'captionEnabled': false, 'videoProgress': null,
'transcript': null, volume: DEFAULT_VIDEO_VOLUME, videoProgress: {}, setVolume: setVolume, setMuted: setMuted,
setVideoProgress: setVideoProgress, setTranscriptEnabled: setTranscriptEnabled,
setCaptionEnabled: setCaptionEnabled, getVideoProgress: function(a0) {
return require().videoProgress[a0];
}, getVideoProgressState: getVideoProgressState, resetQuest: resetQuest, clearState: clearState,
setTranscriptAsset: setTranscriptAsset};
function setVolume(a0) { // fn#56721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:885, offset: 0x013cf9fd, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun56722);
function _fun56722() { // fn#56722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:912, offset: 0x013cfa31, size: 30 bytes, params: 1, frame: 11
return env1_0({volume: env0_0});
}
}
function setMuted(a0) { // fn#56723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:942, offset: 0x013cfa4f, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun56724);
function _fun56724() { // fn#56724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:969, offset: 0x013cfa83, size: 30 bytes, params: 1, frame: 11
return env1_0({muted: env0_0});
}
}
function setVideoProgress(a0, a1, a2) { // fn#56725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1006, offset: 0x013cfaa1, size: 139 bytes, params: 4, frame: 16
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const value = undefined;
const property = require().videoProgress[a0];
const r4 = (property == null ? value : property.maxTimestampSec) ?? 0;
const Math = global.Math;
const env0_3 = Math.max(r4, a1);
(ReactBatchUpdatesNativeModule).batchUpdates(_fun56726);
return value;
function _fun56726() { // fn#56726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1135, offset: 0x013cfb2c, size: 86 bytes, params: 1, frame: 17
const binding = env1_0;
const object2 = {};
copyDataProperties(object2, require().videoProgress, undefined);
object2[env0_0] = {timestampSec: require, duration: importDefault, maxTimestampSec: env0_3};
return binding({videoProgress: object2});
}
}
function setTranscriptEnabled(a0) { // fn#56727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1255, offset: 0x013cfb82, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun56728);
function _fun56728() { // fn#56728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1282, offset: 0x013cfbb6, size: 30 bytes, params: 1, frame: 11
return env1_0({transcriptEnabled: env0_0});
}
}
function setCaptionEnabled(a0) { // fn#56729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1332, offset: 0x013cfbd4, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun56730);
function _fun56730() { // fn#56730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1359, offset: 0x013cfc08, size: 30 bytes, params: 1, frame: 11
return env1_0({captionEnabled: env0_0});
}
}
function getVideoProgressState(a0) { // fn#56732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1451, offset: 0x013cfc42, size: 119 bytes, params: 2, frame: 10
const property = require().videoProgress[a0];
return property == null ? env1_4.UNKNOWN : property.timestampSec === 0 ? env1_4.NOT_STARTED : property.timestampSec >= property.duration ? env1_4.COMPLETED : env1_4.IN_PROGRESS;
}
function resetQuest(a0) { // fn#56733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1605, offset: 0x013cfcb9, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun56734);
function _fun56734() { // fn#56734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1632, offset: 0x013cfced, size: 83 bytes, params: 1, frame: 16
const videoProgress = require().videoProgress;
const binding = env0_0;
videoProgress[binding];
const binding2 = env2_3;
const items2 = [binding];
env1_0({videoProgress: binding2(videoProgress, items2.map(_toPropertyKey_56719))});
}
}
function clearState() { // fn#56735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1735, offset: 0x013cfd40, size: 45 bytes, params: 1, frame: 12
var environment;
const value = environment.__proto__;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun56736);
function _fun56736() { // fn#56736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1763, offset: 0x013cfd6d, size: 25 bytes, params: 1, frame: 11
env1_0({videoProgress: {}});
}
}
function setTranscriptAsset(a0) { // fn#56737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1813, offset: 0x013cfd86, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun56738);
function _fun56738() { // fn#56738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1840, offset: 0x013cfdba, size: 30 bytes, params: 1, frame: 11
env1_0({transcript: env0_0});
}
}
}
}
function _fun56720(a0, a1) { // fn#56720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:748, offset: 0x013cf948, size: 181 bytes, params: 3, frame: 13
const env0_0 = a0;
const env0_1 = a1;
const DEFAULT_VIDEO_VOLUME = (require(7096) /* metro dependency 7096: DiscordVideoPlayerTypes */).DEFAULT_VIDEO_VOLUME;
return {'volume': null, 'muted': false, 'transcriptEnabled': false, 'captionEnabled': false, 'videoProgress': null,
'transcript': null, volume: DEFAULT_VIDEO_VOLUME, videoProgress: {}, setVolume: setVolume_56721,
setMuted: setMuted_56723, setVideoProgress: setVideoProgress, setTranscriptEnabled: setTranscriptEnabled,
setCaptionEnabled: setCaptionEnabled, getVideoProgress: function(a0) {
return require().videoProgress[a0];
}, getVideoProgressState: getVideoProgressState, resetQuest: resetQuest, clearState: clearState,
setTranscriptAsset: setTranscriptAsset};
}
function setVolume_56721(a0) { // fn#56721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:885, offset: 0x013cf9fd, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun56722);
}
function setMuted_56723(a0) { // fn#56723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:942, offset: 0x013cfa4f, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun56724);
}
function setVideoProgress(a0, a1, a2) { // fn#56725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1006, offset: 0x013cfaa1, size: 139 bytes, params: 4, frame: 16
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const value = undefined;
const property = require().videoProgress[a0];
const r4 = (property == null ? value : property.maxTimestampSec) ?? 0;
const Math = global.Math;
const env0_3 = Math.max(r4, a1);
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun56726);
return value;
}
function setTranscriptEnabled(a0) { // fn#56727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1255, offset: 0x013cfb82, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun56728);
}
function setCaptionEnabled(a0) { // fn#56729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1332, offset: 0x013cfbd4, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun56730);
}
function getVideoProgressState(a0) { // fn#56732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1451, offset: 0x013cfc42, size: 119 bytes, params: 2, frame: 10
const property = require().videoProgress[a0];
return property == null ? env1_4.UNKNOWN : property.timestampSec === 0 ? env1_4.NOT_STARTED : property.timestampSec >= property.duration ? env1_4.COMPLETED : env1_4.IN_PROGRESS;
}
function resetQuest(a0) { // fn#56733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1605, offset: 0x013cfcb9, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun56734);
}
function clearState() { // fn#56735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1735, offset: 0x013cfd40, size: 45 bytes, params: 1, frame: 12
var environment;
const value = environment.__proto__;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun56736);
}
function setTranscriptAsset(a0) { // fn#56737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1813, offset: 0x013cfd86, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun56738);
}
function _fun56722() { // fn#56722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:912, offset: 0x013cfa31, size: 30 bytes, params: 1, frame: 11
return env1_0({volume: env0_0});
}
function _fun56724() { // fn#56724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:969, offset: 0x013cfa83, size: 30 bytes, params: 1, frame: 11
return env1_0({muted: env0_0});
}
function _fun56726() { // fn#56726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1135, offset: 0x013cfb2c, size: 86 bytes, params: 1, frame: 17
const binding = env1_0;
const object = {};
copyDataProperties(object, require().videoProgress, undefined);
object[env0_0] = {timestampSec: require, duration: importDefault, maxTimestampSec: env0_3};
return binding({videoProgress: object});
}
function _fun56728() { // fn#56728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1282, offset: 0x013cfbb6, size: 30 bytes, params: 1, frame: 11
return env1_0({transcriptEnabled: env0_0});
}
function _fun56730() { // fn#56730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1359, offset: 0x013cfc08, size: 30 bytes, params: 1, frame: 11
return env1_0({captionEnabled: env0_0});
}
function _fun56734() { // fn#56734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1632, offset: 0x013cfced, size: 83 bytes, params: 1, frame: 16
const videoProgress = require().videoProgress;
const binding = env0_0;
videoProgress[binding];
const binding2 = env2_3;
const items = [binding];
env1_0({videoProgress: binding2(videoProgress, items.map(_toPropertyKey_56719))});
}
function _fun56736() { // fn#56736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1763, offset: 0x013cfd6d, size: 25 bytes, params: 1, frame: 11
env1_0({videoProgress: {}});
}
function _fun56738() { // fn#56738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1840, offset: 0x013cfdba, size: 30 bytes, params: 1, frame: 11
env1_0({transcript: env0_0});
function _toPropertyKey_56719(a0) { // fn#56719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:111, offset: 0x00deffed, size: 138 bytes, params: 2, frame: 16
var r1;
var property;
let value = a0;
if (typeof value === 'object') {
if (value) {
property = value[global.Symbol.toPrimitive];
if (property !== undefined) {
value = property.call(value, 'string');
if (typeof value !== 'object') {
r1 = value;
return typeof r1 === 'symbol' ? r1 : String(r1);
}
throw new global.TypeError('@@toPrimitive must return a primitive value.');
}
value = global.String(value);
r1 = value;
return typeof r1 === 'symbol' ? r1 : String(r1);
}
}
r1 = value;
return typeof r1 === 'symbol' ? r1 : String(r1);
}
global.__d(_fun56718, 7095, [29, 685, 4025, 7096, 690, 7097,
2]) /* metro module 7095, dependencies: [29, 685, 4025, 7096, 690, 7097, 2] */;
@@ -1,38 +1,41 @@
/* Metro module 9519; source: modules/quests/experiments/AdAnalyticsInterfaceExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun74259(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9705:6, offset: 0x01d877d4, size: 372 bytes, params: 8, frame: 24
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {STEP_1_LOADED: 0};
object2[0] = 'STEP_1_LOADED';
object2.STEP_2_CLICKED_INTERNAL = 1;
object2[1] = 'STEP_2_CLICKED_INTERNAL';
object2.STEP_3_CLICKED_EXTERNAL = 2;
object2[2] = 'STEP_3_CLICKED_EXTERNAL';
object2.STEP_4_VIEWED_NON_IMPRESSION = 3;
object2[3] = 'STEP_4_VIEWED_NON_IMPRESSION';
object2.STEP_5_VIEWED_IMPRESSION = 4;
object2[4] = 'STEP_5_VIEWED_IMPRESSION';
let value = require(1854) /* metro dependency 1854: apex */;
object = {STEP_1_LOADED: 0};
object[0] = 'STEP_1_LOADED';
object.STEP_2_CLICKED_INTERNAL = 1;
object[1] = 'STEP_2_CLICKED_INTERNAL';
object.STEP_3_CLICKED_EXTERNAL = 2;
object[2] = 'STEP_3_CLICKED_EXTERNAL';
object.STEP_4_VIEWED_NON_IMPRESSION = 3;
object[3] = 'STEP_4_VIEWED_NON_IMPRESSION';
object.STEP_5_VIEWED_IMPRESSION = 4;
object[4] = 'STEP_5_VIEWED_IMPRESSION';
let value = ApexModule;
const createApexExperiment = value.createApexExperiment;
const STEP_1_LOADED = object2.STEP_1_LOADED;
const STEP_2_CLICKED_INTERNAL = object2.STEP_2_CLICKED_INTERNAL;
const STEP_3_CLICKED_EXTERNAL = object2.STEP_3_CLICKED_EXTERNAL;
const STEP_4_VIEWED_NON_IMPRESSION = object2.STEP_4_VIEWED_NON_IMPRESSION;
const STEP_5_VIEWED_IMPRESSION = object2.STEP_5_VIEWED_IMPRESSION;
const STEP_1_LOADED = object.STEP_1_LOADED;
const STEP_2_CLICKED_INTERNAL = object.STEP_2_CLICKED_INTERNAL;
const STEP_3_CLICKED_EXTERNAL = object.STEP_3_CLICKED_EXTERNAL;
const STEP_4_VIEWED_NON_IMPRESSION = object.STEP_4_VIEWED_NON_IMPRESSION;
const STEP_5_VIEWED_IMPRESSION = object.STEP_5_VIEWED_IMPRESSION;
value = Reflect.apply(createApexExperiment, value, [{'name': '2026-05-use-ad-analytics-interface', 'kind': 'user',
defaultConfig: {'enabled': false, 'maxStep': -1}, variations: {[0]: {'enabled': false, 'maxStep': -1},
[1]: {enabled: true, maxStep: STEP_1_LOADED}, [2]: {enabled: true, maxStep: STEP_2_CLICKED_INTERNAL},
[3]: {enabled: true, maxStep: STEP_3_CLICKED_EXTERNAL}, [4]: {enabled: true,
maxStep: STEP_4_VIEWED_NON_IMPRESSION}, [5]: {enabled: true, maxStep: STEP_5_VIEWED_IMPRESSION}}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/experiments/AdAnalyticsInterfaceExperiment.tsx');
exports.AdAnalyticsInterfaceExperimentStep = object2;
(FileImportTrackerModule).fileFinishedImporting('modules/quests/experiments/AdAnalyticsInterfaceExperiment.tsx');
exports.AdAnalyticsInterfaceExperimentStep = object;
exports.AdAnalyticsInterfaceExperiment = value;
exports.shouldMigrateToAdAnalyticsInterface = shouldMigrateToAdAnalyticsInterface;
function shouldMigrateToAdAnalyticsInterface(a0, a1) { // fn#74260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9705:1014, offset: 0x01d87948, size: 50 bytes, params: 3, frame: 12
const config = env0_0.getConfig({location: a1});
return config.enabled && a0 <= config.maxStep;
}
}
function shouldMigrateToAdAnalyticsInterface(a0, a1) { // fn#74260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9705:1014, offset: 0x01d87948, size: 50 bytes, params: 3, frame: 12
const config = env0_0.getConfig({location: a1});
return config.enabled && a0 <= config.maxStep;
}
global.__d(_fun74259, 9519, [1854, 2]) /* metro module 9519, dependencies: [1854, 2] */;
@@ -1,8 +1,11 @@
/* Metro module 9530; source: modules/quests/experiments/BountiesStage1Experiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun74336(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9716:6, offset: 0x01d8a98d, size: 321 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2026-05-bounties-stage-1', 'kind': 'user',
defaultConfig: {'enabled': false, 'verticalScrollEnabled': false, 'loopingEnabled': false,
'ctaTimerMilliSeconds': 3000, 'rewardTimerSeconds': 15, 'orbAmount': 50}, variations: {[1]: {'enabled': true,
@@ -21,7 +24,8 @@ function _fun74336(global, require, importDefault, importAll, module, exports, d
'verticalScrollEnabled': true, 'loopingEnabled': false, 'ctaTimerMilliSeconds': 0, 'rewardTimerSeconds': 15,
'orbAmount': 50}, [10]: {'enabled': true, 'verticalScrollEnabled': true, 'loopingEnabled': false,
'ctaTimerMilliSeconds': 3000, 'rewardTimerSeconds': 25, 'orbAmount': 50}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/experiments/BountiesStage1Experiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/experiments/BountiesStage1Experiment.tsx');
exports.BountiesStage1Experiment = value;
}
global.__d(_fun74336, 9530, [1854, 2]) /* metro module 9530, dependencies: [1854, 2] */;
@@ -1,11 +1,15 @@
/* Metro module 9531; source: modules/quests/experiments/BountyUseVideoModalMobilePlacementExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun74337(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9717:6, offset: 0x01d8aace, size: 155 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2026-06-bounty-use-video-modal-mobile-placement-experiment',
'kind': 'user', defaultConfig: {enabled: false}, variations: {[1]: {enabled: false}, [2]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/experiments/BountyUseVideoModalMobilePlacementExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/experiments/BountyUseVideoModalMobilePlacementExperiment.tsx');
exports.default = value;
}
global.__d(_fun74337, 9531, [1854, 2]) /* metro module 9531, dependencies: [1854, 2] */;
@@ -1,11 +1,15 @@
/* Metro module 9491; source: modules/quests/experiments/LessPersonalizedAdsExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun74089(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9677:6, offset: 0x01d8051c, size: 155 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2026-01-less-personalized-ads', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[0]: {enabled: false}, [1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/experiments/LessPersonalizedAdsExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/experiments/LessPersonalizedAdsExperiment.tsx');
exports.LessPersonalizedAdsExperiment = value;
}
global.__d(_fun74089, 9491, [1854, 2]) /* metro module 9491, dependencies: [1854, 2] */;
@@ -1,14 +1,18 @@
/* Metro module 7108; source: modules/quests/experiments/NewAdRequestBehaviorExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun56790(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7286:6, offset: 0x013d1e4a, size: 202 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2025-10-ad-request-behavior-experiment', 'kind': 'user',
defaultConfig: {enableNewRequestBehavior: false}, variations: {[1]: {enableNewRequestBehavior: false},
[2]: {enableNewRequestBehavior: true}, [3]: {enableNewRequestBehavior: false},
[4]: {enableNewRequestBehavior: true}, [5]: {enableNewRequestBehavior: true},
[6]: {enableNewRequestBehavior: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/experiments/NewAdRequestBehaviorExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/experiments/NewAdRequestBehaviorExperiment.tsx');
exports.default = value;
}
global.__d(_fun56790, 7108, [1854, 2]) /* metro module 7108, dependencies: [1854, 2] */;
@@ -1,11 +1,15 @@
/* Metro module 9528; source: modules/quests/experiments/QuestHomeBountiesExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun74333(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9714:6, offset: 0x01d8a80f, size: 145 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2026-03-quest-home-bounties', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/experiments/QuestHomeBountiesExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/experiments/QuestHomeBountiesExperiment.tsx');
exports.QuestHomeBountiesExperiment = value;
}
global.__d(_fun74333, 9528, [1854, 2]) /* metro module 9528, dependencies: [1854, 2] */;
+149 -142
View File
@@ -1,87 +1,90 @@
/* Metro module 9511; source: modules/quests/experiments/index.tsx; dependencies: [57, 31, 6528, 1854, 9502, 9503, 9512, 672, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Durations from '../../../utils/Durations.tsx'; /* Metro dependency 672 */
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 ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
import * as QuestConstantsModule from '../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestOrbMultiplierHooksModule from '../hooks/QuestOrbMultiplierHooks.tsx'; /* Metro dependency 9502 */
import * as QuestOrbMultiplierUtilsModule from '../utils/QuestOrbMultiplierUtils.tsx'; /* Metro dependency 9503 */
import * as QuestOrbsMultiplierModule from '../../../external/discord_common/js/shared/shared-constants/QuestOrbsMultiplier.tsx'; /* Metro dependency 9512 */
function _fun74201(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9697:6, offset: 0x01d84540, size: 2175 bytes, params: 8, frame: 47
var object2;
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;
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
let createApexExperiment = value.createApexExperiment;
value = Reflect.apply(createApexExperiment, value, [{'name': '2025-11-video-end-card-v2', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}}]);
const apexExperiment = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2026-02-new-video-quest-progress-bar-styling',
const apexExperiment = (ApexModule).createApexExperiment({'name': '2026-02-new-video-quest-progress-bar-styling',
'kind': 'user', defaultConfig: {enabled: false}, variations: {[0]: {enabled: false}, [1]: {enabled: true}}});
const apexExperiment2 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2026-03-desktop-activity-quest-header',
const apexExperiment2 = (ApexModule).createApexExperiment({'name': '2026-03-desktop-activity-quest-header',
'kind': 'user', defaultConfig: {'enabled': false, 'showSkipButton': false}, variations: {[1]: {'enabled': true,
'showSkipButton': true}, [2]: {'enabled': true, 'showSkipButton': false}}});
const apexExperiment3 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2026-05-app-store-overlay-feature-gate',
const apexExperiment3 = (ApexModule).createApexExperiment({'name': '2026-05-app-store-overlay-feature-gate',
'kind': 'user', defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
const apexExperiment4 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2026-03-quest-reload-video-on-obscured',
const apexExperiment4 = (ApexModule).createApexExperiment({'name': '2026-03-quest-reload-video-on-obscured',
'kind': 'user', defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
object2 = {DEFAULT: 0};
object2[0] = 'DEFAULT';
object2.AUTO_ENABLE_CAPTIONS = 1;
object2[1] = 'AUTO_ENABLE_CAPTIONS';
object2.AUTO_UNMUTE = 2;
object2[2] = 'AUTO_UNMUTE';
const apexModule = require(1854) /* metro dependency 1854: apex */;
createApexExperiment = apexModule.createApexExperiment;
const object3 = {'name': '2026-03-muted-video-quest-new-defaults', 'kind': 'user'};
let DEFAULT = object2.DEFAULT;
object3.defaultConfig = {enabled: false, variant: DEFAULT};
DEFAULT = object2.DEFAULT;
const AUTO_ENABLE_CAPTIONS = object2.AUTO_ENABLE_CAPTIONS;
const AUTO_UNMUTE = object2.AUTO_UNMUTE;
object3.variations = {[0]: {enabled: false, variant: DEFAULT}, [1]: {enabled: true, variant: AUTO_ENABLE_CAPTIONS},
object = {DEFAULT: 0};
object[0] = 'DEFAULT';
object.AUTO_ENABLE_CAPTIONS = 1;
object[1] = 'AUTO_ENABLE_CAPTIONS';
object.AUTO_UNMUTE = 2;
object[2] = 'AUTO_UNMUTE';
createApexExperiment = ApexModule.createApexExperiment;
const object10 = {'name': '2026-03-muted-video-quest-new-defaults', 'kind': 'user'};
let DEFAULT = object.DEFAULT;
object10.defaultConfig = {enabled: false, variant: DEFAULT};
DEFAULT = object.DEFAULT;
const AUTO_ENABLE_CAPTIONS = object.AUTO_ENABLE_CAPTIONS;
const AUTO_UNMUTE = object.AUTO_UNMUTE;
object10.variations = {[0]: {enabled: false, variant: DEFAULT}, [1]: {enabled: true, variant: AUTO_ENABLE_CAPTIONS},
[2]: {enabled: true, variant: AUTO_UNMUTE}};
const apexExperiment5 = Reflect.apply(createApexExperiment, apexModule, [object3]);
const env0_5 = apexModule.createApexExperiment({'name': '2026-04-quests-premium-orb-multiplier-marketing',
const apexExperiment5 = Reflect.apply(createApexExperiment, ApexModule, [object10]);
const env0_5 = ApexModule.createApexExperiment({'name': '2026-04-quests-premium-orb-multiplier-marketing',
'kind': 'user', defaultConfig: {enabled: false}, variations: {[0]: {enabled: false}, [1]: {enabled: true}}});
const apexExperiment6 = apexModule.createApexExperiment({'name': '2026-03-video-quest-player-refactor',
const apexExperiment6 = ApexModule.createApexExperiment({'name': '2026-03-video-quest-player-refactor',
'kind': 'user', defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
const apexExperiment7 = apexModule.createApexExperiment({'name': '2026-04-composed-quest-player', 'kind': 'user',
const apexExperiment7 = ApexModule.createApexExperiment({'name': '2026-04-composed-quest-player', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
const object4 = {CONTROL: 0};
object4[0] = 'CONTROL';
object4.EARN_ORBS_PRIMARY = 1;
object4[1] = 'EARN_ORBS_PRIMARY';
object4.EARN_ORBS_ONLY = 2;
object4[2] = 'EARN_ORBS_ONLY';
const value10 = apexModule;
createApexExperiment = value10.createApexExperiment;
const object5 = {'name': '2026-04-mobile-quest-orb-reward-modal-cta-priority', 'kind': 'user'};
let CONTROL = object4.CONTROL;
object5.defaultConfig = {enabled: false, variant: CONTROL};
CONTROL = object4.CONTROL;
const EARN_ORBS_PRIMARY = object4.EARN_ORBS_PRIMARY;
const EARN_ORBS_ONLY = object4.EARN_ORBS_ONLY;
object5.variations = {[0]: {enabled: false, variant: CONTROL}, [1]: {enabled: true, variant: EARN_ORBS_PRIMARY},
const object11 = {CONTROL: 0};
object11[0] = 'CONTROL';
object11.EARN_ORBS_PRIMARY = 1;
object11[1] = 'EARN_ORBS_PRIMARY';
object11.EARN_ORBS_ONLY = 2;
object11[2] = 'EARN_ORBS_ONLY';
createApexExperiment = ApexModule.createApexExperiment;
const object12 = {'name': '2026-04-mobile-quest-orb-reward-modal-cta-priority', 'kind': 'user'};
let CONTROL = object11.CONTROL;
object12.defaultConfig = {enabled: false, variant: CONTROL};
CONTROL = object11.CONTROL;
const EARN_ORBS_PRIMARY = object11.EARN_ORBS_PRIMARY;
const EARN_ORBS_ONLY = object11.EARN_ORBS_ONLY;
object12.variations = {[0]: {enabled: false, variant: CONTROL}, [1]: {enabled: true, variant: EARN_ORBS_PRIMARY},
[2]: {enabled: true, variant: EARN_ORBS_ONLY}};
const env0_6 = Reflect.apply(createApexExperiment, value10, [object5]);
const apexExperiment8 = apexModule.createApexExperiment({'name': '2026-03-mobile-quest-home-red-dot-notification',
const env0_6 = Reflect.apply(createApexExperiment, ApexModule, [object12]);
const apexExperiment8 = ApexModule.createApexExperiment({'name': '2026-03-mobile-quest-home-red-dot-notification',
'kind': 'user', defaultConfig: {enabled: false}, variations: {[0]: {enabled: false}, [1]: {enabled: true}}});
const apexExperiment9 = apexModule.createApexExperiment({'name': '2026-04-quest-heartbeat-executable-fingerprint',
const apexExperiment9 = ApexModule.createApexExperiment({'name': '2026-04-quest-heartbeat-executable-fingerprint',
'kind': 'user', defaultConfig: {enabled: false}, variations: {[0]: {enabled: false}, [1]: {enabled: true}}});
const object6 = {CONTROL: 0};
object6[0] = 'CONTROL';
object6.NEW_LAYOUT_NO_SEARCH = 1;
object6[1] = 'NEW_LAYOUT_NO_SEARCH';
object6.NEW_LAYOUT_WITH_SEARCH = 2;
object6[2] = 'NEW_LAYOUT_WITH_SEARCH';
const value13 = apexModule;
createApexExperiment = value13.createApexExperiment;
const object7 = {'name': '2026-05-quest-home-new-layout', 'kind': 'user'};
CONTROL = object6.CONTROL;
object7.defaultConfig = {enabled: false, variant: CONTROL};
CONTROL = object6.CONTROL;
const NEW_LAYOUT_NO_SEARCH = object6.NEW_LAYOUT_NO_SEARCH;
const NEW_LAYOUT_WITH_SEARCH = object6.NEW_LAYOUT_WITH_SEARCH;
object7.variations = {[0]: {enabled: false, variant: CONTROL}, [1]: {enabled: true, variant: NEW_LAYOUT_NO_SEARCH},
const object13 = {CONTROL: 0};
object13[0] = 'CONTROL';
object13.NEW_LAYOUT_NO_SEARCH = 1;
object13[1] = 'NEW_LAYOUT_NO_SEARCH';
object13.NEW_LAYOUT_WITH_SEARCH = 2;
object13[2] = 'NEW_LAYOUT_WITH_SEARCH';
createApexExperiment = ApexModule.createApexExperiment;
const object14 = {'name': '2026-05-quest-home-new-layout', 'kind': 'user'};
CONTROL = object13.CONTROL;
object14.defaultConfig = {enabled: false, variant: CONTROL};
CONTROL = object13.CONTROL;
const NEW_LAYOUT_NO_SEARCH = object13.NEW_LAYOUT_NO_SEARCH;
const NEW_LAYOUT_WITH_SEARCH = object13.NEW_LAYOUT_WITH_SEARCH;
object14.variations = {[0]: {enabled: false, variant: CONTROL}, [1]: {enabled: true, variant: NEW_LAYOUT_NO_SEARCH},
[2]: {enabled: true, variant: NEW_LAYOUT_WITH_SEARCH}};
const apexExperiment10 = Reflect.apply(createApexExperiment, value13, [object7]);
const apexExperiment11 = apexModule.createApexExperiment({'name': '2026-05-quest-home-tile-redesign',
const apexExperiment10 = Reflect.apply(createApexExperiment, ApexModule, [object14]);
const apexExperiment11 = ApexModule.createApexExperiment({'name': '2026-05-quest-home-tile-redesign',
'kind': 'user', defaultConfig: {'useNewLayoutWithSearch': false, 'useNewTile': false,
'useLargeFeaturedTiles': false, 'ctaOnHover': false}, variations: {[0]: {'useNewLayoutWithSearch': false,
'useNewTile': false, 'useLargeFeaturedTiles': false, 'ctaOnHover': false}, [1]: {'useNewLayoutWithSearch': true,
@@ -89,113 +92,117 @@ function _fun74201(global, require, importDefault, importAll, module, exports, d
'useNewTile': true, 'useLargeFeaturedTiles': true, 'ctaOnHover': true}, [3]: {'useNewLayoutWithSearch': true,
'useNewTile': true, 'useLargeFeaturedTiles': false, 'ctaOnHover': true}, [4]: {'useNewLayoutWithSearch': true,
'useNewTile': true, 'useLargeFeaturedTiles': true, 'ctaOnHover': false}}});
const apexExperiment12 = apexModule.createApexExperiment({'name': '2026-05-quest-home-remove-expired-quests',
const apexExperiment12 = ApexModule.createApexExperiment({'name': '2026-05-quest-home-remove-expired-quests',
'kind': 'user', defaultConfig: {enabled: false}, variations: {[0]: {enabled: false}, [1]: {enabled: true}}});
const apexExperiment13 = apexModule.createApexExperiment({'name': '2026-05-bounty-stale-refresh-quest-home',
const apexExperiment13 = ApexModule.createApexExperiment({'name': '2026-05-bounty-stale-refresh-quest-home',
'kind': 'user', defaultConfig: {enabled: false}, variations: {[0]: {enabled: false}, [1]: {enabled: true}}});
const env0_7 = apexModule.createApexExperiment({'name': '2026-06-remove-quest-home-hero', 'kind': 'user',
const env0_7 = ApexModule.createApexExperiment({'name': '2026-06-remove-quest-home-hero', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[0]: {enabled: false}, [1]: {enabled: true}}});
let Date = global.Date;
let date = new Date('2026-06-20T10:00:00-07:00');
Date = global.Date;
date = new Date('2026-06-23T10:00:00-07:00');
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const Millis = (Durations).Millis;
const MINUTE = Millis.MINUTE;
const env0_10 = 5 * MINUTE;
const object8 = {CONTROL: 0};
object8[0] = 'CONTROL';
object8.LARGE_MASK_MARGIN = 1;
object8[1] = 'LARGE_MASK_MARGIN';
object8.REMOVE_QUEST_TITLE_SUFFIX = 2;
object8[2] = 'REMOVE_QUEST_TITLE_SUFFIX';
object8.REPLACE_QUEST_NAME_WITH_GAME_PUBLISHER = 3;
object8[3] = 'REPLACE_QUEST_NAME_WITH_GAME_PUBLISHER';
const value22 = apexModule;
createApexExperiment = value22.createApexExperiment;
const object9 = {'name': '2026-06-quest-home-layout-visual-tweaks', 'kind': 'user'};
CONTROL = object8.CONTROL;
object9.defaultConfig = {enabled: false, variant: CONTROL};
CONTROL = object8.CONTROL;
const LARGE_MASK_MARGIN = object8.LARGE_MASK_MARGIN;
const REMOVE_QUEST_TITLE_SUFFIX = object8.REMOVE_QUEST_TITLE_SUFFIX;
const REPLACE_QUEST_NAME_WITH_GAME_PUBLISHER = object8.REPLACE_QUEST_NAME_WITH_GAME_PUBLISHER;
object9.variations = {[0]: {enabled: false, variant: CONTROL}, [1]: {enabled: true, variant: LARGE_MASK_MARGIN},
const object15 = {CONTROL: 0};
object15[0] = 'CONTROL';
object15.LARGE_MASK_MARGIN = 1;
object15[1] = 'LARGE_MASK_MARGIN';
object15.REMOVE_QUEST_TITLE_SUFFIX = 2;
object15[2] = 'REMOVE_QUEST_TITLE_SUFFIX';
object15.REPLACE_QUEST_NAME_WITH_GAME_PUBLISHER = 3;
object15[3] = 'REPLACE_QUEST_NAME_WITH_GAME_PUBLISHER';
createApexExperiment = ApexModule.createApexExperiment;
const object16 = {'name': '2026-06-quest-home-layout-visual-tweaks', 'kind': 'user'};
CONTROL = object15.CONTROL;
object16.defaultConfig = {enabled: false, variant: CONTROL};
CONTROL = object15.CONTROL;
const LARGE_MASK_MARGIN = object15.LARGE_MASK_MARGIN;
const REMOVE_QUEST_TITLE_SUFFIX = object15.REMOVE_QUEST_TITLE_SUFFIX;
const REPLACE_QUEST_NAME_WITH_GAME_PUBLISHER = object15.REPLACE_QUEST_NAME_WITH_GAME_PUBLISHER;
object16.variations = {[0]: {enabled: false, variant: CONTROL}, [1]: {enabled: true, variant: LARGE_MASK_MARGIN},
[2]: {enabled: true, variant: REMOVE_QUEST_TITLE_SUFFIX}, [3]: {enabled: true,
variant: REPLACE_QUEST_NAME_WITH_GAME_PUBLISHER}};
const apexExperiment14 = Reflect.apply(createApexExperiment, value22, [object9]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/experiments/index.tsx');
const apexExperiment14 = Reflect.apply(createApexExperiment, ApexModule, [object16]);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/experiments/index.tsx');
exports.VideoEndCardV2Experiment = value;
exports.NewVideoQuestProgressBarStylingExperiment = apexExperiment;
exports.DesktopActivityQuestHeaderExperiment = apexExperiment2;
exports.AppStoreBottomSheetOverlayFeatureGate = apexExperiment3;
exports.QuestReloadVideoOnObscuredExperiment = apexExperiment4;
exports.MutedVideoQuestNewDefaultsVariant = object2;
exports.MutedVideoQuestNewDefaultsVariant = object;
exports.MutedVideoQuestNewDefaultsExperiment = apexExperiment5;
exports.useQuestOrbsMultiplierMarketing = useQuestOrbsMultiplierMarketing;
exports.VideoQuestPlayerRefactorExperiment = apexExperiment6;
exports.ComposedQuestPlayerExperiment = apexExperiment7;
exports.MobileQuestOrbRewardModalCtaPriorityVariant = object4;
exports.MobileQuestOrbRewardModalCtaPriorityVariant = object11;
exports.useMobileQuestOrbRewardModalCtaPriorityExperiment = useMobileQuestOrbRewardModalCtaPriorityExperiment;
exports.MobileQuestHomeRedDotNotificationExperiment = apexExperiment8;
exports.QuestHeartbeatExecutableFingerprintExperiment = apexExperiment9;
exports.QuestHomeNewLayoutVariant = object6;
exports.QuestHomeNewLayoutVariant = object13;
exports.QuestHomeNewLayout = apexExperiment10;
exports.QuestHomeTileRedesignExperiment = apexExperiment11;
exports.QuestHomeRemoveExpiredQuestsExperiment = apexExperiment12;
exports.BountyStaleRefreshQuestHomeExperiment = apexExperiment13;
exports.useShouldRemoveQuestHomeHero = useShouldRemoveQuestHomeHero;
exports.QuestHomeLayoutVisualTweakVariant = object8;
exports.QuestHomeLayoutVisualTweakVariant = object15;
exports.QuestHomeLayoutVisualTweaksExperiment = apexExperiment14;
function useQuestOrbsMultiplierMarketing(a0) { // fn#74202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9697:5179, offset: 0x01d84dbf, size: 189 bytes, params: 2, frame: 17
const binding = env0_5;
const useConfig = binding.useConfig;
const enabled = Reflect.apply(useConfig, binding, [{location: a0}]).enabled;
const value2 = (QuestOrbMultiplierHooksModule).useQuestOrbMultiplierEligibility();
object = {};
const QuestOrbMultiplierEligibilityType = (QuestOrbMultiplierUtilsModule).QuestOrbMultiplierEligibilityType;
const INELIGIBLE = QuestOrbMultiplierEligibilityType.INELIGIBLE;
object.shouldShowBonusOrbsUX = value2 !== INELIGIBLE && value2 !== QuestOrbMultiplierEligibilityType.CREPE && enabled;
const QuestOrbsMultiplier = (QuestOrbsMultiplierModule).QuestOrbsMultiplier;
const PREMIUM_TIER_2_MULTIPLIER_PERCENTAGE_POINTS = QuestOrbsMultiplier.PREMIUM_TIER_2_MULTIPLIER_PERCENTAGE_POINTS;
object.multiplier = PREMIUM_TIER_2_MULTIPLIER_PERCENTAGE_POINTS / 100;
return object;
}
function useMobileQuestOrbRewardModalCtaPriorityExperiment() { // fn#74203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9697:5712, offset: 0x01d84e7c, size: 36 bytes, params: 1, frame: 12
const binding = env0_6;
const useConfig = binding.useConfig;
const ORBS_REWARD_MODAL = QuestsExperimentLocations.ORBS_REWARD_MODAL;
return Reflect.apply(useConfig, binding, [{location: ORBS_REWARD_MODAL}]);
}
function useShouldRemoveQuestHomeHero() { // fn#74204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9697:6128, offset: 0x01d84ea0, size: 154 bytes, params: 1, frame: 16
let binding = ReactModule;
const [property, env0_0] = Module00057(binding.useState(function() {
var Date = global.Date;
var value = Object.create(Date.prototype, {constructor: {value: Date}});
var value2 = new Date();
return value2 instanceof Object ? value2 : value;
}), 2);
binding.useEffect(_fun74206, []);
const r2 = property >= env0_8 && property < env0_9;
binding = env0_7;
const useConfig = binding.useConfig;
return r2 ? Reflect.apply(useConfig, binding,
[{location: r2 ? 'remove-quest-home-hero-eligible' : 'remove-quest-home-hero-ineligible'}]).enabled : !!r2;
function _fun74206() { // fn#74206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9697:6237, offset: 0x01d84f58, size: 45 bytes, params: 1, frame: 14
const env0_0 = global.setInterval(_fun74207, env1_10);
return _fun74208;
function _fun74207() { // fn#74207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9697:6261, offset: 0x01d84f85, size: 44 bytes, params: 1, frame: 11
const value = environment.__proto__;
const binding = env1_0;
const Date = global.Date;
return binding(new Date());
}
function _fun74208() { // fn#74208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9697:6287, offset: 0x013378b1, size: 24 bytes, params: 1, frame: 11
return global.clearInterval(env0_0);
}
}
}
}
function useQuestOrbsMultiplierMarketing(a0) { // fn#74202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9697:5179, offset: 0x01d84dbf, size: 189 bytes, params: 2, frame: 17
var object2;
const binding = env0_5;
const useConfig = binding.useConfig;
const enabled = Reflect.apply(useConfig, binding, [{location: a0}]).enabled;
const value2 = (require(9502) /* metro dependency 9502: QuestOrbMultiplierHooks */).useQuestOrbMultiplierEligibility();
object2 = {};
const QuestOrbMultiplierEligibilityType = (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).QuestOrbMultiplierEligibilityType;
const INELIGIBLE = QuestOrbMultiplierEligibilityType.INELIGIBLE;
object2.shouldShowBonusOrbsUX = value2 !== INELIGIBLE && value2 !== QuestOrbMultiplierEligibilityType.CREPE && enabled;
const QuestOrbsMultiplier = (require(9512) /* metro dependency 9512: QuestOrbsMultiplier */).QuestOrbsMultiplier;
const PREMIUM_TIER_2_MULTIPLIER_PERCENTAGE_POINTS = QuestOrbsMultiplier.PREMIUM_TIER_2_MULTIPLIER_PERCENTAGE_POINTS;
object2.multiplier = PREMIUM_TIER_2_MULTIPLIER_PERCENTAGE_POINTS / 100;
return object2;
}
function useMobileQuestOrbRewardModalCtaPriorityExperiment() { // fn#74203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9697:5712, offset: 0x01d84e7c, size: 36 bytes, params: 1, frame: 12
const binding = env0_6;
const useConfig = binding.useConfig;
const ORBS_REWARD_MODAL = QuestsExperimentLocations.ORBS_REWARD_MODAL;
return Reflect.apply(useConfig, binding, [{location: ORBS_REWARD_MODAL}]);
}
function useShouldRemoveQuestHomeHero() { // fn#74204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9697:6128, offset: 0x01d84ea0, size: 154 bytes, params: 1, frame: 16
let binding = env0_3;
const [property, env0_0] = env0_2(binding.useState(function() {
var Date = global.Date;
var value = Object.create(Date.prototype, {constructor: {value: Date}});
var value2 = new Date();
return value2 instanceof Object ? value2 : value;
}), 2);
binding.useEffect(_fun74206, []);
const r2 = property >= env0_8 && property < env0_9;
binding = env0_7;
const useConfig = binding.useConfig;
return r2 ? Reflect.apply(useConfig, binding,
[{location: r2 ? 'remove-quest-home-hero-eligible' : 'remove-quest-home-hero-ineligible'}]).enabled : !!r2;
}
function _fun74206() { // fn#74206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9697:6237, offset: 0x01d84f58, size: 45 bytes, params: 1, frame: 14
const env0_0 = global.setInterval(_fun74207, env1_10);
return _fun74208;
}
function _fun74207() { // fn#74207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9697:6261, offset: 0x01d84f85, size: 44 bytes, params: 1, frame: 11
const value = environment.__proto__;
const binding = env1_0;
const Date = global.Date;
return binding(new Date());
}
global.__d(_fun74201, 9511, [57, 31, 6528, 1854, 9502, 9503, 9512, 672,
2]) /* metro module 9511, dependencies: [57, 31, 6528, 1854, 9502, 9503, 9512, 672, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,36 +1,41 @@
/* Metro module 9502; source: modules/quests/hooks/QuestOrbMultiplierHooks.tsx; dependencies: [1878, 566, 9503, 3802, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun74169(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9688:6, offset: 0x01d8301d, size: 135 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = getQuestOrbMultiplierEligibilityForUser;
const getQuestOrbMultiplierEligibilityForUser2 = getQuestOrbMultiplierEligibilityForUser;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/hooks/QuestOrbMultiplierHooks.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/hooks/QuestOrbMultiplierHooks.tsx');
exports.useQuestOrbMultiplierEligibility = function() {
return require(dependencyMap[1]).useStateFromStores([UserStore], _fun74172);
};
exports.getQuestOrbMultiplierEligibilityForUser = closure;
}
function getQuestOrbMultiplierEligibilityForUser(a0) { // fn#74170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9688:106, offset: 0x01d830a4, size: 296 bytes, params: 2, frame: 17
var r0;
var defaultImport;
const QuestOrbMultiplierEligibilityType = (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).QuestOrbMultiplierEligibilityType;
if (a0 == null) {
r0 = QuestOrbMultiplierEligibilityType.INELIGIBLE;
} else {
defaultImport = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
r0 = defaultImport.canUseMoreQuestOrbs(a0) ? (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).getQuestOrbMultiplierSource(a0) === (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).QuestOrbMultiplierSource.CREPE ? QuestOrbMultiplierEligibilityType.CREPE : QuestOrbMultiplierEligibilityType.NITRO : a0 == null ? QuestOrbMultiplierEligibilityType.UPSELL : a0.isFractionalPremiumWithNoStandardSub() ? QuestOrbMultiplierEligibilityType.INELIGIBLE : QuestOrbMultiplierEligibilityType.UPSELL;
exports.getQuestOrbMultiplierEligibilityForUser = getQuestOrbMultiplierEligibilityForUser2;
function getQuestOrbMultiplierEligibilityForUser(a0) { // fn#74170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9688:106, offset: 0x01d830a4, size: 296 bytes, params: 2, frame: 17
var r0;
var defaultImport;
const QuestOrbMultiplierEligibilityType = (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).QuestOrbMultiplierEligibilityType;
if (a0 == null) {
r0 = QuestOrbMultiplierEligibilityType.INELIGIBLE;
} else {
defaultImport = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
r0 = defaultImport.canUseMoreQuestOrbs(a0) ? (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).getQuestOrbMultiplierSource(a0) === (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).QuestOrbMultiplierSource.CREPE ? QuestOrbMultiplierEligibilityType.CREPE : QuestOrbMultiplierEligibilityType.NITRO : a0 == null ? QuestOrbMultiplierEligibilityType.UPSELL : a0.isFractionalPremiumWithNoStandardSub() ? QuestOrbMultiplierEligibilityType.INELIGIBLE : QuestOrbMultiplierEligibilityType.UPSELL;
}
return r0;
}
return r0;
}
function useQuestOrbMultiplierEligibility() { // fn#74171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9688:702, offset: 0x01d831cc, size: 59 bytes, params: 1, frame: 13
return (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun74172);
}
function useQuestOrbMultiplierEligibility() { // fn#74171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9688:702, offset: 0x01d831cc, size: 59 bytes, params: 1, frame: 13
return (FluxModule).useStateFromStores([UserStore], _fun74172);
function _fun74172() { // fn#74172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9688:785, offset: 0x01d83207, size: 29 bytes, params: 1, frame: 11
const value = environment.__proto__;
return getQuestOrbMultiplierEligibilityForUser(UserStore.getCurrentUser());
}
}
function _fun74172() { // fn#74172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9688:785, offset: 0x01d83207, size: 29 bytes, params: 1, frame: 11
const value = environment.__proto__;
return getQuestOrbMultiplierEligibilityForUser(UserStore.getCurrentUser());
}
global.__d(_fun74169, 9502, [1878, 566, 9503, 3802,
2]) /* metro module 9502, dependencies: [1878, 566, 9503, 3802, 2] */;
@@ -1,343 +1,356 @@
/* Metro module 9948; source: modules/quests/hooks/RewardCodeClaimHooks.tsx; dependencies: [5, 57, 31, 9484, 6531, 9949, 9513, 9519, 9517, 9518, 7121, 7120, 3847, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
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 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 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 _fun77867(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10134:6, offset: 0x01e0efca, size: 185 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = useHandleRedemptionLinkClick;
const useHandleRedemptionLinkClick2 = useHandleRedemptionLinkClick;
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 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/hooks/RewardCodeClaimHooks.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/hooks/RewardCodeClaimHooks.tsx');
exports.useClaimOrFetchRewardCode = useClaimOrFetchRewardCode;
exports.useHandleRedemptionLinkClick = closure;
exports.useHandleRedemptionLinkClick = useHandleRedemptionLinkClick2;
exports.useClaimRewardCodePrimaryCtaClickHandler = useClaimRewardCodePrimaryCtaClickHandler;
}
function useHandleRedemptionLinkClick({quest, redemptionLink, questContent, questContentPosition, sourceQuestContent}) { // fn#77868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10134:126, offset: 0x01e0f083, size: 181 bytes, params: 2, frame: 21
const value2 = (require(9949) /* metro dependency 9949: AnalyticsHooks */).useTrackQuestContentClickedWithImpression();
return value2.useCallback(_fun77869, [quest.id, questContent, questContentPosition, sourceQuestContent, value2,
(require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId(),
redemptionLink]);
}
function useClaimOrFetchRewardCode({isClaimingReward, isFetchingRewardCode, questContent, quest, rewardCode, preview}) { // fn#77870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10134:1484, offset: 0x01e0f371, size: 312 bytes, params: 2, frame: 27
const env0_4 = rewardCode;
const env0_5 = preview;
let binding = env0_5;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
binding = env0_4;
const value3 = binding(value2, 2);
const property = value3[0];
const property2 = value3[1];
const binding2 = env0_5;
useState = binding2.useState;
const value4 = binding(Reflect.apply(useState, binding2, [false]), 2);
const property3 = value4[0];
const env0_9 = value4[1];
const value6 = env0_5.useCallback(_fun77871(), []);
const value7 = env0_5.useCallback(_fun77875, []);
env0_5.useEffect(_fun77876, [value6, value7, property, isClaimingReward, property3, isFetchingRewardCode,
questContent, quest, rewardCode, preview]);
return {claimCode: value6, fetchCode: value7, hasError: property, setHasError: property2};
}
function useClaimRewardCodePrimaryCtaClickHandler(a0) { // fn#77877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10134:2397, offset: 0x01e0f67e, size: 334 bytes, params: 2, frame: 27
const claimCode = a0.claimCode;
const fetchCode = a0.fetchCode;
const hasError = a0.hasError;
const onDismiss = a0.onDismiss;
const quest = a0.quest;
const questContent = a0.questContent;
const env0_5 = questContent;
const questContentCTA = a0.questContentCTA;
const value = undefined;
const r10 = value !== questContentCTA ? questContentCTA : (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA.GET_REWARD_CODE;
const questContentPosition = a0.questContentPosition;
const redemptionLink = a0.redemptionLink;
const sourceQuestContent = a0.sourceQuestContent;
const value4 = (require(9949) /* metro dependency 9949: AnalyticsHooks */).useTrackQuestContentClickedWithImpression();
const value5 = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId();
const value6 = useHandleRedemptionLinkClick(a0);
const binding = env0_5;
const useCallback = binding.useCallback;
const userStatus = quest.userStatus;
return Reflect.apply(useCallback, binding, [_fun77878, [claimCode, fetchCode, hasError, onDismiss, quest.id,
userStatus == null ? value : userStatus.claimedAt, questContent, r10, questContentPosition, value4, value5,
redemptionLink, sourceQuestContent, value6]]);
}
function _fun77869() { // fn#77869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10134:364, offset: 0x01e0f138, size: 569 bytes, params: 1, frame: 27
var value2;
var moduleValue;
var binding;
var questBinding;
var id;
var questContentBinding;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
var questContentPositionBinding;
var sourceQuestContentBinding;
var moduleValue2;
var captureAdUserAction;
const AdUserActionType = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType;
var CLICK_INTERNAL;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
var QUEST;
var moduleValue3;
if (redemptionLink != null) {
value2 = environment.__proto__;
moduleValue = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
if (moduleValue.shouldMigrateToAdAnalyticsInterface((require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */).AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL,
'quest_reward_code_redemption_link')) {
moduleValue2 = require(9517) /* metro dependency 9517: captureAdUserAction */;
captureAdUserAction = moduleValue2.captureAdUserAction;
CLICK_INTERNAL = AdUserActionType.CLICK_INTERNAL;
QUEST = AdCreativeType.QUEST;
questBinding = quest;
id = questBinding.id;
questContentBinding = questContent;
sourceQuestContentBinding = sourceQuestContent;
binding = env0_6;
questContentPositionBinding = questContentPosition;
Reflect.apply(captureAdUserAction, moduleValue2, [{type: CLICK_INTERNAL, adCreativeType: QUEST,
adCreativeId: id,
questContentCTA: QuestContentCTA.REDEEM_REWARD, surfaceId: questContentBinding,
sourceQuestContent: sourceQuestContentBinding, impressionId: binding,
questContentPosition: questContentPositionBinding}]);
moduleValue3 = require(9517) /* metro dependency 9517: captureAdUserAction */;
captureAdUserAction = moduleValue3.captureAdUserAction;
CLICK_INTERNAL = AdUserActionType.CLICK_INTERNAL;
QUEST = AdCreativeType.QUEST;
id = questBinding.id;
Reflect.apply(captureAdUserAction, moduleValue3, [{type: CLICK_INTERNAL, adCreativeType: QUEST,
adCreativeId: id,
questContentCTA: QuestContentCTA.VISIT_REDEMPTION_LINK, surfaceId: questContentBinding,
sourceQuestContent: sourceQuestContentBinding, impressionId: binding,
questContentPosition: questContentPositionBinding}]);
} else {
binding = env0_5;
questBinding = quest;
id = questBinding.id;
questContentBinding = questContent;
questContentPositionBinding = questContentPosition;
sourceQuestContentBinding = sourceQuestContent;
binding({questId: id, questContent: questContentBinding, questContentCTA: QuestContentCTA.REDEEM_REWARD,
questContentPosition: questContentPositionBinding, sourceQuestContent: sourceQuestContentBinding});
id = questBinding.id;
binding({questId: id, questContent: questContentBinding,
questContentCTA: QuestContentCTA.VISIT_REDEMPTION_LINK,
questContentPosition: questContentPositionBinding, sourceQuestContent: sourceQuestContentBinding});
}
(importDefault(3847) /* metro dependency 3847: openURL */)(redemptionLink);
}
}
function _fun77871() { // fn#77871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10134:1722, offset: 0x01e0f4a9, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun77873);
return _fun77874;
}
function _fun77875(a0) { // fn#77875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10134:1918, offset: 0x01e0f567, size: 63 bytes, params: 2, frame: 12
var value;
var property;
var error;
try {
value = environment.__proto__;
property = dependencyMap[3];
value = require(property);
value.fetchQuestRewardCode(a0);
} catch (error) {
value = environment;
env0_7(true);
}
}
function _fun77876() { // fn#77876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10134:2000, offset: 0x01e0f5a6, size: 216 bytes, params: 1, frame: 17
var binding;
var value4;
var userStatus;
var id;
var value5;
let r1 = preview === true || rewardCode != null;
r1 = !r1 ? env0_6 : r1;
r1 = !r1 ? isClaimingReward : r1;
r1 = !r1 ? env0_8 : r1;
r1 = !r1 ? isFetchingRewardCode : r1;
if (!r1) {
value4 = undefined;
env0_7(false);
userStatus = quest.userStatus;
if ((userStatus == null ? value4 : userStatus.claimedAt) == null) {
binding = env0_10;
id = quest.id;
value5 = environment.__proto__;
binding(id, (require(6531) /* metro dependency 6531: QuestTypes */).QuestRewardCodePlatforms.CROSS_PLATFORM,
questContent);
} else {
userStatus = quest.userStatus;
if ((userStatus == null ? value4 : userStatus.claimedAt) != null) {
env0_11(quest.id);
function useHandleRedemptionLinkClick({quest, redemptionLink, questContent, questContentPosition, sourceQuestContent}) { // fn#77868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10134:126, offset: 0x01e0f083, size: 181 bytes, params: 2, frame: 21
const value2 = (AnalyticsHooksModule).useTrackQuestContentClickedWithImpression();
return value2.useCallback(_fun77869, [quest.id, questContent, questContentPosition, sourceQuestContent, value2,
(ContentImpressionTrackerHooksModule).useQuestImpressionId(),
redemptionLink]);
function _fun77869() { // fn#77869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10134:364, offset: 0x01e0f138, size: 569 bytes, params: 1, frame: 27
var value2;
var moduleValue;
var binding;
var questBinding;
var id;
var questContentBinding;
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
var questContentPositionBinding;
var sourceQuestContentBinding;
var moduleValue2;
var captureAdUserAction;
const AdUserActionType = (CaptureAdUserActionTypesModule).AdUserActionType;
var CLICK_INTERNAL;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
var QUEST;
var moduleValue3;
if (redemptionLink != null) {
value2 = environment.__proto__;
moduleValue = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
if (moduleValue.shouldMigrateToAdAnalyticsInterface((require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */).AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL,
'quest_reward_code_redemption_link')) {
moduleValue2 = require(9517) /* metro dependency 9517: captureAdUserAction */;
captureAdUserAction = moduleValue2.captureAdUserAction;
CLICK_INTERNAL = AdUserActionType.CLICK_INTERNAL;
QUEST = AdCreativeType.QUEST;
questBinding = quest;
id = questBinding.id;
questContentBinding = questContent;
sourceQuestContentBinding = sourceQuestContent;
binding = env0_6;
questContentPositionBinding = questContentPosition;
Reflect.apply(captureAdUserAction, moduleValue2, [{type: CLICK_INTERNAL, adCreativeType: QUEST,
adCreativeId: id,
questContentCTA: QuestContentCTA.REDEEM_REWARD, surfaceId: questContentBinding,
sourceQuestContent: sourceQuestContentBinding, impressionId: binding,
questContentPosition: questContentPositionBinding}]);
moduleValue3 = require(9517) /* metro dependency 9517: captureAdUserAction */;
captureAdUserAction = moduleValue3.captureAdUserAction;
CLICK_INTERNAL = AdUserActionType.CLICK_INTERNAL;
QUEST = AdCreativeType.QUEST;
id = questBinding.id;
Reflect.apply(captureAdUserAction, moduleValue3, [{type: CLICK_INTERNAL, adCreativeType: QUEST,
adCreativeId: id,
questContentCTA: QuestContentCTA.VISIT_REDEMPTION_LINK, surfaceId: questContentBinding,
sourceQuestContent: sourceQuestContentBinding, impressionId: binding,
questContentPosition: questContentPositionBinding}]);
} else {
binding = ReactModule;
questBinding = quest;
id = questBinding.id;
questContentBinding = questContent;
questContentPositionBinding = questContentPosition;
sourceQuestContentBinding = sourceQuestContent;
binding({questId: id, questContent: questContentBinding, questContentCTA: QuestContentCTA.REDEEM_REWARD,
questContentPosition: questContentPositionBinding, sourceQuestContent: sourceQuestContentBinding});
id = questBinding.id;
binding({questId: id, questContent: questContentBinding,
questContentCTA: QuestContentCTA.VISIT_REDEMPTION_LINK,
questContentPosition: questContentPositionBinding, sourceQuestContent: sourceQuestContentBinding});
}
(importDefault(3847) /* metro dependency 3847: openURL */)(redemptionLink);
}
}
}
}
function _fun77878() { // fn#77878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10134:2824, offset: 0x01e0f7cc, size: 433 bytes, params: 1, frame: 19
var claimCodeBinding;
var id;
var value3;
var moduleValue;
var object2;
var moduleValue2;
var captureAdUserAction;
if (hasError) {
if (quest.userStatus?.claimedAt != null) {
fetchCode(quest.id);
} else {
claimCodeBinding = claimCode;
id = quest.id;
value3 = environment.__proto__;
claimCodeBinding(id,
(require(6531) /* metro dependency 6531: QuestTypes */).QuestRewardCodePlatforms.CROSS_PLATFORM,
questContent);
moduleValue = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
if (moduleValue.shouldMigrateToAdAnalyticsInterface((require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */).AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL,
'quest_reward_code_primary_cta')) {
moduleValue2 = require(9517) /* metro dependency 9517: captureAdUserAction */;
captureAdUserAction = moduleValue2.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 = env0_6;
object2.surfaceId = questContent;
object2.sourceQuestContent = sourceQuestContent;
object2.impressionId = env0_11;
object2.questContentPosition = questContentPosition;
Reflect.apply(captureAdUserAction, moduleValue2, [object2]);
}
function useClaimOrFetchRewardCode({isClaimingReward, isFetchingRewardCode, questContent, quest, rewardCode, preview}) { // fn#77870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10134:1484, offset: 0x01e0f371, size: 312 bytes, params: 2, frame: 27
const rewardCode2 = rewardCode;
const preview2 = preview;
let binding = preview2;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
binding = rewardCode2;
const value3 = binding(value2, 2);
const property = value3[0];
const property2 = value3[1];
const binding2 = preview2;
useState = binding2.useState;
const value4 = binding(Reflect.apply(useState, binding2, [false]), 2);
const property3 = value4[0];
const env0_9 = value4[1];
const value6 = preview2.useCallback(_fun77871(), []);
const value7 = preview2.useCallback(_fun77875, []);
preview2.useEffect(_fun77876, [value6, value7, property, isClaimingReward, property3, isFetchingRewardCode,
questContent, quest, rewardCode, preview]);
return {claimCode: value6, fetchCode: value7, hasError: property, setHasError: property2};
function _fun77871() { // fn#77871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10134:1722, offset: 0x01e0f4a9, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun77873);
return _fun77874;
function* _fun77873(a0, a1, a2) { // fn#77873, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10134:1742, offset: 0x01e0f4d8, size: 143 bytes, params: 4, frame: 19
var binding;
var binding2;
var property;
var value4;
var claimQuestReward;
var value5;
var value6;
var value7;
var error;
if (true) {
value = environment.__proto__.__proto__;
try {
binding = env2_9;
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
try {
binding(true);
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
try {
binding = env3_0;
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
try {
binding2 = env3_2;
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
try {
property = binding2[3];
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
try {
claimQuestReward = value4.claimQuestReward;
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
try {
value5 = Reflect.apply(claimQuestReward, value4, [a0, a1, a2]);
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
if (value7) {
return value6;
}
try {
binding = env2_7;
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
try {
binding(false);
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
try {
binding = env2_9;
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
try {
binding(false);
} catch (error) {
env2_7(true);
env2_9(false);
}
}
}
function _fun77874() { // fn#77874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10134:1851, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function _fun77875(a0) { // fn#77875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10134:1918, offset: 0x01e0f567, size: 63 bytes, params: 2, frame: 12
var value;
var property;
var error;
try {
value = environment.__proto__;
property = dependencyMap[3];
value = require(property);
value.fetchQuestRewardCode(a0);
} catch (error) {
value = environment;
env0_7(true);
}
}
function _fun77876() { // fn#77876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10134:2000, offset: 0x01e0f5a6, size: 216 bytes, params: 1, frame: 17
var binding;
var value4;
var userStatus;
var id;
var value5;
let r1 = preview === true || rewardCode != null;
r1 = !r1 ? env0_6 : r1;
r1 = !r1 ? isClaimingReward : r1;
r1 = !r1 ? env0_8 : r1;
r1 = !r1 ? isFetchingRewardCode : r1;
if (!r1) {
value4 = undefined;
env0_7(false);
userStatus = quest.userStatus;
if ((userStatus == null ? value4 : userStatus.claimedAt) == null) {
binding = env0_10;
id = quest.id;
value5 = environment.__proto__;
binding(id, (require(6531) /* metro dependency 6531: QuestTypes */).QuestRewardCodePlatforms.CROSS_PLATFORM,
questContent);
} else {
userStatus = quest.userStatus;
if ((userStatus == null ? value4 : userStatus.claimedAt) != null) {
env0_11(quest.id);
}
}
}
}
}
function useClaimRewardCodePrimaryCtaClickHandler(a0) { // fn#77877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10134:2397, offset: 0x01e0f67e, size: 334 bytes, params: 2, frame: 27
const claimCode = a0.claimCode;
const fetchCode = a0.fetchCode;
const hasError = a0.hasError;
const onDismiss = a0.onDismiss;
const quest = a0.quest;
const questContent = a0.questContent;
const questContent2 = questContent;
const questContentCTA = a0.questContentCTA;
const value = undefined;
const r10 = value !== questContentCTA ? questContentCTA : (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA.GET_REWARD_CODE;
const questContentPosition = a0.questContentPosition;
const redemptionLink = a0.redemptionLink;
const sourceQuestContent = a0.sourceQuestContent;
const value4 = (AnalyticsHooksModule).useTrackQuestContentClickedWithImpression();
const value5 = (ContentImpressionTrackerHooksModule).useQuestImpressionId();
const value6 = useHandleRedemptionLinkClick(a0);
const binding = questContent2;
const useCallback = binding.useCallback;
const userStatus = quest.userStatus;
return Reflect.apply(useCallback, binding, [_fun77878, [claimCode, fetchCode, hasError, onDismiss, quest.id,
userStatus == null ? value : userStatus.claimedAt, questContent, r10, questContentPosition, value4, value5,
redemptionLink, sourceQuestContent, value6]]);
function _fun77878() { // fn#77878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10134:2824, offset: 0x01e0f7cc, size: 433 bytes, params: 1, frame: 19
var claimCodeBinding;
var id;
var value3;
var moduleValue;
var object;
var moduleValue2;
var captureAdUserAction;
if (hasError) {
if (quest.userStatus?.claimedAt != null) {
fetchCode(quest.id);
} else {
claimCodeBinding = claimCode;
id = quest.id;
value3 = environment.__proto__;
claimCodeBinding(id,
(require(6531) /* metro dependency 6531: QuestTypes */).QuestRewardCodePlatforms.CROSS_PLATFORM,
questContent);
moduleValue = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
if (moduleValue.shouldMigrateToAdAnalyticsInterface((require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */).AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL,
'quest_reward_code_primary_cta')) {
moduleValue2 = require(9517) /* metro dependency 9517: captureAdUserAction */;
captureAdUserAction = moduleValue2.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 = env0_6;
object.surfaceId = questContent;
object.sourceQuestContent = sourceQuestContent;
object.impressionId = env0_11;
object.questContentPosition = questContentPosition;
Reflect.apply(captureAdUserAction, moduleValue2, [object]);
} else {
env0_10({questId: quest.id, questContent: questContent, questContentCTA: env0_6,
questContentPosition: questContentPosition, sourceQuestContent: sourceQuestContent});
}
}
} else {
env0_10({questId: quest.id, questContent: questContent, questContentCTA: env0_6,
questContentPosition: questContentPosition, sourceQuestContent: sourceQuestContent});
if (redemptionLink != null) {
env0_12();
}
onDismiss();
}
}
} else {
if (redemptionLink != null) {
env0_12();
}
onDismiss();
}
}
function* _fun77873(a0, a1, a2) { // fn#77873, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10134:1742, offset: 0x01e0f4d8, size: 143 bytes, params: 4, frame: 19
var binding;
var binding2;
var property;
var value4;
var claimQuestReward;
var value5;
var value6;
var value7;
var error;
if (true) {
value = environment.__proto__.__proto__;
try {
binding = env2_9;
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
try {
binding(true);
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
try {
binding = env3_0;
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
try {
binding2 = env3_2;
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
try {
property = binding2[3];
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
try {
claimQuestReward = value4.claimQuestReward;
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
try {
value5 = Reflect.apply(claimQuestReward, value4, [a0, a1, a2]);
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
if (value7) {
return value6;
}
try {
binding = env2_7;
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
try {
binding(false);
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
try {
binding = env2_9;
} catch (error) {
env2_7(true);
env2_9(false);
return undefined;
}
try {
binding(false);
} catch (error) {
env2_7(true);
env2_9(false);
}
}
}
global.__d(_fun77867, 9948, [5, 57, 31, 9484, 6531, 9949, 9513, 9519, 9517, 9518, 7121, 7120, 3847,
2]) /* metro module 9948, dependencies: [5, 57, 31, 9484, 6531, 9949, 9513, 9519, 9517, 9518, 7121, 7120, 3847, 2] */;
@@ -1,4 +1,14 @@
/* Metro module 14910; source: modules/quests/hooks/useHasNewAdContent.tsx; dependencies: [57, 13563, 7093, 6528, 672, 9511, 566, 7091, 7121, 7013, 1365, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Durations from '../../../utils/Durations.tsx'; /* Metro dependency 672 */
import QuestStore from '../QuestStore.tsx'; /* Metro dependency 7093 */
import AdContentSeenStore from '../AdContentSeenStore.tsx'; /* Metro dependency 13563 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as QuestConstantsModule from '../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as UseSelectedDismissibleContentModule from '../../dismissible_content/hooks/useSelectedDismissibleContent.tsx'; /* Metro dependency 7013 */
import * as ExperimentsModule from '../experiments/index.tsx'; /* Metro dependency 9511 */
function _fun112802(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15107:6, offset: 0x023dcbee, size: 218 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_112805 = function(a0, a1) {
@@ -46,152 +56,156 @@ function _fun112802(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const adContentSeenStore = importDefault(13563) /* metro dependency 13563: AdContentSeenStore */;
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
const env0_5 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const Millis = (Durations).Millis;
const env0_6 = Millis.DAY;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/hooks/useHasNewAdContent.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/hooks/useHasNewAdContent.tsx');
exports.default = useHasNewAdContent;
}
function _createForOfIteratorHelperLoose_112803(a0, a1) { // fn#112803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15107:167, offset: 0x023dccc8, 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_112803(a0, a1) { // fn#112803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15107:167, offset: 0x023dccc8, 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 _fun112804;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_112805(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 _fun112804;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_112805(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_112805(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_112805(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun112804;
}
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 _fun112804() { // fn#112804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15107:738, 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 _fun112804;
}
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 useHasNewAdContent() { // fn#112806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15107:1192, offset: 0x023dce3c, size: 307 bytes, params: 1, frame: 23
const MobileQuestHomeRedDotNotificationExperiment = (require(9511) /* metro dependency 9511: experiments */).MobileQuestHomeRedDotNotificationExperiment;
const useConfig = MobileQuestHomeRedDotNotificationExperiment.useConfig;
const YOU_TAB_PROFILE_HEADER = QuestsExperimentLocations.YOU_TAB_PROFILE_HEADER;
const enabled = Reflect.apply(useConfig, MobileQuestHomeRedDotNotificationExperiment,
[{location: YOU_TAB_PROFILE_HEADER}]).enabled;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AdContentSeenStore], _fun112810,
[(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([QuestStore], _fun112807, [enabled])]);
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
const useSelectedTimeRecurringDismissibleContent = useSelectedDismissibleContentModule.useSelectedTimeRecurringDismissibleContent;
const value4 = null;
const QUEST_HOME_NEW_QUEST_BADGE = value3 && enabled ? (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.QUEST_HOME_NEW_QUEST_BADGE : value4;
const value = env0_2(Reflect.apply(useSelectedTimeRecurringDismissibleContent, useSelectedDismissibleContentModule,
[QUEST_HOME_NEW_QUEST_BADGE, {cooldownDurationMs: DAY}, undefined, true]), 2);
return {showBadge: value4 != value[0], dismissBadge: value[1]};
}
function _fun112807() { // fn#112807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15107:1376, offset: 0x023dcf6f, size: 94 bytes, params: 1, frame: 14
var environment;
var r0;
var Array;
var from;
var quests;
var value;
if (enabled) {
Array = global.Array;
from = Array.from;
value = environment.__proto__;
quests = QuestStore.quests;
value = Reflect.apply(from, Array, [quests.values()]);
value = value.filter(_fun112808);
value = value.map(function(a0) {
return a0.id;
});
r0 = value;
} else {
r0 = [];
}
return r0;
}
function _fun112810() { // fn#112810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15107:1512, offset: 0x023dcff9, size: 112 bytes, params: 1, frame: 19
var value5;
var hasSeen;
var AdCreativeType;
var QUEST;
var value6;
const value3 = _createForOfIteratorHelperLoose_112803(env0_1);
const value4 = value3();
let done = value4.done;
if (done) {
return false;
}
let r1 = value4;
loopExit1: while (true) {
value5 = r1.value;
hasSeen = AdContentSeenStore.hasSeen;
AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
QUEST = AdCreativeType.QUEST;
if (Reflect.apply(hasSeen, AdContentSeenStore, [QUEST, value5])) {
value6 = value3();
done = value6.done;
function useHasNewAdContent() { // fn#112806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15107:1192, offset: 0x023dce3c, size: 307 bytes, params: 1, frame: 23
const MobileQuestHomeRedDotNotificationExperiment = (ExperimentsModule).MobileQuestHomeRedDotNotificationExperiment;
const useConfig = MobileQuestHomeRedDotNotificationExperiment.useConfig;
const YOU_TAB_PROFILE_HEADER = QuestsExperimentLocations.YOU_TAB_PROFILE_HEADER;
const enabled = Reflect.apply(useConfig, MobileQuestHomeRedDotNotificationExperiment,
[{location: YOU_TAB_PROFILE_HEADER}]).enabled;
const value3 = (FluxModule).useStateFromStores([AdContentSeenStore], _fun112810,
[(FluxModule).useStateFromStoresArray([QuestStore], _fun112807, [enabled])]);
const useSelectedTimeRecurringDismissibleContent = UseSelectedDismissibleContentModule.useSelectedTimeRecurringDismissibleContent;
const value4 = null;
const QUEST_HOME_NEW_QUEST_BADGE = value3 && enabled ? (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.QUEST_HOME_NEW_QUEST_BADGE : value4;
const value = Module00057(Reflect.apply(useSelectedTimeRecurringDismissibleContent, UseSelectedDismissibleContentModule,
[QUEST_HOME_NEW_QUEST_BADGE, {cooldownDurationMs: DAY}, undefined, true]), 2);
return {showBadge: value4 != value[0], dismissBadge: value[1]};
function _fun112807() { // fn#112807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15107:1376, offset: 0x023dcf6f, size: 94 bytes, params: 1, frame: 14
var environment;
var r0;
var Array;
var from;
var quests;
var value;
if (enabled) {
Array = global.Array;
from = Array.from;
value = environment.__proto__;
quests = QuestStore.quests;
value = Reflect.apply(from, Array, [quests.values()]);
value = value.filter(_fun112808);
value = value.map(function(a0) {
return a0.id;
});
r0 = value;
} else {
r0 = [];
}
return r0;
function _fun112808(a0) { // fn#112808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15107:1420, offset: 0x023dcfcd, size: 44 bytes, params: 2, frame: 11
let value = environment.__proto__.__proto__;
value = require(7091) /* metro dependency 7091: QuestDataUtils */;
return !value.isQuestExpired(a0);
}
}
function _fun112810() { // fn#112810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15107:1512, offset: 0x023dcff9, size: 112 bytes, params: 1, frame: 19
var value5;
var adContentSeenStoreBinding;
var hasSeen;
var AdCreativeType;
var QUEST;
var value6;
const value3 = _createForOfIteratorHelperLoose_112803(env0_1);
const value4 = value3();
let done = value4.done;
if (done) {
return false;
}
r1 = value6;
continue;
let r1 = value4;
loopExit1: while (true) {
value5 = r1.value;
adContentSeenStoreBinding = AdContentSeenStore;
hasSeen = adContentSeenStoreBinding.hasSeen;
AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
QUEST = AdCreativeType.QUEST;
if (Reflect.apply(hasSeen, adContentSeenStoreBinding, [QUEST, value5])) {
value6 = value3();
done = value6.done;
if (done) {
return false;
}
r1 = value6;
continue;
}
break loopExit1;
}
return true;
}
break loopExit1;
}
return true;
}
function _fun112808(a0) { // fn#112808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15107:1420, offset: 0x023dcfcd, size: 44 bytes, params: 2, frame: 11
let value = environment.__proto__.__proto__;
value = require(7091) /* metro dependency 7091: QuestDataUtils */;
return !value.isQuestExpired(a0);
}
global.__d(_fun112802, 14910, [57, 13563, 7093, 6528, 672, 9511, 566, 7091, 7121, 7013, 1365,
2]) /* metro module 14910, dependencies: [57, 13563, 7093, 6528, 672, 9511, 566, 7091, 7121, 7013, 1365, 2] */;
@@ -1,21 +1,25 @@
/* Metro module 9529; source: modules/quests/hooks/useVideoModalPlacementEnabled.tsx; dependencies: [6528, 9530, 9531, 2] */
import BountyUseVideoModalMobilePlacementExperiment from '../experiments/BountyUseVideoModalMobilePlacementExperiment.tsx'; /* Metro dependency 9531 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as QuestConstantsModule from '../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as BountiesStage1ExperimentModule from '../experiments/BountiesStage1Experiment.tsx'; /* Metro dependency 9530 */
function _fun74334(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9715:6, offset: 0x01d8a8a0, size: 124 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/hooks/useVideoModalPlacementEnabled.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/hooks/useVideoModalPlacementEnabled.tsx');
exports.useVideoModalPlacementEnabled = useVideoModalPlacementEnabled;
function useVideoModalPlacementEnabled(a0) { // fn#74335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9715:252, offset: 0x01d8a91c, size: 113 bytes, params: 2, frame: 15
const BountiesStage1Experiment = (BountiesStage1ExperimentModule).BountiesStage1Experiment;
let useConfig = BountiesStage1Experiment.useConfig;
const QUEST_HOME_MOBILE = QuestsExperimentLocations.QUEST_HOME_MOBILE;
const verticalScrollEnabled = Reflect.apply(useConfig, BountiesStage1Experiment,
[{location: QUEST_HOME_MOBILE}]).verticalScrollEnabled;
useConfig = BountyUseVideoModalMobilePlacementExperiment.useConfig;
return verticalScrollEnabled && Reflect.apply(useConfig, BountyUseVideoModalMobilePlacementExperiment, [{location: a0}]).enabled;
}
}
function useVideoModalPlacementEnabled(a0) { // fn#74335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9715:252, offset: 0x01d8a91c, size: 113 bytes, params: 2, frame: 15
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
let useConfig = BountiesStage1Experiment.useConfig;
const QUEST_HOME_MOBILE = QuestsExperimentLocations.QUEST_HOME_MOBILE;
const verticalScrollEnabled = Reflect.apply(useConfig, BountiesStage1Experiment,
[{location: QUEST_HOME_MOBILE}]).verticalScrollEnabled;
const value = importDefault(9531) /* metro dependency 9531: BountyUseVideoModalMobilePlacementExperiment */;
useConfig = value.useConfig;
return verticalScrollEnabled && Reflect.apply(useConfig, value, [{location: a0}]).enabled;
}
global.__d(_fun74334, 9529, [6528, 9530, 9531, 2]) /* metro module 9529, dependencies: [6528, 9530, 9531, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,4 +1,10 @@
/* Metro module 9504; source: modules/quests/lib/FractionalPremiumUtils.tsx; dependencies: [3802, 1244, 7098, 3826, 672, 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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as DateUtilsModule from '../../../utils/DateUtils.tsx'; /* Metro dependency 3826 */
import * as QuestRewardTypesModule from '../../../external/discord_common/js/shared/shared-constants/QuestRewardTypes.tsx'; /* Metro dependency 7098 */
function _fun74176(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9690:6, offset: 0x01d83457, size: 137 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
@@ -6,48 +12,55 @@ function _fun74176(global, require, importDefault, importAll, module, exports, d
const closure = function(a0) {
return a0.rewardsConfig.rewards.filter(_fun74178);
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/lib/FractionalPremiumUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/lib/FractionalPremiumUtils.tsx');
exports.getDurationStringOfFractionalPremium = getDurationStringOfFractionalPremium;
exports.getFractionalPremiumQuestRewards = closure;
exports.getFractionalPremiumQuestRewardName = getFractionalPremiumQuestRewardName;
function getFractionalPremiumQuestRewards({rewardsConfig}) { // fn#74177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9690:131, offset: 0x01d834e0, size: 36 bytes, params: 2, frame: 11
return rewardsConfig.rewards.filter(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.FRACTIONAL_PREMIUM;
});
function _fun74178({type}) { // fn#74178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9690:166, offset: 0x01d83504, size: 51 bytes, params: 2, frame: 12
const QuestRewardTypes = (QuestRewardTypesModule).QuestRewardTypes;
const FRACTIONAL_PREMIUM = QuestRewardTypes.FRACTIONAL_PREMIUM;
return type === FRACTIONAL_PREMIUM;
}
}
function getDurationStringOfFractionalPremium(a0) { // fn#74179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9690:343, offset: 0x01d83537, size: 204 bytes, params: 2, frame: 18
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const fractionalPremiumUnitsHoursFromSkuIds = (require(3802) /* metro dependency 3802: PremiumUtils */).getFractionalPremiumUnitsHoursFromSkuIds(a0.map(function(a0) {
return a0.skuId;
}));
return fractionalPremiumUnitsHoursFromSkuIds % 24 === 0 ? intl.formatToPlainString(t.Cz1G97,
{days: fractionalPremiumUnitsHoursFromSkuIds / 24}) : intl.formatToPlainString(t.J9Lu4h, {hours: fractionalPremiumUnitsHoursFromSkuIds});
}
function getFractionalPremiumQuestRewardName(a0) { // fn#74181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9690:671, offset: 0x01d83603, size: 280 bytes, params: 2, frame: 21
const fractionalPremiumUnitsHoursFromSkuIds = (require(3802) /* metro dependency 3802: PremiumUtils */).getFractionalPremiumUnitsHoursFromSkuIds(getFractionalPremiumQuestRewards(a0).flatMap(function(a0) {
var Array = global.Array;
return Array(a0.quantity).fill(a0.skuId);
}));
const object = {};
const t = (IndexNativeModule).t;
object.days = t.fYmirx;
object.hours = t['C3RO+g'];
object.minutes = t.r77oHc;
const diffAsUnits = DateUtilsModule.diffAsUnits;
const Millis = (Durations).Millis;
const HOUR = Millis.HOUR;
const value = Reflect.apply(diffAsUnits, DateUtilsModule, [0, fractionalPremiumUnitsHoursFromSkuIds * HOUR]);
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const property = t['4SqnVD'];
const object2 = {};
object2.time = DateUtilsModule.unitsAsStrings(value, object);
return Reflect.apply(formatToPlainString, intl, [property, object2]);
}
}
function getFractionalPremiumQuestRewards({rewardsConfig}) { // fn#74177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9690:131, offset: 0x01d834e0, size: 36 bytes, params: 2, frame: 11
return rewardsConfig.rewards.filter(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.FRACTIONAL_PREMIUM;
});
}
function getDurationStringOfFractionalPremium(a0) { // fn#74179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9690:343, offset: 0x01d83537, size: 204 bytes, params: 2, frame: 18
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const fractionalPremiumUnitsHoursFromSkuIds = (require(3802) /* metro dependency 3802: PremiumUtils */).getFractionalPremiumUnitsHoursFromSkuIds(a0.map(function(a0) {
return a0.skuId;
}));
return fractionalPremiumUnitsHoursFromSkuIds % 24 === 0 ? intl.formatToPlainString(t.Cz1G97,
{days: fractionalPremiumUnitsHoursFromSkuIds / 24}) : intl.formatToPlainString(t.J9Lu4h, {hours: fractionalPremiumUnitsHoursFromSkuIds});
}
function getFractionalPremiumQuestRewardName(a0) { // fn#74181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9690:671, offset: 0x01d83603, size: 280 bytes, params: 2, frame: 21
const fractionalPremiumUnitsHoursFromSkuIds = (require(3802) /* metro dependency 3802: PremiumUtils */).getFractionalPremiumUnitsHoursFromSkuIds(getFractionalPremiumQuestRewards(a0).flatMap(function(a0) {
var Array = global.Array;
return Array(a0.quantity).fill(a0.skuId);
}));
const object3 = {};
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object3.days = t.fYmirx;
object3.hours = t['C3RO+g'];
object3.minutes = t.r77oHc;
const dateUtilsModule = require(3826) /* metro dependency 3826: DateUtils */;
const diffAsUnits = dateUtilsModule.diffAsUnits;
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const HOUR = Millis.HOUR;
const value = Reflect.apply(diffAsUnits, dateUtilsModule, [0, fractionalPremiumUnitsHoursFromSkuIds * HOUR]);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const property = t['4SqnVD'];
const object4 = {};
object4.time = dateUtilsModule.unitsAsStrings(value, object3);
return Reflect.apply(formatToPlainString, intl, [property, object4]);
}
global.__d(_fun74176, 9504, [3802, 1244, 7098, 3826, 672,
2]) /* metro module 9504, dependencies: [3802, 1244, 7098, 3826, 672, 2] */;
@@ -1,9 +1,17 @@
/* Metro module 9479; source: modules/quests/lib/QuestsEligibility.tsx; dependencies: [1581, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as MetaQuestUtilsAndroidModule from '../../device/MetaQuestUtils.android.tsx'; /* Metro dependency 1581 */
function _fun73709(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9665:6, offset: 0x01d754e1, 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/lib/QuestsEligibility.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/lib/QuestsEligibility.tsx');
exports.getIsEligibleForQuests = getIsEligibleForQuests;
function getIsEligibleForQuests() { // fn#73710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9665:191, offset: 0x00fc3e69, size: 39 bytes, params: 1, frame: 11
return !MetaQuestUtilsAndroidModule.isMetaQuest();
}
}
global.__d(_fun73709, 9479, [1581, 2]) /* metro module 9479, dependencies: [1581, 2] */;
@@ -1,27 +1,36 @@
/* Metro module 7110; source: modules/quests/lib/analytics/AnalyticsActions.tsx; dependencies: [5, 7111, 691, 7093, 661, 4875, 7113, 7091, 7114, 7116, 7120, 7121, 4863, 683, 7122, 7071, 477, 491, 7127, 6531, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import DeveloperOptionsStore from '../../../../stores/DeveloperOptionsStore.tsx'; /* Metro dependency 691 */
import QuestStore from '../../QuestStore.tsx'; /* Metro dependency 7093 */
import DevToolsSettingsStore from '../../../devtools/DevToolsSettingsStore.tsx'; /* Metro dependency 7111 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as QuestTypesModule from '../../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as QuestDataUtilsModule from '../../utils/QuestDataUtils.tsx'; /* Metro dependency 7091 */
import * as SessionAdGeneratorModule from '../../../analytics_sessions/SessionAdGenerator.tsx'; /* Metro dependency 7113 */
import * as AnalyticsTypesModule from './AnalyticsTypes.tsx'; /* Metro dependency 7120 */
import * as AdCreativeTypeModule from '../../../../external/discord_common/js/shared/shared-constants/AdCreativeType.tsx'; /* Metro dependency 7121 */
function _fun56794(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:6, offset: 0x013d20f7, size: 500 bytes, params: 8, frame: 23
const env0_0 = require;
const closure = trackQuestEvent;
const closure2 = trackAdContentEvent;
const trackQuestEvent2 = trackQuestEvent;
const trackAdContentEvent2 = trackAdContentEvent;
const closure3 = function() {
return _getCommonClickEventProperties.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const devToolsSettingsStore = importDefault(7111) /* metro dependency 7111: DevToolsSettingsStore */;
const developerOptionsStore = importDefault(691) /* metro dependency 691: DeveloperOptionsStore */;
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
const AnalyticEvents = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const AnalyticEvents = (ConstantsModule).AnalyticEvents;
const Set = global.Set;
const QUEST_CONTENT_VIEWED = AnalyticEvents.QUEST_CONTENT_VIEWED;
const QUEST_CONTENT_CLICKED = AnalyticEvents.QUEST_CONTENT_CLICKED;
const set = new Set([QUEST_CONTENT_VIEWED, QUEST_CONTENT_CLICKED]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/lib/analytics/AnalyticsActions.tsx');
exports.trackQuestEvent = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/quests/lib/analytics/AnalyticsActions.tsx');
exports.trackQuestEvent = trackQuestEvent2;
exports.trackAppStoreOverlayEvent = trackAppStoreOverlayEvent;
exports.trackAdContentAppStoreOverlayEvent = trackAdContentAppStoreOverlayEvent;
exports.trackAdContentEvent = closure2;
exports.trackAdContentEvent = trackAdContentEvent2;
exports.getCommonClickEventProperties = closure3;
exports.trackQuestContentClicked = function() {
return _trackQuestContentClicked.apply(this, arguments);
@@ -50,455 +59,445 @@ function _fun56794(global, require, importDefault, importAll, module, exports, d
var QUEST_EMBED_FALLBACK_VIEWED = AnalyticEvents.QUEST_EMBED_FALLBACK_VIEWED;
defaultImport.trackWithMetadata(QUEST_EMBED_FALLBACK_VIEWED, {quest_id: a0, reason: a1});
};
}
function assignBillingSessionId(a0, a1) { // fn#56795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:221, offset: 0x013d22eb, size: 76 bytes, params: 3, frame: 13
var uuid;
var r0;
var activeSessionUnsafe;
var value3;
let value = a0;
if (a1) {
r0 = value;
} else {
value = undefined;
activeSessionUnsafe = (require(4875) /* metro dependency 4875: SessionHeartbeatScheduler */).getActiveSessionUnsafe();
value3 = null;
uuid = value3 == activeSessionUnsafe ? value : activeSessionUnsafe.uuid;
r0 = value3 != uuid ? uuid : value3;
}
return r0;
}
function getCommonProperties(a0, a1, a2, a3) { // fn#56796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:351, offset: 0x013d2337, size: 161 bytes, params: 5, frame: 21
const value = a2;
const sessionAdGeneratorModule = require(7113) /* metro dependency 7113: SessionAdGenerator */;
const getOrRefreshAdSession = sessionAdGeneratorModule.getOrRefreshAdSession;
const uuid = Reflect.apply(getOrRefreshAdSession, sessionAdGeneratorModule, [a3]).uuid;
const adDecisionData = (require(7091) /* metro dependency 7091: QuestDataUtils */).getAdDecisionData(a0, a1);
const object2 = {client_ad_session_id: uuid};
const assignBillingSessionIdBinding = assignBillingSessionId;
const questDataUtilsModule = require(7091) /* metro dependency 7091: QuestDataUtils */;
object2.billing_session_id = assignBillingSessionIdBinding(uuid, questDataUtilsModule.isBillableQuestContent(a1));
object2.ad_content_id = a0;
copyDataProperties(object2, adDecisionData, undefined);
object2['creative_type'] = adDecisionData.creative_type ?? value;
return object2;
}
function getCommonQuestProperties(a0, a1, a2) { // fn#56797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:643, offset: 0x013d23d8, size: 239 bytes, params: 4, frame: 20
const object2 = {};
let id = a0.id;
object2.quest_id = id;
object2.quest_type = (require(7114) /* metro dependency 7114: QuestUtils */).getQuestType(a0.config);
object2.game_id = a0.config.application.id;
object2.game_name = a0.config.application.name;
object2.application_ids = (require(7116) /* metro dependency 7116: QuestTaskUtils */).getAllApplicationIds(a0) ?? [];
object2.quest_status = (require(7120) /* metro dependency 7120: AnalyticsTypes */).getQuestStatus(a0);
const getCommonPropertiesBinding = getCommonProperties;
id = a0.id;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const QUEST = AdCreativeType.QUEST;
copyDataProperties(object2, getCommonPropertiesBinding(id, a1, QUEST, a2), QUEST);
return object2;
}
function getCommonAdContentProperties({adContentId, adCreativeType, sourceQuestContent, shouldExtendSession, relatedQuestId}) { // fn#56798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:988, offset: 0x013d24c7, size: 276 bytes, params: 2, frame: 23
var r2;
let value = null;
const r4 = value != relatedQuestId ? QuestStore.getQuest(relatedQuestId) : value;
const object2 = {};
copyDataProperties(object2, getCommonProperties(adContentId, sourceQuestContent, adCreativeType,
shouldExtendSession), adCreativeType);
const adMetadataSealed = (require(7091) /* metro dependency 7091: QuestDataUtils */).getAdMetadataSealed(sourceQuestContent,
adContentId);
object2['metadata_sealed'] = value != adMetadataSealed ? adMetadataSealed : value;
const adTrafficMetadataSealed = (require(7091) /* metro dependency 7091: QuestDataUtils */).getAdTrafficMetadataSealed(sourceQuestContent,
undefined, adContentId);
object2['traffic_metadata_sealed'] = value != adTrafficMetadataSealed ? adTrafficMetadataSealed : value;
object2['quest_id'] = value != relatedQuestId ? relatedQuestId : value;
if (value != r4) {
value = require(7120) /* metro dependency 7120: AnalyticsTypes */;
value = value.getQuestStatus(r4);
r2 = value;
} else {
r2 = value;
}
object2['quest_status'] = r2;
return object2;
}
function trackEvent(a0, a1) { // fn#56799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:1428, offset: 0x013d25db, size: 156 bytes, params: 3, frame: 20
var value2;
let value = a2;
const r1 = value !== undefined ? value : false;
if (DevToolsSettingsStore.displayTools) {
if (DevToolsSettingsStore.lastOpenTabId === 'quest_preview') {
return undefined;
}
DeveloperOptionsStore.isLoggingAnalyticsEvents;
if (a3) {
return undefined;
}
value2 = env0_8.has(a0);
if (r1) {
return (importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */).trackWithMetadata(a0, a1,
value2);
}
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
value.track(a0, a1, {flush: value2});
} else {
DeveloperOptionsStore.isLoggingAnalyticsEvents;
if (a3) {
return undefined;
}
value2 = env0_8.has(a0);
if (r1) {
return (importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */).trackWithMetadata(a0, a1,
value2);
}
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
value.track(a0, a1, {flush: value2});
}
}
function trackQuestEvent({questId, event, properties, trackGuildAndChannelMetadata, shouldExtendSession, sourceQuestContent}) { // fn#56800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:1641, offset: 0x013d2677, size: 133 bytes, params: 2, frame: 21
var trackEventBinding;
var object2;
shouldExtendSession = !(shouldExtendSession === undefined) && shouldExtendSession;
const value2 = QuestStore.quests.get(questId);
if (value2 != null) {
trackEventBinding = trackEvent;
object2 = {};
copyDataProperties(object2, getCommonQuestProperties(value2, sourceQuestContent, shouldExtendSession),
undefined);
copyDataProperties(object2, properties, undefined);
trackEventBinding(event, object2, trackGuildAndChannelMetadata, value2.preview);
}
}
function trackAdContentEvent({adContentId, relatedQuestId, adCreativeType, event, properties, trackGuildAndChannelMetadata, shouldExtendSession, sourceQuestContent}) { // fn#56801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:1876, offset: 0x013d26fc, size: 140 bytes, params: 2, frame: 24
shouldExtendSession = !(shouldExtendSession === undefined) && shouldExtendSession;
const trackEventBinding = trackEvent;
const object2 = {};
copyDataProperties(object2, getCommonAdContentProperties({adContentId: adContentId, adCreativeType: adCreativeType,
sourceQuestContent: sourceQuestContent, shouldExtendSession: shouldExtendSession,
relatedQuestId: relatedQuestId}), undefined);
copyDataProperties(object2, properties, undefined);
trackEventBinding(event, object2, trackGuildAndChannelMetadata, false);
}
function _getCommonClickEventProperties() { // fn#56803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:2307, offset: 0x013d2788, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun56805).apply(this, arguments);
}
function _trackQuestContentClicked() { // fn#56806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:2861, offset: 0x013d2957, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun56808).apply(this, arguments);
}
function _trackAdContentClicked() { // fn#56809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:3721, offset: 0x013d2b35, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun56811).apply(this, arguments);
}
function trackAppStoreOverlayEvent({id}, a1, a2, a3, a4) { // fn#56812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:4518, offset: 0x013d2c68, size: 245 bytes, params: 6, frame: 21
var r4;
var object4;
const object5 = {};
const analyticsTypesModule = require(7120) /* metro dependency 7120: AnalyticsTypes */;
object5.content_name = analyticsTypesModule.getQuestContentName(a1.content);
object5.cta_name = a1.ctaContent;
object5.impression_id = a1.impressionId;
object5.source_content_name = analyticsTypesModule.getQuestContentName(a1.sourceQuestContent);
object5.app_id = a2;
object5.content_position = a1.position;
const QUEST_APP_STORE_OVERLAY_CLOSED = AnalyticEvents.QUEST_APP_STORE_OVERLAY_CLOSED;
const r5 = (a3 === QUEST_APP_STORE_OVERLAY_CLOSED || a3 === AnalyticEvents.QUEST_APP_STORE_OVERLAY_RETURNED) && a4 !== undefined;
const trackQuestEventBinding = trackQuestEvent;
const object6 = {};
object6.questId = id;
object6.event = a3;
if (r5) {
object4 = {};
copyDataProperties(object4, object5, analyticsTypesModule);
object4['time_spent_ms'] = a4;
r4 = object4;
} else {
r4 = object5;
}
object6.properties = r4;
object6.sourceQuestContent = a1.sourceQuestContent;
trackQuestEventBinding(object6);
}
function trackAdContentAppStoreOverlayEvent({adContentId, adCreativeType}, a1, a2, a3, a4) { // fn#56813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:5033, offset: 0x013d2d5d, size: 251 bytes, params: 6, frame: 23
var r4;
var object4;
const object5 = {};
const analyticsTypesModule = require(7120) /* metro dependency 7120: AnalyticsTypes */;
object5.content_name = analyticsTypesModule.getQuestContentName(a1.content);
object5.cta_name = a1.ctaContent;
object5.impression_id = a1.impressionId;
object5.source_content_name = analyticsTypesModule.getQuestContentName(a1.sourceQuestContent);
object5.app_id = a2;
object5.content_position = a1.position;
const trackAdContentEventBinding = trackAdContentEvent;
const object6 = {adContentId: adContentId, adCreativeType: adCreativeType, event: a3};
const QUEST_APP_STORE_OVERLAY_CLOSED = AnalyticEvents.QUEST_APP_STORE_OVERLAY_CLOSED;
if (a3 === QUEST_APP_STORE_OVERLAY_CLOSED) {
if (a4 === undefined) {
r4 = object5;
function assignBillingSessionId(a0, a1) { // fn#56795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:221, offset: 0x013d22eb, size: 76 bytes, params: 3, frame: 13
var uuid;
var r0;
var activeSessionUnsafe;
var value3;
let value = a0;
if (a1) {
r0 = value;
} else {
object4 = {};
copyDataProperties(object4, object5, analyticsTypesModule);
object4['time_spent_ms'] = a4;
r4 = object4;
value = undefined;
activeSessionUnsafe = (require(4875) /* metro dependency 4875: SessionHeartbeatScheduler */).getActiveSessionUnsafe();
value3 = null;
uuid = value3 == activeSessionUnsafe ? value : activeSessionUnsafe.uuid;
r0 = value3 != uuid ? uuid : value3;
}
} else if (a3 !== AnalyticEvents.QUEST_APP_STORE_OVERLAY_RETURNED) {
r4 = object5;
} else if (a4 === undefined) {
r4 = object5;
} else {
object4 = {};
copyDataProperties(object4, object5, analyticsTypesModule);
object4['time_spent_ms'] = a4;
r4 = object4;
return r0;
}
object6.properties = r4;
object6.sourceQuestContent = a1.sourceQuestContent;
trackAdContentEventBinding(object6);
}
function trackBountyCarouselScroll({scrollingType, scrollingDirection, carouselPosition, questContent}) { // fn#56816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:5930, offset: 0x013d2e58, size: 197 bytes, params: 2, frame: 24
const sessionAdGeneratorModule = require(7113) /* metro dependency 7113: SessionAdGenerator */;
const getOrRefreshAdSession = sessionAdGeneratorModule.getOrRefreshAdSession;
const uuid = Reflect.apply(getOrRefreshAdSession, sessionAdGeneratorModule, []).uuid;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const BOUNTY_CAROUSEL_SCROLL = AnalyticEvents.BOUNTY_CAROUSEL_SCROLL;
const object2 = {client_ad_session_id: uuid};
const assignBillingSessionIdBinding = assignBillingSessionId;
const questDataUtilsModule = require(7091) /* metro dependency 7091: QuestDataUtils */;
object2.billing_session_id = assignBillingSessionIdBinding(uuid,
questDataUtilsModule.isBillableQuestContent(questContent));
object2.scrolling_type = scrollingType;
object2.scrolling_direction = scrollingDirection;
object2.carousel_position = carouselPosition;
object2.content_name = (require(7120) /* metro dependency 7120: AnalyticsTypes */).getQuestContentName(questContent);
Reflect.apply(track, defaultImport, [BOUNTY_CAROUSEL_SCROLL, object2]);
}
function trackBountyCarouselEmptyStateViewed(a0) { // fn#56817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:6370, offset: 0x013d2f1d, size: 157 bytes, params: 2, frame: 21
const sessionAdGeneratorModule = require(7113) /* metro dependency 7113: SessionAdGenerator */;
const getOrRefreshAdSession = sessionAdGeneratorModule.getOrRefreshAdSession;
const uuid = Reflect.apply(getOrRefreshAdSession, sessionAdGeneratorModule, []).uuid;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const BOUNTY_CAROUSEL_EMPTY_STATE_VIEWED = AnalyticEvents.BOUNTY_CAROUSEL_EMPTY_STATE_VIEWED;
const object2 = {client_ad_session_id: uuid};
const assignBillingSessionIdBinding = assignBillingSessionId;
const value = require(7091) /* metro dependency 7091: QuestDataUtils */;
const isBillableQuestContent = value.isBillableQuestContent;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const QUEST_HOME_MOBILE_CAROUSEL = QuestContent.QUEST_HOME_MOBILE_CAROUSEL;
object2.billing_session_id = assignBillingSessionIdBinding(uuid, Reflect.apply(isBillableQuestContent, value,
[QUEST_HOME_MOBILE_CAROUSEL]));
object2.reason = a0;
Reflect.apply(track, defaultImport, [BOUNTY_CAROUSEL_EMPTY_STATE_VIEWED, object2]);
}
function trackBountyVerticalScroll({scrollingType, scrollingDirection, verticalScrollingPosition, scrollSessionId, timeWatchedPreScrollMs}) { // fn#56818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:6703, offset: 0x013d2fba, size: 168 bytes, params: 2, frame: 22
const sessionAdGeneratorModule = require(7113) /* metro dependency 7113: SessionAdGenerator */;
const getOrRefreshAdSession = sessionAdGeneratorModule.getOrRefreshAdSession;
const uuid = Reflect.apply(getOrRefreshAdSession, sessionAdGeneratorModule, []).uuid;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const BOUNTY_VERTICAL_SCROLL = AnalyticEvents.BOUNTY_VERTICAL_SCROLL;
const object2 = {client_ad_session_id: uuid};
object2.billing_session_id = assignBillingSessionId(uuid, false);
object2.scrolling_type = scrollingType;
object2.scrolling_direction = scrollingDirection;
object2.vertical_scrolling_position = verticalScrollingPosition;
object2.scroll_session_id = scrollSessionId;
object2.time_watched_pre_scroll_ms = timeWatchedPreScrollMs;
Reflect.apply(track, defaultImport, [BOUNTY_VERTICAL_SCROLL, object2]);
}
function trackQuestHomeCarouselScroll({scrollingType, scrollingDirection, scrollWindowStartIndex, scrollWindowEndIndex, scrollWindowSize, questContent, carouselSize}) { // fn#56819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:7156, offset: 0x013d3062, size: 249 bytes, params: 2, frame: 26
const sessionAdGeneratorModule = require(7113) /* metro dependency 7113: SessionAdGenerator */;
const getOrRefreshAdSession = sessionAdGeneratorModule.getOrRefreshAdSession;
const uuid = Reflect.apply(getOrRefreshAdSession, sessionAdGeneratorModule, []).uuid;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const QUEST_HOME_CAROUSEL_SCROLL = AnalyticEvents.QUEST_HOME_CAROUSEL_SCROLL;
const object2 = {scrolling_type: scrollingType, client_ad_session_id: uuid};
const assignBillingSessionIdBinding = assignBillingSessionId;
const questDataUtilsModule = require(7091) /* metro dependency 7091: QuestDataUtils */;
object2.billing_session_id = assignBillingSessionIdBinding(uuid,
questDataUtilsModule.isBillableQuestContent(questContent));
object2.scrolling_direction = scrollingDirection;
object2.scroll_window_start_index = scrollWindowStartIndex;
object2.scroll_window_end_index = scrollWindowEndIndex;
object2.scroll_window_size = scrollWindowSize;
object2.content_name = (require(7120) /* metro dependency 7120: AnalyticsTypes */).getQuestContentName(questContent);
object2.content_id = questContent;
object2.carousel_size = carouselSize;
Reflect.apply(track, defaultImport, [QUEST_HOME_CAROUSEL_SCROLL, object2]);
}
function trackQuestHomeSearchClosed({searchSessionId, searchSessionDurationMs}) { // fn#56821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:8010, offset: 0x013d31d1, size: 131 bytes, params: 2, frame: 19
const sessionAdGeneratorModule = require(7113) /* metro dependency 7113: SessionAdGenerator */;
const getOrRefreshAdSession = sessionAdGeneratorModule.getOrRefreshAdSession;
const uuid = Reflect.apply(getOrRefreshAdSession, sessionAdGeneratorModule, []).uuid;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const QUEST_HOME_SEARCH_CLOSED = AnalyticEvents.QUEST_HOME_SEARCH_CLOSED;
const object2 = {client_ad_session_id: uuid};
object2.billing_session_id = assignBillingSessionId(uuid, false);
object2.search_session_id = searchSessionId;
object2.search_session_duration_ms = searchSessionDurationMs;
Reflect.apply(track, defaultImport, [QUEST_HOME_SEARCH_CLOSED, object2]);
}
function trackQuestHomeSearchQuerySubmitted({searchSessionId, searchQuery, searchQueryLength, resultsCount, hasResults}) { // fn#56822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:8339, offset: 0x013d3254, size: 172 bytes, params: 2, frame: 22
const sessionAdGeneratorModule = require(7113) /* metro dependency 7113: SessionAdGenerator */;
const getOrRefreshAdSession = sessionAdGeneratorModule.getOrRefreshAdSession;
const uuid = Reflect.apply(getOrRefreshAdSession, sessionAdGeneratorModule, []).uuid;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const QUEST_HOME_SEARCH_QUERY_SUBMITTED = AnalyticEvents.QUEST_HOME_SEARCH_QUERY_SUBMITTED;
const object2 = {client_ad_session_id: uuid};
object2.billing_session_id = assignBillingSessionId(uuid, false);
object2.search_session_id = searchSessionId;
object2.search_query = searchQuery;
object2.search_query_length = searchQueryLength;
object2.results_count = resultsCount;
object2.has_results = hasResults;
Reflect.apply(track, defaultImport, [QUEST_HOME_SEARCH_QUERY_SUBMITTED, object2]);
}
function trackQuestBarOrDockModeChange({questContent, sourceQuestContent, questId, mode, prevMode}) { // fn#56823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:8754, offset: 0x013d3300, size: 146 bytes, params: 2, frame: 17
const contentProperties = (require(7120) /* metro dependency 7120: AnalyticsTypes */).getContentProperties(questContent);
const trackQuestEventBinding = trackQuestEvent;
const QUEST_BAR_MODE_CHANGED = AnalyticEvents.QUEST_BAR_MODE_CHANGED;
trackQuestEventBinding({questId: questId, event: QUEST_BAR_MODE_CHANGED,
properties: {content_id: contentProperties.content_id, content_name: contentProperties.content_name, mode: mode,
previous_mode: prevMode}, sourceQuestContent: sourceQuestContent});
}
async function _fun56805({questContent, questContentPosition, questContentRowIndex, questContentCTA, impressionId, clickId}) { // fn#56805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:2390, offset: 0x013d27ca, size: 397 bytes, params: 2, frame: 25
var advertisingId;
var r5;
var value10;
var value11;
if (false) {
return undefined;
function getCommonProperties(a0, a1, a2, a3) { // fn#56796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:351, offset: 0x013d2337, size: 161 bytes, params: 5, frame: 21
const value = a2;
const getOrRefreshAdSession = SessionAdGeneratorModule.getOrRefreshAdSession;
const uuid = Reflect.apply(getOrRefreshAdSession, SessionAdGeneratorModule, [a3]).uuid;
const adDecisionData = (QuestDataUtilsModule).getAdDecisionData(a0, a1);
const object = {client_ad_session_id: uuid};
const assignBillingSessionIdBinding = assignBillingSessionId;
object.billing_session_id = assignBillingSessionIdBinding(uuid, QuestDataUtilsModule.isBillableQuestContent(a1));
object.ad_content_id = a0;
copyDataProperties(object, adDecisionData, undefined);
object['creative_type'] = adDecisionData.creative_type ?? value;
return object;
}
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_0;
const binding2 = env2_2;
const value4 = binding(binding2[14]);
const getAdUser = value4.getAdUser;
const value5 = binding(binding2[10]);
const getQuestContentName = value5.getQuestContentName;
await Reflect.apply(getAdUser, value4, [Reflect.apply(getQuestContentName, value5, [questContent])]);
if (false) {
return undefined;
}
const object2 = {};
binding = env2_0;
const binding3 = env2_2;
const value8 = binding(binding3[10]);
const getContentProperties = value8.getContentProperties;
copyDataProperties(object2, Reflect.apply(getContentProperties, value8, [questContent, questContentPosition,
questContentRowIndex]), undefined);
copyDataProperties(object2, env2_1(binding3[15])(), undefined);
object2['cta_name'] = questContentCTA;
object2['impression_id'] = impressionId;
if (null != undefined) {
value10 = env2_0(env2_2[16]);
advertisingId = value10.isIOS() ? undefined.advertisingId : null;
} else {
advertisingId = null;
}
object2['apple_advertising_id'] = advertisingId;
if (null != undefined) {
value11 = env2_0(env2_2[16]);
advertisingId = value11.isAndroid() ? undefined.advertisingId : null;
} else {
advertisingId = null;
}
object2['android_advertising_id'] = advertisingId;
if (clickId != null) {
r5 = clickId;
} else {
value = env2_0(env2_2[17]);
value = value.v4();
r5 = value;
}
object2['click_id'] = r5;
return object2;
}
async function _fun56808({questId, questContent, questContentCTA, questContentPosition, questContentRowIndex, impressionId, clickId, trackGuildAndChannelMetadata, sourceQuestContent}) { // fn#56808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:2934, offset: 0x013d2999, size: 412 bytes, params: 2, frame: 29
if (false) {
return undefined;
function getCommonQuestProperties(a0, a1, a2) { // fn#56797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:643, offset: 0x013d23d8, size: 239 bytes, params: 4, frame: 20
const object = {};
let id = a0.id;
object.quest_id = id;
object.quest_type = (require(7114) /* metro dependency 7114: QuestUtils */).getQuestType(a0.config);
object.game_id = a0.config.application.id;
object.game_name = a0.config.application.name;
object.application_ids = (require(7116) /* metro dependency 7116: QuestTaskUtils */).getAllApplicationIds(a0) ?? [];
object.quest_status = (require(7120) /* metro dependency 7120: AnalyticsTypes */).getQuestStatus(a0);
const getCommonPropertiesBinding = getCommonProperties;
id = a0.id;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const QUEST = AdCreativeType.QUEST;
copyDataProperties(object, getCommonPropertiesBinding(id, a1, QUEST, a2), QUEST);
return object;
}
value = undefined;
await value;
if (false) {
return undefined;
}
let binding = env2_0;
const adTrafficMetadataSealed = binding(env2_2[7]).getAdTrafficMetadataSealed(sourceQuestContent, questId);
binding = env2_14;
const object3 = {questId: questId};
const QUEST_CONTENT_CLICKED = env2_7.QUEST_CONTENT_CLICKED;
object3.event = QUEST_CONTENT_CLICKED;
const object4 = {};
await env2_16({questContent: questContent, questContentPosition: questContentPosition,
questContentRowIndex: questContentRowIndex, questContentCTA: questContentCTA, impressionId: impressionId,
clickId: clickId});
if (false) {
return undefined;
}
copyDataProperties(object4, undefined, undefined);
object4['metadata_sealed'] = env2_0(env2_2[7]).getAdMetadataSealed(sourceQuestContent) ?? null;
object4['traffic_metadata_sealed'] = adTrafficMetadataSealed ?? null;
const currentQuestHomeSearchSession = env2_0(env2_2[18]).getCurrentQuestHomeSearchSession();
object4['search_session_id'] = (currentQuestHomeSearchSession == null ? value : currentQuestHomeSearchSession.uuid) ?? null;
object3.properties = object4;
object3.trackGuildAndChannelMetadata = trackGuildAndChannelMetadata;
object3.shouldExtendSession = env2_0(env2_2[7]).isBillableQuestContent(questContent);
object3.sourceQuestContent = sourceQuestContent;
binding(object3);
return value;
}
async function _fun56811({adContentId, relatedQuestId, adCreativeType, questContent, questContentCTA, questContentPosition, questContentRowIndex, impressionId, trackGuildAndChannelMetadata, sourceQuestContent}) { // fn#56811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:3788, offset: 0x013d2b77, size: 241 bytes, params: 2, frame: 24
if (true) {
await undefined;
if (false) {
return undefined;
function getCommonAdContentProperties({adContentId, adCreativeType, sourceQuestContent, shouldExtendSession, relatedQuestId}) { // fn#56798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:988, offset: 0x013d24c7, size: 276 bytes, params: 2, frame: 23
var r2;
let value = null;
const r4 = value != relatedQuestId ? QuestStore.getQuest(relatedQuestId) : value;
const object = {};
copyDataProperties(object, getCommonProperties(adContentId, sourceQuestContent, adCreativeType,
shouldExtendSession), adCreativeType);
const adMetadataSealed = (QuestDataUtilsModule).getAdMetadataSealed(sourceQuestContent,
adContentId);
object['metadata_sealed'] = value != adMetadataSealed ? adMetadataSealed : value;
const adTrafficMetadataSealed = (QuestDataUtilsModule).getAdTrafficMetadataSealed(sourceQuestContent,
undefined, adContentId);
object['traffic_metadata_sealed'] = value != adTrafficMetadataSealed ? adTrafficMetadataSealed : value;
object['quest_id'] = value != relatedQuestId ? relatedQuestId : value;
if (value != r4) {
value = require(7120) /* metro dependency 7120: AnalyticsTypes */;
value = value.getQuestStatus(r4);
r2 = value;
} else {
r2 = value;
}
value = environment.__proto__.__proto__;
var binding = env2_15;
var object2 = {adContentId: adContentId, relatedQuestId: relatedQuestId, adCreativeType: adCreativeType};
var QUEST_CONTENT_CLICKED = env2_7.QUEST_CONTENT_CLICKED;
object2.event = QUEST_CONTENT_CLICKED;
await env2_16({questContent: questContent, questContentPosition: questContentPosition,
questContentRowIndex: questContentRowIndex, questContentCTA: questContentCTA, impressionId: impressionId});
if (false) {
return undefined;
}
object2.properties = undefined;
object2.trackGuildAndChannelMetadata = trackGuildAndChannelMetadata;
object2.shouldExtendSession = env2_0(env2_2[7]).isBillableQuestContent(questContent);
object2.sourceQuestContent = sourceQuestContent;
binding(object2);
object['quest_status'] = r2;
return object;
}
function trackEvent(a0, a1) { // fn#56799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:1428, offset: 0x013d25db, size: 156 bytes, params: 3, frame: 20
var value2;
let value = a2;
const r1 = value !== undefined ? value : false;
if (DevToolsSettingsStore.displayTools) {
if (DevToolsSettingsStore.lastOpenTabId === 'quest_preview') {
return undefined;
}
DeveloperOptionsStore.isLoggingAnalyticsEvents;
if (a3) {
return undefined;
}
value2 = env0_8.has(a0);
if (r1) {
return (importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */).trackWithMetadata(a0, a1,
value2);
}
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
value.track(a0, a1, {flush: value2});
} else {
DeveloperOptionsStore.isLoggingAnalyticsEvents;
if (a3) {
return undefined;
}
value2 = env0_8.has(a0);
if (r1) {
return (importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */).trackWithMetadata(a0, a1,
value2);
}
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
value.track(a0, a1, {flush: value2});
}
}
function trackQuestEvent({questId, event, properties, trackGuildAndChannelMetadata, shouldExtendSession, sourceQuestContent}) { // fn#56800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:1641, offset: 0x013d2677, size: 133 bytes, params: 2, frame: 21
var trackEventBinding;
var object;
shouldExtendSession = !(shouldExtendSession === undefined) && shouldExtendSession;
const value2 = QuestStore.quests.get(questId);
if (value2 != null) {
trackEventBinding = trackEvent;
object = {};
copyDataProperties(object, getCommonQuestProperties(value2, sourceQuestContent, shouldExtendSession),
undefined);
copyDataProperties(object, properties, undefined);
trackEventBinding(event, object, trackGuildAndChannelMetadata, value2.preview);
}
}
function trackAdContentEvent({adContentId, relatedQuestId, adCreativeType, event, properties, trackGuildAndChannelMetadata, shouldExtendSession, sourceQuestContent}) { // fn#56801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:1876, offset: 0x013d26fc, size: 140 bytes, params: 2, frame: 24
shouldExtendSession = !(shouldExtendSession === undefined) && shouldExtendSession;
const trackEventBinding = trackEvent;
const object = {};
copyDataProperties(object, getCommonAdContentProperties({adContentId: adContentId, adCreativeType: adCreativeType,
sourceQuestContent: sourceQuestContent, shouldExtendSession: shouldExtendSession,
relatedQuestId: relatedQuestId}), undefined);
copyDataProperties(object, properties, undefined);
trackEventBinding(event, object, trackGuildAndChannelMetadata, false);
}
function _getCommonClickEventProperties() { // fn#56803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:2307, offset: 0x013d2788, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun56805).apply(this, arguments);
async function _fun56805({questContent, questContentPosition, questContentRowIndex, questContentCTA, impressionId, clickId}) { // fn#56805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:2390, offset: 0x013d27ca, size: 397 bytes, params: 2, frame: 25
var advertisingId;
var r5;
var value10;
var value11;
if (false) {
return undefined;
}
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_0;
const binding2 = env2_2;
const value4 = binding(binding2[14]);
const getAdUser = value4.getAdUser;
const value5 = binding(binding2[10]);
const getQuestContentName = value5.getQuestContentName;
await Reflect.apply(getAdUser, value4, [Reflect.apply(getQuestContentName, value5, [questContent])]);
if (false) {
return undefined;
}
const object = {};
binding = env2_0;
const binding3 = env2_2;
const value8 = binding(binding3[10]);
const getContentProperties = value8.getContentProperties;
copyDataProperties(object, Reflect.apply(getContentProperties, value8, [questContent, questContentPosition,
questContentRowIndex]), undefined);
copyDataProperties(object, env2_1(binding3[15])(), undefined);
object['cta_name'] = questContentCTA;
object['impression_id'] = impressionId;
if (null != undefined) {
value10 = env2_0(env2_2[16]);
advertisingId = value10.isIOS() ? undefined.advertisingId : null;
} else {
advertisingId = null;
}
object['apple_advertising_id'] = advertisingId;
if (null != undefined) {
value11 = env2_0(env2_2[16]);
advertisingId = value11.isAndroid() ? undefined.advertisingId : null;
} else {
advertisingId = null;
}
object['android_advertising_id'] = advertisingId;
if (clickId != null) {
r5 = clickId;
} else {
value = env2_0(env2_2[17]);
value = value.v4();
r5 = value;
}
object['click_id'] = r5;
return object;
}
}
function _trackQuestContentClicked() { // fn#56806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:2861, offset: 0x013d2957, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun56808).apply(this, arguments);
async function _fun56808({questId, questContent, questContentCTA, questContentPosition, questContentRowIndex, impressionId, clickId, trackGuildAndChannelMetadata, sourceQuestContent}) { // fn#56808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:2934, offset: 0x013d2999, size: 412 bytes, params: 2, frame: 29
if (false) {
return undefined;
}
value = undefined;
await value;
if (false) {
return undefined;
}
let binding = env2_0;
const adTrafficMetadataSealed = binding(env2_2[7]).getAdTrafficMetadataSealed(sourceQuestContent, questId);
binding = env2_14;
const object = {questId: questId};
const QUEST_CONTENT_CLICKED = env2_7.QUEST_CONTENT_CLICKED;
object.event = QUEST_CONTENT_CLICKED;
const object2 = {};
await env2_16({questContent: questContent, questContentPosition: questContentPosition,
questContentRowIndex: questContentRowIndex, questContentCTA: questContentCTA, impressionId: impressionId,
clickId: clickId});
if (false) {
return undefined;
}
copyDataProperties(object2, undefined, undefined);
object2['metadata_sealed'] = env2_0(env2_2[7]).getAdMetadataSealed(sourceQuestContent) ?? null;
object2['traffic_metadata_sealed'] = adTrafficMetadataSealed ?? null;
const currentQuestHomeSearchSession = env2_0(env2_2[18]).getCurrentQuestHomeSearchSession();
object2['search_session_id'] = (currentQuestHomeSearchSession == null ? value : currentQuestHomeSearchSession.uuid) ?? null;
object.properties = object2;
object.trackGuildAndChannelMetadata = trackGuildAndChannelMetadata;
object.shouldExtendSession = env2_0(env2_2[7]).isBillableQuestContent(questContent);
object.sourceQuestContent = sourceQuestContent;
binding(object);
return value;
}
}
function _trackAdContentClicked() { // fn#56809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:3721, offset: 0x013d2b35, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun56811).apply(this, arguments);
async function _fun56811({adContentId, relatedQuestId, adCreativeType, questContent, questContentCTA, questContentPosition, questContentRowIndex, impressionId, trackGuildAndChannelMetadata, sourceQuestContent}) { // fn#56811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:3788, offset: 0x013d2b77, size: 241 bytes, params: 2, frame: 24
if (true) {
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
var binding = env2_15;
var object = {adContentId: adContentId, relatedQuestId: relatedQuestId, adCreativeType: adCreativeType};
var QUEST_CONTENT_CLICKED = env2_7.QUEST_CONTENT_CLICKED;
object.event = QUEST_CONTENT_CLICKED;
await env2_16({questContent: questContent, questContentPosition: questContentPosition,
questContentRowIndex: questContentRowIndex, questContentCTA: questContentCTA, impressionId: impressionId});
if (false) {
return undefined;
}
object.properties = undefined;
object.trackGuildAndChannelMetadata = trackGuildAndChannelMetadata;
object.shouldExtendSession = env2_0(env2_2[7]).isBillableQuestContent(questContent);
object.sourceQuestContent = sourceQuestContent;
binding(object);
}
}
}
function trackAppStoreOverlayEvent({id}, a1, a2, a3, a4) { // fn#56812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:4518, offset: 0x013d2c68, size: 245 bytes, params: 6, frame: 21
var r4;
var object;
const object2 = {};
object2.content_name = AnalyticsTypesModule.getQuestContentName(a1.content);
object2.cta_name = a1.ctaContent;
object2.impression_id = a1.impressionId;
object2.source_content_name = AnalyticsTypesModule.getQuestContentName(a1.sourceQuestContent);
object2.app_id = a2;
object2.content_position = a1.position;
const QUEST_APP_STORE_OVERLAY_CLOSED = AnalyticEvents.QUEST_APP_STORE_OVERLAY_CLOSED;
const r5 = (a3 === QUEST_APP_STORE_OVERLAY_CLOSED || a3 === AnalyticEvents.QUEST_APP_STORE_OVERLAY_RETURNED) && a4 !== undefined;
const trackQuestEventBinding = trackQuestEvent;
const object3 = {};
object3.questId = id;
object3.event = a3;
if (r5) {
object = {};
copyDataProperties(object, object2, AnalyticsTypesModule);
object['time_spent_ms'] = a4;
r4 = object;
} else {
r4 = object2;
}
object3.properties = r4;
object3.sourceQuestContent = a1.sourceQuestContent;
trackQuestEventBinding(object3);
}
function trackAdContentAppStoreOverlayEvent({adContentId, adCreativeType}, a1, a2, a3, a4) { // fn#56813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:5033, offset: 0x013d2d5d, size: 251 bytes, params: 6, frame: 23
var r4;
var object;
const object2 = {};
object2.content_name = AnalyticsTypesModule.getQuestContentName(a1.content);
object2.cta_name = a1.ctaContent;
object2.impression_id = a1.impressionId;
object2.source_content_name = AnalyticsTypesModule.getQuestContentName(a1.sourceQuestContent);
object2.app_id = a2;
object2.content_position = a1.position;
const trackAdContentEventBinding = trackAdContentEvent;
const object3 = {adContentId: adContentId, adCreativeType: adCreativeType, event: a3};
const QUEST_APP_STORE_OVERLAY_CLOSED = AnalyticEvents.QUEST_APP_STORE_OVERLAY_CLOSED;
if (a3 === QUEST_APP_STORE_OVERLAY_CLOSED) {
if (a4 === undefined) {
r4 = object2;
} else {
object = {};
copyDataProperties(object, object2, AnalyticsTypesModule);
object['time_spent_ms'] = a4;
r4 = object;
}
} else if (a3 !== AnalyticEvents.QUEST_APP_STORE_OVERLAY_RETURNED) {
r4 = object2;
} else if (a4 === undefined) {
r4 = object2;
} else {
object = {};
copyDataProperties(object, object2, AnalyticsTypesModule);
object['time_spent_ms'] = a4;
r4 = object;
}
object3.properties = r4;
object3.sourceQuestContent = a1.sourceQuestContent;
trackAdContentEventBinding(object3);
}
function trackBountyCarouselScroll({scrollingType, scrollingDirection, carouselPosition, questContent}) { // fn#56816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:5930, offset: 0x013d2e58, size: 197 bytes, params: 2, frame: 24
const getOrRefreshAdSession = SessionAdGeneratorModule.getOrRefreshAdSession;
const uuid = Reflect.apply(getOrRefreshAdSession, SessionAdGeneratorModule, []).uuid;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const BOUNTY_CAROUSEL_SCROLL = AnalyticEvents.BOUNTY_CAROUSEL_SCROLL;
const object = {client_ad_session_id: uuid};
const assignBillingSessionIdBinding = assignBillingSessionId;
object.billing_session_id = assignBillingSessionIdBinding(uuid,
QuestDataUtilsModule.isBillableQuestContent(questContent));
object.scrolling_type = scrollingType;
object.scrolling_direction = scrollingDirection;
object.carousel_position = carouselPosition;
object.content_name = (require(7120) /* metro dependency 7120: AnalyticsTypes */).getQuestContentName(questContent);
Reflect.apply(track, defaultImport, [BOUNTY_CAROUSEL_SCROLL, object]);
}
function trackBountyCarouselEmptyStateViewed(a0) { // fn#56817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:6370, offset: 0x013d2f1d, size: 157 bytes, params: 2, frame: 21
const getOrRefreshAdSession = SessionAdGeneratorModule.getOrRefreshAdSession;
const uuid = Reflect.apply(getOrRefreshAdSession, SessionAdGeneratorModule, []).uuid;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const BOUNTY_CAROUSEL_EMPTY_STATE_VIEWED = AnalyticEvents.BOUNTY_CAROUSEL_EMPTY_STATE_VIEWED;
const object = {client_ad_session_id: uuid};
const assignBillingSessionIdBinding = assignBillingSessionId;
const isBillableQuestContent = QuestDataUtilsModule.isBillableQuestContent;
const QuestContent = (QuestTypesModule).QuestContent;
const QUEST_HOME_MOBILE_CAROUSEL = QuestContent.QUEST_HOME_MOBILE_CAROUSEL;
object.billing_session_id = assignBillingSessionIdBinding(uuid, Reflect.apply(isBillableQuestContent, QuestDataUtilsModule,
[QUEST_HOME_MOBILE_CAROUSEL]));
object.reason = a0;
Reflect.apply(track, defaultImport, [BOUNTY_CAROUSEL_EMPTY_STATE_VIEWED, object]);
}
function trackBountyVerticalScroll({scrollingType, scrollingDirection, verticalScrollingPosition, scrollSessionId, timeWatchedPreScrollMs}) { // fn#56818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:6703, offset: 0x013d2fba, size: 168 bytes, params: 2, frame: 22
const getOrRefreshAdSession = SessionAdGeneratorModule.getOrRefreshAdSession;
const uuid = Reflect.apply(getOrRefreshAdSession, SessionAdGeneratorModule, []).uuid;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const BOUNTY_VERTICAL_SCROLL = AnalyticEvents.BOUNTY_VERTICAL_SCROLL;
const object = {client_ad_session_id: uuid};
object.billing_session_id = assignBillingSessionId(uuid, false);
object.scrolling_type = scrollingType;
object.scrolling_direction = scrollingDirection;
object.vertical_scrolling_position = verticalScrollingPosition;
object.scroll_session_id = scrollSessionId;
object.time_watched_pre_scroll_ms = timeWatchedPreScrollMs;
Reflect.apply(track, defaultImport, [BOUNTY_VERTICAL_SCROLL, object]);
}
function trackQuestHomeCarouselScroll({scrollingType, scrollingDirection, scrollWindowStartIndex, scrollWindowEndIndex, scrollWindowSize, questContent, carouselSize}) { // fn#56819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:7156, offset: 0x013d3062, size: 249 bytes, params: 2, frame: 26
const getOrRefreshAdSession = SessionAdGeneratorModule.getOrRefreshAdSession;
const uuid = Reflect.apply(getOrRefreshAdSession, SessionAdGeneratorModule, []).uuid;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const QUEST_HOME_CAROUSEL_SCROLL = AnalyticEvents.QUEST_HOME_CAROUSEL_SCROLL;
const object = {scrolling_type: scrollingType, client_ad_session_id: uuid};
const assignBillingSessionIdBinding = assignBillingSessionId;
object.billing_session_id = assignBillingSessionIdBinding(uuid,
QuestDataUtilsModule.isBillableQuestContent(questContent));
object.scrolling_direction = scrollingDirection;
object.scroll_window_start_index = scrollWindowStartIndex;
object.scroll_window_end_index = scrollWindowEndIndex;
object.scroll_window_size = scrollWindowSize;
object.content_name = (require(7120) /* metro dependency 7120: AnalyticsTypes */).getQuestContentName(questContent);
object.content_id = questContent;
object.carousel_size = carouselSize;
Reflect.apply(track, defaultImport, [QUEST_HOME_CAROUSEL_SCROLL, object]);
}
function trackQuestHomeSearchClosed({searchSessionId, searchSessionDurationMs}) { // fn#56821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:8010, offset: 0x013d31d1, size: 131 bytes, params: 2, frame: 19
const getOrRefreshAdSession = SessionAdGeneratorModule.getOrRefreshAdSession;
const uuid = Reflect.apply(getOrRefreshAdSession, SessionAdGeneratorModule, []).uuid;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const QUEST_HOME_SEARCH_CLOSED = AnalyticEvents.QUEST_HOME_SEARCH_CLOSED;
const object = {client_ad_session_id: uuid};
object.billing_session_id = assignBillingSessionId(uuid, false);
object.search_session_id = searchSessionId;
object.search_session_duration_ms = searchSessionDurationMs;
Reflect.apply(track, defaultImport, [QUEST_HOME_SEARCH_CLOSED, object]);
}
function trackQuestHomeSearchQuerySubmitted({searchSessionId, searchQuery, searchQueryLength, resultsCount, hasResults}) { // fn#56822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:8339, offset: 0x013d3254, size: 172 bytes, params: 2, frame: 22
const getOrRefreshAdSession = SessionAdGeneratorModule.getOrRefreshAdSession;
const uuid = Reflect.apply(getOrRefreshAdSession, SessionAdGeneratorModule, []).uuid;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const QUEST_HOME_SEARCH_QUERY_SUBMITTED = AnalyticEvents.QUEST_HOME_SEARCH_QUERY_SUBMITTED;
const object = {client_ad_session_id: uuid};
object.billing_session_id = assignBillingSessionId(uuid, false);
object.search_session_id = searchSessionId;
object.search_query = searchQuery;
object.search_query_length = searchQueryLength;
object.results_count = resultsCount;
object.has_results = hasResults;
Reflect.apply(track, defaultImport, [QUEST_HOME_SEARCH_QUERY_SUBMITTED, object]);
}
function trackQuestBarOrDockModeChange({questContent, sourceQuestContent, questId, mode, prevMode}) { // fn#56823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:8754, offset: 0x013d3300, size: 146 bytes, params: 2, frame: 17
const contentProperties = (AnalyticsTypesModule).getContentProperties(questContent);
const trackQuestEventBinding = trackQuestEvent;
const QUEST_BAR_MODE_CHANGED = AnalyticEvents.QUEST_BAR_MODE_CHANGED;
trackQuestEventBinding({questId: questId, event: QUEST_BAR_MODE_CHANGED,
properties: {content_id: contentProperties.content_id, content_name: contentProperties.content_name, mode: mode,
previous_mode: prevMode}, sourceQuestContent: sourceQuestContent});
}
}
global.__d(_fun56794, 7110, [5, 7111, 691, 7093, 661, 4875, 7113, 7091, 7114, 7116, 7120, 7121, 4863, 683, 7122,
7071, 477, 491, 7127, 6531,
2]) /* metro module 7110, dependencies: [5, 7111, 691, 7093, 661, 4875, 7113, 7091, 7114, 7116, 7120, 7121, 4863, 683, 7122, 7071, 477, 491, 7127, 6531, 2] */;
@@ -1,295 +1,298 @@
/* Metro module 9949; source: modules/quests/lib/analytics/AnalyticsHooks.tsx; dependencies: [31, 661, 9513, 7110, 7091, 7122, 7120, 7071, 491, 477, 7127, 6531, 7121, 683, 2] */
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import GetDeviceMetadataNative from '../../../device/getDeviceMetadata.native.tsx'; /* Metro dependency 7071 */
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 QuestTypesModule from '../../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as QuestDataUtilsModule from '../../utils/QuestDataUtils.tsx'; /* Metro dependency 7091 */
import * as AnalyticsActionsModule from './AnalyticsActions.tsx'; /* Metro dependency 7110 */
import * as AnalyticsTypesModule from './AnalyticsTypes.tsx'; /* Metro dependency 7120 */
import * as AdDataUtilsAndroidModule from '../../../ads/utils/AdDataUtils.android.tsx'; /* Metro dependency 7122 */
import * as QuestHomeSearchSessionModule from './QuestHomeSearchSession.tsx'; /* Metro dependency 7127 */
import * as ContentImpressionTrackerHooksModule from './ContentImpressionTrackerHooks.tsx'; /* Metro dependency 9513 */
function _fun77879(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:6, offset: 0x01e0f97d, size: 239 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = useTrackQuestEventWithImpression;
const closure2 = useTrackAdContentEventWithImpression;
const useTrackQuestEventWithImpression2 = useTrackQuestEventWithImpression;
const useTrackAdContentEventWithImpression2 = useTrackAdContentEventWithImpression;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/lib/analytics/AnalyticsHooks.tsx');
exports.useTrackQuestEventWithImpression = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/quests/lib/analytics/AnalyticsHooks.tsx');
exports.useTrackQuestEventWithImpression = useTrackQuestEventWithImpression2;
exports.useTrackQuestContentClickedWithImpression = useTrackQuestContentClickedWithImpression;
exports.useTrackAdContentEventWithImpression = closure2;
exports.useTrackAdContentEventWithImpression = useTrackAdContentEventWithImpression2;
exports.useTrackAdContentClickedWithImpression = useTrackAdContentClickedWithImpression;
exports.useQuestsEmbedFallbackAnalytics = useQuestsEmbedFallbackAnalytics;
exports.useBountyCarouselEmptyStateAnalytics = useBountyCarouselEmptyStateAnalytics;
exports.useQuestHomeEntrypointAnalyticsEvents = useQuestHomeEntrypointAnalyticsEvents;
}
function useTrackQuestEventWithImpression() { // fn#77880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:131, offset: 0x01e0fa6c, size: 73 bytes, params: 1, frame: 14
return ReactModule.useCallback(_fun77881,
[(ContentImpressionTrackerHooksModule).useQuestImpression()]);
function _fun77881(a0) { // fn#77881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:232, offset: 0x01e0fab5, size: 118 bytes, params: 2, frame: 17
let value = environment.__proto__;
value = undefined;
const trackQuestEvent = AnalyticsActionsModule.trackQuestEvent;
const object = {};
copyDataProperties(object, a0, undefined);
const object2 = {};
copyDataProperties(object2, a0.properties, undefined);
object2['impression_id'] = env0_0 == null ? value : env0_0.getId();
object['properties'] = object2;
Reflect.apply(trackQuestEvent, AnalyticsActionsModule, [object]);
return value;
}
function useTrackQuestEventWithImpression() { // fn#77880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:131, offset: 0x01e0fa6c, size: 73 bytes, params: 1, frame: 14
return env0_3.useCallback(_fun77881,
[(require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpression()]);
}
function useTrackAdContentEventWithImpression() { // fn#77882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:343, offset: 0x01e0fb2b, size: 73 bytes, params: 1, frame: 14
return env0_3.useCallback(_fun77883,
[(require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpression()]);
}
function useTrackQuestContentClickedWithImpression() { // fn#77884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:757, offset: 0x01e0fbea, size: 51 bytes, params: 1, frame: 14
return env0_3.useCallback(_fun77885, [useTrackQuestEventWithImpression()]);
}
function useTrackAdContentClickedWithImpression() { // fn#77887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:1857, offset: 0x01e0fecb, size: 51 bytes, params: 1, frame: 14
return env0_3.useCallback(_fun77888, [useTrackAdContentEventWithImpression()]);
}
function useQuestsEmbedFallbackAnalytics(a0, a1) { // fn#77890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:2802, offset: 0x01e1016a, size: 57 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
env0_3.useEffect(_fun77891, [a0, a1]);
}
function useBountyCarouselEmptyStateAnalytics(a0) { // fn#77892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:2958, offset: 0x01e101d5, size: 46 bytes, params: 2, frame: 14
const env0_0 = a0;
env0_3.useEffect(_fun77893, [a0]);
}
function useQuestHomeEntrypointAnalyticsEvents({questHomeHero, shouldShowQuestHomeHeroContent}) { // fn#77894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3129, offset: 0x01e1023c, size: 367 bytes, params: 2, frame: 19
let env0_3 = undefined;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const r3 = shouldShowQuestHomeHeroContent ? QuestContent.QUEST_HOME_ENTRYPOINT_THEMED : QuestContent.QUEST_HOME_ENTRYPOINT;
const value2 = env0_3.useMemo(_fun77895, [r3]);
env0_3 = value2;
const value3 = env0_3.useCallback(_fun77896, [questHomeHero, shouldShowQuestHomeHeroContent, r3, value2]);
return env0_3.useMemo(_fun77901, [env0_3.useCallback(_fun77897, [value3]), env0_3.useCallback(_fun77898, [value3]),
env0_3.useCallback(function() {
importDefault(dependencyMap[13]).track(AnalyticEvents.QUEST_HOME_ONBOARDING_POPOVER_RENDERED);
}, []), env0_3.useCallback(_fun77900, [value2, questHomeHero])]);
}
function _fun77881(a0) { // fn#77881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:232, offset: 0x01e0fab5, size: 118 bytes, params: 2, frame: 17
let value = environment.__proto__;
value = undefined;
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackQuestEvent = analyticsActionsModule.trackQuestEvent;
const object3 = {};
copyDataProperties(object3, a0, undefined);
const object4 = {};
copyDataProperties(object4, a0.properties, undefined);
object4['impression_id'] = env0_0 == null ? value : env0_0.getId();
object3['properties'] = object4;
Reflect.apply(trackQuestEvent, analyticsActionsModule, [object3]);
return value;
}
function _fun77883(a0) { // fn#77883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:448, offset: 0x01e0fb74, size: 118 bytes, params: 2, frame: 17
let value = environment.__proto__;
value = undefined;
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackAdContentEvent = analyticsActionsModule.trackAdContentEvent;
const object3 = {};
copyDataProperties(object3, a0, undefined);
const object4 = {};
copyDataProperties(object4, a0.properties, undefined);
object4['impression_id'] = env0_0 == null ? value : env0_0.getId();
object3['properties'] = object4;
Reflect.apply(trackAdContentEvent, analyticsActionsModule, [object3]);
return value;
}
function _fun77885({questId, questContent, questContentCTA, questContentPosition, questContentRowIndex, trackGuildAndChannelMetadata, sourceQuestContent}) { // fn#77885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:873, offset: 0x01e0fc1d, size: 205 bytes, params: 2, frame: 19
var environment;
let value = environment.__proto__;
const env0_7 = (require(7091) /* metro dependency 7091: QuestDataUtils */).getAdMetadataSealed(sourceQuestContent);
const env0_8 = (require(7091) /* metro dependency 7091: QuestDataUtils */).getAdTrafficMetadataSealed(sourceQuestContent,
questId);
const getAdUser = (require(7122) /* metro dependency 7122: AdDataUtilsAndroid */).getAdUser;
const analyticsTypesModule = require(7120) /* metro dependency 7120: AnalyticsTypes */;
const getQuestContentName = analyticsTypesModule.getQuestContentName;
value = Reflect.apply(getAdUser, value, [Reflect.apply(getQuestContentName, analyticsTypesModule, [questContent])]);
value.then(_fun77886);
}
function _fun77888({adContentId, relatedQuestId, adCreativeType, questContent, questContentCTA, questContentPosition, questContentRowIndex, trackGuildAndChannelMetadata, sourceQuestContent}) { // fn#77888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:1974, offset: 0x01e0fefe, size: 173 bytes, params: 2, frame: 16
var environment;
let value = environment.__proto__;
const getAdUser = (require(7122) /* metro dependency 7122: AdDataUtilsAndroid */).getAdUser;
const analyticsTypesModule = require(7120) /* metro dependency 7120: AnalyticsTypes */;
const getQuestContentName = analyticsTypesModule.getQuestContentName;
value = Reflect.apply(getAdUser, value, [Reflect.apply(getQuestContentName, analyticsTypesModule, [questContent])]);
value.then(_fun77889);
}
function _fun77891() { // fn#77891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:2861, offset: 0x01e101a3, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
(require(7110) /* metro dependency 7110: AnalyticsActions */).trackQuestEmbedFallbackViewed(require, env0_0);
}
function _fun77893() { // fn#77893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3020, offset: 0x01e10203, size: 57 bytes, params: 1, frame: 12
var value2;
if (env0_0 != null) {
value2 = environment.__proto__;
(require(7110) /* metro dependency 7110: AnalyticsActions */).trackBountyCarouselEmptyStateViewed(env0_0);
}
}
function _fun77895() { // fn#77895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3344, offset: 0x01e103ab, size: 50 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(7120) /* metro dependency 7120: AnalyticsTypes */;
value = value.getContentProperties(env0_2);
delete value.row_index;
return value;
}
function useTrackAdContentEventWithImpression() { // fn#77882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:343, offset: 0x01e0fb2b, size: 73 bytes, params: 1, frame: 14
return ReactModule.useCallback(_fun77883,
[(ContentImpressionTrackerHooksModule).useQuestImpression()]);
function _fun77883(a0) { // fn#77883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:448, offset: 0x01e0fb74, size: 118 bytes, params: 2, frame: 17
let value = environment.__proto__;
value = undefined;
const trackAdContentEvent = AnalyticsActionsModule.trackAdContentEvent;
const object = {};
copyDataProperties(object, a0, undefined);
const object2 = {};
copyDataProperties(object2, a0.properties, undefined);
object2['impression_id'] = env0_0 == null ? value : env0_0.getId();
object['properties'] = object2;
Reflect.apply(trackAdContentEvent, AnalyticsActionsModule, [object]);
return value;
}
function _fun77896(a0) { // fn#77896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3439, offset: 0x01e103dd, size: 173 bytes, params: 2, frame: 18
var value2;
var value3;
var moduleValue;
var trackAdContentEvent;
var object2;
if (questHomeHero == null) {
value2 = environment.__proto__;
(importDefault(683) /* metro dependency 683: AnalyticsUtils */).track(a0, env0_3);
} else if (shouldShowQuestHomeHeroContent) {
value3 = environment.__proto__;
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackAdContentEvent = moduleValue.trackAdContentEvent;
object2 = {};
object2.adContentId = questHomeHero.id;
object2.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST_HOME_HERO;
object2.event = a0;
object2.properties = env0_3;
object2.sourceQuestContent = env0_2;
Reflect.apply(trackAdContentEvent, moduleValue, [object2]);
} else {
value2 = environment.__proto__;
(importDefault(683) /* metro dependency 683: AnalyticsUtils */).track(a0, env0_3);
}
}
function _fun77897() { // fn#77897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3649, offset: 0x01e1048a, size: 29 bytes, params: 1, frame: 11
const binding = env0_4;
const QUEST_HOVER = AnalyticEvents.QUEST_HOVER;
binding(QUEST_HOVER);
}
function useTrackQuestContentClickedWithImpression() { // fn#77884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:757, offset: 0x01e0fbea, size: 51 bytes, params: 1, frame: 14
return ReactModule.useCallback(_fun77885, [useTrackQuestEventWithImpression()]);
function _fun77885({questId, questContent, questContentCTA, questContentPosition, questContentRowIndex, trackGuildAndChannelMetadata, sourceQuestContent}) { // fn#77885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:873, offset: 0x01e0fc1d, size: 205 bytes, params: 2, frame: 19
var environment;
let value = environment.__proto__;
const env0_7 = (QuestDataUtilsModule).getAdMetadataSealed(sourceQuestContent);
const env0_8 = (QuestDataUtilsModule).getAdTrafficMetadataSealed(sourceQuestContent,
questId);
const getAdUser = (AdDataUtilsAndroidModule).getAdUser;
const getQuestContentName = AnalyticsTypesModule.getQuestContentName;
value = Reflect.apply(getAdUser, value, [Reflect.apply(getQuestContentName, AnalyticsTypesModule, [questContent])]);
value.then(_fun77886);
function _fun77886(a0) { // fn#77886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:1155, offset: 0x01e0fcea, size: 481 bytes, params: 2, frame: 24
var advertisingId;
var moduleValue3;
var moduleValue4;
const binding = env1_0;
const object = {};
object.questId = questId;
const QUEST_CONTENT_CLICKED = AnalyticEvents.QUEST_CONTENT_CLICKED;
object.event = QUEST_CONTENT_CLICKED;
const object2 = {};
const value3 = undefined;
const getContentProperties = AnalyticsTypesModule.getContentProperties;
copyDataProperties(object2, Reflect.apply(getContentProperties, AnalyticsTypesModule, [questContent,
questContentPosition, questContentRowIndex]), undefined);
copyDataProperties(object2, (GetDeviceMetadataNative)(), undefined);
object2['cta_name'] = questContentCTA;
object2['click_id'] = (require(491) /* metro dependency 491 */).v4();
const value5 = null;
if (value5 != a0) {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
advertisingId = moduleValue3.isIOS() ? a0.advertisingId : value5;
} else {
advertisingId = value5;
}
object2['apple_advertising_id'] = advertisingId;
if (value5 != a0) {
moduleValue4 = require(477) /* metro dependency 477: PlatformUtils */;
advertisingId = moduleValue4.isAndroid() ? a0.advertisingId : value5;
} else {
advertisingId = value5;
}
object2['android_advertising_id'] = advertisingId;
object2['metadata_sealed'] = value5 != env0_7 ? env0_7 : value5;
object2['traffic_metadata_sealed'] = value5 != env0_8 ? env0_8 : value5;
const currentQuestHomeSearchSession = (QuestHomeSearchSessionModule).getCurrentQuestHomeSearchSession();
const uuid = value5 == currentQuestHomeSearchSession ? value3 : currentQuestHomeSearchSession.uuid;
object2['search_session_id'] = value5 != uuid ? uuid : value5;
object.properties = object2;
object.trackGuildAndChannelMetadata = trackGuildAndChannelMetadata;
object.shouldExtendSession = QuestDataUtilsModule.isBillableQuestContent(questContent);
object.sourceQuestContent = sourceQuestContent;
binding(object);
return value3;
}
function _fun77898() { // fn#77898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3695, offset: 0x01e104a7, size: 29 bytes, params: 1, frame: 11
const binding = env0_4;
const QUEST_HOVER_OFF = AnalyticEvents.QUEST_HOVER_OFF;
binding(QUEST_HOVER_OFF);
}
}
function _fun77900() { // fn#77900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3830, offset: 0x01e104f3, size: 114 bytes, params: 1, frame: 17
var object2;
var r7;
var id;
let value = environment.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const QUEST_CONTENT_CLICKED = AnalyticEvents.QUEST_CONTENT_CLICKED;
const object3 = {is_targeted: false};
value = environment;
copyDataProperties(object3, env0_3, value);
if (questHomeHero != null) {
id = questHomeHero.id;
object2 = {ad_content_id: id};
r7 = id;
} else {
object2 = {};
r7 = value;
}
copyDataProperties(object3, object2, r7);
Reflect.apply(track, defaultImport, [QUEST_CONTENT_CLICKED, object3]);
}
function _fun77901() { // fn#77901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3959, offset: 0x01e10565, size: 51 bytes, params: 1, frame: 3
return {handleMouseEnter: env0_5, handleMouseLeave: env0_6, handleOnboardingPopoutRender: env0_7,
handleEntrypointClick: env0_8};
}
function useTrackAdContentClickedWithImpression() { // fn#77887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:1857, offset: 0x01e0fecb, size: 51 bytes, params: 1, frame: 14
return ReactModule.useCallback(_fun77888, [useTrackAdContentEventWithImpression()]);
function _fun77888({adContentId, relatedQuestId, adCreativeType, questContent, questContentCTA, questContentPosition, questContentRowIndex, trackGuildAndChannelMetadata, sourceQuestContent}) { // fn#77888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:1974, offset: 0x01e0fefe, size: 173 bytes, params: 2, frame: 16
var environment;
let value = environment.__proto__;
const getAdUser = (AdDataUtilsAndroidModule).getAdUser;
const getQuestContentName = AnalyticsTypesModule.getQuestContentName;
value = Reflect.apply(getAdUser, value, [Reflect.apply(getQuestContentName, AnalyticsTypesModule, [questContent])]);
value.then(_fun77889);
function _fun77889(a0) { // fn#77889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:2215, offset: 0x01e0ffab, size: 447 bytes, params: 2, frame: 24
var advertisingId;
var moduleValue3;
var moduleValue4;
const binding = env1_0;
const object = {};
object.adContentId = adContentId;
object.relatedQuestId = relatedQuestId;
object.adCreativeType = adCreativeType;
const QUEST_CONTENT_CLICKED = AnalyticEvents.QUEST_CONTENT_CLICKED;
object.event = QUEST_CONTENT_CLICKED;
const object2 = {};
const value3 = undefined;
const getContentProperties = AnalyticsTypesModule.getContentProperties;
copyDataProperties(object2, Reflect.apply(getContentProperties, AnalyticsTypesModule, [questContent,
questContentPosition, questContentRowIndex]), undefined);
copyDataProperties(object2, (GetDeviceMetadataNative)(), undefined);
object2['cta_name'] = questContentCTA;
object2['click_id'] = (require(491) /* metro dependency 491 */).v4();
const value5 = null;
if (value5 != a0) {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
advertisingId = moduleValue3.isIOS() ? a0.advertisingId : value5;
} else {
advertisingId = value5;
}
object2['apple_advertising_id'] = advertisingId;
if (value5 != a0) {
moduleValue4 = require(477) /* metro dependency 477: PlatformUtils */;
advertisingId = moduleValue4.isAndroid() ? a0.advertisingId : value5;
} else {
advertisingId = value5;
}
object2['android_advertising_id'] = advertisingId;
const currentQuestHomeSearchSession = (QuestHomeSearchSessionModule).getCurrentQuestHomeSearchSession();
const uuid = value5 == currentQuestHomeSearchSession ? value3 : currentQuestHomeSearchSession.uuid;
object2['search_session_id'] = value5 != uuid ? uuid : value5;
object.properties = object2;
object.trackGuildAndChannelMetadata = trackGuildAndChannelMetadata;
object.shouldExtendSession = QuestDataUtilsModule.isBillableQuestContent(questContent);
object.sourceQuestContent = sourceQuestContent;
binding(object);
return value3;
}
}
function _fun77886(a0) { // fn#77886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:1155, offset: 0x01e0fcea, size: 481 bytes, params: 2, frame: 24
var advertisingId;
var moduleValue3;
var moduleValue4;
const binding = env1_0;
const object3 = {};
object3.questId = questId;
const QUEST_CONTENT_CLICKED = AnalyticEvents.QUEST_CONTENT_CLICKED;
object3.event = QUEST_CONTENT_CLICKED;
const object4 = {};
const value3 = undefined;
const analyticsTypesModule = require(7120) /* metro dependency 7120: AnalyticsTypes */;
const getContentProperties = analyticsTypesModule.getContentProperties;
copyDataProperties(object4, Reflect.apply(getContentProperties, analyticsTypesModule, [questContent,
questContentPosition, questContentRowIndex]), undefined);
copyDataProperties(object4, (importDefault(7071) /* metro dependency 7071: getDeviceMetadataNative */)(), undefined);
object4['cta_name'] = questContentCTA;
object4['click_id'] = (require(491) /* metro dependency 491 */).v4();
const value5 = null;
if (value5 != a0) {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
advertisingId = moduleValue3.isIOS() ? a0.advertisingId : value5;
} else {
advertisingId = value5;
}
object4['apple_advertising_id'] = advertisingId;
if (value5 != a0) {
moduleValue4 = require(477) /* metro dependency 477: PlatformUtils */;
advertisingId = moduleValue4.isAndroid() ? a0.advertisingId : value5;
} else {
advertisingId = value5;
function useQuestsEmbedFallbackAnalytics(a0, a1) { // fn#77890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:2802, offset: 0x01e1016a, size: 57 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
ReactModule.useEffect(_fun77891, [a0, a1]);
function _fun77891() { // fn#77891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:2861, offset: 0x01e101a3, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
(AnalyticsActionsModule).trackQuestEmbedFallbackViewed(require, env0_0);
}
}
object4['android_advertising_id'] = advertisingId;
object4['metadata_sealed'] = value5 != env0_7 ? env0_7 : value5;
object4['traffic_metadata_sealed'] = value5 != env0_8 ? env0_8 : value5;
const currentQuestHomeSearchSession = (require(7127) /* metro dependency 7127: QuestHomeSearchSession */).getCurrentQuestHomeSearchSession();
const uuid = value5 == currentQuestHomeSearchSession ? value3 : currentQuestHomeSearchSession.uuid;
object4['search_session_id'] = value5 != uuid ? uuid : value5;
object3.properties = object4;
object3.trackGuildAndChannelMetadata = trackGuildAndChannelMetadata;
const questDataUtilsModule = require(7091) /* metro dependency 7091: QuestDataUtils */;
object3.shouldExtendSession = questDataUtilsModule.isBillableQuestContent(questContent);
object3.sourceQuestContent = sourceQuestContent;
binding(object3);
return value3;
}
function _fun77889(a0) { // fn#77889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:2215, offset: 0x01e0ffab, size: 447 bytes, params: 2, frame: 24
var advertisingId;
var moduleValue3;
var moduleValue4;
const binding = env1_0;
const object3 = {};
object3.adContentId = adContentId;
object3.relatedQuestId = relatedQuestId;
object3.adCreativeType = adCreativeType;
const QUEST_CONTENT_CLICKED = AnalyticEvents.QUEST_CONTENT_CLICKED;
object3.event = QUEST_CONTENT_CLICKED;
const object4 = {};
const value3 = undefined;
const analyticsTypesModule = require(7120) /* metro dependency 7120: AnalyticsTypes */;
const getContentProperties = analyticsTypesModule.getContentProperties;
copyDataProperties(object4, Reflect.apply(getContentProperties, analyticsTypesModule, [questContent,
questContentPosition, questContentRowIndex]), undefined);
copyDataProperties(object4, (importDefault(7071) /* metro dependency 7071: getDeviceMetadataNative */)(), undefined);
object4['cta_name'] = questContentCTA;
object4['click_id'] = (require(491) /* metro dependency 491 */).v4();
const value5 = null;
if (value5 != a0) {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
advertisingId = moduleValue3.isIOS() ? a0.advertisingId : value5;
} else {
advertisingId = value5;
function useBountyCarouselEmptyStateAnalytics(a0) { // fn#77892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:2958, offset: 0x01e101d5, size: 46 bytes, params: 2, frame: 14
const env0_0 = a0;
ReactModule.useEffect(_fun77893, [a0]);
function _fun77893() { // fn#77893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3020, offset: 0x01e10203, size: 57 bytes, params: 1, frame: 12
var value2;
if (env0_0 != null) {
value2 = environment.__proto__;
(require(7110) /* metro dependency 7110: AnalyticsActions */).trackBountyCarouselEmptyStateViewed(env0_0);
}
}
}
object4['apple_advertising_id'] = advertisingId;
if (value5 != a0) {
moduleValue4 = require(477) /* metro dependency 477: PlatformUtils */;
advertisingId = moduleValue4.isAndroid() ? a0.advertisingId : value5;
} else {
advertisingId = value5;
function useQuestHomeEntrypointAnalyticsEvents({questHomeHero, shouldShowQuestHomeHeroContent}) { // fn#77894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3129, offset: 0x01e1023c, size: 367 bytes, params: 2, frame: 19
let env0_3 = undefined;
const QuestContent = (QuestTypesModule).QuestContent;
const r3 = shouldShowQuestHomeHeroContent ? QuestContent.QUEST_HOME_ENTRYPOINT_THEMED : QuestContent.QUEST_HOME_ENTRYPOINT;
const value2 = env0_3.useMemo(_fun77895, [r3]);
env0_3 = value2;
const value3 = env0_3.useCallback(_fun77896, [questHomeHero, shouldShowQuestHomeHeroContent, r3, value2]);
return env0_3.useMemo(_fun77901, [env0_3.useCallback(_fun77897, [value3]), env0_3.useCallback(_fun77898, [value3]),
env0_3.useCallback(function() {
importDefault(dependencyMap[13]).track(AnalyticEvents.QUEST_HOME_ONBOARDING_POPOVER_RENDERED);
}, []), env0_3.useCallback(_fun77900, [value2, questHomeHero])]);
function _fun77895() { // fn#77895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3344, offset: 0x01e103ab, size: 50 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(7120) /* metro dependency 7120: AnalyticsTypes */;
value = value.getContentProperties(env0_2);
delete value.row_index;
return value;
}
function _fun77896(a0) { // fn#77896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3439, offset: 0x01e103dd, size: 173 bytes, params: 2, frame: 18
var value2;
var value3;
var moduleValue;
var trackAdContentEvent;
var object;
if (questHomeHero == null) {
value2 = environment.__proto__;
(importDefault(683) /* metro dependency 683: AnalyticsUtils */).track(a0, env0_3);
} else if (shouldShowQuestHomeHeroContent) {
value3 = environment.__proto__;
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackAdContentEvent = moduleValue.trackAdContentEvent;
object = {};
object.adContentId = questHomeHero.id;
object.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST_HOME_HERO;
object.event = a0;
object.properties = env0_3;
object.sourceQuestContent = env0_2;
Reflect.apply(trackAdContentEvent, moduleValue, [object]);
} else {
value2 = environment.__proto__;
(importDefault(683) /* metro dependency 683: AnalyticsUtils */).track(a0, env0_3);
}
}
function _fun77897() { // fn#77897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3649, offset: 0x01e1048a, size: 29 bytes, params: 1, frame: 11
const QUEST_HOVER = AnalyticEvents.QUEST_HOVER;
(0, ConstantsModule.AnalyticEvents)(QUEST_HOVER);
}
function _fun77898() { // fn#77898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3695, offset: 0x01e104a7, size: 29 bytes, params: 1, frame: 11
const QUEST_HOVER_OFF = AnalyticEvents.QUEST_HOVER_OFF;
(0, ConstantsModule.AnalyticEvents)(QUEST_HOVER_OFF);
}
function _fun77900() { // fn#77900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3830, offset: 0x01e104f3, size: 114 bytes, params: 1, frame: 17
var object;
var r7;
var id;
let value = environment.__proto__;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const QUEST_CONTENT_CLICKED = AnalyticEvents.QUEST_CONTENT_CLICKED;
const object4 = {is_targeted: false};
value = environment;
copyDataProperties(object4, env0_3, value);
if (questHomeHero != null) {
id = questHomeHero.id;
object = {ad_content_id: id};
r7 = id;
} else {
object = {};
r7 = value;
}
copyDataProperties(object4, object, r7);
Reflect.apply(track, defaultImport, [QUEST_CONTENT_CLICKED, object4]);
}
function _fun77901() { // fn#77901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3959, offset: 0x01e10565, size: 51 bytes, params: 1, frame: 3
return {handleMouseEnter: env0_5, handleMouseLeave: env0_6, handleOnboardingPopoutRender: env0_7,
handleEntrypointClick: env0_8};
}
}
object4['android_advertising_id'] = advertisingId;
const currentQuestHomeSearchSession = (require(7127) /* metro dependency 7127: QuestHomeSearchSession */).getCurrentQuestHomeSearchSession();
const uuid = value5 == currentQuestHomeSearchSession ? value3 : currentQuestHomeSearchSession.uuid;
object4['search_session_id'] = value5 != uuid ? uuid : value5;
object3.properties = object4;
object3.trackGuildAndChannelMetadata = trackGuildAndChannelMetadata;
const questDataUtilsModule = require(7091) /* metro dependency 7091: QuestDataUtils */;
object3.shouldExtendSession = questDataUtilsModule.isBillableQuestContent(questContent);
object3.sourceQuestContent = sourceQuestContent;
binding(object3);
return value3;
}
global.__d(_fun77879, 9949, [31, 661, 9513, 7110, 7091, 7122, 7120, 7071, 491, 477, 7127, 6531, 7121, 683,
2]) /* metro module 9949, dependencies: [31, 661, 9513, 7110, 7091, 7122, 7120, 7071, 491, 477, 7127, 6531, 7121, 683, 2] */;
@@ -1,15 +1,18 @@
/* Metro module 7120; source: modules/quests/lib/analytics/AnalyticsTypes.tsx; dependencies: [6531, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as QuestTypesModule from '../../QuestTypes.tsx'; /* Metro dependency 6531 */
function _fun56939(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7298:6, offset: 0x013d6a13, size: 1079 bytes, params: 8, frame: 23
const env0_0 = require;
const closure = getQuestContentName;
const getQuestContentName2 = getQuestContentName;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
Object = global.Object;
const keys = Object.keys;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const QuestContent = (QuestTypesModule).QuestContent;
const env0_2 = Reflect.apply(keys, Object, [QuestContent]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/lib/analytics/AnalyticsTypes.tsx');
exports.getQuestContentName = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/quests/lib/analytics/AnalyticsTypes.tsx');
exports.getQuestContentName = getQuestContentName2;
exports.getQuestStatus = function(a0) {
var r0;
var r1;
@@ -89,15 +92,16 @@ function _fun56939(global, require, importDefault, importAll, module, exports, d
MOBILE_ORBS_ONBOARDING_DC: 'MOBILE_ORBS_ONBOARDING_DC', LAUNCH_MOBILE_ACTIVITY: 'LAUNCH_MOBILE_ACTIVITY',
OPEN_NITRO_CHECKOUT: 'OPEN_NITRO_CHECKOUT', OPEN_NITRO_HOME: 'OPEN_NITRO_HOME', START_BOUNTY: 'START_BOUNTY',
BACK_TO_BOUNTIES: 'BACK_TO_BOUNTIES'};
function getQuestContentName(a0) { // fn#56940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7298:132, offset: 0x013d6e4a, size: 50 bytes, params: 2, frame: 11
const env0_0 = a0;
return env0_2.find(_fun56941) ?? '';
function _fun56941(a0) { // fn#56941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7298:194, offset: 0x013d6e7c, size: 50 bytes, params: 2, frame: 11
const QuestContent = (QuestTypesModule).QuestContent;
return QuestContent[a0] === env0_0;
}
}
}
function getQuestContentName(a0) { // fn#56940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7298:132, offset: 0x013d6e4a, size: 50 bytes, params: 2, frame: 11
const env0_0 = a0;
return env0_2.find(_fun56941) ?? '';
}
function _fun56941(a0) { // fn#56941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7298:194, offset: 0x013d6e7c, size: 50 bytes, params: 2, frame: 11
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
return QuestContent[a0] === env0_0;
}
global.__d(_fun56939, 7120, [6531, 2]) /* metro module 7120, dependencies: [6531, 2] */;
@@ -1,134 +1,141 @@
/* Metro module 9516; source: modules/quests/lib/analytics/BrandSafetyContext.tsx; dependencies: [9485, 1379, 1867, 3793, 3969, 1878, 9515, 7091, 1423, 4805, 2] */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import SelectedGuildStore from '../../../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseChannelNameModule from '../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import * as QuestDataUtilsModule from '../../utils/QuestDataUtils.tsx'; /* Metro dependency 7091 */
import * as SidebarVisibilityMethodStoreModule from '../../../guild_sidebar/SidebarVisibilityMethodStore.tsx'; /* Metro dependency 9485 */
import * as ContentImpressionTrackerConstantsModule from './ContentImpressionTrackerConstants.tsx'; /* Metro dependency 9515 */
function _fun74246(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9702:6, offset: 0x01d86c29, size: 236 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const sidebarVisibilityMethodStoreModule = require(9485) /* metro dependency 9485: SidebarVisibilityMethodStore */;
const env0_3 = sidebarVisibilityMethodStoreModule.getVisibleChannelIdsMethod;
const env0_4 = sidebarVisibilityMethodStoreModule.getVisibleGuildIdsMethod;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_10 = (require(9515) /* metro dependency 9515: ContentImpressionTrackerConstants */).MAX_BRAND_SAFETY_CONTEXT_ARRAY_LEN;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/lib/analytics/BrandSafetyContext.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/lib/analytics/BrandSafetyContext.tsx');
exports.getBrandSafetyContext = getBrandSafetyContext;
}
function getBrandSafetyContext(a0) { // fn#74247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9702:371, offset: 0x01d86d15, size: 550 bytes, params: 2, frame: 20
var r3;
var r2;
var guildId;
var object2;
var value9;
var guildBannerURL;
var length;
var object4;
const value2 = undefined;
const isBillableQuestContent2 = (require(7091) /* metro dependency 7091: QuestDataUtils */).isBillableQuestContent(a0);
const adContext = (require(7091) /* metro dependency 7091: QuestDataUtils */).getAdContext(a0);
const visibleGuildIdsMethod = getVisibleGuildIdsMethod();
const visibleChannelIdsMethod = getVisibleChannelIdsMethod();
const value6 = null;
if (value6 != adContext) {
if (adContext.is_campaign_ias_enabled) {
if (isBillableQuestContent2) {
if (value2 === visibleGuildIdsMethod) {
return value6;
function getBrandSafetyContext(a0) { // fn#74247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9702:371, offset: 0x01d86d15, size: 550 bytes, params: 2, frame: 20
var r3;
var r2;
var guildId;
var object;
var value9;
var guildBannerURL;
var length;
var object3;
const value2 = undefined;
const isBillableQuestContent2 = (QuestDataUtilsModule).isBillableQuestContent(a0);
const adContext = (QuestDataUtilsModule).getAdContext(a0);
const visibleGuildIdsMethod = getVisibleGuildIdsMethod();
const visibleChannelIdsMethod = getVisibleChannelIdsMethod();
const value6 = null;
if (value6 != adContext) {
if (adContext.is_campaign_ias_enabled) {
if (isBillableQuestContent2) {
if (value2 === visibleGuildIdsMethod) {
return value6;
}
if (value2 === visibleChannelIdsMethod) {
return value6;
}
guildId = SelectedGuildStore.getGuildId();
r3 = value6 != guildId ? GuildStore.getGuild(guildId) : value6;
object = {};
value9 = visibleGuildIdsMethod();
var env0_0 = GuildStore.getGuilds();
object.guilds = value9.map(_fun74248).filter(function(a0) {
return a0 !== null;
});
object.channels = value6 == r3 ? [] : visibleChannelIdsMethod().map(_fun74250).filter(_fun74251);
if (value6 != guildId) {
object.selected_guild_id = guildId;
}
if (value6 === (value6 == r3 ? value2 : r3.banner)) {
r2 = value6;
} else if (value2 === (value6 == r3 ? value2 : r3.banner)) {
r2 = value6;
} else {
guildBannerURL = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildBannerURL({id: r3.id,
banner: r3.banner}, true);
r2 = value6 != guildBannerURL ? guildBannerURL : value6;
}
if (value6 !== r2) {
object.selected_guild_banner_url = r2;
}
length = object.guilds.length;
if (length > MAX_BRAND_SAFETY_CONTEXT_ARRAY_LEN) {
object.guilds = object.guilds.slice(0, MAX_BRAND_SAFETY_CONTEXT_ARRAY_LEN);
object.truncated = true;
}
length = object.channels.length;
if (length > MAX_BRAND_SAFETY_CONTEXT_ARRAY_LEN) {
object.channels = object.channels.slice(0, MAX_BRAND_SAFETY_CONTEXT_ARRAY_LEN);
object.truncated = true;
}
object3 = {};
object3.brand_safety_context = global.JSON.stringify(object);
return object3;
}
if (value2 === visibleChannelIdsMethod) {
return value6;
}
guildId = SelectedGuildStore.getGuildId();
r3 = value6 != guildId ? GuildStore.getGuild(guildId) : value6;
object2 = {};
value9 = visibleGuildIdsMethod();
var env0_0 = GuildStore.getGuilds();
object2.guilds = value9.map(_fun74248).filter(function(a0) {
return a0 !== null;
});
object2.channels = value6 == r3 ? [] : visibleChannelIdsMethod().map(_fun74250).filter(_fun74251);
if (value6 != guildId) {
object2.selected_guild_id = guildId;
}
if (value6 === (value6 == r3 ? value2 : r3.banner)) {
r2 = value6;
} else if (value2 === (value6 == r3 ? value2 : r3.banner)) {
r2 = value6;
} else {
guildBannerURL = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildBannerURL({id: r3.id,
banner: r3.banner}, true);
r2 = value6 != guildBannerURL ? guildBannerURL : value6;
}
if (value6 !== r2) {
object2.selected_guild_banner_url = r2;
}
length = object2.guilds.length;
if (length > MAX_BRAND_SAFETY_CONTEXT_ARRAY_LEN) {
object2.guilds = object2.guilds.slice(0, MAX_BRAND_SAFETY_CONTEXT_ARRAY_LEN);
object2.truncated = true;
}
length = object2.channels.length;
if (length > MAX_BRAND_SAFETY_CONTEXT_ARRAY_LEN) {
object2.channels = object2.channels.slice(0, MAX_BRAND_SAFETY_CONTEXT_ARRAY_LEN);
object2.truncated = true;
}
object4 = {};
object4.brand_safety_context = global.JSON.stringify(object2);
return object4;
return value6;
}
return value6;
}
return value6;
function _fun74248(a0) { // fn#74248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9702:658, offset: 0x01d86f3b, size: 172 bytes, params: 2, frame: 16
var r1;
var value2;
var guildIconURL;
const property = env0_0[a0];
if (property === undefined) {
return null;
}
const object = {};
object.id = property.id;
object.name = property.name;
const description = property.description;
const value = null;
if (value !== description) {
object.description = property.description;
}
if (value === property.icon) {
r1 = value;
} else {
value2 = environment.__proto__;
guildIconURL = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildIconURL({id: property.id,
icon: property.icon, size: 44, canAnimate: true});
r1 = value != guildIconURL ? guildIconURL : value;
}
if (value !== r1) {
object.icon_url = r1;
}
return object;
}
function _fun74250(a0) { // fn#74250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9702:977, offset: 0x01d86fe7, size: 119 bytes, params: 2, frame: 17
const channel = ChannelStore.getChannel(a0);
if (channel === undefined) {
return null;
}
const object = {};
object.id = channel.id;
object.name = UseChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore);
if (channel.topic.length > 0) {
object.channel_topic = channel.topic;
}
return object;
}
}
return value6;
}
function _fun74248(a0) { // fn#74248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9702:658, offset: 0x01d86f3b, size: 172 bytes, params: 2, frame: 16
var r1;
var value2;
var guildIconURL;
const property = env0_0[a0];
if (property === undefined) {
return null;
}
const object2 = {};
object2.id = property.id;
object2.name = property.name;
const description = property.description;
const value = null;
if (value !== description) {
object2.description = property.description;
}
if (value === property.icon) {
r1 = value;
} else {
value2 = environment.__proto__;
guildIconURL = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildIconURL({id: property.id,
icon: property.icon, size: 44, canAnimate: true});
r1 = value != guildIconURL ? guildIconURL : value;
}
if (value !== r1) {
object2.icon_url = r1;
}
return object2;
}
function _fun74250(a0) { // fn#74250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9702:977, offset: 0x01d86fe7, size: 119 bytes, params: 2, frame: 17
const channel = ChannelStore.getChannel(a0);
if (channel === undefined) {
return null;
}
const object2 = {};
object2.id = channel.id;
object2.name = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel, UserStore,
RelationshipStore);
if (channel.topic.length > 0) {
object2.channel_topic = channel.topic;
}
return object2;
function _fun74251(a0) { // fn#74251, offset: 0x00d81d26, size: 11 bytes, params: 2, frame: 2
return a0 !== null;
}
global.__d(_fun74246, 9516, [9485, 1379, 1867, 3793, 3969, 1878, 9515, 7091, 1423, 4805,
2]) /* metro module 9516, dependencies: [9485, 1379, 1867, 3793, 3969, 1878, 9515, 7091, 1423, 4805, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,11 +1,14 @@
/* Metro module 9515; source: modules/quests/lib/analytics/ContentImpressionTrackerConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun74245(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9701:6, offset: 0x01d86bb6, size: 115 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/lib/analytics/ContentImpressionTrackerConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/lib/analytics/ContentImpressionTrackerConstants.tsx');
exports.MAX_BRAND_SAFETY_CONTEXT_ARRAY_LEN = 100;
exports.HEARTBEAT_SECONDS = 60;
exports.MIN_QUEST_VIEW_TIME_SECONDS = 1;
exports.MIN_QUEST_CONTENT_VISIBILITY_PERCENTAGE = 0.5;
}
global.__d(_fun74245, 9515, [2]) /* metro module 9515, dependencies: [2] */;
@@ -1,96 +1,103 @@
/* Metro module 9513; source: modules/quests/lib/analytics/ContentImpressionTrackerHooks.tsx; dependencies: [31, 7093, 7121, 566, 7120, 6266, 9514, 2] */
import UsePrevious from '../../../../hooks/usePrevious.tsx'; /* Metro dependency 6266 */
import QuestStore from '../../QuestStore.tsx'; /* Metro dependency 7093 */
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 AdCreativeTypeModule from '../../../../external/discord_common/js/shared/shared-constants/AdCreativeType.tsx'; /* Metro dependency 7121 */
import * as ContentImpressionTrackerModule from './ContentImpressionTracker.tsx'; /* Metro dependency 9514 */
function _fun74210(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9699:6, offset: 0x01d85012, size: 180 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = useQuestImpression;
const useQuestImpression2 = useQuestImpression;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/lib/analytics/ContentImpressionTrackerHooks.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/lib/analytics/ContentImpressionTrackerHooks.tsx');
exports.useAdContentImpressionTrackerProps = useAdContentImpressionTrackerProps;
exports.useQuestStatusChanged = useQuestStatusChanged;
exports.useQuestImpression = closure;
exports.useQuestImpression = useQuestImpression2;
exports.useQuestImpressionId = useQuestImpressionId;
}
function useQuestImpression() { // fn#74211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9699:116, offset: 0x01d850c6, size: 62 bytes, params: 1, frame: 13
const binding = env0_3;
const useContext = binding.useContext;
const value = undefined;
const QuestImpressionContext = (require(9514) /* metro dependency 9514: ContentImpressionTracker */).QuestImpressionContext;
const value2 = Reflect.apply(useContext, binding, [QuestImpressionContext]);
return value2 == null ? value : value2.current;
}
function useAdContentImpressionTrackerProps(a0) { // fn#74212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9699:362, offset: 0x01d85104, size: 169 bytes, params: 2, frame: 17
const env0_0 = a0;
const value = undefined;
return env0_3.useMemo(_fun74216, [useAdContentIds('questOrQuests' in a0 ? a0.questOrQuests : value,
'adContentId' in a0 ? a0.adContentId : value), a0.questContent,
'questOrQuests' in a0 ? (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST : a0.adCreativeType]);
}
function useQuestStatusChanged({adContentIds, adCreativeType}) { // fn#74217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9699:1007, offset: 0x01d852f9, size: 154 bytes, params: 2, frame: 20
const value3 = env0_3.useMemo(_fun74219,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore], _fun74218, [adContentIds,
adCreativeType])]);
return value3 !== (importDefault(6266) /* metro dependency 6266: usePrevious */)(value3);
}
function useQuestImpressionId() { // fn#74220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9699:1344, offset: 0x01d8542c, size: 34 bytes, params: 1, frame: 10
const value = undefined;
const value2 = useQuestImpression();
return value2 == null ? value : value2.getId();
}
function useAdContentIds(a0, a1) { // fn#74213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9699:415, owner: useAdContentImpressionTrackerProps.useAdContentIds, offset: 0x01d851ad, size: 55 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
return env1_3.useMemo(_fun74214, [a0, a1]);
}
function _fun74216() { // fn#74216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9699:709, offset: 0x01d85254, size: 165 bytes, params: 1, frame: 16
let object = {};
object.adContentIds = env0_1;
let questContent = env0_0.questContent;
object.questContent = questContent;
const adContentIds = object.adContentIds;
questContent = object.questContent;
object = [];
arraySpread(object, adContentIds, 0, questContent);
const value4 = '' + object.sort().join('_') + '_' + questContent;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
AdCreativeType.QUEST;
return {adContentIds: env0_1, adCreativeType: env0_2, key: value4};
}
function _fun74218() { // fn#74218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9699:1115, offset: 0x01d85393, size: 95 bytes, params: 1, frame: 14
const adCreativeTypeBinding = adCreativeType;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const QUEST = AdCreativeType.QUEST;
return adCreativeTypeBinding !== QUEST || adContentIds.length !== 1 ? null : QuestStore.getQuest(adContentIds[0]);
}
function _fun74219() { // fn#74219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9699:1209, offset: 0x01d853f2, size: 58 bytes, params: 1, frame: 13
const value2 = null;
return value2 == env0_2 ? value2 : (require(7120) /* metro dependency 7120: AnalyticsTypes */).getQuestStatus(env0_2);
}
function _fun74214() { // fn#74214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9699:463, offset: 0x01d851e4, size: 112 bytes, params: 1, frame: 14
var r0;
var isArray2;
var binding;
if (require != null) {
r0 = [require];
} else if (env0_0 != null) {
isArray2 = global.Array.isArray(env0_0);
binding = env0_0;
r0 = isArray2 ? binding.map(function(a0) {
return a0.id;
}) : [binding.id];
} else {
r0 = [];
function useQuestImpression() { // fn#74211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9699:116, offset: 0x01d850c6, size: 62 bytes, params: 1, frame: 13
const useContext = ReactModule.useContext;
const value = undefined;
const QuestImpressionContext = (ContentImpressionTrackerModule).QuestImpressionContext;
const value2 = Reflect.apply(useContext, ReactModule, [QuestImpressionContext]);
return value2 == null ? value : value2.current;
}
return r0;
function useAdContentImpressionTrackerProps(a0) { // fn#74212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9699:362, offset: 0x01d85104, size: 169 bytes, params: 2, frame: 17
const env0_0 = a0;
const value = undefined;
return ReactModule.useMemo(_fun74216, [useAdContentIds('questOrQuests' in a0 ? a0.questOrQuests : value,
'adContentId' in a0 ? a0.adContentId : value), a0.questContent,
'questOrQuests' in a0 ? (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST : a0.adCreativeType]);
function useAdContentIds(a0, a1) { // fn#74213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9699:415, owner: useAdContentImpressionTrackerProps.useAdContentIds, offset: 0x01d851ad, size: 55 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
return env1_3.useMemo(_fun74214, [a0, a1]);
function _fun74214() { // fn#74214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9699:463, offset: 0x01d851e4, size: 112 bytes, params: 1, frame: 14
var r0;
var isArray2;
var binding;
if (require != null) {
r0 = [require];
} else if (env0_0 != null) {
isArray2 = global.Array.isArray(env0_0);
binding = env0_0;
r0 = isArray2 ? binding.map(function(a0) {
return a0.id;
}) : [binding.id];
} else {
r0 = [];
}
return r0;
}
}
function _fun74216() { // fn#74216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9699:709, offset: 0x01d85254, size: 165 bytes, params: 1, frame: 16
let object = {};
object.adContentIds = env0_1;
let questContent = env0_0.questContent;
object.questContent = questContent;
const adContentIds = object.adContentIds;
questContent = object.questContent;
object = [];
arraySpread(object, adContentIds, 0, questContent);
const value4 = '' + object.sort().join('_') + '_' + questContent;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
AdCreativeType.QUEST;
return {adContentIds: env0_1, adCreativeType: env0_2, key: value4};
}
}
function useQuestStatusChanged({adContentIds, adCreativeType}) { // fn#74217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9699:1007, offset: 0x01d852f9, size: 154 bytes, params: 2, frame: 20
const value3 = ReactModule.useMemo(_fun74219,
[(FluxModule).useStateFromStores([QuestStore], _fun74218, [adContentIds,
adCreativeType])]);
return value3 !== (UsePrevious)(value3);
function _fun74218() { // fn#74218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9699:1115, offset: 0x01d85393, size: 95 bytes, params: 1, frame: 14
const adCreativeTypeBinding = adCreativeType;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const QUEST = AdCreativeType.QUEST;
return adCreativeTypeBinding !== QUEST || adContentIds.length !== 1 ? null : QuestStore.getQuest(adContentIds[0]);
}
function _fun74219() { // fn#74219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9699:1209, offset: 0x01d853f2, size: 58 bytes, params: 1, frame: 13
const value2 = null;
return value2 == env0_2 ? value2 : (require(7120) /* metro dependency 7120: AnalyticsTypes */).getQuestStatus(env0_2);
}
}
function useQuestImpressionId() { // fn#74220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9699:1344, offset: 0x01d8542c, size: 34 bytes, params: 1, frame: 10
const value = undefined;
const value2 = useQuestImpression();
return value2 == null ? value : value2.getId();
}
}
global.__d(_fun74210, 9513, [31, 7093, 7121, 566, 7120, 6266, 9514,
2]) /* metro module 9513, dependencies: [31, 7093, 7121, 566, 7120, 6266, 9514, 2] */;
@@ -1,32 +1,39 @@
/* Metro module 7127; source: modules/quests/lib/analytics/QuestHomeSearchSession.tsx; dependencies: [491, 4882, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun56979(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7305:6, offset: 0x013d7b01, size: 126 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/lib/analytics/QuestHomeSearchSession.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/lib/analytics/QuestHomeSearchSession.tsx');
exports.getOrCreateQuestHomeSearchSession = getOrCreateQuestHomeSearchSession;
exports.clearQuestHomeSearchSession = function() {
env0_2 = null;
};
exports.getCurrentQuestHomeSearchSession = getCurrentQuestHomeSearchSession;
}
function getOrCreateQuestHomeSearchSession() { // fn#56980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7305:228, offset: 0x013d7b7f, size: 154 bytes, params: 1, frame: 18
var object;
var object3;
const Date = global.Date;
const value = Date.now();
if (env0_2 == null) {
object3 = {};
object3.uuid = (require(491) /* metro dependency 491 */).v4();
object3.createdAtTimestamp = value;
object3.lastUsedTimestamp = value;
object3.version = (require(4882) /* metro dependency 4882: SessionUtils */).CLIENT_SESSION_STORAGE_VERSION;
object = {searchSession: object3, isNew: true};
} else {
env0_2.lastUsedTimestamp = value;
object = {searchSession: env0_2, isNew: false};
function getOrCreateQuestHomeSearchSession() { // fn#56980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7305:228, offset: 0x013d7b7f, size: 154 bytes, params: 1, frame: 18
var object2;
var object4;
const Date = global.Date;
const value = Date.now();
if (env0_2 == null) {
object4 = {};
object4.uuid = (require(491) /* metro dependency 491 */).v4();
object4.createdAtTimestamp = value;
object4.lastUsedTimestamp = value;
object4.version = (require(4882) /* metro dependency 4882: SessionUtils */).CLIENT_SESSION_STORAGE_VERSION;
object2 = {searchSession: object4, isNew: true};
} else {
env0_2.lastUsedTimestamp = value;
object2 = {searchSession: env0_2, isNew: false};
}
return object2;
}
return object;
function getCurrentQuestHomeSearchSession() { // fn#56982, offset: 0x00c36b39, size: 9 bytes, params: 1, frame: 1
return env0_2;
}
}
global.__d(_fun56979, 7127, [491, 4882, 2]) /* metro module 7127, dependencies: [491, 4882, 2] */;
+19 -16
View File
@@ -1,23 +1,26 @@
/* Metro module 7099; source: modules/quests/lib/getQuestLogger.tsx; dependencies: [691, 482, 3, 2] */
import DeveloperOptionsStore from '../../../stores/DeveloperOptionsStore.tsx'; /* Metro dependency 691 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
function _fun56747(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7277:6, offset: 0x013d0218, size: 134 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const developerOptionsStore = importDefault(691) /* metro dependency 691: DeveloperOptionsStore */;
const env0_3 = (require(482) /* metro dependency 482: Constants */).NOOP;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/lib/getQuestLogger.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/lib/getQuestLogger.tsx');
exports.getQuestLogger = getQuestLogger;
function getQuestLogger() { // fn#56748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7277:209, offset: 0x013d029e, size: 321 bytes, params: 1, frame: 19
const value = a0;
const value2 = undefined;
const {quest, location} = value !== value2 ? value : {};
const isLoggingQuestEvents = DeveloperOptionsStore.isLoggingQuestEvents;
const questName = quest == null ? value2 : quest.config.messages.questName;
const value3 = '';
const value8 = new (importDefault(3) /* metro dependency 3: Logger */)('QuestLogger' + (location != null ? '-' + location : value3) + (questName != null ? '-' + questName + ')' : value3));
return {log: isLoggingQuestEvents ? value8.log : NOOP, warn: isLoggingQuestEvents ? value8.warn : NOOP,
error: isLoggingQuestEvents ? value8.error : NOOP, info: isLoggingQuestEvents ? value8.info : NOOP,
verbose: isLoggingQuestEvents ? value8.verbose : NOOP, trace: isLoggingQuestEvents ? value8.trace : NOOP};
}
}
function getQuestLogger() { // fn#56748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7277:209, offset: 0x013d029e, size: 321 bytes, params: 1, frame: 19
const value = a0;
const value2 = undefined;
const {quest, location} = value !== value2 ? value : {};
const isLoggingQuestEvents = DeveloperOptionsStore.isLoggingQuestEvents;
const questName = quest == null ? value2 : quest.config.messages.questName;
const value3 = '';
const value8 = new (importDefault(3) /* metro dependency 3: Logger */)('QuestLogger' + (location != null ? '-' + location : value3) + (questName != null ? '-' + questName + ')' : value3));
return {log: isLoggingQuestEvents ? value8.log : NOOP, warn: isLoggingQuestEvents ? value8.warn : NOOP,
error: isLoggingQuestEvents ? value8.error : NOOP, info: isLoggingQuestEvents ? value8.info : NOOP,
verbose: isLoggingQuestEvents ? value8.verbose : NOOP, trace: isLoggingQuestEvents ? value8.trace : NOOP};
}
global.__d(_fun56747, 7099, [691, 482, 3, 2]) /* metro module 7099, dependencies: [691, 482, 3, 2] */;
@@ -1,14 +1,18 @@
/* Metro module 16152; source: modules/quests/managers/QuestFetchManager.tsx; dependencies: [6, 7, 15, 17, 18, 7093, 672, 9479, 9484, 1216, 477, 9493, 7108, 6531, 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 QuestStore from '../QuestStore.tsx'; /* Metro dependency 7093 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as QuestsEligibilityModule from '../lib/QuestsEligibility.tsx'; /* Metro dependency 9479 */
function _fun124815(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:6, offset: 0x025c3cad, size: 414 bytes, params: 8, frame: 20
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 */;
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const env0_9 = Millis.DAY;
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
@@ -25,221 +29,223 @@ function _fun124815(global, require, importDefault, importAll, module, exports,
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
MINUTE = Millis.MINUTE;
const env0_13 = 5 * MINUTE;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
let value = AutomaticLifecycleManager;
value = _fun124819(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/managers/QuestFetchManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/managers/QuestFetchManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_124816() { // fn#124816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:158, offset: 0x025c3e4b, 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_124816_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun124819(a0) { // fn#124819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:509, offset: 0x025c3ead, size: 72 bytes, params: 2, frame: 15
const closure = QuestFetchManager;
env0_7(closure, a0);
return env0_4(closure, [{key: '_fetch', value: value_124829}]);
}
function QuestFetchManager(a0) { // fn#124820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:521, offset: 0x025c3ef5, size: 330 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, QuestFetchManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(QuestFetchManager);
binding = env1_5;
if (_isNativeReflectConstruct_124816()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
const Date = global.Date;
value.instantiatedAt = Date.now();
value.initialFetchTimerId = null;
value.initialQuestHomeHeroFetchTimerId = null;
value.recurringFetchTimerId = null;
value.lastFetchAttemptedAt = 0;
value.lastFetchedQuestForLocaleChangeAt = 0;
value.handleQuestsFetchCurrentQuestsBegin = handleQuestsFetchCurrentQuestsBegin;
value.handlePostConnectionOpen = handlePostConnectionOpen_124822;
value.handleRunningGamesChange = function() {
};
value.handleUserSettingsProtoUpdate = handleUserSettingsProtoUpdate;
value.handleLogout = handleLogout_124828;
var handleQuestsFetchCurrentQuestsBegin = value.handleQuestsFetchCurrentQuestsBegin;
var handleUserSettingsProtoUpdate = value.handleUserSettingsProtoUpdate;
value.actions = {QUESTS_FETCH_CURRENT_QUESTS_BEGIN: handleQuestsFetchCurrentQuestsBegin,
POST_CONNECTION_OPEN: value.handlePostConnectionOpen, RUNNING_GAMES_CHANGE: value.handleRunningGamesChange,
RUNNING_NON_GAMES_CHANGE: value.handleRunningGamesChange,
USER_SETTINGS_PROTO_UPDATE: handleUserSettingsProtoUpdate, LOGOUT: value.handleLogout};
return value;
}
function value_124829(a0) { // fn#124829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:2549, offset: 0x025c4341, size: 391 bytes, params: 2, frame: 20
var r3;
var defaultImport;
var addBreadcrumb;
var object;
var lastFetchedCurrentQuests;
var value4;
var defaultImport3;
let value = environment.__proto__;
if ((require(9479) /* metro dependency 9479: QuestsEligibility */).getIsEligibleForQuests() && !QuestStore.isFetchingCurrentQuests) {
defaultImport = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
addBreadcrumb = defaultImport.addBreadcrumb;
object = {callerSource: a0};
object.storeSize = QuestStore.quests.size;
lastFetchedCurrentQuests = QuestStore.lastFetchedCurrentQuests;
object.lastFetchedCurrentQuests = lastFetchedCurrentQuests;
value4 = global.Date.now();
lastFetchedCurrentQuests = QuestStore.lastFetchedCurrentQuests;
object.msSinceLastFetch = value4 - lastFetchedCurrentQuests;
object.isFetchingCurrentQuests = QuestStore.isFetchingCurrentQuests;
Reflect.apply(addBreadcrumb, defaultImport, [{'category': 'quests.fetch',
'message': 'QuestFetchManager._fetch triggered', data: object}]);
(require(9484) /* metro dependency 9484: QuestActionCreators */).fetchCurrentQuests();
r3 = (require(477) /* metro dependency 477: PlatformUtils */).isMac() && (importDefault(9493) /* metro dependency 9493: DiscordAppStateNative */).getState() !== 'focused';
if (!r3) {
defaultImport3 = importDefault(7108) /* metro dependency 7108: NewAdRequestBehaviorExperiment */;
r3 = defaultImport3.getConfig({location: 'QuestFetchManager'}).enableNewRequestBehavior;
function _isNativeReflectConstruct_124816() { // fn#124816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:158, offset: 0x025c3e4b, 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) {
}
if (!r3) {
value = require(9484) /* metro dependency 9484: QuestActionCreators */;
value.fetchQuestToDeliver((require(6531) /* metro dependency 6531: QuestTypes */).QuestPlacement.MOBILE_HOME_DOCK_AREA,
a0);
return (_isNativeReflectConstruct_124816_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun124819(a0) { // fn#124819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:509, offset: 0x025c3ead, size: 72 bytes, params: 2, frame: 15
const QuestFetchManager2 = QuestFetchManager;
Inherits(QuestFetchManager2, a0);
return CreateClass(QuestFetchManager2, [{key: '_fetch', value: value_124829}]);
function QuestFetchManager(a0) { // fn#124820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:521, offset: 0x025c3ef5, size: 330 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, QuestFetchManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(QuestFetchManager);
binding = env1_5;
if (_isNativeReflectConstruct_124816()) {
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);
const Date = global.Date;
value.instantiatedAt = Date.now();
value.initialFetchTimerId = null;
value.initialQuestHomeHeroFetchTimerId = null;
value.recurringFetchTimerId = null;
value.lastFetchAttemptedAt = 0;
value.lastFetchedQuestForLocaleChangeAt = 0;
value.handleQuestsFetchCurrentQuestsBegin = handleQuestsFetchCurrentQuestsBegin;
value.handlePostConnectionOpen = handlePostConnectionOpen_124822;
value.handleRunningGamesChange = function() {
};
value.handleUserSettingsProtoUpdate = handleUserSettingsProtoUpdate_124827;
value.handleLogout = handleLogout_124828;
var handleQuestsFetchCurrentQuestsBegin = value.handleQuestsFetchCurrentQuestsBegin;
value.actions = {QUESTS_FETCH_CURRENT_QUESTS_BEGIN: handleQuestsFetchCurrentQuestsBegin,
POST_CONNECTION_OPEN: value.handlePostConnectionOpen, RUNNING_GAMES_CHANGE: value.handleRunningGamesChange,
RUNNING_NON_GAMES_CHANGE: value.handleRunningGamesChange,
USER_SETTINGS_PROTO_UPDATE: value.handleUserSettingsProtoUpdate, LOGOUT: value.handleLogout};
return value;
function handleQuestsFetchCurrentQuestsBegin() { // fn#124821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:983, owner: QuestFetchManager.handleQuestsFetchCurrentQuestsBegin, offset: 0x025c403f, size: 34 bytes, params: 1, frame: 10
const binding = env0_0;
const Date = global.Date;
binding.lastFetchAttemptedAt = Date.now();
}
function QuestFetchManagerHandlePostConnectionOpen() { // fn#124822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:1050, owner: QuestFetchManager.handlePostConnectionOpen, offset: 0x025c4061, size: 305 bytes, params: 1, frame: 19
let window = global.window;
const clearTimeout = window.clearTimeout;
const binding = env0_0;
Reflect.apply(clearTimeout, window, [binding.initialFetchTimerId]);
window = global.window;
window.clearTimeout(binding.initialQuestHomeHeroFetchTimerId);
window = global.window;
window.clearTimeout(binding.recurringFetchTimerId);
window = global.window;
binding.recurringFetchTimerId = window.setInterval(_fun124823, env2_10);
let Math = global.Math;
const floor = Math.floor;
const Math2 = global.Math;
const value4 = Reflect.apply(floor, Math, [Math2.random() * env2_11]);
binding.initialFetchTimerId = global.window.setTimeout(_fun124824, value4);
const getIsEligibleForQuests = QuestsEligibilityModule.getIsEligibleForQuests;
if (Reflect.apply(getIsEligibleForQuests, QuestsEligibilityModule, [])) {
Math = global.Math;
env0_0.initialQuestHomeHeroFetchTimerId = global.window.setTimeout(_fun124825,
value4 + Math.floor(global.Math.random() * env2_11));
}
function _fun124823() { // fn#124823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:1243, offset: 0x025c4192, size: 70 bytes, params: 1, frame: 11
const Date = global.Date;
let value = Date.now();
value -= env1_0.lastFetchAttemptedAt;
if (value > DAY) {
env1_0._fetch('post_connect_recurring');
}
}
function _fun124824() { // fn#124824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:1403, offset: 0x025c41d8, size: 70 bytes, params: 1, frame: 11
const Date = global.Date;
let value = Date.now();
value -= QuestStore.lastFetchedCurrentQuests;
if (!(value <= env3_13)) {
value = environment.__proto__;
env1_0._fetch('post_connect_initial');
}
}
function _fun124825() { // fn#124825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:1612, offset: 0x025c421e, size: 43 bytes, params: 1, frame: 11
var value;
var property;
var error;
try {
value = environment.__proto__.__proto__.__proto__;
property = dependencyMap[8];
value = require(property);
value.fetchQuestHomeHero();
} catch (error) {
}
}
}
function QuestFetchManagerHandleUserSettingsProtoUpdate({partial, settings, wasSaved}) { // fn#124827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:1734, owner: QuestFetchManager.handleUserSettingsProtoUpdate, offset: 0x025c4249, size: 152 bytes, params: 2, frame: 12
var value4;
var binding;
let value = 'localization' in settings.proto;
let r0 = value ? !partial : !value;
r0 = !r0 ? wasSaved : r0;
if (!r0) {
value = global.Date.now();
value -= env0_0.lastFetchedQuestForLocaleChangeAt;
value4 = environment.__proto__.__proto__;
value = value <= env2_12;
r0 = value;
}
if (!r0) {
binding = env0_0;
binding.lastFetchedQuestForLocaleChangeAt = global.Date.now();
binding._fetch('user_settings');
}
}
function QuestFetchManagerHandleLogout() { // fn#124828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:1950, owner: QuestFetchManager.handleLogout, offset: 0x025c42e1, size: 96 bytes, params: 1, frame: 13
let window = global.window;
const clearTimeout = window.clearTimeout;
const binding = env0_0;
Reflect.apply(clearTimeout, window, [binding.initialFetchTimerId]);
window = global.window;
window.clearTimeout(binding.initialQuestHomeHeroFetchTimerId);
window = global.window;
window.clearTimeout(binding.recurringFetchTimerId);
binding.lastFetchAttemptedAt = 0;
binding.lastFetchedQuestForLocaleChangeAt = 0;
}
}
function value_124829(a0) { // fn#124829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:2549, offset: 0x025c4341, size: 391 bytes, params: 2, frame: 20
var r3;
var questStoreBinding;
var defaultImport;
var addBreadcrumb;
var object2;
var lastFetchedCurrentQuests;
var value4;
var defaultImport3;
let value = environment.__proto__;
if ((require(9479) /* metro dependency 9479: QuestsEligibility */).getIsEligibleForQuests() && !QuestStore.isFetchingCurrentQuests) {
defaultImport = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
addBreadcrumb = defaultImport.addBreadcrumb;
object2 = {callerSource: a0};
questStoreBinding = QuestStore;
object2.storeSize = questStoreBinding.quests.size;
lastFetchedCurrentQuests = questStoreBinding.lastFetchedCurrentQuests;
object2.lastFetchedCurrentQuests = lastFetchedCurrentQuests;
value4 = global.Date.now();
lastFetchedCurrentQuests = questStoreBinding.lastFetchedCurrentQuests;
object2.msSinceLastFetch = value4 - lastFetchedCurrentQuests;
object2.isFetchingCurrentQuests = questStoreBinding.isFetchingCurrentQuests;
Reflect.apply(addBreadcrumb, defaultImport, [{'category': 'quests.fetch',
'message': 'QuestFetchManager._fetch triggered', data: object2}]);
(require(9484) /* metro dependency 9484: QuestActionCreators */).fetchCurrentQuests();
r3 = (require(477) /* metro dependency 477: PlatformUtils */).isMac() && (importDefault(9493) /* metro dependency 9493: DiscordAppStateNative */).getState() !== 'focused';
if (!r3) {
defaultImport3 = importDefault(7108) /* metro dependency 7108: NewAdRequestBehaviorExperiment */;
r3 = defaultImport3.getConfig({location: 'QuestFetchManager'}).enableNewRequestBehavior;
}
if (!r3) {
value = require(9484) /* metro dependency 9484: QuestActionCreators */;
value.fetchQuestToDeliver((require(6531) /* metro dependency 6531: QuestTypes */).QuestPlacement.MOBILE_HOME_DOCK_AREA,
a0);
}
}
}
}
}
function handleQuestsFetchCurrentQuestsBegin() { // fn#124821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:983, owner: QuestFetchManager.handleQuestsFetchCurrentQuestsBegin, offset: 0x025c403f, size: 34 bytes, params: 1, frame: 10
const binding = env0_0;
const Date = global.Date;
binding.lastFetchAttemptedAt = Date.now();
}
function QuestFetchManagerHandlePostConnectionOpen() { // fn#124822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:1050, owner: QuestFetchManager.handlePostConnectionOpen, offset: 0x025c4061, size: 305 bytes, params: 1, frame: 19
let window = global.window;
const clearTimeout = window.clearTimeout;
const binding = env0_0;
Reflect.apply(clearTimeout, window, [binding.initialFetchTimerId]);
window = global.window;
window.clearTimeout(binding.initialQuestHomeHeroFetchTimerId);
window = global.window;
window.clearTimeout(binding.recurringFetchTimerId);
window = global.window;
binding.recurringFetchTimerId = window.setInterval(_fun124823, env2_10);
let Math = global.Math;
const floor = Math.floor;
const Math2 = global.Math;
const value4 = Reflect.apply(floor, Math, [Math2.random() * env2_11]);
binding.initialFetchTimerId = global.window.setTimeout(_fun124824, value4);
const questsEligibilityModule = require(9479) /* metro dependency 9479: QuestsEligibility */;
const getIsEligibleForQuests = questsEligibilityModule.getIsEligibleForQuests;
if (Reflect.apply(getIsEligibleForQuests, questsEligibilityModule, [])) {
Math = global.Math;
env0_0.initialQuestHomeHeroFetchTimerId = global.window.setTimeout(_fun124825,
value4 + Math.floor(global.Math.random() * env2_11));
}
}
function QuestFetchManagerHandleUserSettingsProtoUpdate({partial, settings, wasSaved}) { // fn#124827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:1734, owner: QuestFetchManager.handleUserSettingsProtoUpdate, offset: 0x025c4249, size: 152 bytes, params: 2, frame: 12
var value4;
var binding;
let value = 'localization' in settings.proto;
let r0 = value ? !partial : !value;
r0 = !r0 ? wasSaved : r0;
if (!r0) {
value = global.Date.now();
value -= env0_0.lastFetchedQuestForLocaleChangeAt;
value4 = environment.__proto__.__proto__;
value = value <= env2_12;
r0 = value;
}
if (!r0) {
binding = env0_0;
binding.lastFetchedQuestForLocaleChangeAt = global.Date.now();
binding._fetch('user_settings');
}
}
function QuestFetchManagerHandleLogout() { // fn#124828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:1950, owner: QuestFetchManager.handleLogout, offset: 0x025c42e1, size: 96 bytes, params: 1, frame: 13
let window = global.window;
const clearTimeout = window.clearTimeout;
const binding = env0_0;
Reflect.apply(clearTimeout, window, [binding.initialFetchTimerId]);
window = global.window;
window.clearTimeout(binding.initialQuestHomeHeroFetchTimerId);
window = global.window;
window.clearTimeout(binding.recurringFetchTimerId);
binding.lastFetchAttemptedAt = 0;
binding.lastFetchedQuestForLocaleChangeAt = 0;
}
function _fun124823() { // fn#124823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:1243, offset: 0x025c4192, size: 70 bytes, params: 1, frame: 11
const Date = global.Date;
let value = Date.now();
value -= env1_0.lastFetchAttemptedAt;
if (value > DAY) {
env1_0._fetch('post_connect_recurring');
}
}
function _fun124824() { // fn#124824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:1403, offset: 0x025c41d8, size: 70 bytes, params: 1, frame: 11
const Date = global.Date;
let value = Date.now();
value -= QuestStore.lastFetchedCurrentQuests;
if (!(value <= env3_13)) {
value = environment.__proto__;
env1_0._fetch('post_connect_initial');
}
}
function _fun124825() { // fn#124825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:1612, offset: 0x025c421e, size: 43 bytes, params: 1, frame: 11
var value;
var property;
var error;
try {
value = environment.__proto__.__proto__.__proto__;
property = dependencyMap[8];
value = require(property);
value.fetchQuestHomeHero();
} catch (error) {
}
}
global.__d(_fun124815, 16152, [6, 7, 15, 17, 18, 7093, 672, 9479, 9484, 1216, 477, 9493, 7108, 6531, 4860,
2]) /* metro module 16152, dependencies: [6, 7, 15, 17, 18, 7093, 672, 9479, 9484, 1216, 477, 9493, 7108, 6531, 4860, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -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] */;
Loaded 100 of 22448 files, more files were not shown because too many files have changed in this diff. Show more