Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,165 @@
|
||||
/* Metro module 3804; source: stores/billing/BillingInfoStore.tsx; dependencies: [6, 7, 15, 17, 18, 661, 566, 694, 2] */
|
||||
function _fun29212(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#29212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:6, offset: 0x00fbd40f, size: 639 bytes, params: 8, frame: 24
|
||||
const closure = function() {
|
||||
env0_11 = false;
|
||||
};
|
||||
const closure2 = function() {
|
||||
env0_6 = undefined;
|
||||
};
|
||||
const closure3 = function() {
|
||||
env0_14 = false;
|
||||
};
|
||||
const closure4 = function() {
|
||||
env0_15 = true;
|
||||
};
|
||||
const closure5 = function() {
|
||||
env0_15 = false;
|
||||
};
|
||||
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 */;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).FallbackCurrencyCountry;
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
let value = _fun29221(Store);
|
||||
value.displayName = 'BillingInfoStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
||||
{BILLING_PAYMENT_SOURCE_CREATE_START: function() {
|
||||
env0_11 = true;
|
||||
}, BILLING_PAYMENT_SOURCE_CREATE_SUCCESS: closure, BILLING_PAYMENT_SOURCE_CREATE_FAIL: closure,
|
||||
STRIPE_TOKEN_FAILURE: closure, BILLING_PAYMENT_SOURCE_REMOVE_START: function() {
|
||||
env0_13 = true;
|
||||
}, BILLING_PAYMENT_SOURCE_REMOVE_SUCCESS: function() {
|
||||
env0_13 = false;
|
||||
}, BILLING_PAYMENT_SOURCE_REMOVE_FAIL: function({error}) {
|
||||
env0_13 = false;
|
||||
env0_17 = error;
|
||||
}, BILLING_PAYMENT_SOURCE_REMOVE_CLEAR_ERROR: function() {
|
||||
env0_17 = null;
|
||||
}, BILLING_PAYMENT_SOURCE_UPDATE_START: function() {
|
||||
env0_12 = true;
|
||||
}, BILLING_PAYMENT_SOURCE_UPDATE_SUCCESS: function() {
|
||||
env0_12 = false;
|
||||
}, BILLING_PAYMENT_SOURCE_UPDATE_FAIL: function({error}) {
|
||||
env0_12 = false;
|
||||
env0_16 = error;
|
||||
}, BILLING_PAYMENT_SOURCE_UPDATE_CLEAR_ERROR: function() {
|
||||
env0_16 = null;
|
||||
}, BILLING_PAYMENT_SOURCES_FETCH_START: function(a0) {
|
||||
env0_6 = a0.request;
|
||||
}, BILLING_PAYMENT_SOURCES_FETCH_SUCCESS: closure2, BILLING_PAYMENT_SOURCES_FETCH_FAIL: closure2,
|
||||
BILLING_SUBSCRIPTION_FETCH_START: function() {
|
||||
env0_14 = true;
|
||||
}, BILLING_SUBSCRIPTION_FETCH_SUCCESS: closure3, BILLING_SUBSCRIPTION_FETCH_FAIL: closure3,
|
||||
BILLING_SUBSCRIPTION_UPDATE_START: closure4, BILLING_SUBSCRIPTION_CANCEL_START: closure4,
|
||||
BILLING_SUBSCRIPTION_UPDATE_SUCCESS: closure5, BILLING_SUBSCRIPTION_UPDATE_FAIL: closure5,
|
||||
BILLING_SUBSCRIPTION_CANCEL_FAIL: closure5, BILLING_SUBSCRIPTION_CANCEL_SUCCESS: closure5,
|
||||
BILLING_IP_COUNTRY_CODE_FETCH_START: function(a0) {
|
||||
env0_8 = a0.request;
|
||||
}, BILLING_SET_IP_COUNTRY_CODE: function(a0) {
|
||||
env0_7 = a0.countryCode;
|
||||
}, BILLING_IP_COUNTRY_CODE_FAILURE: function() {
|
||||
env0_7 = null;
|
||||
env0_18 = true;
|
||||
}, BILLING_IP_LOCATION_FETCH_START: function(a0) {
|
||||
env0_10 = a0.request;
|
||||
}, BILLING_SET_IP_LOCATION: function(a0) {
|
||||
env0_9 = a0.location;
|
||||
}, BILLING_IP_LOCATION_FAILURE: function() {
|
||||
env0_9 = null;
|
||||
env0_19 = true;
|
||||
}, LOGOUT: function() {
|
||||
env0_6 = undefined;
|
||||
env0_8 = undefined;
|
||||
env0_7 = undefined;
|
||||
env0_18 = false;
|
||||
env0_9 = undefined;
|
||||
env0_19 = false;
|
||||
env0_10 = undefined;
|
||||
env0_17 = null;
|
||||
env0_16 = null;
|
||||
}, CONNECTION_OPEN: CONNECTION_OPEN_29259});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/billing/BillingInfoStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_29213() { // fn#29213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:182, offset: 0x00fbd68e, 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_29213_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun29221(a0) { // fn#29221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:671, offset: 0x00fbd72b, size: 479 bytes, params: 2, frame: 16
|
||||
const closure = BillingInfoStore;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, [{key: 'isBusy', get: get_29223}, {key: 'isUpdatingPaymentSource', get: get_29224},
|
||||
{key: 'isRemovingPaymentSource', get: get_29225}, {key: 'isSyncing', get: function() {
|
||||
return this.isPaymentSourceFetching || this.isSubscriptionFetching;
|
||||
}}, {key: 'isSubscriptionFetching', get: get_29227}, {key: 'isPaymentSourceFetching', get: get_29228},
|
||||
{key: 'editSourceError', get: get_29229}, {key: 'removeSourceError', get: get_29230},
|
||||
{key: 'ipCountryCodeLoaded', get: get_29231}, {key: 'ipCountryCode', get: get_29232},
|
||||
{key: 'ipCountryCodeRequest', get: get_29233}, {key: 'ipLocationLoaded', get: get_29234}, {key: 'ipLocation',
|
||||
get: get_29235}, {key: 'ipLocationRequest', get: get_29236}, {key: 'ipLocationHasError', get: get_29237},
|
||||
{key: 'ipCountryCodeWithFallback', get: get_29238}, {key: 'ipCountryCodeHasError', get: get_29239},
|
||||
{key: 'paymentSourcesFetchRequest', get: get_29240}]);
|
||||
}
|
||||
|
||||
function CONNECTION_OPEN_29259({countryCode}) { // fn#29259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:4442, offset: 0x00fbdb53, size: 26 bytes, params: 2, frame: 2
|
||||
if (countryCode == null) {
|
||||
}
|
||||
}
|
||||
|
||||
function BillingInfoStore() { // fn#29222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:683, offset: 0x00fbd90a, size: 113 bytes, params: 1, frame: 20
|
||||
const value = environment.__proto__;
|
||||
env1_0(this, BillingInfoStore);
|
||||
const value3 = env1_3(BillingInfoStore);
|
||||
return env1_2(this, _isNativeReflectConstruct_29213() ? global.Reflect.construct(value3, arguments,
|
||||
env1_3(this).constructor) : value3.apply(this, arguments));
|
||||
}
|
||||
|
||||
function get_29223() { // fn#29223, offset: 0x00fbd97b, size: 30 bytes, params: 1, frame: 3
|
||||
let r0 = env1_11 || env1_12;
|
||||
r0 = !r0 ? env1_15 : r0;
|
||||
r0 = !r0 ? env1_13 : r0;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function get_29231() { // fn#29231, offset: 0x00fbd9bc, size: 15 bytes, params: 1, frame: 2
|
||||
return env1_7 !== undefined;
|
||||
}
|
||||
|
||||
function get_29234() { // fn#29234, offset: 0x00fbd9dd, size: 15 bytes, params: 1, frame: 2
|
||||
return env1_9 !== undefined;
|
||||
}
|
||||
|
||||
function get_29238() { // fn#29238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:1844, offset: 0x00fbd9f5, size: 25 bytes, params: 1, frame: 3
|
||||
return env1_7 ?? FallbackCurrencyCountry;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
/* Metro module 3819; source: stores/billing/BraintreeStore.tsx; dependencies: [6, 7, 15, 17, 18, 661, 477, 507, 566, 694, 2] */
|
||||
function _fun29541(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#29541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3946:6, offset: 0x00fc4873, size: 458 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_7 = value.Endpoints;
|
||||
const env0_8 = value.PaymentGateways;
|
||||
const env0_9 = value.PaymentSourceTypes;
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (value.isDesktop()) {
|
||||
global.window.popupBridge = {getReturnUrlPrefix: getReturnUrlPrefix, open: open};
|
||||
}
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
_fun29547(Store).displayName = 'BraintreeStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
||||
{BRAINTREE_CREATE_CLIENT_SUCCESS: function(a0) {
|
||||
env0_12 = a0.client;
|
||||
}, BRAINTREE_CREATE_PAYPAL_CLIENT_SUCCESS: function(a0) {
|
||||
env0_13 = a0.paypalClient;
|
||||
}, BILLING_POPUP_BRIDGE_CALLBACK: BILLING_POPUP_BRIDGE_CALLBACK_29555,
|
||||
BILLING_POPUP_BRIDGE_STATE_UPDATE: function({paymentSourceType, state}) {
|
||||
if (paymentSourceType === PaymentSourceTypes.PAYPAL) {
|
||||
env0_10 = state;
|
||||
}
|
||||
}, BRAINTREE_TEARDOWN_PAYPAL_CLIENT: function() {
|
||||
env0_13 = null;
|
||||
}, BRAINTREE_CREATE_VENMO_CLIENT_SUCCESS: function(a0) {
|
||||
env0_14 = a0.venmoClient;
|
||||
}, BRAINTREE_TEARDOWN_VENMO_CLIENT: function() {
|
||||
env0_14 = null;
|
||||
}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/billing/BraintreeStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_29542() { // fn#29542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3946:215, offset: 0x00fc4a3d, 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_29542_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function getReturnUrlPrefix() { // fn#29545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3946:498, offset: 0x00fc4a9b, size: 117 bytes, params: 1, frame: 14
|
||||
if (env0_10 == null) {
|
||||
throw new global.Error('popupBridgeState is unset');
|
||||
}
|
||||
const aPIBaseURL = (require(507) /* metro dependency 507: HTTPUtils */).getAPIBaseURL();
|
||||
const BILLING_POPUP_BRIDGE_CALLBACK_REDIRECT_PREFIX = Endpoints.BILLING_POPUP_BRIDGE_CALLBACK_REDIRECT_PREFIX;
|
||||
const BRAINTREE = PaymentGateways.BRAINTREE;
|
||||
return aPIBaseURL + Reflect.apply(BILLING_POPUP_BRIDGE_CALLBACK_REDIRECT_PREFIX, Endpoints, [BRAINTREE, env0_10]);
|
||||
}
|
||||
|
||||
function open(a0) { // fn#29546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3946:659, offset: 0x00fc4b10, size: 47 bytes, params: 2, frame: 12
|
||||
env0_11 = a0;
|
||||
global.window.open(a0);
|
||||
env0_15.emitChange();
|
||||
}
|
||||
|
||||
function _fun29547(a0) { // fn#29547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3946:706, offset: 0x00fc4b3f, size: 143 bytes, params: 2, frame: 16
|
||||
const closure = BraintreeStore;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: 'getClient', value: value_29549}, {key: 'getPayPalClient', value: value_29550},
|
||||
{key: 'getVenmoClient', value: value_29551}, {key: 'getLastURL', value: value_29552}]);
|
||||
}
|
||||
|
||||
function BILLING_POPUP_BRIDGE_CALLBACK_29555({paymentSourceType, state, path, query}) { // fn#29555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3946:1479, offset: 0x00fc4c69, size: 108 bytes, params: 2, frame: 15
|
||||
var onComplete;
|
||||
const PAYPAL = PaymentSourceTypes.PAYPAL;
|
||||
if (paymentSourceType === PAYPAL) {
|
||||
if (state === env0_10) {
|
||||
onComplete = global.window.popupBridge.onComplete;
|
||||
if (typeof onComplete === 'function') {
|
||||
onComplete(null, {path: path, queryItems: query});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
/* Metro module 7020; source: stores/billing/GuildBoostSlotStore.tsx; dependencies: [6, 7, 15, 17, 18, 3808, 566, 694, 2] */
|
||||
function _fun55622(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:6, offset: 0x013ac4a0, size: 350 bytes, params: 8, frame: 19
|
||||
const closure = GUILD_BOOST_SLOT_UPDATE_SUCCESS;
|
||||
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 */;
|
||||
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
|
||||
let env0_8 = {};
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
let value = _fun55628(Store);
|
||||
value.displayName = 'GuildBoostSlotStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {GUILD_BOOST_SLOTS_FETCH: function() {
|
||||
env0_7 = true;
|
||||
}, GUILD_BOOST_SLOTS_FETCH_SUCCESS: function({guildBoostSlots}) {
|
||||
env0_8 = {};
|
||||
guildBoostSlots.forEach(_fun55637);
|
||||
env0_7 = false;
|
||||
env0_6 = true;
|
||||
}, GUILD_BOOST_SLOT_UPDATE_SUCCESS: closure, GUILD_BOOST_SLOT_CREATE: closure, GUILD_BOOST_SLOT_UPDATE: closure,
|
||||
LOGOUT: function() {
|
||||
env0_8 = {};
|
||||
env0_6 = false;
|
||||
env0_7 = false;
|
||||
}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/billing/GuildBoostSlotStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_55623() { // fn#55623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:158, offset: 0x013ac5fe, 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_55623_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function GUILD_BOOST_SLOT_CREATE({guildBoostSlot}) { // fn#55626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:370, offset: 0x013ac65c, size: 43 bytes, params: 2, frame: 13
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, env0_8, guildBoostSlot);
|
||||
object2[guildBoostSlot.id] = guildBoostSlot;
|
||||
}
|
||||
|
||||
function handleSubscriptionStoreUpdate() { // fn#55627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:441, offset: 0x013ac687, size: 101 bytes, params: 1, frame: 16
|
||||
var r3;
|
||||
var property;
|
||||
var id;
|
||||
var getSubscriptionById;
|
||||
var subscriptionId;
|
||||
var value4;
|
||||
const object2 = {};
|
||||
const Object = global.Object;
|
||||
const value2 = Object.values(env0_8);
|
||||
let length = value2.length;
|
||||
const value3 = 0;
|
||||
if (value3 < length) {
|
||||
for (r3 = value3; true; r3 = value4) {
|
||||
property = value2[r3];
|
||||
id = property.id;
|
||||
object2[id] = property;
|
||||
getSubscriptionById = SubscriptionStore.getSubscriptionById;
|
||||
subscriptionId = property.subscriptionId;
|
||||
property.subscription = Reflect.apply(getSubscriptionById, SubscriptionStore, [subscriptionId]);
|
||||
value4 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
|
||||
length = value2.length;
|
||||
if (!(value4 < length)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun55628(a0) { // fn#55628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:620, offset: 0x013ac6ec, size: 162 bytes, params: 2, frame: 16
|
||||
const closure = GuildBoostSlotStore;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, [{key: 'initialize', value: function() {
|
||||
this.syncWith([SubscriptionStore], handleSubscriptionStoreUpdate);
|
||||
}}, {key: 'hasFetched', get: get_55631}, {key: 'isFetching', get: get_55632}, {key: 'boostSlots', get: get_55633},
|
||||
{key: 'getGuildBoostSlot', value: value_55634}]);
|
||||
}
|
||||
|
||||
function GUILD_BOOST_SLOTS_FETCH_SUCCESS({guildBoostSlots}) { // fn#55636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:1367, offset: 0x013ac7b4, size: 51 bytes, params: 2, frame: 12
|
||||
env0_8 = {};
|
||||
guildBoostSlots.forEach(_fun55637);
|
||||
}
|
||||
|
||||
function _fun55637(a0) { // fn#55637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:1443, offset: 0x013ac7e7, size: 23 bytes, params: 2, frame: 3
|
||||
env1_8[a0.id] = a0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,244 @@
|
||||
/* Metro module 3805; source: stores/billing/PaymentSourceStore.tsx; dependencies: [6, 7, 15, 17, 18, 3806, 566, 694, 2] */
|
||||
function _fun29260(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#29260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:6, offset: 0x00fbdb6d, size: 353 bytes, params: 8, frame: 19
|
||||
const _arrayLikeToArray_29266 = 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 = BILLING_PAYMENT_SOURCE_CREATE_SUCCESS;
|
||||
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 */;
|
||||
const paymentSourceRecord = importDefault(3806) /* metro dependency 3806: PaymentSourceRecord */;
|
||||
let env0_6 = {};
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
let value = _fun29268(Store);
|
||||
value.displayName = 'PaymentSourceStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
||||
{BILLING_PAYMENT_SOURCE_CREATE_SUCCESS: closure, BILLING_PAYMENT_SOURCE_UPDATE_SUCCESS: closure,
|
||||
BILLING_PAYMENT_SOURCE_FETCH_SUCCESS: closure,
|
||||
BILLING_PAYMENT_SOURCES_FETCH_SUCCESS: BILLING_PAYMENT_SOURCES_FETCH_SUCCESS,
|
||||
BILLING_PAYMENT_SOURCE_REMOVE_SUCCESS: BILLING_PAYMENT_SOURCE_REMOVE_SUCCESS_29278, LOGOUT: function() {
|
||||
env0_6 = {};
|
||||
env0_7 = null;
|
||||
env0_8 = false;
|
||||
}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/billing/PaymentSourceStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_29261() { // fn#29261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:160, offset: 0x00fbdcce, 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_29261_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_29264(a0, a1) { // fn#29264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:353, offset: 0x00fbdd2c, 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 _fun29265;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_29266(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_29266(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_29266(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun29265;
|
||||
}
|
||||
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 BILLING_PAYMENT_SOURCE_CREATE_SUCCESS({paymentSource}) { // fn#29267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:1284, offset: 0x00fbde9e, size: 98 bytes, params: 2, frame: 15
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, env0_6, undefined);
|
||||
let id = paymentSource.id;
|
||||
object2[id] = paymentSource;
|
||||
if (paymentSource.isDefault || global.Object.keys(object2).length === 1) {
|
||||
id = paymentSource.id;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun29268(a0) { // fn#29268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:1413, offset: 0x00fbdf00, size: 214 bytes, params: 2, frame: 16
|
||||
const closure = PaymentSourceStore;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, [{key: 'paymentSources', get: get_29270}, {key: 'paymentSourceIds', get: get_29271},
|
||||
{key: 'defaultPaymentSourceId', get: get_29272}, {key: 'defaultPaymentSource', get: get_29273},
|
||||
{key: 'hasFetchedPaymentSources', get: get_29274}, {key: 'getDefaultBillingCountryCode', value: function() {
|
||||
var property = this.defaultPaymentSource;
|
||||
var value = null;
|
||||
return value == property ? value : property.paymentMethodCountry;
|
||||
}}, {key: 'getPaymentSource', value: value_29276}]);
|
||||
}
|
||||
|
||||
function BILLING_PAYMENT_SOURCES_FETCH_SUCCESS({paymentSources}) { // fn#29277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:2493, offset: 0x00fbe0ac, size: 160 bytes, params: 2, frame: 19
|
||||
var r5;
|
||||
var value4;
|
||||
var binding;
|
||||
var id;
|
||||
var createFromServer;
|
||||
var value5;
|
||||
env0_6 = {};
|
||||
env0_7 = null;
|
||||
const value2 = _createForOfIteratorHelperLoose_29264(paymentSources);
|
||||
const value3 = value2();
|
||||
let done = value3.done;
|
||||
if (!done) {
|
||||
r5 = value3;
|
||||
while (true) {
|
||||
value4 = r5.value;
|
||||
binding = env0_6;
|
||||
id = value4.id;
|
||||
createFromServer = PaymentSourceRecord.createFromServer;
|
||||
binding[id] = Reflect.apply(createFromServer, PaymentSourceRecord, [value4]);
|
||||
if (value4.default) {
|
||||
id = value4.id;
|
||||
env0_7 = id;
|
||||
}
|
||||
value5 = value2();
|
||||
done = value5.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r5 = value5;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (env0_7 == null && paymentSources.length > 0) {
|
||||
id = paymentSources[0].id;
|
||||
}
|
||||
}
|
||||
|
||||
function BILLING_PAYMENT_SOURCE_REMOVE_SUCCESS_29278({id}) { // fn#29278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:2763, offset: 0x00fbe14c, size: 87 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
var value2;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, env0_6, undefined);
|
||||
env0_6 = object2;
|
||||
delete object2[id];
|
||||
if (env0_7 === id) {
|
||||
value2 = global.Object.keys(env0_6);
|
||||
r0 = value2.length === 0 ? null : value2[0];
|
||||
}
|
||||
}
|
||||
|
||||
function get_29271() { // fn#29271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:1785, offset: 0x00fbe047, size: 27 bytes, params: 1, frame: 11
|
||||
const Object = global.Object;
|
||||
return Object.keys(env1_6);
|
||||
}
|
||||
|
||||
function get_29273() { // fn#29273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:1908, offset: 0x00fbe062, size: 30 bytes, params: 1, frame: 3
|
||||
const value2 = null;
|
||||
return value2 != env1_7 ? env1_6[env1_7] : value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,531 @@
|
||||
/* Metro module 3807; source: stores/billing/SubscriptionPlanStore.tsx; dependencies: [6, 7, 15, 17, 18, 3803, 661, 1880, 1944, 21, 566, 694, 2] */
|
||||
function _fun29330(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#29330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:6, offset: 0x00fbff5a, size: 619 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_29336 = 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 = function() {
|
||||
[SubscriptionPlanInfo[SubscriptionPlans.NONE_MONTH], SubscriptionPlanInfo[SubscriptionPlans.NONE_YEAR],
|
||||
SubscriptionPlanInfo[SubscriptionPlans.NONE_3_MONTH],
|
||||
SubscriptionPlanInfo[SubscriptionPlans.NONE_6_MONTH]].forEach(_fun29339);
|
||||
};
|
||||
const closure2 = SUBSCRIPTION_PLANS_RESET;
|
||||
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 subscriptionPlanRecord = importDefault(3803) /* metro dependency 3803: SubscriptionPlanRecord */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_9 = value.CurrencyCodes;
|
||||
const env0_10 = value.PriceSetAssignmentPurchaseTypes;
|
||||
value = require(1880) /* metro dependency 1880: PremiumConstants */;
|
||||
const SubscriptionIntervalTypes = value.SubscriptionIntervalTypes;
|
||||
const env0_11 = value.SubscriptionPlanInfo;
|
||||
const env0_12 = value.SubscriptionPlans;
|
||||
const env0_13 = value.PremiumSubscriptionSKUs;
|
||||
const env0_14 = value.ACTIVE_PREMIUM_SKUS;
|
||||
const env0_15 = {};
|
||||
const env0_16 = {};
|
||||
let Set = global.Set;
|
||||
let set = new Set();
|
||||
Set = global.Set;
|
||||
set = new Set();
|
||||
const env0_19 = {};
|
||||
const env0_20 = {};
|
||||
closure();
|
||||
const DAY = SubscriptionIntervalTypes.DAY;
|
||||
items = [DAY];
|
||||
const MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
items[1] = MONTH;
|
||||
const YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
items[2] = YEAR;
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
let value4 = _fun29342(Store);
|
||||
value4.displayName = 'SubscriptionPlanStore';
|
||||
const value7 = new value4(importDefault(694) /* metro dependency 694: Dispatcher */,
|
||||
{SUBSCRIPTION_PLANS_FETCH: SUBSCRIPTION_PLANS_FETCH,
|
||||
SUBSCRIPTION_PLANS_FETCH_SUCCESS: SUBSCRIPTION_PLANS_FETCH_SUCCESS,
|
||||
SUBSCRIPTION_PLANS_FETCH_FAILURE: SUBSCRIPTION_PLANS_FETCH_FAILURE, SUBSCRIPTION_PLANS_RESET: closure2,
|
||||
GIFT_CODE_RESOLVE_SUCCESS: GIFT_CODE_RESOLVE_SUCCESS,
|
||||
ENTITLEMENTS_GIFTABLE_FETCH_SUCCESS: function({entitlements}) {
|
||||
var r2;
|
||||
var value4;
|
||||
var value2 = _createForOfIteratorHelperLoose_29334(entitlements);
|
||||
var value3 = value2();
|
||||
if (!value3.done) {
|
||||
r2 = value3;
|
||||
while (true) {
|
||||
entitlements = r2.value;
|
||||
if (entitlements.subscription_plan != null) {
|
||||
addSubscriptionPlanFromServer(entitlements.subscription_plan);
|
||||
}
|
||||
value4 = value2();
|
||||
if (value4.done) {
|
||||
break;
|
||||
}
|
||||
r2 = value4;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}, LOGOUT: closure2});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/billing/SubscriptionPlanStore.tsx');
|
||||
exports.default = value7;
|
||||
exports.subscriptionPlansFetchingForSKU = set;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_29331() { // fn#29331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:365, offset: 0x00fc01c5, 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_29331_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_29334(a0, a1) { // fn#29334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:558, offset: 0x00fc0223, 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 _fun29335;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_29336(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_29336(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_29336(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun29335;
|
||||
}
|
||||
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 addSubscriptionPlan(a0) { // fn#29337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:1512, offset: 0x00fc0395, size: 338 bytes, params: 2, frame: 22
|
||||
var r2;
|
||||
var Set;
|
||||
var Object;
|
||||
var value2;
|
||||
var prototype;
|
||||
var value3;
|
||||
var set;
|
||||
var value4;
|
||||
var Array;
|
||||
var from;
|
||||
var value7;
|
||||
var skuId3;
|
||||
var items2;
|
||||
var value8;
|
||||
var value9;
|
||||
const skuId = a0.skuId;
|
||||
let binding = env0_15;
|
||||
binding[a0.id] = a0;
|
||||
const prices = a0.prices;
|
||||
const DEFAULT = PriceSetAssignmentPurchaseTypes.DEFAULT;
|
||||
let property = prices[DEFAULT];
|
||||
if (property != null) {
|
||||
Set = global.Set;
|
||||
Object = global.Object;
|
||||
value2 = Object.keys(property.paymentSourcePrices);
|
||||
prototype = Set.prototype;
|
||||
value3 = Object.create(prototype, {constructor: {value: Set}});
|
||||
set = new Set();
|
||||
value4 = set instanceof Object ? set : value3;
|
||||
binding = env0_19;
|
||||
binding[a0.id] = value4;
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
binding = env0_20;
|
||||
property = binding[a0.skuId];
|
||||
if (property != null) {
|
||||
r2 = property;
|
||||
} else {
|
||||
set = new global.Set();
|
||||
}
|
||||
value7 = Reflect.apply(from, Array, [r2]);
|
||||
binding = env0_20;
|
||||
skuId3 = a0.skuId;
|
||||
Set = global.Set;
|
||||
items2 = [];
|
||||
value8 = arraySpread(items2, value7, 0, value4);
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
arraySpread(items2, Reflect.apply(from, Array, [value4]), value8, value4);
|
||||
prototype = Set.prototype;
|
||||
value9 = Object.create(prototype, {constructor: {value: Set}});
|
||||
set = new Set();
|
||||
binding[skuId3] = set instanceof Object ? set : value9;
|
||||
}
|
||||
property = env0_16[skuId];
|
||||
if (property != null) {
|
||||
property.add(a0.id);
|
||||
} else {
|
||||
binding = env0_16;
|
||||
Set = global.Set;
|
||||
items2 = [a0.id];
|
||||
binding[skuId] = new Set();
|
||||
}
|
||||
}
|
||||
|
||||
function initializeNonePlans() { // fn#29338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:1813, offset: 0x00fc04e7, size: 116 bytes, params: 1, frame: 12
|
||||
const NONE_MONTH = SubscriptionPlans.NONE_MONTH;
|
||||
const NONE_YEAR = SubscriptionPlans.NONE_YEAR;
|
||||
const NONE_3_MONTH = SubscriptionPlans.NONE_3_MONTH;
|
||||
const NONE_6_MONTH = SubscriptionPlans.NONE_6_MONTH;
|
||||
[SubscriptionPlanInfo[NONE_MONTH], SubscriptionPlanInfo[NONE_YEAR], SubscriptionPlanInfo[NONE_3_MONTH],
|
||||
SubscriptionPlanInfo[NONE_6_MONTH]].forEach(_fun29339);
|
||||
}
|
||||
|
||||
function addSubscriptionPlanFromServer(a0) { // fn#29340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:2109, offset: 0x00fc05d3, size: 34 bytes, params: 2, frame: 12
|
||||
addSubscriptionPlan(SubscriptionPlanRecord.createFromServer(a0));
|
||||
}
|
||||
|
||||
function LOGOUT_29341() { // fn#29341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:2194, offset: 0x00fc05f5, size: 150 bytes, params: 1, frame: 16
|
||||
(require(1944) /* metro dependency 1944: FunctionUtils */).clearObject(env0_15);
|
||||
(require(1944) /* metro dependency 1944: FunctionUtils */).clearObject(env0_16);
|
||||
env0_17.clear();
|
||||
env0_18.clear();
|
||||
(require(1944) /* metro dependency 1944: FunctionUtils */).clearObject(env0_19);
|
||||
(require(1944) /* metro dependency 1944: FunctionUtils */).clearObject(env0_20);
|
||||
initializeNonePlans();
|
||||
}
|
||||
|
||||
function _fun29342(a0) { // fn#29342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:2402, offset: 0x00fc068b, size: 427 bytes, params: 2, frame: 16
|
||||
const closure = SubscriptionPlanStore;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'getPlanIdsForSkus', value: value_29344}, {key: 'getFetchedSKUIDs',
|
||||
value: value_29346}, {key: 'getForSKU', value: value_29347}, {key: 'getForSkuAndInterval', value: function(a0,
|
||||
a1) {
|
||||
var value = a2;
|
||||
var env0_0 = a1;
|
||||
var env0_1 = value !== undefined ? value : 1;
|
||||
return this.getForSKU(a0).find(_fun29350);
|
||||
}}, {key: 'get', value: value_29351}, {key: 'isFetchingForSKU', value: value_29352}, {key: 'isFetchingForSKUs',
|
||||
value: function(a0) {
|
||||
var env0_0 = this;
|
||||
return a0.some(_fun29354);
|
||||
}}, {key: 'isLoadedForSKU', value: value_29355}, {key: 'isLoadedForSKUs', value: function(a0) {
|
||||
var env0_0 = this;
|
||||
return a0.every(_fun29357);
|
||||
}}, {key: 'isFetchingForPremiumSKUs', value: function() {
|
||||
var env0_0 = this;
|
||||
return ACTIVE_PREMIUM_SKUS.some(_fun29359);
|
||||
}}, {key: 'isLoadedForPremiumSKUs', value: function() {
|
||||
var env0_0 = this;
|
||||
return ACTIVE_PREMIUM_SKUS.every(_fun29361);
|
||||
}}, {key: 'ignoreSKUFetch', value: value_29362}, {key: 'getPaymentSourcesForPlanId', value: value_29363},
|
||||
{key: 'getPaymentSourceIds', value: value_29364}, {key: 'hasPaymentSourceForSKUId', value: value_29367},
|
||||
{key: 'hasPaymentSourceForSKUIds', value: function(a0, a1) {
|
||||
var env0_0 = this;
|
||||
var env0_1 = a0;
|
||||
return a1.every(_fun29369);
|
||||
}}]);
|
||||
}
|
||||
|
||||
function SUBSCRIPTION_PLANS_FETCH({skuId}) { // fn#29370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4443, offset: 0x00fc0c4e, size: 29 bytes, params: 2, frame: 11
|
||||
env0_17.add(skuId);
|
||||
}
|
||||
|
||||
function SUBSCRIPTION_PLANS_FETCH_SUCCESS({skuId, subscriptionPlans}) { // fn#29371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4535, offset: 0x00fc0c6b, size: 133 bytes, params: 2, frame: 15
|
||||
let binding = env0_16;
|
||||
let Set = global.Set;
|
||||
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
let set = new Set();
|
||||
binding[skuId] = set instanceof Object ? set : value2;
|
||||
binding = env0_20;
|
||||
Set = global.Set;
|
||||
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
set = new Set();
|
||||
binding[skuId] = set instanceof Object ? set : value4;
|
||||
subscriptionPlans.forEach(addSubscriptionPlanFromServer);
|
||||
env0_17.delete(skuId);
|
||||
env0_18.delete(skuId);
|
||||
}
|
||||
|
||||
function SUBSCRIPTION_PLANS_FETCH_FAILURE({skuId}) { // fn#29372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4736, offset: 0x00fc0cf0, size: 43 bytes, params: 2, frame: 12
|
||||
env0_17.delete(skuId);
|
||||
env0_18.delete(skuId);
|
||||
}
|
||||
|
||||
function GIFT_CODE_RESOLVE_SUCCESS({giftCode}) { // fn#29373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4874, offset: 0x00fc0d1b, size: 45 bytes, params: 2, frame: 11
|
||||
if (giftCode.subscription_plan != null) {
|
||||
addSubscriptionPlanFromServer(giftCode.subscription_plan);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun29339({id, name, interval, intervalCount, skuId}) { // fn#29339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:1922, offset: 0x00fc055b, size: 120 bytes, params: 2, frame: 15
|
||||
const value = environment.__proto__;
|
||||
const addSubscriptionPlanBinding = addSubscriptionPlan;
|
||||
const createFromServer = SubscriptionPlanRecord.createFromServer;
|
||||
const USD = CurrencyCodes.USD;
|
||||
addSubscriptionPlanBinding(Reflect.apply(createFromServer, SubscriptionPlanRecord, [{id: id, name: name,
|
||||
interval: interval, interval_count: intervalCount, tax_inclusive: true, sku_id: skuId, currency: USD, price: 0,
|
||||
price_tier: 0}]));
|
||||
}
|
||||
|
||||
function value_29344(a0) { // fn#29344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:2744, offset: 0x00fc0836, size: 168 bytes, params: 2, frame: 24
|
||||
var r13;
|
||||
var r2;
|
||||
var r1;
|
||||
var value4;
|
||||
var Array;
|
||||
var from;
|
||||
var property;
|
||||
var Set;
|
||||
var prototype;
|
||||
var value5;
|
||||
var set;
|
||||
var value6;
|
||||
var value7;
|
||||
var push;
|
||||
var items2;
|
||||
var value8;
|
||||
const items3 = [];
|
||||
const value2 = _createForOfIteratorHelperLoose_29334(a0);
|
||||
const value3 = value2();
|
||||
let done = value3.done;
|
||||
if (!done) {
|
||||
r2 = value3;
|
||||
while (true) {
|
||||
value4 = r2.value;
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
property = env1_16[value4];
|
||||
if (property != null) {
|
||||
r1 = property;
|
||||
} else {
|
||||
Set = global.Set;
|
||||
prototype = Set.prototype;
|
||||
value5 = Object.create(prototype, {constructor: {value: Set}});
|
||||
set = new Set();
|
||||
value6 = set instanceof Object ? set : value5;
|
||||
r1 = value6;
|
||||
r13 = value5;
|
||||
}
|
||||
value7 = Reflect.apply(from, Array, [r1]);
|
||||
value7.sort(_fun29345);
|
||||
push = items3.push;
|
||||
items2 = [];
|
||||
arraySpread(items2, value7, 0, r13);
|
||||
apply(push, items2, items3, r13);
|
||||
value8 = value2();
|
||||
done = value8.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r2 = value8;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return items3;
|
||||
}
|
||||
|
||||
function value_29346() { // fn#29346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3054, offset: 0x00fc0936, size: 41 bytes, params: 1, frame: 12
|
||||
return (importDefault(21) /* metro dependency 21: SnowflakeUtils */).keys(env1_16);
|
||||
}
|
||||
|
||||
function value_29347(a0) { // fn#29347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3113, offset: 0x00fc095f, size: 61 bytes, params: 2, frame: 12
|
||||
var environment;
|
||||
const Array = global.Array;
|
||||
const from = Array.from;
|
||||
const value = environment.__proto__;
|
||||
return Reflect.apply(from, Array, [env1_16[a0] ?? []]).map(_fun29348);
|
||||
}
|
||||
|
||||
function value_29349(a0, a1) { // fn#29349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3221, offset: 0x00fc09ac, size: 60 bytes, params: 3, frame: 12
|
||||
const value = a2;
|
||||
const env0_0 = a1;
|
||||
const env0_1 = value !== undefined ? value : 1;
|
||||
return this.getForSKU(a0).find(_fun29350);
|
||||
}
|
||||
|
||||
function value_29353(a0) { // fn#29353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3447, offset: 0x00fc0a25, size: 30 bytes, params: 2, frame: 11
|
||||
return a0.some(_fun29354);
|
||||
}
|
||||
|
||||
function value_29355(a0) { // fn#29355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3534, offset: 0x00fc0a5a, size: 68 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__;
|
||||
const value2 = env1_18.has(a0);
|
||||
return value2 ? !!value2 : !env1_17.has(a0) && env1_16[a0] != null;
|
||||
}
|
||||
|
||||
function value_29356(a0) { // fn#29356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3617, offset: 0x00fc0a9e, size: 30 bytes, params: 2, frame: 11
|
||||
return a0.every(_fun29357);
|
||||
}
|
||||
|
||||
function value_29358() { // fn#29358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3713, offset: 0x00fc0ad3, size: 34 bytes, params: 1, frame: 11
|
||||
return ACTIVE_PREMIUM_SKUS.some(_fun29359);
|
||||
}
|
||||
|
||||
function value_29360() { // fn#29360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3807, offset: 0x00fc0af5, size: 34 bytes, params: 1, frame: 11
|
||||
return ACTIVE_PREMIUM_SKUS.every(_fun29361);
|
||||
}
|
||||
|
||||
function value_29363(a0) { // fn#29363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3955, offset: 0x00fc0b2f, size: 36 bytes, params: 2, frame: 12
|
||||
return env1_19.hasOwnProperty(a0) ? env1_19[a0] : null;
|
||||
}
|
||||
|
||||
function value_29364() { // fn#29364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4039, offset: 0x00fc0b53, size: 74 bytes, params: 1, frame: 13
|
||||
const Set = global.Set;
|
||||
const set = new Set();
|
||||
const Object = global.Object;
|
||||
Object.values(env1_19).forEach(function(a0) {
|
||||
return a0.forEach(_fun29366);
|
||||
});
|
||||
return set;
|
||||
}
|
||||
|
||||
function value_29367(a0, a1) { // fn#29367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4169, offset: 0x00fc0bc9, size: 66 bytes, params: 3, frame: 13
|
||||
const value = environment.__proto__;
|
||||
const NONE = PremiumSubscriptionSKUs.NONE;
|
||||
return NONE === a1 || env1_20[a1] != null && env1_20[a1].has(a0);
|
||||
}
|
||||
|
||||
function value_29368(a0, a1) { // fn#29368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4267, offset: 0x00fc0c0b, size: 37 bytes, params: 3, frame: 11
|
||||
const env0_1 = a0;
|
||||
return a1.every(_fun29369);
|
||||
}
|
||||
|
||||
function _fun29345(a0, a1) { // fn#29345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:2887, offset: 0x00fc08de, size: 88 bytes, params: 3, frame: 14
|
||||
let value = environment.__proto__.__proto__;
|
||||
const property = env2_15[a0];
|
||||
const property2 = env2_15[a1];
|
||||
const binding = env2_21;
|
||||
value = binding.indexOf(property.interval);
|
||||
value -= binding.indexOf(property2.interval);
|
||||
return value || property.intervalCount - property2.intervalCount;
|
||||
}
|
||||
|
||||
function _fun29348(a0) { // fn#29348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3175, offset: 0x00fc099c, size: 16 bytes, params: 2, frame: 2
|
||||
return env2_15[a0];
|
||||
}
|
||||
|
||||
function _fun29350(a0) { // fn#29350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3270, offset: 0x00fc09e8, size: 39 bytes, params: 2, frame: 4
|
||||
return a0.interval === require && a0.intervalCount === env0_1;
|
||||
}
|
||||
|
||||
function _fun29354(a0) { // fn#29354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3474, offset: 0x00fc0a43, size: 23 bytes, params: 2, frame: 11
|
||||
return env0_0.isFetchingForSKU(a0);
|
||||
}
|
||||
|
||||
function _fun29357(a0) { // fn#29357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3645, offset: 0x00fc0abc, size: 23 bytes, params: 2, frame: 11
|
||||
return env0_0.isLoadedForSKU(a0);
|
||||
}
|
||||
|
||||
function _fun29365(a0) { // fn#29365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4097, offset: 0x00fc0b9d, size: 22 bytes, params: 2, frame: 11
|
||||
return a0.forEach(_fun29366);
|
||||
}
|
||||
|
||||
function _fun29369(a0) { // fn#29369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4297, offset: 0x00fc0c30, size: 30 bytes, params: 2, frame: 13
|
||||
return env0_0.hasPaymentSourceForSKUId(env0_1, a0);
|
||||
}
|
||||
|
||||
function _fun29366(a0) { // fn#29366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4111, offset: 0x00fc0bb3, size: 22 bytes, params: 2, frame: 11
|
||||
return env1_0.add(a0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,355 @@
|
||||
/* Metro module 3808; source: stores/billing/SubscriptionStore.tsx; dependencies: [6, 7, 15, 17, 18, 3803, 3809, 1226, 661, 566, 694, 2] */
|
||||
function _fun29375(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#29375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:6, offset: 0x00fc0d9c, size: 547 bytes, params: 8, frame: 21
|
||||
const closure = function() {
|
||||
env0_10 = null;
|
||||
env0_11 = null;
|
||||
env0_12 = null;
|
||||
env0_13 = null;
|
||||
env0_14 = null;
|
||||
env0_15 = false;
|
||||
env0_16 = null;
|
||||
env0_17 = false;
|
||||
env0_18 = false;
|
||||
env0_20 = false;
|
||||
env0_21 = null;
|
||||
};
|
||||
const isPaid = function({status}) {
|
||||
return status !== SubscriptionStatusTypes.UNPAID;
|
||||
};
|
||||
const closure2 = getSubscriptionOfType;
|
||||
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 */;
|
||||
let env0_4 = importDefault(18) /* metro dependency 18 */;
|
||||
const env0_5 = (require(3803) /* metro dependency 3803: SubscriptionPlanRecord */).isNoneSubscription;
|
||||
const env0_6 = (require(3809) /* metro dependency 3809: SubscriptionRecord */).SubscriptionRecord;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_8 = value.SubscriptionStatusTypes;
|
||||
const env0_9 = value.SubscriptionTypes;
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
_fun29384(Store).displayName = 'SubscriptionStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
||||
{BILLING_SUBSCRIPTION_FETCH_SUCCESS: function({subscriptions, lastLazyPerkSync}) {
|
||||
var env0_4 = AuthenticationStore.getId();
|
||||
subscriptions.forEach(_fun29409);
|
||||
env0_10 = {};
|
||||
env0_11 = {};
|
||||
env0_13 = [];
|
||||
env0_14 = [];
|
||||
env0_21 = lastLazyPerkSync;
|
||||
}, BILLING_SUBSCRIPTION_UPDATE_SUCCESS: BILLING_SUBSCRIPTION_UPDATE_SUCCESS,
|
||||
BILLING_MOST_RECENT_SUBSCRIPTION_FETCH_START: function() {
|
||||
env0_20 = true;
|
||||
}, BILLING_MOST_RECENT_SUBSCRIPTION_FETCH_SUCCESS: function({subscription}) {
|
||||
env0_15 = true;
|
||||
env0_20 = false;
|
||||
if (subscription != null) {
|
||||
var user_id = subscription.user_id;
|
||||
if (user_id !== AuthenticationStore.getId()) {
|
||||
env0_15 = false;
|
||||
return undefined;
|
||||
}
|
||||
env0_12 = SubscriptionRecord.createFromServer(subscription);
|
||||
}
|
||||
}, BILLING_MOST_RECENT_SUBSCRIPTION_FETCH_FAIL: function() {
|
||||
env0_20 = false;
|
||||
}, BILLING_PREVIOUS_PREMIUM_SUBSCRIPTION_FETCH_SUCCESS: function({subscription}) {
|
||||
env0_17 = true;
|
||||
if (subscription != null) {
|
||||
var user_id = subscription.user_id;
|
||||
if (user_id !== AuthenticationStore.getId()) {
|
||||
env0_17 = false;
|
||||
return undefined;
|
||||
}
|
||||
env0_16 = SubscriptionRecord.createFromServer(subscription);
|
||||
}
|
||||
}, BILLING_SUBSCRIPTION_RESET: closure, BILLING_SUBSCRIPTION_REWARD_ELIGIBILITY_FETCH_START: function() {
|
||||
env0_18 = true;
|
||||
}, BILLING_SUBSCRIPTION_REWARD_ELIGIBILITY_FETCH_SUCCESS: function(a0) {
|
||||
env0_19 = a0.eligible;
|
||||
env0_18 = false;
|
||||
}, BILLING_SUBSCRIPTION_REWARD_ELIGIBILITY_FETCH_FAILURE: function(a0) {
|
||||
var r3;
|
||||
if (a0 == null) {
|
||||
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", r3);
|
||||
throw undefined;
|
||||
}
|
||||
env0_19 = false;
|
||||
env0_18 = false;
|
||||
}, LOGOUT: closure});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/billing/SubscriptionStore.tsx');
|
||||
exports.default = value;
|
||||
exports.getSubscriptionOfType = closure2;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_29376() { // fn#29376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:276, offset: 0x00fc0fbf, 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_29376_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function getUpdatedActiveSubscriptions({activeSubscriptions, record}) { // fn#29379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:549, offset: 0x00fc101d, size: 145 bytes, params: 2, frame: 17
|
||||
var items2;
|
||||
const index = activeSubscriptions.findIndex(function({id}) {
|
||||
return id === record.id;
|
||||
});
|
||||
if (index === -1) {
|
||||
arraySpread([record], activeSubscriptions, 1, undefined);
|
||||
} else {
|
||||
items2 = [];
|
||||
arraySpread(items2, activeSubscriptions, 0, undefined);
|
||||
if (isPaid(record)) {
|
||||
if (record.status !== SubscriptionStatusTypes.ENDED) {
|
||||
items2[index] = record;
|
||||
} else {
|
||||
items2.splice(index, 1);
|
||||
}
|
||||
} else {
|
||||
items2.splice(index, 1);
|
||||
}
|
||||
}
|
||||
return items2;
|
||||
}
|
||||
|
||||
function getSubscriptionOfType(a0, a1) { // fn#29383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:888, offset: 0x00fc111a, size: 118 bytes, params: 3, frame: 23
|
||||
var propertyName;
|
||||
var propertyName2;
|
||||
var property;
|
||||
var userId;
|
||||
var getId;
|
||||
var type;
|
||||
const value = a2;
|
||||
const r8 = !(value !== undefined) || value ? env0_11 : env0_10;
|
||||
if (r8 == null) {
|
||||
return null;
|
||||
}
|
||||
const properties = Object.keys(r8);
|
||||
const properties2 = 0;
|
||||
const properties3 = properties.length;
|
||||
if (properties === undefined) {
|
||||
return null;
|
||||
}
|
||||
let r5 = properties2;
|
||||
loopExit7: while (true) {
|
||||
propertyName = properties[r5];
|
||||
propertyName2 = r5 + 1;
|
||||
if (propertyName === undefined) {
|
||||
return null;
|
||||
}
|
||||
property = r8[propertyName];
|
||||
userId = property.userId;
|
||||
getId = AuthenticationStore.getId;
|
||||
if (userId !== Reflect.apply(getId, AuthenticationStore, [])) {
|
||||
return null;
|
||||
}
|
||||
type = property.type;
|
||||
if (type !== a0) {
|
||||
r5 = propertyName2;
|
||||
continue;
|
||||
}
|
||||
if (a1 == null) {
|
||||
break loopExit7;
|
||||
}
|
||||
if (a1(property)) {
|
||||
break loopExit7;
|
||||
}
|
||||
r5 = propertyName2;
|
||||
continue;
|
||||
}
|
||||
return property;
|
||||
}
|
||||
|
||||
function _fun29384(a0) { // fn#29384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:1085, offset: 0x00fc1190, size: 477 bytes, params: 2, frame: 16
|
||||
const closure = SubscriptionStore;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(AuthenticationStore);
|
||||
}}, {key: 'hasFetchedSubscriptions', value: value_29387}, {key: 'hasFetchedMostRecentPremiumTypeSubscription',
|
||||
value: value_29388}, {key: 'hasFetchedPreviousPremiumTypeSubscription', value: value_29389},
|
||||
{key: 'getPremiumSubscription', value: value_29390}, {key: 'getPremiumTypeSubscription', value: value_29392},
|
||||
{key: 'getSubscriptions', value: value_29393}, {key: 'getSubscriptionById', value: value_29394},
|
||||
{key: 'getActiveGuildSubscriptions', value: value_29395}, {key: 'getActiveApplicationSubscriptions',
|
||||
value: value_29396}, {key: 'getSubscriptionForPlanIds', value: value_29397},
|
||||
{key: 'getMostRecentPremiumTypeSubscription', value: value_29400}, {key: 'getPreviousPremiumTypeSubscription',
|
||||
value: value_29401}, {key: 'getIsSubscriptionEligibleForReward', value: value_29402},
|
||||
{key: 'getIsFetchingSubscriptionRewardEligibility', value: value_29403},
|
||||
{key: 'getIsFetchingMostRecentSubscription', value: value_29404}, {key: 'getLastLazyPerkSync',
|
||||
value: value_29405}, {key: 'getPremiumGroupSubscription', value: function() {
|
||||
var getSubscriptionOfTypeBinding = getSubscriptionOfType;
|
||||
var PREMIUM = SubscriptionTypes.PREMIUM;
|
||||
return getSubscriptionOfTypeBinding(PREMIUM, _fun29407, true);
|
||||
}}]);
|
||||
}
|
||||
|
||||
function BILLING_SUBSCRIPTION_FETCH_SUCCESS({subscriptions, lastLazyPerkSync}) { // fn#29408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:3020, offset: 0x00fc15ab, size: 105 bytes, params: 2, frame: 18
|
||||
const object = {};
|
||||
const object2 = {};
|
||||
const items = [];
|
||||
const items2 = [];
|
||||
const env0_4 = AuthenticationStore.getId();
|
||||
subscriptions.forEach(_fun29409);
|
||||
}
|
||||
|
||||
function BILLING_SUBSCRIPTION_UPDATE_SUCCESS({subscription}) { // fn#29410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:3385, offset: 0x00fc16e0, size: 252 bytes, params: 2, frame: 16
|
||||
var r0;
|
||||
var fromServer;
|
||||
var object2;
|
||||
const user_id = subscription.user_id;
|
||||
const getId = AuthenticationStore.getId;
|
||||
if (user_id === Reflect.apply(getId, AuthenticationStore, [])) {
|
||||
fromServer = SubscriptionRecord.createFromServer(subscription);
|
||||
object2 = {};
|
||||
copyDataProperties(object2, env0_10, undefined);
|
||||
object2[fromServer.id] = fromServer;
|
||||
if (isPaid(fromServer)) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, env0_11, undefined);
|
||||
object2[fromServer.id] = fromServer;
|
||||
}
|
||||
r0 = env0_13 != null && fromServer.type === SubscriptionTypes.GUILD;
|
||||
if (r0) {
|
||||
env0_13 = getUpdatedActiveSubscriptions({activeSubscriptions: env0_13, record: fromServer});
|
||||
}
|
||||
r0 = env0_14 != null && fromServer.type === SubscriptionTypes.APPLICATION;
|
||||
if (r0) {
|
||||
env0_13 = getUpdatedActiveSubscriptions({activeSubscriptions: env0_14, record: fromServer});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function SubscriptionStore() { // fn#29385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:1097, offset: 0x00fc136d, size: 113 bytes, params: 1, frame: 20
|
||||
const value = environment.__proto__;
|
||||
env1_0(this, SubscriptionStore);
|
||||
const value3 = env1_3(SubscriptionStore);
|
||||
return env1_2(this, _isNativeReflectConstruct_29376() ? global.Reflect.construct(value3, arguments,
|
||||
env1_3(this).constructor) : value3.apply(this, arguments));
|
||||
}
|
||||
|
||||
function value_29390() { // fn#29390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:1686, offset: 0x00fc1406, size: 44 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
let value = a0;
|
||||
const r4 = !(value !== undefined) || value;
|
||||
value = environment.__proto__;
|
||||
const getSubscriptionOfTypeBinding = getSubscriptionOfType;
|
||||
const PREMIUM = SubscriptionTypes.PREMIUM;
|
||||
return getSubscriptionOfTypeBinding(PREMIUM, function(a0) {
|
||||
return !isNoneSubscription(a0.planId);
|
||||
}, r4);
|
||||
}
|
||||
|
||||
function value_29392() { // fn#29392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:1803, offset: 0x00fc144e, size: 37 bytes, params: 1, frame: 14
|
||||
let value = a0;
|
||||
const r3 = !(value !== undefined) || value;
|
||||
value = environment.__proto__;
|
||||
const getSubscriptionOfTypeBinding = getSubscriptionOfType;
|
||||
const PREMIUM = SubscriptionTypes.PREMIUM;
|
||||
return getSubscriptionOfTypeBinding(PREMIUM, undefined, r3);
|
||||
}
|
||||
|
||||
function value_29393() { // fn#29393, offset: 0x00fc1473, size: 29 bytes, params: 1, frame: 3
|
||||
let value = a0;
|
||||
let r0 = !(value !== undefined) || value;
|
||||
value = environment.__proto__;
|
||||
r0 = r0 ? env1_11 : env1_10;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_29394(a0) { // fn#29394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:1962, offset: 0x00fc1490, size: 39 bytes, params: 2, frame: 5
|
||||
let value = environment.__proto__;
|
||||
const binding = env1_10;
|
||||
value = undefined;
|
||||
return (binding == null ? value : binding[a0]) ?? value;
|
||||
}
|
||||
|
||||
function value_29397(a0) { // fn#29397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:2205, offset: 0x00fc14b7, size: 128 bytes, params: 2, frame: 14
|
||||
var environment;
|
||||
var r0;
|
||||
var value3;
|
||||
const value = a1;
|
||||
const r1 = !(value !== undefined) || value;
|
||||
const Set = global.Set;
|
||||
let set = new Set(a0);
|
||||
set = environment.__proto__;
|
||||
const r5 = r1 ? env1_11 : env1_10;
|
||||
set = null;
|
||||
if (set == r5) {
|
||||
r0 = set;
|
||||
} else {
|
||||
value3 = global.Object.values(r5).find(function({items}) {
|
||||
return items.some(_fun29399);
|
||||
});
|
||||
r0 = set != value3 ? value3 : set;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_29406() { // fn#29406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:2808, offset: 0x00fc1570, size: 37 bytes, params: 1, frame: 15
|
||||
const getSubscriptionOfTypeBinding = getSubscriptionOfType;
|
||||
const PREMIUM = SubscriptionTypes.PREMIUM;
|
||||
return getSubscriptionOfTypeBinding(PREMIUM, function(a0) {
|
||||
return a0.hasAnyPremiumGroup && a0.statusAllowsPerks;
|
||||
}, true);
|
||||
}
|
||||
|
||||
function _fun29409(a0) { // fn#29409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:3139, offset: 0x00fc1614, size: 204 bytes, params: 2, frame: 14
|
||||
var r1;
|
||||
var value2;
|
||||
var fromServer;
|
||||
var type;
|
||||
const user_id = a0.user_id;
|
||||
if (user_id === env0_4) {
|
||||
value2 = environment.__proto__;
|
||||
fromServer = SubscriptionRecord.createFromServer(a0);
|
||||
env0_0[fromServer.id] = fromServer;
|
||||
if (isPaid(fromServer)) {
|
||||
env0_1[fromServer.id] = fromServer;
|
||||
type = fromServer.type;
|
||||
r1 = type === SubscriptionTypes.GUILD && fromServer.status !== SubscriptionStatusTypes.ENDED;
|
||||
if (r1) {
|
||||
env0_2.push(fromServer);
|
||||
}
|
||||
type = fromServer.type;
|
||||
r1 = type === SubscriptionTypes.APPLICATION && fromServer.status !== SubscriptionStatusTypes.ENDED;
|
||||
if (r1) {
|
||||
env0_3.push(fromServer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun29398({items}) { // fn#29398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:2301, offset: 0x00fc1537, size: 29 bytes, params: 2, frame: 11
|
||||
return items.some(_fun29399);
|
||||
}
|
||||
|
||||
function _fun29399({planId}) { // fn#29399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:2318, offset: 0x00fc1554, size: 28 bytes, params: 2, frame: 11
|
||||
return env1_0.has(planId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,900 @@
|
||||
/* Metro module 7064; source: stores/billing/UserOfferStore.tsx; dependencies: [6, 7, 15, 17, 18, 7065, 7247, 1878, 5181, 3808, 1880, 7248, 3802, 566, 694, 2] */
|
||||
function _fun56003(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:6, offset: 0x013bad31, size: 673 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_56006 = 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 = LOGOUT_56010;
|
||||
const closure2 = function() {
|
||||
UserStore.getCurrentUser();
|
||||
};
|
||||
const handleReferralTrialStoreUpdate = function() {
|
||||
return false;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
const referralTrialStore = importDefault(7065) /* metro dependency 7065: ReferralTrialStore */;
|
||||
const userDiscountOfferRecord = importDefault(7247) /* metro dependency 7247: UserDiscountOfferRecord */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const entitlementStore = importDefault(5181) /* metro dependency 5181: EntitlementStore */;
|
||||
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
|
||||
let value = require(1880) /* metro dependency 1880: PremiumConstants */;
|
||||
const env0_12 = value.ANNUAL_DISCOUNT_IDS;
|
||||
const env0_13 = value.DISCOUNT_OFFERS_REQUIRES_REMINDER_ROLLOUT;
|
||||
const env0_14 = value.PREMIUM_TIER_2_CHURN_1_MONTH_DISCOUNT_ID;
|
||||
const env0_15 = value.PREMIUM_TIER_2_CHURN_3_MONTH_DISCOUNT_ID;
|
||||
const env0_16 = value.SubscriptionPlanInfo;
|
||||
const env0_17 = value.SubscriptionTrials;
|
||||
const env0_18 = value.TRIAL_OFFERS_REQUIRES_REMINDER_ROLLOUT;
|
||||
object = {userOffersLastFetchedAtDate: undefined, userTrialOffers: {}, userDiscountOffers: {},
|
||||
userDiscounts: undefined, isFetching: false, lastFetchSuccessful: false};
|
||||
const emitChanges = function() {
|
||||
return true;
|
||||
};
|
||||
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
|
||||
value = _fun56016(PersistedStore);
|
||||
value.displayName = 'UserOfferStore';
|
||||
value.persistKey = 'UserOfferStore';
|
||||
value.migrations = [function(a0) {
|
||||
var r2;
|
||||
var object;
|
||||
var value = a0 == null;
|
||||
var value2 = undefined;
|
||||
r2 = value ? value2 : a0.userDiscounts;
|
||||
if (r2 != null) {
|
||||
object = {};
|
||||
copyDataProperties(object, a0, value);
|
||||
object['userDiscountOffers'] = r2;
|
||||
return object;
|
||||
}
|
||||
return value2;
|
||||
}, function(a0) {
|
||||
if (a0 != null) {
|
||||
if (global.Object.hasOwn(a0, 'userAnnualOfferLastFetchedAtDate')) {
|
||||
delete a0.userAnnualOfferLastFetchedAtDate;
|
||||
}
|
||||
return a0;
|
||||
}
|
||||
}, function(a0) {
|
||||
var r0;
|
||||
var object;
|
||||
var value = a0;
|
||||
if (value != null) {
|
||||
if (value?.isFetching != null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
object = {};
|
||||
copyDataProperties(object, value, null);
|
||||
object['isFetching'] = false;
|
||||
r0 = object;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
}, function(a0) {
|
||||
var r5;
|
||||
var property;
|
||||
var object;
|
||||
var value = undefined;
|
||||
if ((a0 == null ? value : a0.userDiscountOffers) != null) {
|
||||
object = {};
|
||||
copyDataProperties(object, a0, r5);
|
||||
property = global.Object;
|
||||
value = global.Object.entries(a0.userDiscountOffers);
|
||||
value = property.fromEntries(value.map(_fun56053));
|
||||
object['userDiscountOffers'] = value;
|
||||
return object;
|
||||
}
|
||||
return value;
|
||||
}];
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
||||
{BILLING_USER_OFFER_FETCH_START: BILLING_USER_OFFER_FETCH_START,
|
||||
BILLING_USER_TRIAL_OFFER_ACKNOWLEDGED_SUCCESS: BILLING_USER_TRIAL_OFFER_ACKNOWLEDGED_SUCCESS,
|
||||
BILLING_USER_OFFER_FETCH_SUCCESS: BILLING_USER_OFFER_FETCH_SUCCESS,
|
||||
BILLING_USER_OFFER_ACKNOWLEDGED_SUCCESS: BILLING_USER_OFFER_ACKNOWLEDGED_SUCCESS,
|
||||
BILLING_USER_OFFER_FETCH_FAIL: BILLING_USER_OFFER_FETCH_FAIL,
|
||||
BILLING_USER_OFFER_REDEEMED: BILLING_USER_OFFER_REDEEMED, BILLING_PAYMENT_SOURCE_CREATE_SUCCESS: closure2,
|
||||
BILLING_PAYMENT_SOURCE_UPDATE_SUCCESS: closure2, BILLING_PAYMENT_SOURCE_REMOVE_SUCCESS: closure2,
|
||||
LOGOUT: closure});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/billing/UserOfferStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_56004(a0, a1) { // fn#56004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:463, offset: 0x013bafd2, 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 _fun56005;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_56006(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_56006(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_56006(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun56005;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_56007() { // fn#56007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:1373, offset: 0x013bb144, 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_56007_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function LOGOUT_56010() { // fn#56010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:1712, offset: 0x013bb1a2, size: 53 bytes, params: 1, frame: 3
|
||||
env0_20.userTrialOffers = {};
|
||||
env0_20.userDiscountOffers = {};
|
||||
env0_20.userOffersLastFetchedAtDate = undefined;
|
||||
env0_20.isFetching = false;
|
||||
}
|
||||
|
||||
function rehydrateDiscountOffer(a0) { // fn#56011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:1856, offset: 0x013bb1d7, size: 270 bytes, params: 2, frame: 18
|
||||
var r6;
|
||||
var r1;
|
||||
var r0;
|
||||
var object2;
|
||||
var appliedAt;
|
||||
var value4;
|
||||
var Date;
|
||||
var date;
|
||||
var deletedAt;
|
||||
let value = a0;
|
||||
if (value instanceof UserDiscountOfferRecord) {
|
||||
r0 = value;
|
||||
} else {
|
||||
if ('discount_id' in value) {
|
||||
value = UserDiscountOfferRecord.createFromServer(value);
|
||||
r1 = value;
|
||||
} else {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value, undefined);
|
||||
appliedAt = value.appliedAt;
|
||||
value4 = null;
|
||||
if (value4 != appliedAt) {
|
||||
Date = global.Date;
|
||||
appliedAt = value.appliedAt;
|
||||
date = new Date();
|
||||
} else {
|
||||
r6 = value4;
|
||||
}
|
||||
object2['appliedAt'] = r6;
|
||||
deletedAt = value.deletedAt;
|
||||
if (value4 != deletedAt) {
|
||||
Date = global.Date;
|
||||
deletedAt = value.deletedAt;
|
||||
date = new Date();
|
||||
} else {
|
||||
r6 = value4;
|
||||
}
|
||||
object2['deletedAt'] = r6;
|
||||
object2['expiresAt'] = value4 != value.expiresAt ? new global.Date() : value4;
|
||||
r1 = new UserDiscountOfferRecord();
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function handleSubscriptionStoreUpdate_56012() { // fn#56012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:2134, offset: 0x013bb2e5, size: 175 bytes, params: 1, frame: 14
|
||||
var r0;
|
||||
var binding;
|
||||
const value3 = SubscriptionStore.getPremiumTypeSubscription() != null;
|
||||
if (value3) {
|
||||
if (env0_20.userDiscountOffers[PREMIUM_TIER_2_CHURN_1_MONTH_DISCOUNT_ID] != null) {
|
||||
binding = env0_20;
|
||||
binding.userDiscountOffers = {[PREMIUM_TIER_2_CHURN_1_MONTH_DISCOUNT_ID]: binding.userDiscountOffers[PREMIUM_TIER_2_CHURN_1_MONTH_DISCOUNT_ID]};
|
||||
} else if (env0_20.userDiscountOffers[PREMIUM_TIER_2_CHURN_3_MONTH_DISCOUNT_ID] != null) {
|
||||
binding = env0_20;
|
||||
binding.userDiscountOffers = {[PREMIUM_TIER_2_CHURN_3_MONTH_DISCOUNT_ID]: binding.userDiscountOffers[PREMIUM_TIER_2_CHURN_3_MONTH_DISCOUNT_ID]};
|
||||
} else {
|
||||
env0_20.userDiscountOffers = {};
|
||||
}
|
||||
binding = env0_20;
|
||||
binding.userTrialOffers = {};
|
||||
r0 = true;
|
||||
} else {
|
||||
r0 = value3;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun56016(a0) { // fn#56016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:2545, offset: 0x013bb3a8, size: 552 bytes, params: 2, frame: 16
|
||||
const closure = UserOfferStore;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: 'initialize', value: value_56018}, {key: 'getUserTrialOffer', value: value_56020},
|
||||
{key: 'getUserDiscountOffer', value: value_56021}, {key: 'getAnyOfUserTrialOfferId', value: value_56022},
|
||||
{key: 'isFetchingOffer', value: value_56023}, {key: 'hasFetchedOffer', value: value_56024},
|
||||
{key: 'shouldFetchReferralOffer', value: value_56025}, {key: 'shouldShowTrialOfferReminder',
|
||||
value: value_56026}, {key: 'getAlmostExpiringTrialOffersForReminder', value: value_56027},
|
||||
{key: 'shouldShowDiscountOfferReminder', value: value_56030},
|
||||
{key: 'getAlmostExpiringDiscountOffersForReminder', value: value_56031}, {key: 'getAcknowledgedOffers',
|
||||
value: value_56034}, {key: 'getUnacknowledgedDiscountOffers', value: value_56036},
|
||||
{key: 'getUnacknowledgedOffers', value: value_56038}, {key: 'hasAnyUnexpiredOffer', value: value_56040},
|
||||
{key: 'hasAnyUnexpiredDiscountOffer', value: value_56042}, {key: 'canFractionalPremiumUserUseOffer',
|
||||
value: value_56044}, {key: 'getReferrer', value: value_56045}, {key: 'getState', value: value_56046},
|
||||
{key: 'forceReset', value: function() {
|
||||
LOGOUT_56010();
|
||||
}}, {key: 'lastFetchSuccessful', value: value_56048}]);
|
||||
}
|
||||
|
||||
function _fun56052(a0) { // fn#56052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:6985, offset: 0x013bbf83, size: 110 bytes, params: 2, frame: 15
|
||||
var object2;
|
||||
var Object;
|
||||
var fromEntries;
|
||||
var Object2;
|
||||
let value = undefined;
|
||||
const userDiscountOffers = a0 == null ? value : a0.userDiscountOffers;
|
||||
if (userDiscountOffers != null) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, a0, undefined);
|
||||
Object = global.Object;
|
||||
fromEntries = Object.fromEntries;
|
||||
Object2 = global.Object;
|
||||
value = Object2.entries(a0.userDiscountOffers);
|
||||
value = Reflect.apply(fromEntries, Object, [value.map(function(a0) {
|
||||
var r0;
|
||||
var r2;
|
||||
var r4;
|
||||
var item3;
|
||||
var value3;
|
||||
var iterator = a0[Symbol.iterator]();
|
||||
var iterator2 = iterator.next;
|
||||
var item2 = Reflect.apply(iterator2, iterator, []);
|
||||
var item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
var value = undefined;
|
||||
var value2 = item2 === value;
|
||||
var r1 = value2 ? value : item;
|
||||
if (value2) {
|
||||
r0 = item2;
|
||||
r2 = value;
|
||||
r4 = value2;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r0 = item3;
|
||||
r2 = value;
|
||||
r4 = value3;
|
||||
} else {
|
||||
r0 = item3;
|
||||
r2 = item;
|
||||
r4 = value3;
|
||||
}
|
||||
}
|
||||
if (!r4) {
|
||||
r0.return();
|
||||
}
|
||||
var items = [r1];
|
||||
items[1] = rehydrateDiscountOffer(r2);
|
||||
return items;
|
||||
})]);
|
||||
object2['userDiscountOffers'] = value;
|
||||
return object2;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function BILLING_USER_OFFER_FETCH_START() { // fn#56054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:7226, offset: 0x013bc04a, size: 19 bytes, params: 1, frame: 2
|
||||
env0_20.isFetching = true;
|
||||
}
|
||||
|
||||
function BILLING_USER_TRIAL_OFFER_ACKNOWLEDGED_SUCCESS({userTrialOffer}) { // fn#56055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:7326, offset: 0x013bc05d, size: 89 bytes, params: 2, frame: 10
|
||||
if (userTrialOffer != null) {
|
||||
env0_20.userTrialOffers[userTrialOffer.trial_id] = userTrialOffer;
|
||||
} else {
|
||||
env0_20.userTrialOffers = {};
|
||||
}
|
||||
const binding = env0_20;
|
||||
const Date = global.Date;
|
||||
binding.userOffersLastFetchedAtDate = Date.now();
|
||||
}
|
||||
|
||||
function BILLING_USER_OFFER_FETCH_SUCCESS({userTrialOffer, userDiscountOffer}) { // fn#56056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:7531, offset: 0x013bc0b6, size: 182 bytes, params: 2, frame: 12
|
||||
if (userTrialOffer == null && userDiscountOffer == null) {
|
||||
LOGOUT_56010();
|
||||
}
|
||||
if (userTrialOffer != null) {
|
||||
env0_20.userTrialOffers[userTrialOffer.trial_id] = userTrialOffer;
|
||||
env0_20.userDiscountOffers = {};
|
||||
} else if (userDiscountOffer != null) {
|
||||
env0_20.userDiscountOffers[userDiscountOffer.discountId] = userDiscountOffer;
|
||||
env0_20.userTrialOffers = {};
|
||||
}
|
||||
const binding = env0_20;
|
||||
const Date = global.Date;
|
||||
binding.userOffersLastFetchedAtDate = Date.now();
|
||||
env0_20.isFetching = false;
|
||||
env0_20.lastFetchSuccessful = true;
|
||||
}
|
||||
|
||||
function BILLING_USER_OFFER_ACKNOWLEDGED_SUCCESS({userTrialOffer, userDiscount, userDiscountOffer}) { // fn#56057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:7898, offset: 0x013bc16c, size: 174 bytes, params: 2, frame: 13
|
||||
if (userTrialOffer != null) {
|
||||
env0_20.userTrialOffers[userTrialOffer.trial_id] = userTrialOffer;
|
||||
} else {
|
||||
env0_20.userTrialOffers = {};
|
||||
}
|
||||
if (userDiscount != null) {
|
||||
env0_20.userDiscountOffers[userDiscount.discountId] = userDiscount;
|
||||
} else if (userDiscountOffer != null) {
|
||||
env0_20.userDiscountOffers[userDiscountOffer.discountId] = userDiscountOffer;
|
||||
} else {
|
||||
env0_20.userDiscountOffers = {};
|
||||
}
|
||||
const binding = env0_20;
|
||||
const Date = global.Date;
|
||||
binding.userOffersLastFetchedAtDate = Date.now();
|
||||
}
|
||||
|
||||
function BILLING_USER_OFFER_FETCH_FAIL() { // fn#56058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:8244, offset: 0x013bc21a, size: 64 bytes, params: 1, frame: 12
|
||||
LOGOUT_56010();
|
||||
const binding = env0_20;
|
||||
const Date = global.Date;
|
||||
binding.userOffersLastFetchedAtDate = Date.now();
|
||||
env0_20.isFetching = false;
|
||||
env0_20.lastFetchSuccessful = false;
|
||||
}
|
||||
|
||||
function BILLING_USER_OFFER_REDEEMED({offerId}) { // fn#56059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:8405, offset: 0x013bc25a, size: 146 bytes, params: 2, frame: 14
|
||||
let Object = global.Object;
|
||||
let keys = Object.keys;
|
||||
const userDiscountOffers = env0_20.userDiscountOffers;
|
||||
const value3 = Reflect.apply(keys, Object, [userDiscountOffers]).find(_fun56060);
|
||||
if (value3 != null) {
|
||||
delete env0_20.userDiscountOffers[value3];
|
||||
}
|
||||
Object = global.Object;
|
||||
keys = Object.keys;
|
||||
const userTrialOffers = env0_20.userTrialOffers;
|
||||
const value5 = Reflect.apply(keys, Object, [userTrialOffers]).find(_fun56061);
|
||||
if (value5 != null) {
|
||||
delete env0_20.userTrialOffers[value5];
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function value_56018(a0) { // fn#56018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:2845, offset: 0x013bb5d0, size: 237 bytes, params: 2, frame: 19
|
||||
var environment;
|
||||
var value;
|
||||
var object2;
|
||||
var Object;
|
||||
var fromEntries;
|
||||
var Object2;
|
||||
if (a0 != null) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, a0, undefined);
|
||||
Object = global.Object;
|
||||
fromEntries = Object.fromEntries;
|
||||
Object2 = global.Object;
|
||||
value = Object2.entries(a0.userDiscountOffers ?? ({}));
|
||||
value = Reflect.apply(fromEntries, Object, [value.map(function(a0) {
|
||||
var r0;
|
||||
var r2;
|
||||
var r4;
|
||||
var item3;
|
||||
var value3;
|
||||
var iterator = a0[Symbol.iterator]();
|
||||
var iterator2 = iterator.next;
|
||||
var item2 = Reflect.apply(iterator2, iterator, []);
|
||||
var item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
var value = undefined;
|
||||
var value2 = item2 === value;
|
||||
var r1 = value2 ? value : item;
|
||||
if (value2) {
|
||||
r0 = item2;
|
||||
r2 = value;
|
||||
r4 = value2;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r0 = item3;
|
||||
r2 = value;
|
||||
r4 = value3;
|
||||
} else {
|
||||
r0 = item3;
|
||||
r2 = item;
|
||||
r4 = value3;
|
||||
}
|
||||
}
|
||||
if (!r4) {
|
||||
r0.return();
|
||||
}
|
||||
var items = [r1];
|
||||
items[1] = rehydrateDiscountOffer(r2);
|
||||
return items;
|
||||
})]);
|
||||
object2['userDiscountOffers'] = value;
|
||||
value = environment.__proto__;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
}
|
||||
const waitFor = this.waitFor;
|
||||
value = environment.__proto__;
|
||||
Reflect.apply(waitFor, this, [EntitlementStore, ReferralTrialStore, SubscriptionStore, UserStore]);
|
||||
this.syncWith([UserStore], emitChanges);
|
||||
this.syncWith([SubscriptionStore], handleSubscriptionStoreUpdate_56012);
|
||||
this.syncWith([ReferralTrialStore], handleReferralTrialStoreUpdate);
|
||||
}
|
||||
|
||||
function value_56020(a0) { // fn#56020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:3206, offset: 0x013bb716, size: 32 bytes, params: 2, frame: 2
|
||||
var value;
|
||||
if (a0 !== null) {
|
||||
value = environment.__proto__;
|
||||
return env1_20.userTrialOffers[a0];
|
||||
}
|
||||
}
|
||||
|
||||
function value_56021(a0) { // fn#56021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:3294, offset: 0x013bb736, size: 32 bytes, params: 2, frame: 2
|
||||
var value;
|
||||
if (a0 !== null) {
|
||||
value = environment.__proto__;
|
||||
return env1_20.userDiscountOffers[a0];
|
||||
}
|
||||
}
|
||||
|
||||
function value_56022(a0) { // fn#56022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:3389, offset: 0x013bb756, size: 78 bytes, params: 2, frame: 16
|
||||
var value4;
|
||||
var userTrialOffers;
|
||||
var value5;
|
||||
const value2 = _createForOfIteratorHelperLoose_56004(a0);
|
||||
const value3 = value2();
|
||||
let done = value3.done;
|
||||
if (done) {
|
||||
return null;
|
||||
}
|
||||
let r3 = value3;
|
||||
loopExit1: while (true) {
|
||||
value4 = r3.value;
|
||||
userTrialOffers = env1_20.userTrialOffers;
|
||||
if (userTrialOffers[value4] != null) {
|
||||
break loopExit1;
|
||||
}
|
||||
value5 = value2();
|
||||
done = value5.done;
|
||||
if (done) {
|
||||
return null;
|
||||
}
|
||||
r3 = value5;
|
||||
continue;
|
||||
}
|
||||
return value4;
|
||||
}
|
||||
|
||||
function value_56023() { // fn#56023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:3560, offset: 0x013bb7a4, size: 27 bytes, params: 1, frame: 3
|
||||
const value = environment.__proto__;
|
||||
const isFetching = env1_20.isFetching;
|
||||
return isFetching != null && isFetching;
|
||||
}
|
||||
|
||||
function value_56024() { // fn#56024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:3641, offset: 0x013bb7bf, size: 21 bytes, params: 1, frame: 2
|
||||
const userOffersLastFetchedAtDate = env1_20.userOffersLastFetchedAtDate;
|
||||
return userOffersLastFetchedAtDate != null;
|
||||
}
|
||||
|
||||
function value_56025(a0) { // fn#56025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:3735, offset: 0x013bb7d4, size: 108 bytes, params: 2, frame: 14
|
||||
const value = a0;
|
||||
const userOffersLastFetchedAtDate = env1_20.userOffersLastFetchedAtDate;
|
||||
const isFetching = env1_20.isFetching;
|
||||
const r0 = isFetching != null && isFetching;
|
||||
if (userOffersLastFetchedAtDate == null) {
|
||||
return !r0;
|
||||
}
|
||||
const Date = global.Date;
|
||||
return !r0 && (Date.now() - 600000 > userOffersLastFetchedAtDate || (value ?? 0) > userOffersLastFetchedAtDate);
|
||||
}
|
||||
|
||||
function value_56026({trial_id}) { // fn#56026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:3931, offset: 0x013bb840, size: 79 bytes, params: 2, frame: 13
|
||||
var r0;
|
||||
let value = environment.__proto__;
|
||||
const value2 = TRIAL_OFFERS_REQUIRES_REMINDER_ROLLOUT.includes(trial_id);
|
||||
if (value2) {
|
||||
value = require(7248) /* metro dependency 7248: PremiumOfferReminderExperiment */;
|
||||
value = value.isPremiumOfferReminderExperimentEnabled({location: 'user_offer_store'});
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = !value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_56027(a0) { // fn#56027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:4110, offset: 0x013bb88f, size: 171 bytes, params: 2, frame: 16
|
||||
var environment;
|
||||
var r0;
|
||||
const env0_1 = a0;
|
||||
let Object = global.Object;
|
||||
const values = Object.values;
|
||||
let value = environment.__proto__;
|
||||
const env0_2 = Reflect.apply(values, Object, [SubscriptionTrials]).map(function(a0) {
|
||||
return a0.id;
|
||||
});
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
const premiumUtilsModule = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
if (premiumUtilsModule.isPremium(currentUser)) {
|
||||
if (this.canFractionalPremiumUserUseOffer()) {
|
||||
Object = global.Object;
|
||||
value = Object.values(env1_20.userTrialOffers);
|
||||
value = value.filter(_fun56029);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = [];
|
||||
}
|
||||
} else {
|
||||
Object = global.Object;
|
||||
value = Object.values(env1_20.userTrialOffers);
|
||||
value = value.filter(_fun56029);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_56030({discountId}) { // fn#56030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:4573, offset: 0x013bb9fc, size: 79 bytes, params: 2, frame: 13
|
||||
var r0;
|
||||
let value = environment.__proto__;
|
||||
const value2 = DISCOUNT_OFFERS_REQUIRES_REMINDER_ROLLOUT.includes(discountId);
|
||||
if (value2) {
|
||||
value = require(7248) /* metro dependency 7248: PremiumOfferReminderExperiment */;
|
||||
value = value.isPremiumOfferReminderExperimentEnabled({location: 'user_offer_store'});
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = !value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_56031(a0) { // fn#56031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:4757, offset: 0x013bba4b, size: 132 bytes, params: 2, frame: 15
|
||||
var environment;
|
||||
var r0;
|
||||
var Object;
|
||||
const env0_1 = a0;
|
||||
let value = environment.__proto__;
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
const premiumUtilsModule = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
if (premiumUtilsModule.isPremium(currentUser)) {
|
||||
if (this.canFractionalPremiumUserUseOffer()) {
|
||||
Object = global.Object;
|
||||
value = Object.values(env1_20.userDiscountOffers);
|
||||
value = value.filter(_fun56032);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = [];
|
||||
}
|
||||
} else {
|
||||
Object = global.Object;
|
||||
value = Object.values(env1_20.userDiscountOffers);
|
||||
value = value.filter(_fun56032);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_56034(a0) { // fn#56034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:5157, offset: 0x013bbb9b, size: 128 bytes, params: 2, frame: 15
|
||||
var environment;
|
||||
var r0;
|
||||
var Object;
|
||||
const env0_0 = a0;
|
||||
let value = environment.__proto__;
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
const premiumUtilsModule = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
if (premiumUtilsModule.isPremium(currentUser)) {
|
||||
if (this.canFractionalPremiumUserUseOffer()) {
|
||||
Object = global.Object;
|
||||
value = Object.values(env1_20.userTrialOffers);
|
||||
value = value.filter(_fun56035);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = [];
|
||||
}
|
||||
} else {
|
||||
Object = global.Object;
|
||||
value = Object.values(env1_20.userTrialOffers);
|
||||
value = value.filter(_fun56035);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_56036() { // fn#56036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:5405, offset: 0x013bbc46, size: 129 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
var r0;
|
||||
var Object;
|
||||
let value = environment.__proto__;
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
const premiumUtilsModule = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
if (premiumUtilsModule.isPremium(currentUser)) {
|
||||
if (this.canFractionalPremiumUserUseOffer()) {
|
||||
Object = global.Object;
|
||||
value = Object.values(env1_20.userDiscountOffers ?? ({}));
|
||||
value = value.filter(_fun56037);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = [];
|
||||
}
|
||||
} else {
|
||||
Object = global.Object;
|
||||
value = Object.values(env1_20.userDiscountOffers ?? ({}));
|
||||
value = value.filter(_fun56037);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_56038(a0) { // fn#56038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:5669, offset: 0x013bbcf6, size: 128 bytes, params: 2, frame: 15
|
||||
var environment;
|
||||
var r0;
|
||||
var Object;
|
||||
const env0_0 = a0;
|
||||
let value = environment.__proto__;
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
const premiumUtilsModule = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
if (premiumUtilsModule.isPremium(currentUser)) {
|
||||
if (this.canFractionalPremiumUserUseOffer()) {
|
||||
Object = global.Object;
|
||||
value = Object.values(env1_20.userTrialOffers);
|
||||
value = value.filter(_fun56039);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = [];
|
||||
}
|
||||
} else {
|
||||
Object = global.Object;
|
||||
value = Object.values(env1_20.userTrialOffers);
|
||||
value = value.filter(_fun56039);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_56040() { // fn#56040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:5906, offset: 0x013bbda1, size: 51 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
const Object = global.Object;
|
||||
const values = Object.values;
|
||||
let value = environment.__proto__;
|
||||
const userTrialOffers = env1_20.userTrialOffers;
|
||||
return Reflect.apply(values, Object, [userTrialOffers]).some(function(a0) {
|
||||
var r0;
|
||||
var Date;
|
||||
var value = a0.expires_at == null;
|
||||
if (value) {
|
||||
r0 = value;
|
||||
} else {
|
||||
Date = global.Date;
|
||||
value = Date.parse(a0.expires_at);
|
||||
Date = global.Date;
|
||||
value = value > Date.now();
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
});
|
||||
}
|
||||
|
||||
function value_56042() { // fn#56042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:6068, offset: 0x013bbe14, size: 51 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
const Object = global.Object;
|
||||
const values = Object.values;
|
||||
const value = environment.__proto__;
|
||||
const userDiscountOffers = env1_20.userDiscountOffers;
|
||||
return Reflect.apply(values, Object, [userDiscountOffers]).some(function(a0) {
|
||||
return !a0.hasExpired();
|
||||
});
|
||||
}
|
||||
|
||||
function value_56044() { // fn#56044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:6197, offset: 0x013bbe59, size: 52 bytes, params: 1, frame: 13
|
||||
var r0;
|
||||
let value = environment.__proto__;
|
||||
const isFractionalPremiumActive2 = EntitlementStore.isFractionalPremiumActive({excludeReverseTrial: true});
|
||||
if (isFractionalPremiumActive2) {
|
||||
value = SubscriptionStore.getPremiumTypeSubscription();
|
||||
value = value == null;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = isFractionalPremiumActive2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_56045(a0) { // fn#56045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:6334, offset: 0x013bbe8d, size: 51 bytes, params: 2, frame: 4
|
||||
const value = null;
|
||||
return value == a0 ? value : env1_20.userTrialOffers[a0] == undefined ? undefined : env1_20.userTrialOffers[a0].referrer;
|
||||
}
|
||||
|
||||
function value_56048() { // fn#56048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:6551, offset: 0x013bbecf, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_20.lastFetchSuccessful;
|
||||
}
|
||||
|
||||
function _fun56060(a0) { // fn#56060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:8497, offset: 0x013bc2ec, size: 38 bytes, params: 2, frame: 2
|
||||
const userDiscountOffers = env1_20.userDiscountOffers;
|
||||
return userDiscountOffers[a0].id === offerId;
|
||||
}
|
||||
|
||||
function _fun56061(a0) { // fn#56061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:8616, offset: 0x013bc312, size: 38 bytes, params: 2, frame: 2
|
||||
const userTrialOffers = env1_20.userTrialOffers;
|
||||
return userTrialOffers[a0].id === offerId;
|
||||
}
|
||||
|
||||
function _fun56029(a0) { // fn#56029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:4297, offset: 0x013bb93a, size: 194 bytes, params: 2, frame: 16
|
||||
var Date;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
var moduleValue;
|
||||
const binding = env0_2;
|
||||
let r0 = binding.includes(a0.trial_id) && a0.expires_at != null && a0.subscription_trial != null && env0_1.includes(a0.subscription_trial.sku_id);
|
||||
if (r0) {
|
||||
Date = global.Date;
|
||||
value6 = Date.parse(a0.expires_at);
|
||||
Date = global.Date;
|
||||
value7 = Date.now();
|
||||
value8 = environment.__proto__.__proto__;
|
||||
moduleValue = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
r0 = value6 < value7 + moduleValue.getOfferNoticeThreshold(a0);
|
||||
}
|
||||
r0 = r0 && env0_0.shouldShowTrialOfferReminder(a0);
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun56032(a0) { // fn#56032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:4913, offset: 0x013bbacf, size: 166 bytes, params: 2, frame: 15
|
||||
var environment;
|
||||
var value2;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
let value = a0.expiresAt != null;
|
||||
let r0 = value && a0.discount != null && a0.discount.planIds.some(_fun56033);
|
||||
if (r0) {
|
||||
value = a0.expiresAt.getTime();
|
||||
value2 = global.Date.now();
|
||||
value3 = environment.__proto__.__proto__;
|
||||
moduleValue = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
value = value < value2 + moduleValue.getOfferNoticeThreshold(a0);
|
||||
r0 = value;
|
||||
}
|
||||
r0 = r0 && env0_0.shouldShowDiscountOfferReminder(a0);
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun56035(a0) { // fn#56035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:5310, offset: 0x013bbc1b, size: 43 bytes, params: 2, frame: 12
|
||||
const binding = env0_0;
|
||||
return binding.includes(a0.trial_id) && a0.expires_at != null;
|
||||
}
|
||||
|
||||
function _fun56037(a0) { // fn#56037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:5577, offset: 0x013bbcc7, size: 47 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
let value = a0.hasAcknowledged();
|
||||
if (value) {
|
||||
r0 = !value;
|
||||
} else {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = !ANNUAL_DISCOUNT_IDS.includes(a0.discountId);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun56039(a0) { // fn#56039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:5822, offset: 0x013bbd76, size: 43 bytes, params: 2, frame: 12
|
||||
const binding = env0_0;
|
||||
return binding.includes(a0.trial_id) && a0.expires_at == null;
|
||||
}
|
||||
|
||||
function _fun56033(a0) { // fn#56033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7242:4978, offset: 0x013bbb75, size: 38 bytes, params: 2, frame: 12
|
||||
const binding = env1_1;
|
||||
return binding.includes(SubscriptionPlanInfo[a0].skuId);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user