Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
/* Metro module 4225; source: modules/billing/Constants.tsx; dependencies: [2] */
function _fun34705(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#34705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4396:6, offset: 0x0105fb38, size: 88 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/Constants.tsx');
exports.StripeErrorTypes = ['api_connection_error', 'api_error', 'authentication_error', 'card_error',
'idempotency_error', 'invalid_request_error', 'rate_limit_error', 'validation_error'];
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,79 @@
/* Metro module 4228; source: modules/billing/actions/StripeActionCreators.tsx; dependencies: [5, 661, 507, 2] */
function _fun34891(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#34891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4399:6, offset: 0x010652e6, size: 158 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).Endpoints;
const value = _fun34895();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/actions/StripeActionCreators.tsx');
exports.createStripeSetupIntent = function() {
return _createStripeSetupIntent.apply(this, arguments);
};
exports.createSetupIntentForPaymentElements = value;
}
function _createStripeSetupIntent() { // fn#34892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4399:126, offset: 0x01065384, size: 48 bytes, params: 1, frame: 14
return env0_2(_fun34894).apply(this, arguments);
}
function _fun34895() { // fn#34895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4399:367, offset: 0x01065448, size: 32 bytes, params: 1, frame: 12
const env0_0 = env0_2(_fun34897);
return _fun34898;
}
async function _fun34894() { // fn#34894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4399:197, offset: 0x010653c6, size: 130 bytes, params: 1, frame: 17
let value = a0;
if (false) {
return undefined;
}
const r5 = value !== undefined ? value : {};
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const binding = env2_0;
const binding2 = env2_1;
const HTTP = binding(binding2[2]).HTTP;
const post = HTTP.post;
const object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': true};
const BILLING_STRIPE_SETUP_INTENT_SECRET = env2_3.BILLING_STRIPE_SETUP_INTENT_SECRET;
object2.url = BILLING_STRIPE_SETUP_INTENT_SECRET;
copyDataProperties(object2, r5, binding2);
await Reflect.apply(post, HTTP, [object2]);
value = undefined;
if (false) {
return value;
}
return value.body;
}
async function _fun34897() { // fn#34897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4399:387, offset: 0x0106547a, size: 130 bytes, params: 1, frame: 17
let value = a0;
if (false) {
return undefined;
}
const r5 = value !== undefined ? value : {};
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const binding = env2_0;
const binding2 = env2_1;
const HTTP = binding(binding2[2]).HTTP;
const post = HTTP.post;
const object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': true,
'failImmediatelyWhenRateLimited': true};
const BILLING_STRIPE_SETUP_INTENT_SECRET_FOR_PAYMENT_ELEMENTS = env2_3.BILLING_STRIPE_SETUP_INTENT_SECRET_FOR_PAYMENT_ELEMENTS;
object2.url = BILLING_STRIPE_SETUP_INTENT_SECRET_FOR_PAYMENT_ELEMENTS;
copyDataProperties(object2, r5, binding2);
await Reflect.apply(post, HTTP, [object2]);
value = undefined;
if (false) {
return value;
}
return value.body;
}
@@ -0,0 +1,51 @@
/* Metro module 7256; source: modules/billing/errors/InvalidGooglePlayPurchase.tsx; dependencies: [7, 6, 15, 17, 18, 3824, 2] */
function _fun58297(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7434:6, offset: 0x016c447f, size: 194 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(7) /* metro dependency 7 */;
const env0_1 = importDefault(6) /* metro dependency 6 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(3824) /* metro dependency 3824: BillingError */;
value = _fun58301(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/errors/InvalidGooglePlayPurchase.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_58298() { // fn#58298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7434:148, offset: 0x016c4541, 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_58298_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun58301(a0) { // fn#58301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7434:347, offset: 0x016c459f, size: 40 bytes, params: 2, frame: 14
const closure = InvalidGooglePlayPurchase;
env0_4(closure, a0);
return env0_0(closure);
}
@@ -0,0 +1,50 @@
/* Metro module 7035; source: modules/billing/experiments/BlockedPaymentsCountryExperiment.tsx; dependencies: [4620, 1854, 7036, 2] */
function _fun55741(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7213:6, offset: 0x013b09c0, size: 283 bytes, params: 8, frame: 24
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(4620) /* metro dependency 4620: experiments */).createExperiment({'kind': 'user',
'id': '2022-03_block_russian_purchases', 'label': 'Block purchases based on country',
defaultConfig: {paymentsBlocked: false}, treatments: [{'id': 1, 'label': 'Payments Blocked',
config: {paymentsBlocked: true}}]});
const env0_3 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2026-03-block-purchases',
'kind': 'user', defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/experiments/BlockedPaymentsCountryExperiment.tsx');
exports.useBlockedPaymentsConfig = useBlockedPaymentsConfig;
exports.useIsPaymentsBlocked = useIsPaymentsBlocked;
exports.getIsPaymentsBlocked = getIsPaymentsBlocked;
}
function useBlockedPaymentsConfig() { // fn#55742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7213:581, offset: 0x013b0adb, size: 123 bytes, params: 1, frame: 16
let binding = env0_2;
const useExperiment = binding.useExperiment;
const paymentsBlocked = Reflect.apply(useExperiment, binding, [{location: 'c519a9_1'},
{autoTrackExposure: false}]).paymentsBlocked;
binding = env0_3;
const useConfig = binding.useConfig;
const enabled = Reflect.apply(useConfig, binding, [{location: 'c519a9_1'}]).enabled;
const defaultBillingCountryCode = (importDefault(7036) /* metro dependency 7036: useGeoForUserNative */)().defaultBillingCountryCode;
let r0 = paymentsBlocked || enabled;
r0 = !r0 ? defaultBillingCountryCode === 'RU' : r0;
return r0;
}
function useIsPaymentsBlocked() { // fn#55743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7213:830, offset: 0x013b0b56, size: 80 bytes, params: 1, frame: 16
let binding = env0_2;
const useExperiment = binding.useExperiment;
const paymentsBlocked = Reflect.apply(useExperiment, binding, [{location: 'dc120b_3'},
{autoTrackExposure: false}]).paymentsBlocked;
binding = env0_3;
const useConfig = binding.useConfig;
return paymentsBlocked || Reflect.apply(useConfig, binding, [{location: 'dc120b_3'}]).enabled;
}
function getIsPaymentsBlocked() { // fn#55744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7213:1027, offset: 0x013b0ba6, size: 80 bytes, params: 1, frame: 16
let binding = env0_2;
const getCurrentConfig = binding.getCurrentConfig;
const paymentsBlocked = Reflect.apply(getCurrentConfig, binding, [{location: '1ee357_1'},
{autoTrackExposure: false}]).paymentsBlocked;
binding = env0_3;
const getConfig = binding.getConfig;
return paymentsBlocked || Reflect.apply(getConfig, binding, [{location: '1ee357_1'}]).enabled;
}
@@ -0,0 +1,18 @@
/* Metro module 7012; source: modules/billing/experiments/GiftCardsExperiment.tsx; dependencies: [1854, 2] */
function _fun55537(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7190:6, offset: 0x013a996a, size: 162 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
value = value.createApexExperiment({'name': '2026-02-gift-cards', 'kind': 'user', defaultConfig: {enabled: false},
variations: {[1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/experiments/GiftCardsExperiment.tsx');
exports.default = value;
exports.useGiftCardsExperimentConfig = useGiftCardsExperimentConfig;
}
function useGiftCardsExperimentConfig(a0) { // fn#55538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7190:355, offset: 0x013a9a0c, size: 34 bytes, params: 2, frame: 12
const binding = env0_0;
const useConfig = binding.useConfig;
return {enabled: Reflect.apply(useConfig, binding, [a0]).enabled};
}
@@ -0,0 +1,13 @@
/* Metro module 6852; source: modules/billing/experiments/StoreCountryExperiment.tsx; dependencies: [1854, 2] */
function _fun54063(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7030:6, offset: 0x0135bc73, size: 187 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
value = value.createApexExperiment({'name': '2026-03-store-country', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[0]: {enabled: false}, [1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/experiments/StoreCountryExperiment.tsx');
exports.StoreCountryExperiment = value;
exports.useIsStoreCountryExperimentEnabled = useIsStoreCountryExperimentEnabled;
exports.getIsStoreCountryExperimentEnabled = getIsStoreCountryExperimentEnabled;
}
@@ -0,0 +1,132 @@
/* Metro module 12192; source: modules/billing/hooks/useFPDurationLeft.tsx; dependencies: [1244, 7054, 3826, 1216, 2] */
function _fun93405(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12378:6, offset: 0x020b23ea, size: 213 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const closure = roundFPCountdownUnits;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {SHORT_TIME_LEFT: 0};
object2[0] = 'SHORT_TIME_LEFT';
object2.LONG_TIME_LEFT = 1;
object2[1] = 'LONG_TIME_LEFT';
object2.ENDS_IN = 2;
object2[2] = 'ENDS_IN';
object2.SHORT_TIME = 3;
object2[3] = 'SHORT_TIME';
object2.CREDITS_ENDS_IN = 4;
object2[4] = 'CREDITS_ENDS_IN';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/hooks/useFPDurationLeft.tsx');
exports.default = useFPDurationLeft;
exports.CountDownMessageTypes = object2;
exports.roundFPCountdownUnits = closure;
}
function roundFPCountdownUnits(a0) { // fn#93406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12378:301, offset: 0x020b24bf, size: 379 bytes, params: 2, frame: 15
var r5;
var r1;
const object2 = {};
copyDataProperties(object2, a0, r5);
const seconds = object2.seconds;
const value = 0;
if (seconds > value) {
object2.minutes = object2.minutes + 1;
object2.seconds = value;
}
if (object2.minutes === 60) {
object2.hours = object2.hours + 1;
object2.minutes = value;
}
if (object2.hours === 24) {
object2.days = object2.days + 1;
object2.hours = value;
}
if (object2.days > value) {
return {'days': null, 'hours': 0, 'minutes': 0, 'seconds': 0,
days: object2.hours > value ? object2.days + 1 : object2.days};
}
if (object2.hours > value) {
r1 = object2.minutes > 45 ? object2.hours + 1 : object2.hours;
return r1 > 11 ? {'days': 1, 'hours': 0, 'minutes': 0, 'seconds': 0} : {'days': 0, 'hours': null, 'minutes': 0,
'seconds': 0, hours: r1};
}
let minutes = object2.minutes;
if (minutes > value) {
minutes = object2.minutes;
r5 = minutes > 45 ? 1 : value;
minutes = r5 === 1 ? value : object2.minutes;
return {days: value, hours: r5, minutes: minutes, seconds: value};
}
return object2.seconds > value ? {'days': 0, 'hours': 0, 'minutes': 1, 'seconds': 0} : object2;
}
function useFPDurationLeft(a0, a1) { // fn#93407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12378:946, offset: 0x020b263a, size: 782 bytes, params: 3, frame: 20
var object;
var r0;
var error;
const t = require(dependencyMap[0]).t;
var property;
var moduleValue;
var unitsAsStrings;
var value6;
var captureMessage;
let value = environment;
const SHORT_TIME_LEFT = env0_3.SHORT_TIME_LEFT;
if (SHORT_TIME_LEFT === a1) {
object = {days: t['/wnvqA'], hours: t.Jsq0XN, minutes: t['SBd+Bs']};
} else if (env0_3.LONG_TIME_LEFT === a1) {
object = {days: t.UD5nn5, hours: t.Hg8Fee, minutes: t.XSbQZZ};
} else if (env0_3.ENDS_IN === a1) {
object = {days: t.rLqNad, hours: t.d1LvCA, minutes: t.Z2LX7K};
} else if (env0_3.CREDITS_ENDS_IN === a1) {
object = {days: t.xQ3zuN, hours: t.SFU7QN, minutes: t.Y4FNdL};
} else {
if (env0_3.SHORT_TIME !== a1) {
throw new global.Error('Unknown messageType (' + a1 + ') when rendering time left');
}
object = {days: t.fYmirx, hours: t['C3RO+g'], minutes: t.r77oHc};
}
const value4 = roundFPCountdownUnits(importDefault(dependencyMap[1])(a0.toDate(), 60000));
reducibleJoin13: while (true) {
reduciblePort20: while (true) {
exceptionLanding19: while (true) {
try {
} catch (error) {
break exceptionLanding19;
}
break reducibleJoin13;
}
value = importDefault(dependencyMap[3]);
captureMessage = value.captureMessage;
Reflect.apply(captureMessage, value, ['Error trying to format string for fractional nitro duration pill']);
r0 = '';
break reduciblePort20;
}
return r0;
}
try {
} catch (error) {
break exceptionLanding19;
}
try {
property = dependencyMap[2];
} catch (error) {
break exceptionLanding19;
}
try {
moduleValue = require(property);
} catch (error) {
break exceptionLanding19;
}
try {
unitsAsStrings = moduleValue.unitsAsStrings;
} catch (error) {
break exceptionLanding19;
}
try {
value6 = Reflect.apply(unitsAsStrings, moduleValue, [value4, object]);
} catch (error) {
break exceptionLanding19;
}
return value6;
}
@@ -0,0 +1,290 @@
/* Metro module 5180; source: modules/billing/hooks/useFractionalPremiumInfo.tsx; dependencies: [57, 31, 1878, 3808, 5181, 661, 1880, 3738, 44, 3817, 3802, 566, 4594, 5182, 22, 2] */
function _fun45601(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5358:6, offset: 0x01192fa0, size: 284 bytes, params: 8, frame: 19
const env0_0 = require;
const shouldFetchRedemptionEntitlements = function(a0, a1) {
return a1 != null && !EntitlementStore.fetchingAllEntitlements && (EntitlementStore.fetchedAllEntitlements ? a0 : !EntitlementStore.fetchedAllEntitlements);
};
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 userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
const entitlementStore = importDefault(5181) /* metro dependency 5181: EntitlementStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_8 = value.EntitlementSourceTypes;
const env0_9 = value.EntitlementTypes;
const env0_10 = value.SubscriptionStatusTypes;
value = require(1880) /* metro dependency 1880: PremiumConstants */;
const env0_11 = value.FractionalPremiumStates;
const env0_12 = value.PREMIUM_SUBSCRIPTION_APPLICATION;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/hooks/useFractionalPremiumInfo.tsx');
exports.default = useFractionalPremiumInfo;
}
function shouldFetchApplicationEntitlements(a0) { // fn#45603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5358:1869, offset: 0x011930f9, size: 77 bytes, params: 2, frame: 12
return a0 != null && !EntitlementStore.applicationIdsFetching.has(PREMIUM_SUBSCRIPTION_APPLICATION) && !EntitlementStore.applicationIdsFetched.has(PREMIUM_SUBSCRIPTION_APPLICATION);
}
function calculateFractionalPremiumInfo({isFetching, entitlements, unactivatedFractionalPremiumUnits, currentUser, premiumSubscription, fetchedAllEntitlements, excludeReverseTrialFromCountdown}) { // fn#45604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5358:342, offset: 0x01193146, size: 839 bytes, params: 2, frame: 31
var r10;
var r14;
var r19;
var value7;
var defaultImport3;
var moduleValue;
var Array;
var object2;
const value = undefined;
isFetching = !(isFetching === value) && isFetching;
let object4 = {isFractionalPremiumActive: false};
const NONE = FractionalPremiumStates.NONE;
object4.fractionalState = NONE;
object4.startsAt = (importDefault(3738) /* metro dependency 3738 */)(0);
object4.endsAt = (importDefault(3738) /* metro dependency 3738 */)(0);
const value4 = '';
object4.currentEntitlementId = value4;
object4.currentEntitlementEndsAt = (importDefault(3738) /* metro dependency 3738 */)(0);
object4.unactivatedUnits = [];
object4.fetched = fetchedAllEntitlements;
if (isFetching) {
object2 = {};
copyDataProperties(object2, object4, undefined);
object2['fetched'] = false;
return object2;
}
if (currentUser != null) {
if (entitlements.length !== 0) {
value7 = entitlements.filter(function(a0) {
return a0.endsAt != null && a0.startsAt != null;
}).sort(_fun45606);
value7.reverse();
if (value7.length > 0) {
if (value7.length !== entitlements.length) {
Array = global.Array;
(require(3817) /* metro dependency 3817: BillingUtils */).captureBillingMessage('fractional redemption entitlements should have startsAt/endsAt',
{extra: {entitlementIds: Array.from(entitlements.values()).map(_fun45607)}});
throw new global.Error('fractional redemption entitlements should have startsAt/endsAt');
}
if (value7[0].startsAt == null) {
Array = global.Array;
(require(3817) /* metro dependency 3817: BillingUtils */).captureBillingMessage('fractional redemption entitlements should have startsAt/endsAt',
{extra: {entitlementIds: Array.from(entitlements.values()).map(_fun45607)}});
throw new global.Error('fractional redemption entitlements should have startsAt/endsAt');
}
if (value7[0].endsAt == null) {
Array = global.Array;
(require(3817) /* metro dependency 3817: BillingUtils */).captureBillingMessage('fractional redemption entitlements should have startsAt/endsAt',
{extra: {entitlementIds: Array.from(entitlements.values()).map(_fun45607)}});
throw new global.Error('fractional redemption entitlements should have startsAt/endsAt');
}
r10 = value7[0] ?? null;
r14 = r10 == null ? FractionalPremiumStates.NONE : premiumSubscription == null ? FractionalPremiumStates.FP_ONLY : premiumSubscription.status === SubscriptionStatusTypes.PAUSED ? FractionalPremiumStates.FP_SUB_PAUSED : FractionalPremiumStates.FP_ONLY;
r19 = excludeReverseTrialFromCountdown && (r10 == null ? value : r10.sourceType) === EntitlementSourceTypes.REVERSE_TRIAL;
object4 = {isFractionalPremiumActive: r10 != null, fractionalState: r14};
r14 = r10 != null ? (importDefault(3738) /* metro dependency 3738 */)(r10.startsAt) : (importDefault(3738) /* metro dependency 3738 */)(0);
object4.startsAt = r14;
if (r10 != null) {
defaultImport3 = importDefault(3738) /* metro dependency 3738 */;
moduleValue = require(3802) /* metro dependency 3802: PremiumUtils */;
r14 = defaultImport3(moduleValue.extendDateWithUnconsumedFractionalPremium(r10.endsAt,
unactivatedFractionalPremiumUnits, value, r19));
} else {
r14 = (importDefault(3738) /* metro dependency 3738 */)(0);
}
object4.endsAt = r14;
object4.currentEntitlementId = r10 != null ? r10.id : value4;
object4.currentEntitlementEndsAt = r10 != null ? (importDefault(3738) /* metro dependency 3738 */)(r10.endsAt) : (importDefault(3738) /* metro dependency 3738 */)(0);
object4.unactivatedUnits = unactivatedFractionalPremiumUnits;
object4.fetched = fetchedAllEntitlements;
return object4;
}
r10 = value7[0] ?? null;
r14 = r10 == null ? FractionalPremiumStates.NONE : premiumSubscription == null ? FractionalPremiumStates.FP_ONLY : premiumSubscription.status === SubscriptionStatusTypes.PAUSED ? FractionalPremiumStates.FP_SUB_PAUSED : FractionalPremiumStates.FP_ONLY;
r19 = excludeReverseTrialFromCountdown && (r10 == null ? value : r10.sourceType) === EntitlementSourceTypes.REVERSE_TRIAL;
object4 = {isFractionalPremiumActive: r10 != null, fractionalState: r14};
r14 = r10 != null ? (importDefault(3738) /* metro dependency 3738 */)(r10.startsAt) : (importDefault(3738) /* metro dependency 3738 */)(0);
object4.startsAt = r14;
if (r10 != null) {
defaultImport3 = importDefault(3738) /* metro dependency 3738 */;
moduleValue = require(3802) /* metro dependency 3802: PremiumUtils */;
r14 = defaultImport3(moduleValue.extendDateWithUnconsumedFractionalPremium(r10.endsAt,
unactivatedFractionalPremiumUnits, value, r19));
} else {
r14 = (importDefault(3738) /* metro dependency 3738 */)(0);
}
object4.endsAt = r14;
object4.currentEntitlementId = r10 != null ? r10.id : value4;
object4.currentEntitlementEndsAt = r10 != null ? (importDefault(3738) /* metro dependency 3738 */)(r10.endsAt) : (importDefault(3738) /* metro dependency 3738 */)(0);
object4.unactivatedUnits = unactivatedFractionalPremiumUnits;
object4.fetched = fetchedAllEntitlements;
return object4;
}
if (unactivatedFractionalPremiumUnits.length === 0) {
return object4;
}
value7 = entitlements.filter(function(a0) {
return a0.endsAt != null && a0.startsAt != null;
}).sort(_fun45606);
value7.reverse();
if (value7.length > 0) {
if (value7.length !== entitlements.length) {
Array = global.Array;
(require(3817) /* metro dependency 3817: BillingUtils */).captureBillingMessage('fractional redemption entitlements should have startsAt/endsAt',
{extra: {entitlementIds: Array.from(entitlements.values()).map(function(a0) {
return a0.id;
})}});
throw new global.Error('fractional redemption entitlements should have startsAt/endsAt');
}
if (value7[0].startsAt == null) {
Array = global.Array;
(require(3817) /* metro dependency 3817: BillingUtils */).captureBillingMessage('fractional redemption entitlements should have startsAt/endsAt',
{extra: {entitlementIds: Array.from(entitlements.values()).map(_fun45607)}});
throw new global.Error('fractional redemption entitlements should have startsAt/endsAt');
}
if (value7[0].endsAt == null) {
Array = global.Array;
(require(3817) /* metro dependency 3817: BillingUtils */).captureBillingMessage('fractional redemption entitlements should have startsAt/endsAt',
{extra: {entitlementIds: Array.from(entitlements.values()).map(_fun45607)}});
throw new global.Error('fractional redemption entitlements should have startsAt/endsAt');
}
r10 = value7[0] ?? null;
r14 = r10 == null ? FractionalPremiumStates.NONE : premiumSubscription == null ? FractionalPremiumStates.FP_ONLY : premiumSubscription.status === SubscriptionStatusTypes.PAUSED ? FractionalPremiumStates.FP_SUB_PAUSED : FractionalPremiumStates.FP_ONLY;
r19 = excludeReverseTrialFromCountdown && (r10 == null ? value : r10.sourceType) === EntitlementSourceTypes.REVERSE_TRIAL;
object4 = {isFractionalPremiumActive: r10 != null, fractionalState: r14};
r14 = r10 != null ? (importDefault(3738) /* metro dependency 3738 */)(r10.startsAt) : (importDefault(3738) /* metro dependency 3738 */)(0);
object4.startsAt = r14;
if (r10 != null) {
defaultImport3 = importDefault(3738) /* metro dependency 3738 */;
moduleValue = require(3802) /* metro dependency 3802: PremiumUtils */;
r14 = defaultImport3(moduleValue.extendDateWithUnconsumedFractionalPremium(r10.endsAt,
unactivatedFractionalPremiumUnits, value, r19));
} else {
r14 = (importDefault(3738) /* metro dependency 3738 */)(0);
}
object4.endsAt = r14;
object4.currentEntitlementId = r10 != null ? r10.id : value4;
object4.currentEntitlementEndsAt = r10 != null ? (importDefault(3738) /* metro dependency 3738 */)(r10.endsAt) : (importDefault(3738) /* metro dependency 3738 */)(0);
object4.unactivatedUnits = unactivatedFractionalPremiumUnits;
object4.fetched = fetchedAllEntitlements;
return object4;
}
r10 = value7[0] ?? null;
r14 = r10 == null ? FractionalPremiumStates.NONE : premiumSubscription == null ? FractionalPremiumStates.FP_ONLY : premiumSubscription.status === SubscriptionStatusTypes.PAUSED ? FractionalPremiumStates.FP_SUB_PAUSED : FractionalPremiumStates.FP_ONLY;
r19 = excludeReverseTrialFromCountdown && (r10 == null ? value : r10.sourceType) === EntitlementSourceTypes.REVERSE_TRIAL;
object4 = {isFractionalPremiumActive: r10 != null, fractionalState: r14};
r14 = r10 != null ? (importDefault(3738) /* metro dependency 3738 */)(r10.startsAt) : (importDefault(3738) /* metro dependency 3738 */)(0);
object4.startsAt = r14;
if (r10 != null) {
defaultImport3 = importDefault(3738) /* metro dependency 3738 */;
moduleValue = require(3802) /* metro dependency 3802: PremiumUtils */;
r14 = defaultImport3(moduleValue.extendDateWithUnconsumedFractionalPremium(r10.endsAt,
unactivatedFractionalPremiumUnits, value, r19));
} else {
r14 = (importDefault(3738) /* metro dependency 3738 */)(0);
}
object4.endsAt = r14;
object4.currentEntitlementId = r10 != null ? r10.id : value4;
object4.currentEntitlementEndsAt = r10 != null ? (importDefault(3738) /* metro dependency 3738 */)(r10.endsAt) : (importDefault(3738) /* metro dependency 3738 */)(0);
object4.unactivatedUnits = unactivatedFractionalPremiumUnits;
object4.fetched = fetchedAllEntitlements;
}
return object4;
}
function useFractionalPremiumInfo() { // fn#45608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5358:2094, offset: 0x01193525, size: 532 bytes, params: 1, frame: 26
const value = a0;
const r0 = value !== undefined ? value : {'forceFetch': false, 'excludeReverseTrial': false,
'excludeReverseTrialFromCountdown': false};
const forceFetch = r0.forceFetch;
const env0_1 = r0.excludeReverseTrial;
const excludeReverseTrialFromCountdown = r0.excludeReverseTrialFromCountdown;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const env0_3 = currentUser;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([EntitlementStore],
function() {
return EntitlementStore.getFractionalPremium({excludeReverseTrial: excludeReverseTrial});
});
const env0_4 = value2;
const fetchedAllEntitlements = (require(566) /* metro dependency 566: flux */).useStateFromStores([EntitlementStore],
function() {
return EntitlementStore.fetchedAllEntitlements;
});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([EntitlementStore],
function() {
return EntitlementStore.getUnactivatedFractionalPremiumUnits();
});
const premiumTypeSubscription = (require(566) /* metro dependency 566: flux */).useStateFromStores([SubscriptionStore],
function() {
return SubscriptionStore.getPremiumTypeSubscription();
});
const binding = env0_4;
const useState = binding.useState;
const calculateFractionalPremiumInfoBinding = calculateFractionalPremiumInfo;
let r13 = shouldFetchRedemptionEntitlements(forceFetch, currentUser) || EntitlementStore.fetchingAllEntitlements;
r13 = !r13 ? shouldFetchApplicationEntitlements(currentUser) : r13;
r13 = !r13 ? EntitlementStore.applicationIdsFetching.has(PREMIUM_SUBSCRIPTION_APPLICATION) : r13;
const value6 = env0_3(Reflect.apply(useState, binding, [calculateFractionalPremiumInfoBinding({isFetching: r13,
entitlements: value2, unactivatedFractionalPremiumUnits: value3, currentUser: currentUser,
premiumSubscription: premiumTypeSubscription, fetchedAllEntitlements: fetchedAllEntitlements,
excludeReverseTrialFromCountdown: excludeReverseTrialFromCountdown})]), 2);
const property = value6[0];
const env0_8 = value6[1];
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun45614);
env0_4.useEffect(_fun45615, [currentUser, value2, premiumTypeSubscription, value3, fetchedAllEntitlements,
excludeReverseTrialFromCountdown]);
return property;
}
function _fun45606(a0, a1) { // fn#45606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5358:838, offset: 0x011934ab, size: 122 bytes, params: 3, frame: 16
const value = environment.__proto__;
(importDefault(44) /* metro dependency 44 */)(a0.endsAt != null && a1.endsAt != null, 'endsAt should not be null');
return a0.endsAt < a1.endsAt ? -1 : a0.endsAt > a1.endsAt ? 1 : 0;
}
function _fun45614() { // fn#45614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5358:3043, offset: 0x011937a2, size: 130 bytes, params: 1, frame: 16
if (shouldFetchRedemptionEntitlements(forceFetch, currentUser)) {
(require(5182) /* metro dependency 5182: EntitlementActionCreators */).fetchUserEntitlements({entitlementType: EntitlementTypes.FRACTIONAL_REDEMPTION});
}
if (shouldFetchApplicationEntitlements(currentUser)) {
(require(5182) /* metro dependency 5182: EntitlementActionCreators */).fetchUserEntitlementsForApplication(PREMIUM_SUBSCRIPTION_APPLICATION);
}
}
function _fun45615() { // fn#45615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5358:3265, offset: 0x01193824, size: 95 bytes, params: 1, frame: 13
const env0_0 = calculateFractionalPremiumInfo({entitlements: env0_4, unactivatedFractionalPremiumUnits: env0_6,
currentUser: currentUser, premiumSubscription: premiumTypeSubscription,
fetchedAllEntitlements: fetchedAllEntitlements,
excludeReverseTrialFromCountdown: excludeReverseTrialFromCountdown});
env0_8(_fun45616);
}
function _fun45616(a0) { // fn#45616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5358:3460, offset: 0x01193883, size: 56 bytes, params: 2, frame: 14
const value = a0;
const moduleValue = require(22) /* metro dependency 22 */;
return moduleValue.isEqual(value, env0_0) ? value : env0_0;
}
@@ -0,0 +1,285 @@
/* Metro module 7563; source: modules/billing/hooks/useSubscriptionPlansLoaded.tsx; dependencies: [3805, 3807, 3808, 1880, 3, 566, 2] */
function _fun60805(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7741:6, offset: 0x017103df, size: 230 bytes, params: 8, frame: 20
const env0_0 = require;
const _arrayLikeToArray_60808 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const closure = getSubscriptionPlansLoaded;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const paymentSourceStore = importDefault(3805) /* metro dependency 3805: PaymentSourceStore */;
const subscriptionPlanStore = importDefault(3807) /* metro dependency 3807: SubscriptionPlanStore */;
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
const env0_5 = (require(1880) /* metro dependency 1880: PremiumConstants */).ACTIVE_PREMIUM_SKUS;
const logger = importDefault(3) /* metro dependency 3: Logger */;
Object.create(logger.prototype, {constructor: {value: logger}});
new logger('useSubscriptionPlansLoaded');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/hooks/useSubscriptionPlansLoaded.tsx');
exports.useSubscriptionPlansLoaded = useSubscriptionPlansLoaded;
exports.getSubscriptionPlansLoaded = closure;
}
function _createForOfIteratorHelperLoose_60806(a0, a1) { // fn#60806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7741:161, offset: 0x017104c5, 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)) {
if (r1) {
}
return _fun60807;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_60808(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') {
value = _arrayLikeToArray_60808(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_60808(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun60807;
}
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 getSubscriptionPlansLoaded() { // fn#60809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7741:1114, offset: 0x01710637, size: 327 bytes, params: 1, frame: 20
var r6;
var r0;
var r1;
var r2;
var r4;
var r7;
var paymentSourceId;
var items2;
var item3;
var item4;
var hasPaymentSourceForSKUIds;
var value8;
var value9;
let value = a0;
const value2 = a1;
const value3 = undefined;
reducibleJoin2: while (true) {
if (value !== value3) {
r6 = value;
break reducibleJoin2;
}
value = environment;
items2 = [];
arraySpread(items2, ACTIVE_PREMIUM_SKUS, 0, undefined);
r6 = items2;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (value2 !== value3) {
r0 = value2;
break reducibleJoin4;
}
value = environment;
r0 = [PaymentSourceStore, SubscriptionPlanStore, SubscriptionStore];
break reducibleJoin4;
}
const iterator = r0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
r0 = item2 === value3 ? value3 : item;
reducibleJoin7: while (true) {
if (value) {
r1 = item2;
r2 = value;
r4 = value3;
break reducibleJoin7;
}
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value = item3 === value3;
if (value) {
r1 = item3;
r2 = value;
r4 = value3;
break reducibleJoin7;
}
r1 = item3;
r2 = value;
r4 = item;
break reducibleJoin7;
}
reducibleJoin9: while (true) {
if (r2) {
r7 = value3;
break reducibleJoin9;
}
item4 = Reflect.apply(iterator2, r1, []);
item = item4.value;
item4 = item4.done ? undefined : r1;
value = item4 === value3;
if (value) {
r1 = item4;
r2 = value;
r7 = value3;
break reducibleJoin9;
}
r1 = item4;
r2 = value;
r7 = item;
break reducibleJoin9;
}
reducibleJoin11: while (true) {
if (r2) {
break reducibleJoin11;
}
r1.return();
break reducibleJoin11;
}
const paymentSourceIds = r0.paymentSourceIds;
const defaultPaymentSourceId = r0.defaultPaymentSourceId;
value = r4.isLoadedForSKUs(r6);
const premiumTypeSubscription = r7.getPremiumTypeSubscription();
reducibleJoin13: while (true) {
if (premiumTypeSubscription == null) {
paymentSourceId = value3;
break reducibleJoin13;
}
paymentSourceId = premiumTypeSubscription.paymentSourceId;
break reducibleJoin13;
}
if (paymentSourceId != null) {
hasPaymentSourceForSKUIds = r4.hasPaymentSourceForSKUIds;
reducibleJoin16: while (true) {
if (!Reflect.apply(hasPaymentSourceForSKUIds, r4, [paymentSourceId, r6])) {
return false;
}
break reducibleJoin16;
}
}
if (defaultPaymentSourceId != null) {
hasPaymentSourceForSKUIds = r4.hasPaymentSourceForSKUIds;
reducibleJoin19: while (true) {
if (!Reflect.apply(hasPaymentSourceForSKUIds, r4, [defaultPaymentSourceId, r6])) {
return false;
}
break reducibleJoin19;
}
}
const value6 = _createForOfIteratorHelperLoose_60806(paymentSourceIds);
const value7 = value6();
let done = value7.done;
if (!done) {
r2 = value7;
reducibleLoop20: while (true) {
value8 = r2.value;
hasPaymentSourceForSKUIds = r4.hasPaymentSourceForSKUIds;
if (!Reflect.apply(hasPaymentSourceForSKUIds, r4, [value8, r6])) {
return false;
}
value9 = value6();
done = value9.done;
if (done) {
return value;
}
r2 = value9;
continue reducibleLoop20;
}
}
return value;
}
function useSubscriptionPlansLoaded() { // fn#60810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7741:1680, offset: 0x0171077e, size: 116 bytes, params: 1, frame: 17
var r5;
var items2;
const value = a0;
if (value !== undefined) {
r5 = value;
} else {
items2 = [];
arraySpread(items2, ACTIVE_PREMIUM_SKUS, 0, undefined);
r5 = items2;
}
return (require(566) /* metro dependency 566: flux */).useStateFromStores([PaymentSourceStore,
SubscriptionPlanStore, SubscriptionStore], _fun60811, [r5]);
}
function _fun60811() { // fn#60811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7741:1770, offset: 0x017107f2, size: 52 bytes, params: 1, frame: 14
return getSubscriptionPlansLoaded(env0_0, [PaymentSourceStore, SubscriptionPlanStore, SubscriptionStore]);
}
@@ -0,0 +1,17 @@
/* Metro module 7334; source: modules/billing/native/ACOMExperiments.tsx; dependencies: [1854, 2] */
function _fun59040(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7512:6, offset: 0x016df8fe, size: 283 bytes, params: 8, frame: 24
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
value = value.createApexExperiment({'name': '2026-03-nitro-acom-subscription', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
const apexExperiment = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2026-03-acom-modify-dark-launch',
'kind': 'user', defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
const apexExperiment2 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2026-06-otp-acom-order',
'kind': 'user', defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/native/ACOMExperiments.tsx');
exports.NitroACOMSubscriptionExperiment = value;
exports.ACOMModifyDarkLaunchExperiment = apexExperiment;
exports.OTPACOMOrderExperiment = apexExperiment2;
}
@@ -0,0 +1,20 @@
/* Metro module 7361; source: modules/billing/native/BlockedPaymentsCountryActionSheet.tsx; dependencies: [31, 33, 6275, 7327, 2] */
function _fun59316(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7539:6, offset: 0x016e58b8, size: 136 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/native/BlockedPaymentsCountryActionSheet.tsx');
exports.default = BlockedPaymentsCountryActionSheet;
}
function BlockedPaymentsCountryActionSheet() { // fn#59317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7539:222, offset: 0x016e5940, size: 73 bytes, params: 1, frame: 16
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
return (
<BottomSheet>
{((Component) => <Component />)(importDefault(7327) /* metro dependency 7327: BlockedPaymentsCountryDisplay */)}
</BottomSheet>
);
}
@@ -0,0 +1,43 @@
/* Metro module 7327; source: modules/billing/native/BlockedPaymentsCountryDisplay.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 4048, 1305, 1244, 1948, 4002, 7328, 7329, 2] */
function _fun59024(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7505:6, offset: 0x016de838, size: 301 bytes, params: 8, frame: 21
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 */;
const env0_3 = value.View;
const env0_4 = value.Image;
const env0_5 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
const env0_8 = Reflect.apply(createStyles, value, [{container: {alignItems: 'center'}, header: {'fontSize': 20,
'fontWeight': '700', 'color': null, 'marginBottom': 16, color: TEXT_SUBTLE}, image: {marginTop: 38}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/native/BlockedPaymentsCountryDisplay.tsx');
exports.default = BlockedPaymentsCountryDisplay;
}
function BlockedPaymentsCountryDisplay() { // fn#59025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7505:454, offset: 0x016de965, size: 380 bytes, params: 1, frame: 29
const styles = useStyles();
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const items2 = [<LegacyText style={styles.header}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vwMEHS)}</LegacyText>];
const format = intl.format;
const IHxEJU = (require(1244) /* metro dependency 1244: indexNative */).t.IHxEJU;
const defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
const getArticleURL = defaultImport.getArticleURL;
const BLOCKED_PAYMENTS = HelpdeskArticles.BLOCKED_PAYMENTS;
items2[1] = <LegacyText>{Reflect.apply(format, intl, [IHxEJU, {helpdeskArticle: Reflect.apply(getArticleURL,
defaultImport, [BLOCKED_PAYMENTS])}])}</LegacyText>;
items2[2] = <Image style={styles.image} source={(require(4002) /* metro dependency 4002: shared */).isThemeDark(value2) ? importDefault(7328) /* metro dependency 7328 */ : importDefault(7329) /* metro dependency 7329 */} />;
return (
<View style={styles.container}>
{items2}
</View>
);
}
@@ -0,0 +1,85 @@
/* Metro module 5142; source: modules/billing/native/GenericIAPStore.tsx; dependencies: [6, 7, 15, 17, 18, 22, 5143, 566, 694, 2] */
function _fun45368(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5320:6, offset: 0x0118cbbf, size: 337 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 */;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
let value = _fun45372(Store);
value.displayName = 'GenericIAPStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{IAP_LOAD_GENERIC_PRODUCTS: function({products, storeFront}) {
env0_8 = products;
env0_10 = storeFront;
}, GENERIC_IAP_INIT_CONNECTION: function(a0) {
env0_9 = a0.connected;
}, GENERIC_IAP_INIT_CONNECTION_FAILED: function() {
env0_9 = false;
}, GENERIC_IAP_END_CONNECTION: function() {
env0_9 = false;
}, GENERIC_IAP_SET_STORE_FRONT: function(a0) {
env0_10 = a0.storeFront;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/native/GenericIAPStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_45369() { // fn#45369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5320:148, offset: 0x0118cd10, 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_45369_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun45372(a0) { // fn#45372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5320:370, offset: 0x0118cd6e, size: 143 bytes, params: 2, frame: 16
const closure = GenericIAPStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'isGenericIapConnected', value: value_45374}, {key: 'genericProductsLoaded',
value: value_45375}, {key: 'getProducts', value: value_45377}, {key: 'getStoreFront', value: value_45378}]);
}
function value_45375() { // fn#45375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5320:743, offset: 0x0118cdfd, size: 98 bytes, params: 1, frame: 17
var environment;
var r0;
var defaultImport;
const value = environment.__proto__;
const value2 = env1_8 != null;
if (value2) {
defaultImport = importDefault(22) /* metro dependency 22 */;
r0 = defaultImport.filter(env1_8, function(a0) {
var GenericProductIds = require(dependencyMap[6]).GenericProductIds;
return GenericProductIds.includes(a0.identifier);
}).length === (require(5143) /* metro dependency 5143: ProductIdsAndroid */).GenericProductIds.length;
} else {
r0 = value2;
}
return r0;
}
@@ -0,0 +1,39 @@
/* Metro module 7333; source: modules/billing/native/PaymentFlowWarningMessage.tsx; dependencies: [31, 27, 33, 4501, 697, 6235, 1305, 4573, 2] */
function _fun59038(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7511:6, offset: 0x016df715, size: 288 bytes, params: 8, frame: 24
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;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'padding': 10, 'marginVertical': 5, 'borderRadius': null, 'display': 'flex', 'flexDirection': 'row',
'alignItems': 'center'};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const DARK_PRIMARY_630_LIGHT_PRIMARY_230 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_PRIMARY_630_LIGHT_PRIMARY_230;
object.backgroundColor = DARK_PRIMARY_630_LIGHT_PRIMARY_230;
const env0_6 = Reflect.apply(createStyles, value, [{container: object, icon: {marginRight: 10},
text: {flexShrink: 1}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/native/PaymentFlowWarningMessage.tsx');
exports.default = PaymentFlowWarningMessage;
}
function PaymentFlowWarningMessage(a0) { // fn#59039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7511:404, offset: 0x016df835, size: 201 bytes, params: 2, frame: 21
const styles = useStyles();
const WarningCircle = (require(1305) /* metro dependency 1305: native */).WarningCircle;
const YELLOW_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300;
const warningCircle = <WarningCircle style={styles.icon} color={YELLOW_300} width={16} height={16} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.container}>
{warningCircle}
<Text variant="text-sm/medium" style={styles.text}>
{a0.message}
</Text>
</View>
);
}
@@ -0,0 +1,517 @@
/* Metro module 7356; source: modules/billing/native/StorekitIAPQueue.tsx; dependencies: [5, 6, 7, 27, 3837, 5138, 7336, 2] */
function _fun59285(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7534:6, offset: 0x016e4a4f, size: 236 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const NativeModules = (require(27) /* metro dependency 27 */).NativeModules;
const env0_5 = (require(3837) /* metro dependency 3837: CountryCodeUtils */).convertToAlpha2;
const env0_6 = NativeModules.RNIapIosSk2;
let value = _fun59289();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/native/StorekitIAPQueue.tsx');
exports.default = value;
}
function productSK2ToIAPProduct(a0) { // fn#59286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7534:194, offset: 0x016e4b3b, size: 334 bytes, params: 2, frame: 18
var object2;
const r1 = a0.subscription.promotionalOffers == null ? [] : a0.subscription.promotionalOffers.map(function(a0) {
return promoOfferToDiscount(a0);
});
if (a0.subscription.introductoryOffer != null) {
r1.push(promoOfferToDiscount(a0.subscription.introductoryOffer));
}
const Number = global.Number;
const price = a0.price;
const toFixed = price.toFixed;
const CurrencyExponents = (require(5138) /* metro dependency 5138: PriceUtils */).CurrencyExponents;
const currency = a0.currency;
const value = Number(Reflect.apply(toFixed, price, [CurrencyExponents[currency.toLowerCase()]]));
object2 = {};
let String = global.String;
object2.identifier = String(a0.id);
object2.price = value;
object2.currencySymbol = a0.displayPrice.split(RegExp('[0-9]', ''))[0];
object2.currencyCode = a0.currency.toLowerCase();
String = global.String;
object2.priceString = String(value);
object2.countryCode = '';
object2.downloadable = false;
object2.description = a0.description;
object2.title = a0.displayName;
object2.discounts = r1;
return object2;
}
function promoOfferToDiscount(a0) { // fn#59288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7534:772, offset: 0x016e4c89, size: 175 bytes, params: 2, frame: 12
const paymentMode = a0.paymentMode;
const r2 = paymentMode === 'freeTrial' ? 'FREETRIAL' : paymentMode === 'payAsYouGo' ? 'PAYASYOUGO' : paymentMode === 'payUpFront' ? 'PAYUPFRONT' : '';
const object2 = {};
object2.identifier = a0.id;
object2.type = 'SUBSCRIPTION';
object2.numberOfPeriods = a0.period.value.toString();
object2.price = a0.price.toString();
object2.localizedPrice = a0.displayPrice;
object2.paymentMode = r2;
object2.subscriptionPeriod = a0.period.unit.toUpperCase();
return object2;
}
function _fun59289() { // fn#59289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7534:1166, offset: 0x016e4d38, size: 121 bytes, params: 1, frame: 17
const binding = env0_4;
const closure = StorekitIAPQueueClass;
let env0_0 = env0_2(_fun59304);
return binding(closure, [{key: 'fetchSubscriptions', value: function(a0) {
var env0_0 = this;
var env0_1 = a0;
var Promise = global.Promise;
var value2 = new Promise(_fun59292);
this.processQueue();
return value2;
}}, {key: 'fetchProducts', value: function(a0) {
var env0_0 = this;
var env0_1 = a0;
var Promise = global.Promise;
var value2 = new Promise(_fun59297);
this.processQueue();
return value2;
}}, {key: 'processQueue', value: value_59305}]);
}
function StorekitIAPQueueClass() { // fn#59290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7534:1187, offset: 0x016e4db1, size: 45 bytes, params: 1, frame: 13
env1_3(this, StorekitIAPQueueClass);
this._queue = [];
this._processingQueue = false;
}
function value_59291(a0) { // fn#59291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7534:1325, offset: 0x016e4dde, size: 61 bytes, params: 2, frame: 12
const env0_1 = a0;
const Promise = global.Promise;
const promise = new Promise(_fun59292);
this.processQueue();
return promise;
}
function value_59296(a0) { // fn#59296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7534:1575, offset: 0x016e4ee5, size: 61 bytes, params: 2, frame: 12
const env0_1 = a0;
const Promise = global.Promise;
const promise = new Promise(_fun59297);
this.processQueue();
return promise;
}
function* _fun59304() { // fn#59304, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7534:2257, offset: 0x016e5122, size: 132 bytes, params: 1, frame: 13
var _queue;
var length;
var shift;
var value3;
var error;
let value = undefined;
if (false) {
return value;
}
if (!this._processingQueue) {
this._processingQueue = true;
try {
_queue = this._queue;
} catch (error) {
this._processingQueue = false;
throw error;
}
try {
length = _queue.length;
} catch (error) {
this._processingQueue = false;
throw error;
}
try {
value = length > 0;
} catch (error) {
this._processingQueue = false;
throw error;
}
if (value) {
while (true) {
try {
_queue = this._queue;
} catch (error) {
this._processingQueue = false;
throw error;
}
try {
shift = _queue.shift;
} catch (error) {
this._processingQueue = false;
throw error;
}
try {
value = Reflect.apply(shift, _queue, []);
} catch (error) {
this._processingQueue = false;
throw error;
}
try {
value = value();
} catch (error) {
this._processingQueue = false;
throw error;
}
yield value;
try {
value = undefined;
value3 = false;
} catch (error) {
this._processingQueue = false;
throw error;
}
if (value3) {
this._processingQueue = false;
return value;
}
try {
_queue = this._queue;
} catch (error) {
this._processingQueue = false;
throw error;
}
try {
length = _queue.length;
} catch (error) {
this._processingQueue = false;
throw error;
}
try {
value = length > 0;
} catch (error) {
this._processingQueue = false;
throw error;
}
if (value) {
continue;
}
break;
}
this._processingQueue = false;
return undefined;
}
this._processingQueue = false;
}
}
function _fun59292(a0, a1) { // fn#59292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7534:1356, offset: 0x016e4e1b, size: 60 bytes, params: 3, frame: 13
const env0_0 = a0;
const env0_1 = a1;
const _queue = env0_0._queue;
_queue.push(env2_2(_fun59294));
}
function _fun59297(a0, a1) { // fn#59297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7534:1606, offset: 0x016e4f22, size: 60 bytes, params: 3, frame: 13
const env0_0 = a0;
const env0_1 = a1;
const _queue = env0_0._queue;
_queue.push(env2_2(_fun59299));
}
function* _fun59294() { // fn#59294, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7534:1384, offset: 0x016e4e60, size: 116 bytes, params: 1, frame: 13
var environment;
var binding;
var getItems;
var value4;
var value5;
var value6;
var filter;
var closure;
var value7;
var map;
var error;
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
try {
binding = env4_6;
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
getItems = binding.getItems;
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
value4 = Reflect.apply(getItems, binding, [StorekitIAPQueueClass]);
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
yield value4;
try {
value5 = undefined;
value6 = false;
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
if (value6) {
return value5;
}
try {
filter = value5.filter;
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
closure = function(a0) {
return a0.subscription != null;
};
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
value7 = Reflect.apply(filter, value5, [closure]);
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
map = value7.map;
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
binding = env4_7;
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
value = Reflect.apply(map, value7, [binding]);
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
binding = env1_0;
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
binding(value);
} catch (error) {
value = environment.__proto__;
env1_1(error);
}
}
}
function* _fun59299() { // fn#59299, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7534:1634, offset: 0x016e4f67, size: 125 bytes, params: 1, frame: 14
var environment;
var binding;
var binding2;
var property;
var getProducts;
var object2;
var then;
var closure;
var value4;
var error;
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
try {
binding = env4_0;
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
binding2 = env4_1;
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
property = binding2[6];
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
value = binding(property);
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
getProducts = value.getProducts;
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
object2 = {};
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
object2.skus = StorekitIAPQueueClass;
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
value = Reflect.apply(getProducts, value, [object2]);
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
then = value.then;
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
closure = function(a0) {
return a0.filter(_fun59301).map(_fun59302);
};
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
value = Reflect.apply(then, value, [closure]);
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
yield value;
try {
value = undefined;
value4 = false;
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
if (value4) {
return value;
}
try {
binding = env1_0;
} catch (error) {
value = environment.__proto__;
env1_1(error);
return undefined;
}
try {
binding(value);
} catch (error) {
value = environment.__proto__;
env1_1(error);
}
}
}
function _fun59300(a0) { // fn#59300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7534:1698, offset: 0x016e4fe4, size: 37 bytes, params: 2, frame: 12
return a0.filter(function(a0) {
return a0.type === 'iap';
}).map(_fun59302);
}
function _fun59302(a0) { // fn#59302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7534:1736, offset: 0x016e501d, size: 252 bytes, params: 2, frame: 16
var r3;
var value2;
var binding;
var value3;
var error;
let value = '';
let countryCode = a0.countryCode;
if (countryCode == null) {
r3 = value;
} else {
countryCode = a0.countryCode;
if (countryCode.length === 0) {
r3 = value;
} else {
try {
value2 = environment.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env6_5;
countryCode = a0.countryCode;
value3 = binding(countryCode);
r3 = value3;
} catch (error) {
r3 = value;
}
}
}
const object2 = {};
object2.identifier = a0.productId;
const parseFloat = global.parseFloat;
const price = a0.price;
value = undefined;
object2.price = parseFloat(price);
const localizedPrice = a0.localizedPrice;
object2.currencySymbol = localizedPrice == null ? value : localizedPrice.split(RegExp('[0-9]', ''))[0];
object2.currencyCode = a0.currency.toLowerCase();
object2.priceString = a0.price;
object2.countryCode = r3;
object2.downloadable = false;
object2.description = a0.description;
object2.title = a0.title;
object2.discounts = 'discounts' in a0 ? a0.discounts : value;
return object2;
}
@@ -0,0 +1,42 @@
/* Metro module 7636; source: modules/billing/native/UnsupportedFeatureModal.tsx; dependencies: [31, 27, 33, 5280, 5282, 5080, 4573, 1244, 2] */
function _fun61154(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7814:6, offset: 0x0171c108, size: 157 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(27) /* metro dependency 27 */).View;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/native/UnsupportedFeatureModal.tsx');
exports.default = UnsupportedFeatureModal;
}
function UnsupportedFeatureModal({title, onDismiss}) { // fn#61155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7814:227, offset: 0x0171c1a5, size: 135 bytes, params: 2, frame: 19
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
const object = {title: title};
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(_fun61156);
object.render = render_61157;
return <Navigator initialRouteName="Unsupported" screens={{Unsupported: object}} />;
}
function _fun61156() { // fn#61156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7814:413, offset: 0x0171c22c, size: 58 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
if (onDismiss != null) {
onDismiss();
}
}
function UnsupportedFeatureModalRender() { // fn#61157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7814:455, owner: UnsupportedFeatureModal.render, offset: 0x0171c266, size: 143 bytes, params: 1, frame: 20
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const I22zuX = (require(1244) /* metro dependency 1244: indexNative */).t.I22zuX;
return (
<View style={{'flex': 1, 'alignItems': 'center', 'justifyContent': 'center', 'padding': 24}}>
<Text variant="text-lg/normal" color="text-default">
{Reflect.apply(string, intl, [I22zuX])}
</Text>
</View>
);
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,132 @@
/* Metro module 7359; source: modules/billing/native/iapProducts.tsx; dependencies: [2] */
function _fun59313(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7537:6, offset: 0x016e5329, size: 1225 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/native/iapProducts.tsx');
exports.copiedIAPProducts = [{'identifier': 'premium_tier_2_premium_guild_5_yearly', 'price': 274.99,
'currencySymbol': '$', 'currencyCode': 'usd', 'priceString': '$274.99', 'countryCode': 'US',
'downloadable': false, 'description': 'Chat perks and 7 Boosts (Yearly Sub)',
'title': 'Nitro + 5 Boosts (Yearly)', discounts: []}, {'identifier': 'premium_tier_1_premium_guild_1_yearly',
'price': 84.99, 'currencySymbol': '$', 'currencyCode': 'usd', 'priceString': '$84.99', 'countryCode': 'US',
'downloadable': false, 'description': 'Chat perks and 1 Boost (Yearly Sub)', 'title': 'Nitro Classic + 1 Boost',
discounts: []}, {'identifier': 'premium_tier_0_yearly', 'price': 29.99, 'currencySymbol': '$',
'currencyCode': 'usd', 'priceString': '$29.99', 'countryCode': 'US', 'downloadable': false,
'description': 'Chat perks (Yearly Sub)', 'title': 'Nitro Basic Yearly',
discounts: [{'identifier': 'premium_tier_0_yearly_likelihood', 'localizedPrice': '$0.00',
'numberOfPeriods': '1', 'type': 'SUBSCRIPTION', 'paymentMode': 'FREETRIAL', 'subscriptionPeriod': 'MONTH',
'price': '0'}]}, {'identifier': 'premium_tier_2_monthly', 'price': 9.99, 'currencySymbol': '$',
'currencyCode': 'usd', 'priceString': '$9.99', 'countryCode': 'US', 'downloadable': false,
'description': 'Chat perks and 2 Boosts (Monthly Sub)', 'title': 'Nitro Monthly',
discounts: [{'numberOfPeriods': '14', 'type': 'SUBSCRIPTION', 'localizedPrice': '$0.00',
'identifier': 'premium_tier_2_monthly_q4_drop', 'paymentMode': 'FREETRIAL', 'price': '0',
'subscriptionPeriod': 'DAY'}, {'identifier': 'premium_tier_2_monthly_reactivation', 'price': '0',
'subscriptionPeriod': 'MONTH', 'paymentMode': 'FREETRIAL', 'localizedPrice': '$0.00', 'type': 'SUBSCRIPTION',
'numberOfPeriods': '1'}, {'numberOfPeriods': '14', 'type': 'SUBSCRIPTION',
'identifier': 'premium_tier_2_monthly_referral_trial', 'price': '0', 'subscriptionPeriod': 'DAY',
'paymentMode': 'FREETRIAL', 'localizedPrice': '$0.00'}, {'localizedPrice': '$0.00', 'type': 'SUBSCRIPTION',
'numberOfPeriods': '1', 'identifier': 'premium_tier_2_monthly_likelihood', 'paymentMode': 'FREETRIAL',
'price': '0', 'subscriptionPeriod': 'MONTH'}]}, {'identifier': 'premium_tier_1_premium_guild_1_monthly',
'price': 8.49, 'currencySymbol': '$', 'currencyCode': 'usd', 'priceString': '$8.49', 'countryCode': 'US',
'downloadable': false, 'description': 'Chat perks and 1 Boost (Monthly Sub)',
'title': 'Nitro Classic + 1 Boost', discounts: []}, {'identifier': 'premium_tier_2_premium_guild_28_monthly',
'price': 107.99, 'currencySymbol': '$', 'currencyCode': 'usd', 'priceString': '$107.99', 'countryCode': 'US',
'downloadable': false, 'description': 'Chat perks and 30 Boosts (Monthly Sub)',
'title': 'Nitro + 28 Boosts (Monthly)', discounts: []}, {'identifier': 'premium_tier_2_premium_guild_3_monthly',
'price': 20.49, 'currencySymbol': '$', 'currencyCode': 'usd', 'priceString': '$20.49', 'countryCode': 'US',
'downloadable': false, 'description': 'Chat perks and 5 Boosts (Monthly Sub)',
'title': 'Nitro + 3 Boosts (Monthly)', discounts: []}, {'identifier': 'premium_month_tier_2.1', 'price': 9.99,
'currencySymbol': '$', 'currencyCode': 'usd', 'priceString': '$9.99', 'countryCode': 'US',
'downloadable': false, 'description': 'Chat perks and 2 Boosts (Monthly Sub)', 'title': 'Nitro Monthly',
discounts: []}, {'identifier': 'premium_tier_0_monthly', 'price': 2.99, 'currencySymbol': '$',
'currencyCode': 'usd', 'priceString': '$2.99', 'countryCode': 'US', 'downloadable': false,
'description': 'Chat perks (Monthly Sub)', 'title': 'Nitro Basic Monthly',
discounts: [{'localizedPrice': '$0.00', 'paymentMode': 'FREETRIAL', 'subscriptionPeriod': 'MONTH', 'price': '0',
'numberOfPeriods': '1', 'type': 'SUBSCRIPTION', 'identifier': 'premium_tier_0_monthly_likelihood'}]},
{'identifier': 'premium_guild_1_monthly', 'price': 4.99, 'currencySymbol': '$', 'currencyCode': 'usd',
'priceString': '$4.99', 'countryCode': 'US', 'downloadable': false, 'description': '1 Server Boost (Monthly)',
'title': '1 Server Boost Monthly', discounts: []}, {'identifier': 'premium_month_tier_1.1', 'price': 4.99,
'currencySymbol': '$', 'currencyCode': 'usd', 'priceString': '$4.99', 'countryCode': 'US',
'downloadable': false, 'description': 'Chat perks like animated emojis (Monthly Sub)',
'title': 'Classic Monthly', discounts: [{'localizedPrice': '$0.00',
'identifier': 'premium_tier_1_monthly_likelihood', 'paymentMode': 'FREETRIAL', 'subscriptionPeriod': 'MONTH',
'price': '0', 'type': 'SUBSCRIPTION', 'numberOfPeriods': '1'}]}, {'identifier': 'premium_tier_1_yearly',
'price': 49.99, 'currencySymbol': '$', 'currencyCode': 'usd', 'priceString': '$49.99', 'countryCode': 'US',
'downloadable': false, 'description': 'Chat perks like animated emojis (Yearly Sub)',
'title': 'Nitro Classic Yearly', discounts: []}, {'identifier': 'premium_year_tier_1.1', 'price': 49.99,
'currencySymbol': '$', 'currencyCode': 'usd', 'priceString': '$49.99', 'countryCode': 'US',
'downloadable': false, 'description': 'Chat perks like animated emojis (Yearly Sub)', 'title': 'Classic Yearly',
discounts: []}, {'identifier': 'premium_tier_2_premium_guild_1_monthly', 'price': 13.49, 'currencySymbol': '$',
'currencyCode': 'usd', 'priceString': '$13.49', 'countryCode': 'US', 'downloadable': false,
'description': 'Chat perks and 3 Boosts (Monthly Sub)', 'title': 'Nitro + 1 Boost (Monthly)', discounts: []},
{'identifier': 'premium_tier_2_premium_guild_2_monthly', 'price': 16.99, 'currencySymbol': '$',
'currencyCode': 'usd', 'priceString': '$16.99', 'countryCode': 'US', 'downloadable': false,
'description': 'Chat perks and 4 Boosts (Monthly Sub)', 'title': 'Nitro + 2 Boosts (Monthly)', discounts: []},
{'identifier': 'premium_tier_2_premium_guild_2_yearly', 'price': 169.99, 'currencySymbol': '$',
'currencyCode': 'usd', 'priceString': '$169.99', 'countryCode': 'US', 'downloadable': false,
'description': 'Chat perks and 4 Boosts (Yearly Sub)', 'title': 'Nitro + 2 Boosts (Yearly)', discounts: []},
{'identifier': 'premium_tier_2_premium_guild_1_yearly', 'price': 134.99, 'currencySymbol': '$',
'currencyCode': 'usd', 'priceString': '$134.99', 'countryCode': 'US', 'downloadable': false,
'description': 'Chat perks and 3 Boosts (Yearly Sub)', 'title': 'Nitro + 1 Boost (Yearly)', discounts: []},
{'identifier': 'premium_tier_2_premium_guild_3_yearly', 'price': 204.99, 'currencySymbol': '$',
'currencyCode': 'usd', 'priceString': '$204.99', 'countryCode': 'US', 'downloadable': false,
'description': 'Chat perks and 5 Boosts (Yearly Sub)', 'title': 'Nitro + 3 Boosts (Yearly)', discounts: []},
{'identifier': 'premium_tier_1_monthly', 'price': 4.99, 'currencySymbol': '$', 'currencyCode': 'usd',
'priceString': '$4.99', 'countryCode': 'US', 'downloadable': false,
'description': 'Chat perks like animated emojis (Monthly Sub)', 'title': 'Nitro Classic Monthly',
discounts: []}, {'identifier': 'premium_tier_2_premium_guild_10_monthly', 'price': 44.99, 'currencySymbol': '$',
'currencyCode': 'usd', 'priceString': '$44.99', 'countryCode': 'US', 'downloadable': false,
'description': 'Chat perks and 12 Boosts (Monthly Sub)', 'title': 'Nitro + 10 Boosts (Monthly)', discounts: []},
{'identifier': 'premium_year_tier_2.1', 'price': 99.99, 'currencySymbol': '$', 'currencyCode': 'usd',
'priceString': '$99.99', 'countryCode': 'US', 'downloadable': false,
'description': 'Chat perks and 2 Boosts (Yearly Sub)', 'title': 'Nitro Yearly', discounts: []},
{'identifier': 'premium_guild_2_monthly', 'price': 9.99, 'currencySymbol': '$', 'currencyCode': 'usd',
'priceString': '$9.99', 'countryCode': 'US', 'downloadable': false, 'description': '2 Server Boosts (Monthly)',
'title': '2 Server Boosts Monthly', discounts: []}, {'identifier': 'premium_tier_2_premium_guild_5_monthly',
'price': 27.49, 'currencySymbol': '$', 'currencyCode': 'usd', 'priceString': '$27.49', 'countryCode': 'US',
'downloadable': false, 'description': 'Chat perks and 7 Boosts (Monthly Sub)',
'title': 'Nitro + 5 Boosts (Monthly)', discounts: []}, {'identifier': 'api_generic_subscription', 'price': 4.99,
'currencySymbol': '$', 'currencyCode': 'usd', 'priceString': '$4.99', 'countryCode': 'US',
'downloadable': false, 'description': 'Discord Subscription', 'title': 'Discord Subscription', discounts: []},
{'identifier': 'premium_tier_2_yearly', 'price': 99.99, 'currencySymbol': '$', 'currencyCode': 'usd',
'priceString': '$99.99', 'countryCode': 'US', 'downloadable': false,
'description': 'Chat perks and 2 Boosts (Yearly Sub)', 'title': 'Nitro Yearly',
discounts: [{'subscriptionPeriod': 'MONTH', 'paymentMode': 'FREETRIAL', 'price': '0', 'type': 'SUBSCRIPTION',
'numberOfPeriods': '1', 'localizedPrice': '$0.00', 'identifier': 'premium_tier_2_yearly_reactivation'},
{'localizedPrice': '$0.00', 'paymentMode': 'FREETRIAL', 'subscriptionPeriod': 'DAY', 'price': '0',
'type': 'SUBSCRIPTION', 'numberOfPeriods': '14', 'identifier': 'premium_tier_2_yearly_q4_drop'},
{'identifier': 'premium_tier_2_yearly_referral_trial', 'localizedPrice': '$0.00', 'price': '0',
'subscriptionPeriod': 'DAY', 'paymentMode': 'FREETRIAL', 'numberOfPeriods': '14', 'type': 'SUBSCRIPTION'},
{'localizedPrice': '$0.00', 'type': 'SUBSCRIPTION', 'numberOfPeriods': '1', 'subscriptionPeriod': 'MONTH',
'price': '0', 'paymentMode': 'FREETRIAL', 'identifier': 'premium_tier_2_yearly_likelihood'}]},
{'identifier': 'premium_tier_2_premium_guild_13_monthly', 'price': 54.99, 'currencySymbol': '$',
'currencyCode': 'usd', 'priceString': '$54.99', 'countryCode': 'US', 'downloadable': false,
'description': 'Chat perks and 15 Boosts (Monthly Sub)', 'title': 'Nitro + 13 Boosts (Monthly)', discounts: []},
{'identifier': 'api_generic_consumable', 'price': 4.99, 'currencySymbol': '$', 'currencyCode': 'usd',
'priceString': '$4.99', 'countryCode': 'US', 'downloadable': false,
'description': 'Profile and Avatar Decorations from the Shop', 'title': 'Discord Collectible', discounts: []},
{'identifier': 'premium_month_tier_0', 'price': 2.99, 'currencySymbol': '$', 'currencyCode': 'usd',
'priceString': '$2.99', 'countryCode': 'US', 'downloadable': false,
'description': '1 month of sweet chat perks', 'title': 'Nitro Basic (1 Month)', discounts: []},
{'identifier': 'premium_month_tier_2.2', 'price': 9.99, 'currencySymbol': '$', 'currencyCode': 'usd',
'priceString': '$9.99', 'countryCode': 'US', 'downloadable': false,
'description': '1 month of sweet chat perks and 1 Nitro Boost', 'title': 'Nitro (1 Month)', discounts: []},
{'identifier': 'premium_year_tier_1.2', 'price': 49.99, 'currencySymbol': '$', 'currencyCode': 'usd',
'priceString': '$49.99', 'countryCode': 'US', 'downloadable': false,
'description': '1 year of sweet chat perks', 'title': 'Nitro Classic (1 Year)', discounts: []},
{'identifier': 'premium_month_tier_1.2', 'price': 4.99, 'currencySymbol': '$', 'currencyCode': 'usd',
'priceString': '$4.99', 'countryCode': 'US', 'downloadable': false,
'description': '1 month of sweet chat perks', 'title': 'Nitro Classic (1 Month)', discounts: []},
{'identifier': 'sticker_pack_199', 'price': 1.99, 'currencySymbol': '$', 'currencyCode': 'usd',
'priceString': '$1.99', 'countryCode': 'US', 'downloadable': false,
'description': 'A pack of stickers you can use in chat', 'title': 'Discord Sticker Pack', discounts: []},
{'identifier': 'premium_year_tier_0', 'price': 29.99, 'currencySymbol': '$', 'currencyCode': 'usd',
'priceString': '$29.99', 'countryCode': 'US', 'downloadable': false,
'description': '1 year of sweet chat perks', 'title': 'Nitro Basic (1 Year)', discounts: []},
{'identifier': 'sticker_pack_299', 'price': 2.99, 'currencySymbol': '$', 'currencyCode': 'usd',
'priceString': '$2.99', 'countryCode': 'US', 'downloadable': false,
'description': 'A pack of stickers you can use in chat', 'title': 'Discord Sticker Pack', discounts: []},
{'identifier': 'premium_year_tier_2.2', 'price': 99.99, 'currencySymbol': '$', 'currencyCode': 'usd',
'priceString': '$99.99', 'countryCode': 'US', 'downloadable': false,
'description': '1 year of sweet chat perks and 1 Nitro Boost', 'title': 'Nitro (1 Year)', discounts: []}];
}
@@ -0,0 +1,18 @@
/* Metro module 7360; source: modules/billing/native/openBlockedPaymentsCountryActionSheet.tsx; dependencies: [4080, 7361, 1962, 2] */
function _fun59314(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7538:6, offset: 0x016e57f2, size: 101 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/billing/native/openBlockedPaymentsCountryActionSheet.tsx');
exports.default = _default_59315;
}
function _default_59315() { // fn#59315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7538:105, offset: 0x016e5857, size: 97 bytes, params: 1, frame: 16
importDefault(dependencyMap[0]).hideActionSheet();
const defaultImport2 = importDefault(dependencyMap[0]);
const openLazy = defaultImport2.openLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport2, [value, 'BlockedPaymentsCountryActionSheet']);
}
@@ -0,0 +1,615 @@
/* Metro module 14237; source: modules/billing/native/otp/SimpleRequestOTPActionSheet.tsx; dependencies: [5, 57, 31, 27, 1878, 4279, 661, 1880, 33, 3, 1585, 7669, 566, 8461, 5120, 1900, 7298, 10147, 4080, 4496, 5134, 4572, 4573, 6239, 4578, 7641, 491, 7294, 6275, 10109, 2] */
function _fun107664(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14434:6, offset: 0x02304980, size: 344 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const skuStore = importDefault(4279) /* metro dependency 4279: SKUStore */;
const env0_9 = (require(661) /* metro dependency 661: Constants */).PriceSetAssignmentPurchaseTypes;
const env0_10 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
let value = require(33) /* metro dependency 33 */;
const env0_11 = value.jsxs;
const env0_12 = value.jsx;
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('PaymentFlowTest.android');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/native/otp/SimpleRequestOTPActionSheet.tsx');
exports.default = _default_107687;
}
function GiftPurchaseSKUView({selectedSkuId, giftRecipientId, giftMessage}) { // fn#107665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14434:317, offset: 0x02304ad8, size: 1116 bytes, params: 2, frame: 30
const value3 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
let binding = env0_5;
const [property, env0_2] = env0_4(binding.useState(false), 2);
const currentUser = UserStore.getCurrentUser();
var env0_4 = binding.useRef({});
const nativeGiftContextModule = require(7669) /* metro dependency 7669: NativeGiftContext */;
const useNativeGiftContext = nativeGiftContextModule.useNativeGiftContext;
const giftStyle = Reflect.apply(useNativeGiftContext, nativeGiftContextModule, []).giftStyle;
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SKUStore], function() {
return SKUStore.get(selectedSkuId);
});
const value8 = (require(8461) /* metro dependency 8461: useFetchCollectiblesProduct */).useFetchCollectiblesProduct(selectedSkuId);
const product = value8.product;
var env0_5 = product;
const isFetching = value8.isFetching;
binding.useEffect(_fun107667, [selectedSkuId]);
let useMemo = binding.useMemo;
const value9 = Reflect.apply(useMemo, binding, [_fun107668, [product, currentUser, selectedSkuId]]);
binding.useEffect(function() {
var env0_0 = _fun107671;
_fun107674();
}, [value9, property, binding.useMemo(_fun107669, [value9])]);
const env0_8 = (importDefault(10147) /* metro dependency 10147: useMobileCollectiblesPurchaseSKUAndroid */)({product: product ?? ({skuId: selectedSkuId,
googleSkuIds: {}}), onPurchaseComplete: onPurchaseComplete, onPurchaseError: onPurchaseError,
onPurchasePending: onPurchasePending, giftParams: {isGift: true, options: {recipient_id: giftRecipientId,
custom_message: giftMessage, gift_style: giftStyle}}});
const value11 = _fun107678();
binding = env0_5;
useMemo = binding.useMemo;
const value13 = env0_4(Reflect.apply(useMemo, binding, [_fun107682, [product]]), 2);
const property2 = value13[0];
const property3 = value13[1];
let r14 = isFetching || property;
r14 = !r14 ? product == null : r14;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const object = {};
object.paddingTop = value3.top;
object.paddingBottom = value3.bottom;
object.paddingHorizontal = 12;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const name = value7?.name;
const value15 = 'No message';
const items2 = [<Text variant="text-md/medium" color="always-white">{'Gifting '}{name}{' to '}{giftRecipientId}{' '}{'\n'}{'Regular price: '}{property3}{' '}{'\n'}{'Premium price: '}{property2}{' '}{'\n'}{giftMessage != null ? giftMessage === '' ? value15 : 'Message: ' + giftMessage : value15}</Text>];
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[1] = <Card><Button variant="primary" text={r14 ? 'Loading...' : 'Send Gift'} onPress={value11} disabled={r14} /></Card>;
items2[2] = <Card><Text variant="text-md/medium" color="always-white">{'Select style: '}{giftStyle}</Text>{((Component) => <Component />)(importDefault(7641) /* metro dependency 7641: PremiumGiftBackgroundSelect */)}</Card>;
return (
<Stack spacing={24} style={object}>
{items2}
</Stack>
);
}
function SimpleRequestOTPActionSheet({selectedSkuId, requestType, giftRecipientId, giftMessage}) { // fn#107683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14434:3322, offset: 0x02305417, size: 414 bytes, params: 2, frame: 26
var r4;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items2;
const value2 = (require(491) /* metro dependency 491 */).v4();
const binding = env0_5;
const useMemo = binding.useMemo;
if (requestType !== 'giftSku') {
items2 = [<Text variant="text-lg/bold" color="text-feedback-warning">{'Gift purchasing is the only supported feature on Android in this version.'}</Text>];
items2[1] = <Text variant="text-md/normal" color="text-feedback-warning">{'Request type: '}{requestType ?? 'none'}</Text>;
r4 = <View>{items2}</View>;
} else if (selectedSkuId == null) {
items2 = [<Text variant="text-lg/bold" color="text-feedback-warning">{'Gift purchasing is the only supported feature on Android in this version.'}</Text>];
items2[1] = <Text variant="text-md/normal" color="text-feedback-warning">{'Request type: '}{requestType ?? 'none'}</Text>;
r4 = <View>{items2}</View>;
} else if (giftRecipientId != null) {
const NativeGiftContextProvider = (require(7669) /* metro dependency 7669: NativeGiftContext */).NativeGiftContextProvider;
r4 = <NativeGiftContextProvider basePurchaseAnalytics={Reflect.apply(useMemo, binding, [_fun107684,
[value2]])} onClose={function() {
}} setCurrentAnalyticsStep={function() {
}}><GiftPurchaseSKUView selectedSkuId={selectedSkuId} giftRecipientId={giftRecipientId} giftMessage={giftMessage} /></NativeGiftContextProvider>;
} else {
items2 = [<Text variant="text-lg/bold" color="text-feedback-warning">{'Gift purchasing is the only supported feature on Android in this version.'}</Text>];
items2[1] = <Text variant="text-md/normal" color="text-feedback-warning">{'Request type: '}{requestType ?? 'none'}</Text>;
r4 = <View>{items2}</View>;
}
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
return (
<BottomSheet>
{r4}
</BottomSheet>
);
}
function _default_107687(a0) { // fn#107687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14434:4106, offset: 0x023055f9, size: 87 bytes, params: 2, frame: 16
const NativePaymentContextProvider = (require(10109) /* metro dependency 10109: NativePaymentContext */).NativePaymentContextProvider;
return (
<NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>
<SimpleRequestOTPActionSheet {...a0} />
</NativePaymentContextProvider>
);
}
function _fun107667() { // fn#107667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14434:640, offset: 0x02304f34, size: 57 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (selectedSkuId != null) {
value2 = environment.__proto__;
moduleValue = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
moduleValue.fetchCollectiblesProduct(selectedSkuId);
}
}
function _fun107668() { // fn#107668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14434:715, offset: 0x02304f6d, size: 221 bytes, params: 1, frame: 16
var binding;
var value3;
if (product == null) {
value3 = environment.__proto__;
binding = env1_13;
binding.warn('No googleSkuIds available for product: ' + selectedSkuId);
return [];
}
let googleSkuIds = product.googleSkuIds;
if (googleSkuIds == null) {
value3 = environment.__proto__;
binding = env1_13;
binding.warn('No googleSkuIds available for product: ' + selectedSkuId);
return [];
}
const premiumTypeUtilsModule = require(1900) /* metro dependency 1900: PremiumTypeUtils */;
const isPremium = premiumTypeUtilsModule.isPremium;
binding = env0_3;
const TIER_2 = PremiumTypes.TIER_2;
const isPremium2 = Reflect.apply(isPremium, premiumTypeUtilsModule, [binding, TIER_2]);
googleSkuIds = product.googleSkuIds;
const r3 = isPremium2 ? googleSkuIds[PriceSetAssignmentPurchaseTypes.MOBILE_PREMIUM_TIER_2] : googleSkuIds[PriceSetAssignmentPurchaseTypes.MOBILE];
return r3 == null ? [r3] : global.Object.values(product.googleSkuIds);
}
function _fun107669() { // fn#107669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14434:992, offset: 0x0230504a, size: 33 bytes, params: 1, frame: 11
return env0_6.sort().join(',');
}
function _fun107670() { // fn#107670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14434:1034, offset: 0x0230506b, size: 31 bytes, params: 1, frame: 9
(function() {
return _loadGoogleSkus.apply(this, arguments);
})();
}
function GiftPurchaseSKUViewOnPurchaseError() { // fn#107676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14434:1576, owner: GiftPurchaseSKUView.onPurchaseError, offset: 0x023051a7, size: 27 bytes, params: 1, frame: 11
env1_13.error('Purchase error occurred');
}
function GiftPurchaseSKUViewOnPurchasePending() { // fn#107677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14434:1635, owner: GiftPurchaseSKUView.onPurchasePending, offset: 0x023051c2, size: 28 bytes, params: 1, frame: 11
env1_13.info('Purchase is pending');
}
function _fun107678() { // fn#107678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14434:1753, offset: 0x023051de, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun107680);
return submitGiftPurchase;
}
function _fun107682() { // fn#107682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14434:2482, offset: 0x023053ac, size: 107 bytes, params: 1, frame: 18
var r0;
var value2;
var moduleValue;
var getFormattedPriceForCollectiblesProduct;
var items2;
var value;
let productBinding = product;
if (productBinding == null) {
r0 = ['Loading...', 'Loading...'];
} else {
value2 = environment.__proto__;
moduleValue = require(5134) /* metro dependency 5134: CollectiblesUtils */;
getFormattedPriceForCollectiblesProduct = moduleValue.getFormattedPriceForCollectiblesProduct;
productBinding = product;
value = Reflect.apply(getFormattedPriceForCollectiblesProduct, moduleValue, [productBinding, true, true]);
items2 = [value];
value = require(5134) /* metro dependency 5134: CollectiblesUtils */;
getFormattedPriceForCollectiblesProduct = value.getFormattedPriceForCollectiblesProduct;
items2[1] = Reflect.apply(getFormattedPriceForCollectiblesProduct, value, [productBinding, false, true]);
r0 = items2;
}
return r0;
}
function _fun107684() { // fn#107684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14434:3425, offset: 0x023055b5, size: 68 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (require(7294) /* metro dependency 7294: PremiumAnalyticsUtils */).getBasePurchaseFlowAnalyticsFields({isGift: true,
analyticsLoadId: env0_0, analyticsLocations: []});
}
function _loadGoogleSkus() { // fn#107671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14434:1039, offset: 0x0230508a, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun107673).apply(this, arguments);
}
function* _fun107680() { // fn#107680, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14434:1773, offset: 0x0230520d, size: 415 bytes, params: 1, frame: 18
var message;
var r4;
var binding;
var value3;
var googleSkuIds;
var value4;
var length;
var value5;
var value6;
var error;
var binding2;
var skuId;
var HermesInternal;
var concat;
var binding3;
var property;
var show;
var object2;
var binding4;
var warn;
var value8;
var JSON;
var stringify;
if (true) {
value = environment.__proto__.__proto__;
reducibleJoin3: while (true) {
reduciblePort60: while (true) {
exceptionLanding55: while (true) {
try {
binding = env2_5;
} catch (error) {
break exceptionLanding55;
}
break reducibleJoin3;
}
value = environment.__proto__.__proto__.__proto__;
binding = env3_13;
warn = binding.warn;
Reflect.apply(warn, binding, ['Error creating gift purchase:', error]);
binding = env3_1;
value = undefined;
value8 = binding(env3_2[19]);
show = value8.show;
reducibleJoin57: while (true) {
if (error == null) {
message = value;
break reducibleJoin57;
}
message = error.message;
break reducibleJoin57;
}
reducibleJoin59: while (true) {
if (message) {
r4 = message;
break reducibleJoin59;
}
JSON = global.JSON;
stringify = JSON.stringify;
value = Reflect.apply(stringify, JSON, [error]);
r4 = value;
break reducibleJoin59;
}
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(show, value8, [{title: 'Gift Purchase Failed', body: 'Error: ' + r4}]);
break reduciblePort60;
}
return undefined;
}
try {
value3 = binding == null;
} catch (error) {
break exceptionLanding55;
}
if (value3) {
value = environment.__proto__.__proto__.__proto__;
try {
binding = env3_13;
} catch (error) {
break exceptionLanding55;
}
try {
error = binding.error;
} catch (error) {
break exceptionLanding55;
}
try {
Reflect.apply(error, binding, ['Cannot proceed with purchase: collectibleProduct is undefined']);
} catch (error) {
break exceptionLanding55;
}
try {
binding = env3_1;
} catch (error) {
break exceptionLanding55;
}
try {
binding4 = env3_2;
} catch (error) {
break exceptionLanding55;
}
try {
property = binding4[19];
} catch (error) {
break exceptionLanding55;
}
try {
value = binding(property);
} catch (error) {
break exceptionLanding55;
}
try {
show = value.show;
} catch (error) {
break exceptionLanding55;
}
try {
object2 = {'title': 'Product Not Found',
'body': 'The product information could not be loaded. Please try again.'};
} catch (error) {
break exceptionLanding55;
}
try {
Reflect.apply(show, value, [object2]);
} catch (error) {
break exceptionLanding55;
}
} else {
try {
binding = env2_5;
} catch (error) {
break exceptionLanding55;
}
try {
googleSkuIds = binding.googleSkuIds;
} catch (error) {
break exceptionLanding55;
}
try {
value4 = googleSkuIds == null;
} catch (error) {
break exceptionLanding55;
}
if (!value4) {
try {
} catch (error) {
break exceptionLanding55;
}
try {
length = View.length;
} catch (error) {
break exceptionLanding55;
}
try {
value5 = length === 0;
} catch (error) {
break exceptionLanding55;
}
reducibleJoin19: while (true) {
if (!value5) {
try {
} catch (error) {
break exceptionLanding55;
}
try {
value = SKUStore();
} catch (error) {
break exceptionLanding55;
}
yield value;
try {
value = undefined;
value6 = false;
} catch (error) {
break exceptionLanding55;
}
if (value6) {
return value;
}
return undefined;
}
break reducibleJoin19;
}
}
try {
binding = env3_13;
} catch (error) {
break exceptionLanding55;
}
try {
error = binding.error;
} catch (error) {
break exceptionLanding55;
}
try {
binding2 = env2_5;
} catch (error) {
break exceptionLanding55;
}
try {
skuId = binding2.skuId;
} catch (error) {
break exceptionLanding55;
}
try {
} catch (error) {
break exceptionLanding55;
}
try {
} catch (error) {
break exceptionLanding55;
}
try {
value = Reflect.apply(concat, 'No Google SKU IDs available for product ', [skuId]);
} catch (error) {
break exceptionLanding55;
}
try {
Reflect.apply(error, binding, [value]);
} catch (error) {
break exceptionLanding55;
}
try {
binding = env3_1;
} catch (error) {
break exceptionLanding55;
}
try {
binding3 = env3_2;
} catch (error) {
break exceptionLanding55;
}
try {
property = binding3[19];
} catch (error) {
break exceptionLanding55;
}
try {
value = binding(property);
} catch (error) {
break exceptionLanding55;
}
try {
show = value.show;
} catch (error) {
break exceptionLanding55;
}
try {
object2 = {'title': 'Product Not Available',
'body': 'This product is not available for purchase on Google Play.'};
} catch (error) {
break exceptionLanding55;
}
try {
Reflect.apply(show, value, [object2]);
} catch (error) {
break exceptionLanding55;
}
}
}
}
function* _fun107673() { // fn#107673, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14434:1092, offset: 0x023050ca, size: 221 bytes, params: 1, frame: 17
var current;
var value3;
var binding;
var binding2;
var property;
var value4;
var loadInAppSkus;
var inAppSkus;
var value5;
var value6;
var value7;
var error;
var error2;
if (true) {
reducibleJoin3: while (true) {
reduciblePort29: while (true) {
exceptionLanding28: while (true) {
value = environment.__proto__.__proto__.__proto__;
if (UserStore == null) {
break reducibleJoin3;
}
current = env3_4.current;
if (current[UserStore]) {
break reduciblePort29;
}
break reducibleJoin3;
}
binding = env4_13;
error2 = binding.error;
Reflect.apply(error2, binding, ['Unable to fetch product IDs from Google Play store:', error]);
dependencyMap(false);
break reduciblePort29;
}
return undefined;
}
if (View.length !== 0) {
reducibleJoin29: while (true) {
if (importDefault) {
break reducibleJoin29;
}
dependencyMap(true);
value3 = environment.__proto__.__proto__.__proto__.__proto__;
try {
binding = env4_0;
} catch (error) {
break exceptionLanding28;
}
try {
binding2 = env4_2;
} catch (error) {
break exceptionLanding28;
}
try {
property = binding2[16];
} catch (error) {
break exceptionLanding28;
}
try {
value4 = binding(property);
} catch (error) {
break exceptionLanding28;
}
try {
loadInAppSkus = value4.loadInAppSkus;
} catch (error) {
break exceptionLanding28;
}
try {
} catch (error) {
break exceptionLanding28;
}
try {
inAppSkus = Reflect.apply(loadInAppSkus, value4, [View]);
} catch (error) {
break exceptionLanding28;
}
yield inAppSkus;
try {
value5 = undefined;
value6 = false;
} catch (error) {
break exceptionLanding28;
}
if (value6) {
return value5;
}
try {
} catch (error) {
break exceptionLanding28;
}
try {
value7 = UserStore == null;
} catch (error) {
break exceptionLanding28;
}
reducibleJoin24: while (true) {
if (value7) {
break reducibleJoin24;
}
try {
binding = env3_4;
} catch (error) {
break exceptionLanding28;
}
try {
current = binding.current;
} catch (error) {
break exceptionLanding28;
}
try {
} catch (error) {
break exceptionLanding28;
}
try {
current[UserStore] = true;
} catch (error) {
break exceptionLanding28;
}
break reducibleJoin24;
}
try {
} catch (error) {
break exceptionLanding28;
}
try {
dependencyMap(false);
} catch (error) {
break exceptionLanding28;
}
break reducibleJoin29;
}
}
}
}
@@ -0,0 +1,12 @@
/* Metro module 14243; source: modules/billing/native/smoke/BillingFlows.android.tsx; dependencies: [27, 33, 2] */
function _fun107729(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14440:6, offset: 0x023070f9, size: 136 bytes, params: 8, frame: 18
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(27) /* metro dependency 27 */).View;
const env0_1 = (require(33) /* metro dependency 33 */).jsx;
object2 = {RunAllFlows: RunAllFlows};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/native/smoke/BillingFlows.android.tsx');
exports.default = object2;
}
@@ -0,0 +1,221 @@
/* Metro module 13673; source: modules/billing/native/subscription/useRestorePurchases.tsx; dependencies: [5, 57, 31, 3, 7037, 2] */
function _fun104389(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13870:6, offset: 0x02294f59, size: 191 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('useRestorePurchases');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/native/subscription/useRestorePurchases.tsx');
exports.default = useRestorePurchases;
}
function useRestorePurchases() { // fn#104390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13870:270, offset: 0x02295018, size: 139 bytes, params: 1, frame: 16
let value = a0;
let forceRestore = (value !== undefined ? value : {}).forceRestore;
forceRestore = forceRestore === undefined || forceRestore;
const binding = env0_4;
const env0_1 = binding.useRef(false);
value = env0_3(binding.useState(false), 2);
const property = value[0];
const env0_2 = value[1];
binding.useEffect(_fun104394, [forceRestore]);
return property;
}
function _restore() { // fn#104391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13870:382, owner: useRestorePurchases._restore, offset: 0x022950a3, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_2(_fun104393).apply(this, arguments);
}
function _fun104394() { // fn#104394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13870:673, offset: 0x022951db, size: 44 bytes, params: 1, frame: 10
if (forceRestore || !env0_1.current) {
(function() {
return _restore.apply(this, arguments);
})();
}
}
function* _fun104393() { // fn#104393, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13870:421, offset: 0x022950e3, size: 248 bytes, params: 1, frame: 17
var value;
var value2;
var value3;
var binding;
var log;
var binding2;
var property;
var value4;
var restoreAndApplyPurchases;
var value5;
var value6;
var value7;
var error;
var error2;
exceptionLanding25: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
value = environment.__proto__.__proto__;
env2_2(true);
value3 = environment.__proto__.__proto__.__proto__;
binding = env3_5;
log = binding.log;
Reflect.apply(log, binding, ['isRestoring true']);
reducibleJoin3: while (true) {
reduciblePort24: while (true) {
exceptionLanding20: while (true) {
try {
try {
binding = env3_0;
} catch (error) {
break exceptionLanding20;
}
} catch (error) {
break exceptionLanding25;
}
break reducibleJoin3;
}
try {
binding = env3_5;
} catch (error) {
break exceptionLanding25;
}
try {
error2 = binding.error;
} catch (error) {
break exceptionLanding25;
}
try {
Reflect.apply(error2, binding, [error]);
} catch (error) {
break exceptionLanding25;
}
break reduciblePort24;
}
env2_2(false);
binding = env3_5;
log = binding.log;
Reflect.apply(log, binding, ['isRestoring false']);
return undefined;
}
try {
try {
binding2 = env3_1;
} catch (error) {
break exceptionLanding20;
}
} catch (error) {
break exceptionLanding25;
}
try {
try {
property = binding2[4];
} catch (error) {
break exceptionLanding20;
}
} catch (error) {
break exceptionLanding25;
}
try {
try {
value4 = binding(property);
} catch (error) {
break exceptionLanding20;
}
} catch (error) {
break exceptionLanding25;
}
try {
try {
restoreAndApplyPurchases = value4.restoreAndApplyPurchases;
} catch (error) {
break exceptionLanding20;
}
} catch (error) {
break exceptionLanding25;
}
try {
try {
value5 = Reflect.apply(restoreAndApplyPurchases, value4, []);
} catch (error) {
break exceptionLanding20;
}
} catch (error) {
break exceptionLanding25;
}
yield value5;
try {
try {
value6 = undefined;
value7 = false;
} catch (error) {
break exceptionLanding20;
}
} catch (error) {
break exceptionLanding25;
}
if (value7) {
env2_2(false);
binding = env3_5;
binding.log('isRestoring false');
return value6;
}
try {
try {
binding = env3_5;
} catch (error) {
break exceptionLanding20;
}
} catch (error) {
break exceptionLanding25;
}
try {
try {
log = binding.log;
} catch (error) {
break exceptionLanding20;
}
} catch (error) {
break exceptionLanding25;
}
try {
try {
Reflect.apply(log, binding, ['restored unfinished transactions']);
} catch (error) {
break exceptionLanding20;
}
} catch (error) {
break exceptionLanding25;
}
try {
try {
} catch (error) {
break exceptionLanding20;
}
} catch (error) {
break exceptionLanding25;
}
try {
try {
dependencyMap.current = true;
} catch (error) {
break exceptionLanding20;
}
} catch (error) {
break exceptionLanding25;
}
env2_2(false);
binding = env3_5;
log = binding.log;
Reflect.apply(log, binding, ['isRestoring false']);
return undefined;
}
env2_2(false);
env3_5.log('isRestoring false');
throw error;
}
@@ -0,0 +1,79 @@
/* Metro module 7944; source: modules/billing/native/subscription/useStoreFrontPrice.tsx; dependencies: [31, 661, 3802, 2] */
function _fun63396(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8122:6, offset: 0x01b7e010, size: 196 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).PriceSetAssignmentPurchaseTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/native/subscription/useStoreFrontPrice.tsx');
exports.default = useStoreFrontPrice;
exports.PriceStates = {PRICE_AVAILABLE: 'PRICE_AVAILABLE',
SUBSCRIPTION_PLAN_UNAVAILABLE: 'SUBSCRIPTION_PLAN_UNAVAILABLE',
STOREFRONT_UNAVAILABLE: 'STOREFRONT_UNAVAILABLE', MISMATCHING_COUNTRIES: 'MISMATCHING_COUNTRIES',
COUNTRY_PRICE_UNAVAILABLE: 'COUNTRY_PRICE_UNAVAILABLE'};
}
function useStoreFrontPrice(a0, a1) { // fn#63397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8122:532, offset: 0x01b7e0d4, size: 53 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
return env0_2.useMemo(_fun63398, [a0, a1]);
}
function _fun63398() { // fn#63398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8122:583, offset: 0x01b7e109, size: 299 bytes, params: 1, frame: 22
var r2;
var r1;
var prices;
var value2;
var MOBILE;
var value4;
var moduleValue;
var getCountryPrices;
var binding;
var id;
var value5;
var moduleValue2;
var experimentalGetPrice;
var STOREFRONT_UNAVAILABLE;
var SUBSCRIPTION_PLAN_UNAVAILABLE;
var value;
if (env0_0 == null) {
value = environment.__proto__;
SUBSCRIPTION_PLAN_UNAVAILABLE = env1_4.SUBSCRIPTION_PLAN_UNAVAILABLE;
value = undefined;
r1 = SUBSCRIPTION_PLAN_UNAVAILABLE;
r2 = value;
} else if (require == null) {
value = environment.__proto__;
STOREFRONT_UNAVAILABLE = env1_4.STOREFRONT_UNAVAILABLE;
value = undefined;
r1 = STOREFRONT_UNAVAILABLE;
r2 = value;
} else {
prices = env0_0.prices;
value2 = undefined;
r2 = prices == null ? value2 : prices[PriceSetAssignmentPurchaseTypes.MOBILE];
if (r2 == null) {
value = environment.__proto__;
r1 = env1_4.COUNTRY_PRICE_UNAVAILABLE;
r2 = value2;
} else {
value4 = environment.__proto__;
moduleValue = require(3802) /* metro dependency 3802: PremiumUtils */;
getCountryPrices = moduleValue.getCountryPrices;
binding = env0_0;
id = binding.id;
MOBILE = PriceSetAssignmentPurchaseTypes.MOBILE;
value5 = Reflect.apply(getCountryPrices, moduleValue, [id, MOBILE]);
moduleValue2 = require(3802) /* metro dependency 3802: PremiumUtils */;
experimentalGetPrice = moduleValue2.experimentalGetPrice;
id = binding.id;
MOBILE = PriceSetAssignmentPurchaseTypes.MOBILE;
value = Reflect.apply(experimentalGetPrice, moduleValue2, [id, {purchaseType: MOBILE,
currency: require.currency}]);
r1 = value5.countryCode !== require.country ? env1_4.MISMATCHING_COUNTRIES : value == null ? env1_4.COUNTRY_PRICE_UNAVAILABLE : env1_4.PRICE_AVAILABLE;
r2 = value;
}
}
return {price: r2, priceState: r1};
}
@@ -0,0 +1,93 @@
/* Metro module 7011; source: modules/billing/stores/WalletBalanceStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
function _fun55524(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7189:6, offset: 0x013a95ff, size: 343 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let env0_5 = {};
let Set = global.Set;
let set = new Set();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun55528(Store).displayName = 'WalletBalanceStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */,
{BILLING_WALLET_BALANCE_FETCH_START: BILLING_WALLET_BALANCE_FETCH_START,
BILLING_WALLET_BALANCE_FETCH_SUCCESS: BILLING_WALLET_BALANCE_FETCH_SUCCESS,
BILLING_WALLET_BALANCE_FETCH_FAIL: BILLING_WALLET_BALANCE_FETCH_FAIL,
WALLET_BALANCE_UPDATE: WALLET_BALANCE_UPDATE, LOGOUT: function() {
env0_5 = {};
var Set = global.Set;
var value3 = new Set();
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/stores/WalletBalanceStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_55525() { // fn#55525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7189:148, offset: 0x013a9756, 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_55525_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun55528(a0) { // fn#55528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7189:366, offset: 0x013a97b4, size: 93 bytes, params: 2, frame: 16
const closure = WalletBalanceStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getBalance', value: value_55530}, {key: 'getIsFetching', value: value_55531}]);
}
function BILLING_WALLET_BALANCE_FETCH_START({paymentSourceId}) { // fn#55532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7189:901, offset: 0x013a9811, size: 62 bytes, params: 2, frame: 12
const Set = global.Set;
const binding = env0_6;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(binding);
(set instanceof Object ? set : value2).add(paymentSourceId);
}
function BILLING_WALLET_BALANCE_FETCH_SUCCESS(a0) { // fn#55533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7189:1006, offset: 0x013a984f, size: 114 bytes, params: 2, frame: 15
const Set = global.Set;
new Set(env0_6).delete(a0.paymentSourceId);
const object2 = {};
copyDataProperties(object2, env0_5, undefined);
object2[a0.paymentSourceId] = {currency: a0.currency, amount: a0.amount};
}
function BILLING_WALLET_BALANCE_FETCH_FAIL({paymentSourceId}) { // fn#55534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7189:1180, offset: 0x013a98c1, size: 62 bytes, params: 2, frame: 12
const Set = global.Set;
const binding = env0_6;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(binding);
(set instanceof Object ? set : value2).delete(paymentSourceId);
}
function WALLET_BALANCE_UPDATE({paymentSourceId, currency, balance}) { // fn#55535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7189:1272, offset: 0x013a98ff, size: 62 bytes, params: 2, frame: 15
const object2 = {};
copyDataProperties(object2, env0_5, undefined);
object2[paymentSourceId] = {currency: currency, amount: balance};
}
@@ -0,0 +1,31 @@
/* Metro module 1899; source: modules/billing/utils/StoreCountryUtils.tsx; dependencies: [2] */
function _fun20848(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2026:6, offset: 0x00edd9cb, size: 85 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/utils/StoreCountryUtils.tsx');
exports.parseStoreCountry = function(a0) {
var r5;
var r3;
var r0;
var object;
var property;
var value = a0;
var value2 = null;
if (value2 == value) {
r0 = value;
} else {
object = {country: value.country};
property = value.set_at;
r5 = value2 != property ? property : value.setAt;
r3 = value2 != r5 ? r5 : value2;
object.setAt = r3;
property = value.is_locked;
r3 = value2 != property ? property : value.isLocked;
value = value2 != r3;
object.isLocked = value && r3;
r0 = object;
}
return r0;
};
}