Initial commit

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

No files matched your search

@@ -0,0 +1,668 @@
/* Metro module 5181; source: stores/game_store/EntitlementStore.tsx; dependencies: [6, 7, 15, 17, 18, 4272, 4270, 4279, 661, 1880, 22, 4278, 664, 566, 694, 2] */
function _fun45617(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:6, offset: 0x011938bb, size: 648 bytes, params: 8, frame: 22
const env0_0 = require;
const _arrayLikeToArray_45623 = 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({entitlements}) {
var r2;
var value4;
var value2 = _createForOfIteratorHelperLoose_45621(entitlements);
var value3 = value2();
if (!value3.done) {
for (r2 = value3; true; r2 = value4) {
addEntitlement(r2.value);
value4 = value2();
if (value4.done) {
break;
}
}
}
};
const closure2 = function(a0) {
addEntitlement(a0.entitlement);
};
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 entitlementRecord = importDefault(4272) /* metro dependency 4272: EntitlementRecord */;
const libraryApplicationStore = importDefault(4270) /* metro dependency 4270: LibraryApplicationStore */;
const skuStore = importDefault(4279) /* metro dependency 4279: SKUStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_11 = constantsModule.EntitlementSourceTypes;
const env0_12 = constantsModule.EntitlementTypes;
const env0_13 = (require(1880) /* metro dependency 1880: PremiumConstants */).PREMIUM_SUBSCRIPTION_APPLICATION;
let env0_14 = {};
let env0_15 = {};
let env0_16 = {};
let env0_17 = {};
let Set = global.Set;
let set = new Set();
Set = global.Set;
set = new Set();
const env0_23 = {};
const Store = (importAll(566) /* metro dependency 566: flux */).Store;
_fun45628(Store).displayName = 'EntitlementStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */,
{ENTITLEMENT_FETCH_APPLICATION_START: ENTITLEMENT_FETCH_APPLICATION_START,
ENTITLEMENT_FETCH_APPLICATION_SUCCESS: ENTITLEMENT_FETCH_APPLICATION_SUCCESS,
ENTITLEMENT_FETCH_APPLICATION_FAIL: function() {
}, ENTITLEMENTS_GIFTABLE_FETCH_SUCCESS: function({entitlements}) {
env0_15 = {};
entitlements.forEach(addGiftEntitlement);
}, SKU_PURCHASE_SUCCESS: closure, VIRTUAL_CURRENCY_REDEEM_SUCCESS: closure,
LIBRARY_FETCH_SUCCESS: LIBRARY_FETCH_SUCCESS_45656, ENTITLEMENT_CREATE: closure2, ENTITLEMENT_UPDATE: closure2,
ENTITLEMENT_DELETE: ENTITLEMENT_DELETE, LOGOUT: function() {
env0_14 = {};
env0_16 = {};
env0_17 = {};
env0_18 = false;
env0_19 = false;
env0_20 = false;
var Set = global.Set;
var value3 = new Set();
Set = global.Set;
var value6 = new Set();
}, ENTITLEMENTS_FETCH_FOR_USER_START: function() {
env0_18 = true;
}, ENTITLEMENTS_FETCH_FOR_USER_SUCCESS: function({entitlements, excludeEnded}) {
var r2;
var value4;
env0_19 = true;
env0_18 = false;
env0_20 = !excludeEnded;
var value2 = _createForOfIteratorHelperLoose_45621(entitlements);
var value3 = value2();
if (!value3.done) {
for (r2 = value3; true; r2 = value4) {
addEntitlement(r2.value);
value4 = value2();
if (value4.done) {
break;
}
}
}
}, ENTITLEMENTS_FETCH_FOR_USER_FAIL: function() {
env0_19 = false;
env0_18 = false;
env0_20 = false;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/game_store/EntitlementStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_45618() { // fn#45618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:283, offset: 0x01193b43, 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_45618_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_45621(a0, a1) { // fn#45621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:476, offset: 0x01193ba1, 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 _fun45622;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_45623(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_45623(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_45623(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun45622;
}
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 addEntitlement(a0) { // fn#45624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:1450, offset: 0x01193d13, size: 317 bytes, params: 2, frame: 15
var Set;
var value2;
var set;
var value4;
var value6;
var property;
let binding = env0_14;
binding[a0.id] = EntitlementRecord.createFromServer(a0);
binding = env0_16;
let sku_id = a0.sku_id;
if (binding[sku_id] == null) {
binding = env0_16;
sku_id = a0.sku_id;
Set = global.Set;
value2 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
binding[sku_id] = set instanceof Object ? set : value2;
}
binding = env0_17;
let application_id = a0.application_id;
if (binding[application_id] == null) {
binding = env0_17;
application_id = a0.application_id;
Set = global.Set;
value4 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
binding[application_id] = set instanceof Object ? set : value4;
}
let subscription_id = a0.subscription_id;
if (subscription_id != null) {
binding = env0_23;
subscription_id = a0.subscription_id;
if (binding[subscription_id] == null) {
binding = env0_23;
subscription_id = a0.subscription_id;
Set = global.Set;
value6 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
binding[subscription_id] = set instanceof Object ? set : value6;
}
binding = env0_23;
subscription_id = a0.subscription_id;
property = binding[subscription_id];
property.add(a0.id);
}
property = env0_17[a0.application_id];
property.add(a0.id);
property = env0_16[a0.sku_id];
property.add(a0.id);
}
function addGiftEntitlement(a0) { // fn#45625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:1774, offset: 0x01193e50, size: 38 bytes, params: 2, frame: 13
env0_15[a0.id] = EntitlementRecord.createFromServer(a0);
}
function _fun45628(a0) { // fn#45628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:2051, offset: 0x01193ed1, size: 475 bytes, params: 2, frame: 16
const closure = EntitlementStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.syncWith([LibraryApplicationStore], _fun45631);
}}, {key: 'get', value: value_45632}, {key: 'getGiftable', value: value_45633}, {key: 'getForApplication',
value: value_45634}, {key: 'getForSku', value: value_45635}, {key: 'fetchingAllEntitlements', get: get_45636},
{key: 'fetchedAllEntitlements', get: get_45637}, {key: 'fetchedEndedEntitlements', get: get_45638},
{key: 'applicationIdsFetching', get: get_45639}, {key: 'applicationIdsFetched', get: get_45640},
{key: 'isFetchingForApplication', value: function(a0) {
return this.fetchingAllEntitlements || a0 != null && this.applicationIdsFetching.has(a0);
}}, {key: 'isFetchedForApplication', value: function(a0) {
return this.fetchedAllEntitlements || a0 != null && this.applicationIdsFetched.has(a0);
}}, {key: 'getForSubscription', value: value_45643}, {key: 'isEntitledToSku', value: value_45644},
{key: 'hasFetchedForApplicationIds', value: function(a0) {
return a0.every(_fun45646);
}}, {key: 'getFractionalPremium', value: value_45647}, {key: 'isFractionalPremiumActive', value: function() {
var value = a0;
var property = (value !== undefined ? value : {}).excludeReverseTrial;
return this.getFractionalPremium({includeEnded: false,
excludeReverseTrial: property !== undefined ? property : false}).length > 0;
}}, {key: 'getUnactivatedFractionalPremiumUnits', value: value_45650}]);
}
function ENTITLEMENT_FETCH_APPLICATION_START({applicationId}) { // fn#45652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:4895, offset: 0x01194618, size: 29 bytes, params: 2, frame: 11
env0_21.add(applicationId);
}
function ENTITLEMENT_FETCH_APPLICATION_SUCCESS({applicationId, entitlements}) { // fn#45653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:5005, offset: 0x01194635, size: 111 bytes, params: 2, frame: 15
var r2;
var value4;
var consumed;
var value5;
env0_21.delete(applicationId);
env0_22.add(applicationId);
const value2 = _createForOfIteratorHelperLoose_45621(entitlements);
const value3 = value2();
let done = value3.done;
if (!done) {
r2 = value3;
while (true) {
value4 = r2.value;
consumed = value4.consumed;
if (consumed !== true) {
addEntitlement(value4);
}
value5 = value2();
done = value5.done;
if (done) {
break;
}
r2 = value5;
continue;
}
}
}
function LIBRARY_FETCH_SUCCESS_45656({libraryApplications}) { // fn#45656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:5555, offset: 0x011946c8, size: 147 bytes, params: 2, frame: 19
var r4;
var r8;
var value4;
var entitlements;
var value5;
var value6;
var addEntitlementBinding;
var value7;
var value8;
var value9;
const value2 = _createForOfIteratorHelperLoose_45621(libraryApplications);
const value3 = value2();
let done = value3.done;
if (!done) {
r4 = value3;
reducibleLoop1: while (true) {
value4 = r4.value;
entitlements = value4.entitlements;
reducibleJoin4: while (true) {
if (entitlements == null) {
break reducibleJoin4;
}
_createForOfIteratorHelperLoose_45621Binding = _createForOfIteratorHelperLoose_45621;
entitlements = value4.entitlements;
value5 = _createForOfIteratorHelperLoose_45621Binding(entitlements);
value6 = value5();
done = value6.done;
if (done) {
break reducibleJoin4;
}
r8 = value6;
reducibleLoop3: while (true) {
addEntitlementBinding = addEntitlement;
value7 = r8.value;
addEntitlementBinding(value7);
value8 = value5();
done = value8.done;
if (done) {
break reducibleJoin4;
}
r8 = value8;
continue reducibleLoop3;
}
}
value9 = value2();
done = value9.done;
if (done) {
break reducibleLoop1;
}
r4 = value9;
continue reducibleLoop1;
}
}
}
function ENTITLEMENT_DELETE({entitlement}) { // fn#45657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:5924, offset: 0x0119475b, size: 140 bytes, params: 2, frame: 14
delete env0_14[entitlement.id];
let property = env0_17[entitlement.application_id];
if (property != null) {
property.delete(entitlement.id);
}
property = env0_16[entitlement.sku_id];
if (property != null) {
property.delete(entitlement.id);
}
if (entitlement.subscription_id != null) {
property = env0_23[entitlement.subscription_id];
if (property != null) {
property.delete(entitlement.id);
}
}
}
function value_45630() { // fn#45630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:2361, offset: 0x0119411d, size: 41 bytes, params: 1, frame: 13
this.syncWith([LibraryApplicationStore], function() {
return true;
});
}
function value_45633() { // fn#45633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:2470, offset: 0x01194146, size: 41 bytes, params: 1, frame: 12
return (importDefault(22) /* metro dependency 22 */).values(env1_15);
}
function value_45634(a0) { // fn#45634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:2540, offset: 0x0119416f, size: 113 bytes, params: 2, frame: 17
var r3;
var value6;
var add;
var value7;
const property = env1_17[a0];
if (property == null) {
return null;
}
const Set = global.Set;
const set = new Set();
const value4 = _createForOfIteratorHelperLoose_45621(property);
const value5 = value4();
let done = value5.done;
if (!done) {
r3 = value5;
reducibleLoop2: while (true) {
value6 = r3.value;
add = set.add;
Reflect.apply(add, set, [env1_14[value6]]);
value7 = value4();
done = value7.done;
if (done) {
break reducibleLoop2;
}
r3 = value7;
continue reducibleLoop2;
}
}
return set;
}
function value_45635(a0) { // fn#45635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:2719, offset: 0x011941e0, size: 113 bytes, params: 2, frame: 17
var r3;
var value6;
var add;
var value7;
const property = env1_16[a0];
if (property == null) {
return null;
}
const Set = global.Set;
const set = new Set();
const value4 = _createForOfIteratorHelperLoose_45621(property);
const value5 = value4();
let done = value5.done;
if (!done) {
r3 = value5;
reducibleLoop2: while (true) {
value6 = r3.value;
add = set.add;
Reflect.apply(add, set, [env1_14[value6]]);
value7 = value4();
done = value7.done;
if (done) {
break reducibleLoop2;
}
r3 = value7;
continue reducibleLoop2;
}
}
return set;
}
function value_45643(a0) { // fn#45643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:3452, offset: 0x011942ab, size: 113 bytes, params: 2, frame: 17
var r3;
var value6;
var add;
var value7;
const property = env1_23[a0];
if (property == null) {
return null;
}
const Set = global.Set;
const set = new Set();
const value4 = _createForOfIteratorHelperLoose_45621(property);
const value5 = value4();
let done = value5.done;
if (!done) {
r3 = value5;
reducibleLoop2: while (true) {
value6 = r3.value;
add = set.add;
Reflect.apply(add, set, [env1_14[value6]]);
value7 = value4();
done = value7.done;
if (done) {
break reducibleLoop2;
}
r3 = value7;
continue reducibleLoop2;
}
}
return set;
}
function value_45644(a0, a1, a2) { // fn#45644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:3637, offset: 0x0119431c, size: 243 bytes, params: 4, frame: 22
var r7;
var r3;
var r2;
var value3;
var value4;
var done;
var value5;
var isValid;
var value6;
var sku;
var id;
var value10;
var isUserEntitledToLibraryApplication;
let value = a3;
reducibleJoin2: while (true) {
if (value !== undefined) {
r7 = value;
break reducibleJoin2;
}
value = null;
r7 = value;
break reducibleJoin2;
}
value = environment.__proto__;
let property = env1_16[a1];
const value2 = null;
if (value2 != property) {
value3 = _createForOfIteratorHelperLoose_45621(property);
value4 = value3();
done = value4.done;
if (!done) {
r3 = value4;
reducibleLoop4: while (true) {
value5 = r3.value;
property = env1_14[value5];
if (value2 != property) {
isValid = property.isValid;
reducibleJoin6: while (true) {
if (Reflect.apply(isValid, property, [a0, SKUStore, r7])) {
return true;
}
break reducibleJoin6;
}
}
value6 = value3();
done = value6.done;
if (done) {
break reducibleLoop4;
}
r3 = value6;
continue reducibleLoop4;
}
}
}
const binding = env1_22;
if (binding.has(a2)) {
return false;
}
const r4 = value2 != r7 ? LibraryApplicationStore.getLibraryApplication(a2,
r7) : LibraryApplicationStore.getActiveLibraryApplication(a2);
const value9 = value2 == r4;
reducibleJoin14: while (true) {
if (value9) {
r2 = value9;
break reducibleJoin14;
}
sku = r4.sku;
id = sku.id;
value10 = id !== a1;
r2 = value10;
break reducibleJoin14;
}
reducibleJoin16: while (true) {
if (r2) {
break reducibleJoin16;
}
value = require(4278) /* metro dependency 4278: LibraryApplicationUtils */;
isUserEntitledToLibraryApplication = value.isUserEntitledToLibraryApplication;
value = !Reflect.apply(isUserEntitledToLibraryApplication, value, [r4]);
r2 = value;
break reducibleJoin16;
}
return r2 ? value2 : !r2;
}
function value_45645(a0) { // fn#45645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:4031, offset: 0x0119440f, size: 23 bytes, params: 2, frame: 11
return a0.every(_fun45646);
}
function value_45647() { // fn#45647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:4109, offset: 0x0119443c, size: 133 bytes, params: 1, frame: 14
var environment;
const value = a0;
const r2 = value !== undefined ? value : {};
if (r2.includeEnded !== undefined) {
}
if (r2.excludeReverseTrial !== undefined) {
}
const Date = global.Date;
let date = new Date();
const getForApplication = this.getForApplication;
date = environment.__proto__;
date = Reflect.apply(getForApplication, this, [PREMIUM_SUBSCRIPTION_APPLICATION]);
if (date != null) {
date.forEach(_fun45648);
}
return [];
}
function value_45650() { // fn#45650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:4592, offset: 0x01194589, size: 54 bytes, params: 1, frame: 13
var environment;
const getForApplication = this.getForApplication;
let value = environment.__proto__;
value = Reflect.apply(getForApplication, this, [PREMIUM_SUBSCRIPTION_APPLICATION]);
if (value != null) {
value.forEach(_fun45651);
}
return [];
}
function _fun45646(a0) { // fn#45646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:4059, offset: 0x01194426, size: 22 bytes, params: 2, frame: 11
return env2_22.has(a0);
}
function _fun45648(a0) { // fn#45648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:4244, offset: 0x011944c1, size: 136 bytes, params: 2, frame: 13
const r3 = a0.endsAt != null && a0.endsAt < env0_3;
const sourceType = a0.sourceType;
value = environment.__proto__.__proto__;
const REVERSE_TRIAL = EntitlementSourceTypes.REVERSE_TRIAL;
const r1 = sourceType === REVERSE_TRIAL && excludeReverseTrial;
const type = a0.type;
const FRACTIONAL_REDEMPTION = EntitlementTypes.FRACTIONAL_REDEMPTION;
let r0 = type !== FRACTIONAL_REDEMPTION || r3 && !includeEnded;
r0 = !r0 ? r1 : r0;
if (!r0) {
env0_2.push(a0);
}
}
function _fun45651(a0) { // fn#45651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5359:4669, offset: 0x011945bf, size: 89 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
const FractionalPremiumSKUsSets = (require(664) /* metro dependency 664: FractionalPremiumSKUs */).FractionalPremiumSKUsSets;
const ACTIVE_FRACTIONAL_PREMIUM_SKUS = FractionalPremiumSKUsSets.ACTIVE_FRACTIONAL_PREMIUM_SKUS;
if (ACTIVE_FRACTIONAL_PREMIUM_SKUS.has(a0.skuId) && !a0.consumed) {
env0_0.push(a0);
}
}
+438
View File
@@ -0,0 +1,438 @@
/* Metro module 4279; source: stores/game_store/SKUStore.tsx; dependencies: [6, 7, 15, 17, 18, 4273, 1949, 4267, 566, 694, 2] */
function _fun36274(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:6, offset: 0x010875bf, size: 666 bytes, params: 8, frame: 21
const _arrayLikeToArray_36280 = 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 skuFetchSuccess = function(a0) {
addSku(a0);
};
const handleStoreListing = function(a0) {
addSku(a0.sku);
if (a0.child_skus != null) {
a0.child_skus.forEach(_fun36285);
}
if (a0.alternative_skus != null) {
a0.alternative_skus.forEach(_fun36286);
}
};
const closure = function({entitlements}) {
var r2;
var value4;
var value2 = _createForOfIteratorHelperLoose_36278(entitlements);
var value3 = value2();
if (!value3.done) {
r2 = value3;
while (true) {
entitlements = r2.value;
if (entitlements.sku != null) {
addSku(entitlements.sku);
}
value4 = value2();
if (value4.done) {
break;
}
r2 = value4;
continue;
}
}
};
const closure2 = APPLICATION_STORE_CLEAR_DATA;
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 skuRecord = importDefault(4273) /* metro dependency 4273: SKURecord */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const detectableGameStore = importDefault(4267) /* metro dependency 4267: DetectableGameStore */;
let Map = global.Map;
const map = new Map();
let Set = global.Set;
let set = new Set();
Set = global.Set;
set = new Set();
Map = global.Map;
set = new Map();
Map = global.Map;
set = new Map();
Map = global.Map;
set = new Map();
const Store = (importAll(566) /* metro dependency 566: flux */).Store;
_fun36290(Store).displayName = 'SKUStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */,
{STORE_LISTINGS_FETCH_START: STORE_LISTINGS_FETCH_START, STORE_LISTINGS_FETCH_FAIL: STORE_LISTINGS_FETCH_FAIL,
STORE_LISTINGS_FETCH_SUCCESS: function({storeListings}) {
var r2;
var value4;
var value2 = _createForOfIteratorHelperLoose_36278(storeListings);
var value3 = value2();
if (!value3.done) {
for (r2 = value3; true; r2 = value4) {
handleStoreListing(r2.value);
value4 = value2();
if (value4.done) {
break;
}
}
}
}, STORE_LISTING_FETCH_SUCCESS: function({storeListing}) {
handleStoreListing(storeListing);
}, GIFT_CODE_RESOLVE_SUCCESS: function({giftCode}) {
if (giftCode.store_listing == null) {
return false;
}
addSku(giftCode.store_listing.sku);
}, SKU_FETCH_START: SKU_FETCH_START, SKU_FETCH_SUCCESS: function({sku}) {
skuFetchSuccess(sku);
}, SKU_FETCH_FAIL: SKU_FETCH_FAIL, SKUS_FETCH_SUCCESS: SKUS_FETCH_SUCCESS,
ENTITLEMENTS_GIFTABLE_FETCH_SUCCESS: closure, APPLICATION_STORE_CLEAR_DATA: closure2,
APPLICATION_SUBSCRIPTIONS_FETCH_ENTITLEMENTS_SUCCESS: closure, ENTITLEMENTS_FETCH_FOR_USER_SUCCESS: closure});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/game_store/SKUStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_36275() { // fn#36275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:180, offset: 0x01087859, 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_36275_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_36278(a0, a1) { // fn#36278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:373, offset: 0x010878b7, 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 _fun36279;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_36280(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_36280(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_36280(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun36279;
}
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 addSku(a0) { // fn#36281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:1349, offset: 0x01087a29, size: 457 bytes, params: 2, frame: 20
var r5;
var Object;
var length;
var Set;
var value11;
var set2;
const env0_0 = a0;
let binding = env0_12;
const value2 = binding.get(a0.id);
const fromServer = SKURecord.createFromServer(a0);
if (value2 != null) {
r5 = fromServer.price == null && value2.price != null;
if (r5) {
fromServer.price = value2.price;
}
Object = global.Object;
length = Object.keys(fromServer.prices).length;
r5 = length === 0 && global.Object.keys(value2.prices).length > 0;
if (r5) {
fromServer.prices = value2.prices;
}
r5 = fromServer.orbsReward == null && value2.orbsReward != null;
if (r5) {
fromServer.orbsReward = value2.orbsReward;
}
length = fromServer.eligibleOffers.length;
r5 = length === 0 && value2.eligibleOffers.length > 0;
if (r5) {
fromServer.eligibleOffers = value2.eligibleOffers;
}
}
binding = env0_12;
let set = binding.set;
Reflect.apply(set, binding, [a0.id, fromServer]);
env0_10.delete(a0.id);
env0_11.delete(a0.id);
const bundled_sku_ids = a0.bundled_sku_ids;
if (bundled_sku_ids != null) {
bundled_sku_ids.forEach(_fun36282);
}
const has = env0_13.has;
let application_id = a0.application_id;
if (!Reflect.apply(has, binding, [application_id])) {
binding = env0_13;
set = binding.set;
application_id = a0.application_id;
Set = global.Set;
value11 = Object.create(Set.prototype, {constructor: {value: Set}});
set2 = new Set();
Reflect.apply(set, binding, [application_id, set2 instanceof Object ? set2 : value11]);
}
const value = env0_13.get(a0.application_id);
value.add(a0.id);
}
function handleStoreListing(a0) { // fn#36284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:2007, offset: 0x01087c2a, size: 91 bytes, params: 2, frame: 15
addSku(a0.sku);
if (a0.child_skus != null) {
a0.child_skus.forEach(function(a0) {
addSku(a0);
});
}
if (a0.alternative_skus != null) {
a0.alternative_skus.forEach(function(a0) {
addSku(a0);
});
}
}
function APPLICATION_STORE_CLEAR_DATA() { // fn#36288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:2334, offset: 0x01087cec, size: 189 bytes, params: 1, frame: 11
let Map = global.Map;
const map = new Map();
let Set = global.Set;
let set = new Set();
Set = global.Set;
set = new Set();
Map = global.Map;
set = new Map();
Map = global.Map;
set = new Map();
Map = global.Map;
set = new Map();
}
function handleUserSettingsStoreUpdate() { // fn#36289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:2421, offset: 0x01087da9, size: 51 bytes, params: 1, frame: 10
const binding = env0_8;
let locale = LocaleStore.locale;
if (binding === locale) {
return false;
}
locale = LocaleStore.locale;
APPLICATION_STORE_CLEAR_DATA();
}
function _fun36290(a0) { // fn#36290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:2522, offset: 0x01087ddc, size: 235 bytes, params: 2, frame: 16
const closure = SKUStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: function() {
this.waitFor(LocaleStore, DetectableGameStore);
this.syncWith([LocaleStore], handleUserSettingsStoreUpdate);
env1_8 = LocaleStore.locale;
}}, {key: 'get', value: value_36293}, {key: 'getForApplication', value: value_36294}, {key: 'isFetching',
value: value_36296}, {key: 'getFetchingSkuIds', value: value_36297}, {key: 'getSKUs', value: value_36298},
{key: 'getParentSKU', value: value_36299}, {key: 'didFetchingSkuFail', value: value_36300}]);
}
function STORE_LISTINGS_FETCH_START({skuId}) { // fn#36301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:3461, offset: 0x01087ffe, size: 29 bytes, params: 2, frame: 11
env0_10.add(skuId);
}
function STORE_LISTINGS_FETCH_FAIL({skuId}) { // fn#36302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:3547, offset: 0x0108801b, size: 43 bytes, params: 2, frame: 12
env0_10.delete(skuId);
env0_11.add(skuId);
}
function SKUS_FETCH_SUCCESS({guildId, skus}) { // fn#36309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:4289, offset: 0x010880ef, size: 137 bytes, params: 2, frame: 17
var environment;
var r3;
var skuFetchSuccessBinding;
var value4;
var value5;
var binding;
var set;
var Set;
var map;
var prototype;
var value6;
var set2;
let value = environment;
const value2 = _createForOfIteratorHelperLoose_36278(skus);
const value3 = value2();
let done = value3.done;
if (!done) {
r3 = value3;
reducibleLoop1: while (true) {
skuFetchSuccessBinding = skuFetchSuccess;
value4 = r3.value;
skuFetchSuccessBinding(value4);
value5 = value2();
done = value5.done;
if (done) {
break reducibleLoop1;
}
r3 = value5;
continue reducibleLoop1;
}
}
reducibleJoin4: while (true) {
if (guildId == null) {
break reducibleJoin4;
}
binding = env0_14;
set = binding.set;
Set = global.Set;
map = skus.map;
value = Reflect.apply(map, skus, [function(a0) {
return a0.id;
}]);
prototype = Set.prototype;
value6 = Object.create(prototype, {constructor: {value: Set}});
set2 = new Set(value);
value = set2 instanceof Object ? set2 : value6;
Reflect.apply(set, binding, [guildId, value]);
break reducibleJoin4;
}
}
function _fun36282(a0) { // fn#36282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:1857, offset: 0x01087bf2, size: 37 bytes, params: 2, frame: 13
const binding = env1_9;
binding.set(a0, env0_0.id);
}
function value_36294(a0) { // fn#36294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:2961, offset: 0x01087f25, size: 69 bytes, params: 2, frame: 11
var environment;
var r0;
let value = environment.__proto__;
value = env1_13.get(a0);
if (value == null) {
r0 = [];
} else {
value = global.Array.from(value);
value = value.map(_fun36295);
r0 = value;
}
return r0;
}
function value_36297() { // fn#36297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:3126, offset: 0x01087f96, size: 31 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = env1_10.keys();
const items2 = [];
arraySpread(items2, value, 0, undefined);
return items2;
}
function value_36298() { // fn#36298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:3180, offset: 0x01087fb5, size: 28 bytes, params: 1, frame: 11
const Object = global.Object;
return Object.fromEntries(env1_12);
}
function value_36299(a0) { // fn#36299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:3248, offset: 0x01087fd1, size: 45 bytes, params: 2, frame: 12
let value = environment.__proto__;
value = env1_9.get(a0);
if (value != null) {
return this.get(value);
}
}
function _fun36295(a0) { // fn#36295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:3025, offset: 0x01087f6a, size: 22 bytes, params: 2, frame: 11
return env2_12.get(a0);
}
@@ -0,0 +1,348 @@
/* Metro module 13046; source: stores/game_store/StoreListingStore.tsx; dependencies: [6, 7, 15, 17, 18, 1949, 13047, 1360, 566, 694, 2] */
function _fun99618(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:6, offset: 0x021cf457, size: 483 bytes, params: 8, frame: 22
const env0_0 = require;
const _arrayLikeToArray_99624 = 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 getChannelSkuComboId = function(a0, a1) {
return '' + a0 + ':' + a1;
};
const closure = function() {
env0_10 = {};
env0_13 = {};
env0_12 = {};
env0_11 = {};
var Set = global.Set;
var value3 = new Set();
};
const closure2 = USER_SETTINGS_PROTO_UPDATE_99628;
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 localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const storeListingRecord = importDefault(13047) /* metro dependency 13047: StoreListingRecord */;
let env0_10 = {};
let env0_11 = {};
let env0_12 = {};
let env0_13 = {};
let Set = global.Set;
let set = new Set();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun99629(Store).displayName = 'StoreListingStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */,
{STORE_LISTINGS_FETCH_START: STORE_LISTINGS_FETCH_START_99639,
STORE_LISTINGS_FETCH_FAIL: STORE_LISTINGS_FETCH_FAIL_99640,
STORE_LISTINGS_FETCH_SUCCESS: function({storeListings}) {
var r2;
var value4;
var value2 = _createForOfIteratorHelperLoose_99622(storeListings);
var value3 = value2();
if (!value3.done) {
for (r2 = value3; true; r2 = value4) {
addRegularStoreListing(r2.value);
value4 = value2();
if (value4.done) {
break;
}
}
}
}, STORE_LISTING_FETCH_SUCCESS: STORE_LISTING_FETCH_SUCCESS_99642, USER_SETTINGS_PROTO_UPDATE: closure2,
APPLICATION_STORE_CLEAR_DATA: closure, GIFT_CODE_RESOLVE_SUCCESS: function({giftCode}) {
if (giftCode.store_listing == null) {
return false;
}
addRegularStoreListing(giftCode.store_listing);
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/game_store/StoreListingStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_99619() { // fn#99619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:170, offset: 0x021cf63a, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_99619_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_99622(a0, a1) { // fn#99622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:363, offset: 0x021cf69c, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun99623;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_99624(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_99624(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_99624(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun99623;
}
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 addRegularStoreListing(a0) { // fn#99625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:1309, offset: 0x021cf810, size: 208 bytes, params: 2, frame: 17
var binding;
var Set;
var value4;
var set;
let id = a0.id;
const id2 = a0.sku.id;
const property = env0_10[id];
const fromServer = StoreListingRecord.createFromServer(a0);
if (!(property != null && !property.isSlimDirectoryVersion() && fromServer.isSlimDirectoryVersion())) {
if (a0.published === false) {
if (env0_12[id2] == null) {
binding = env0_12;
Set = global.Set;
value4 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
binding[id2] = set instanceof Object ? set : value4;
}
env0_12[id2].add(id);
} else {
env0_13[id2] = id;
}
env0_10[id] = fromServer;
binding = env0_14;
id = a0.sku.id;
binding.delete(id);
}
}
function USER_SETTINGS_PROTO_UPDATE_99628() { // fn#99628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:1666, offset: 0x021cf91f, size: 51 bytes, params: 1, frame: 10
const binding = env0_9;
let locale = LocaleStore.locale;
if (binding === locale) {
return false;
}
APPLICATION_STORE_CLEAR_DATA_99627();
locale = LocaleStore.locale;
}
function _fun99629(a0) { // fn#99629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:1767, offset: 0x021cf952, size: 228 bytes, params: 2, frame: 16
const closure = StoreListingStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(LocaleStore);
this.syncWith([LocaleStore], USER_SETTINGS_PROTO_UPDATE_99628);
env1_9 = LocaleStore.locale;
}}, {key: 'get', value: value_99632}, {key: 'getForSKU', value: value_99633}, {key: 'getUnpublishedForSKU',
value: value_99634}, {key: 'getForChannel', value: value_99636}, {key: 'isFetchingForSKU', value: value_99637},
{key: 'getStoreListing', value: value_99638}]);
}
function STORE_LISTINGS_FETCH_START_99639({skuId}) { // fn#99639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:3065, offset: 0x021cfbea, size: 29 bytes, params: 2, frame: 11
env0_14.add(skuId);
}
function STORE_LISTINGS_FETCH_FAIL_99640({skuId}) { // fn#99640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:3151, offset: 0x021cfc07, size: 29 bytes, params: 2, frame: 11
env0_14.delete(skuId);
}
function STORE_LISTING_FETCH_SUCCESS_99642({storeListing, channelId}) { // fn#99642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:3420, offset: 0x021cfc66, size: 101 bytes, params: 2, frame: 16
var fromServer;
var binding;
var getChannelSkuComboIdBinding;
var skuId;
if (channelId != null) {
fromServer = StoreListingRecord.createFromServer(storeListing);
binding = env0_11;
getChannelSkuComboIdBinding = getChannelSkuComboId;
skuId = fromServer.skuId;
binding[getChannelSkuComboIdBinding(channelId, skuId)] = fromServer;
binding = env0_13;
skuId = fromServer.skuId;
binding[skuId] = fromServer.id;
} else {
addRegularStoreListing(storeListing);
}
}
function value_99633(a0, a1) { // fn#99633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:2237, offset: 0x021cfa79, size: 64 bytes, params: 3, frame: 15
const property = env1_13[a0];
const value2 = null;
return value2 != a1 ? env1_11[getChannelSkuComboId(a1, a0)] : value2 != property ? env1_10[property] : value2;
}
function value_99634(a0) { // fn#99634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:2360, offset: 0x021cfab9, size: 103 bytes, params: 2, frame: 13
var environment;
var r0;
var value3;
const value = environment.__proto__;
const property = env1_12[a0];
if (property == null) {
r0 = [];
} else {
value3 = global.Array.from(property).map(_fun99635);
r0 = value3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
}
return r0;
}
function value_99636(a0, a1) { // fn#99636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:2489, offset: 0x021cfb20, size: 31 bytes, params: 3, frame: 14
return env1_11[getChannelSkuComboId(a0, a1)];
}
function value_99638(a0) { // fn#99638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:2630, offset: 0x021cfb3f, size: 171 bytes, params: 2, frame: 18
var value;
const storeListingId = a0.storeListingId;
const skuId = a0.skuId;
const channelId = a0.channelId;
if (a0.isTestMode) {
if (skuId == null) {
value = null;
if (value != storeListingId) {
return this.get(storeListingId);
}
if (value != channelId) {
if (value == skuId) {
throw new global.Error('getStoreListing with channel expects a skuId');
}
return this.getForChannel(channelId, skuId);
}
return value != skuId ? this.getForSKU(skuId) : value;
}
value = this.getUnpublishedForSKU(skuId);
if (value == null) {
value = null;
if (value != storeListingId) {
return this.get(storeListingId);
}
if (value != channelId) {
if (value == skuId) {
throw new global.Error('getStoreListing with channel expects a skuId');
}
return this.getForChannel(channelId, skuId);
}
return value != skuId ? this.getForSKU(skuId) : value;
}
if (value.length > 0) {
return value[0];
}
value = null;
if (value != storeListingId) {
return this.get(storeListingId);
}
} else if (storeListingId != null) {
return this.get(storeListingId);
}
if (value != channelId) {
if (value == skuId) {
throw new global.Error('getStoreListing with channel expects a skuId');
}
return this.getForChannel(channelId, skuId);
}
return value != skuId ? this.getForSKU(skuId) : value;
}
+156
View File
@@ -0,0 +1,156 @@
/* Metro module 7505; source: stores/game_store/TestModeStore.tsx; dependencies: [6, 7, 15, 17, 18, 1311, 1348, 4270, 3829, 566, 694, 2] */
function _fun60513(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:6, offset: 0x01704e23, size: 446 bytes, params: 8, frame: 22
const env0_0 = require;
const closure = function() {
env0_12 = null;
};
const closure2 = LOGOUT_60518;
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 selectivelySyncedUserSettingsStore = importDefault(1311) /* metro dependency 1311: SelectivelySyncedUserSettingsStore */;
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
const libraryApplicationStore = importDefault(4270) /* metro dependency 4270: LibraryApplicationStore */;
object = {'applicationId': null, 'originURL': null};
const Set = global.Set;
let set = new Set();
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
set = _fun60519(PersistedStore);
set.displayName = 'TestModeStore';
set.persistKey = 'TestModeStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */,
{DEVELOPER_TEST_MODE_AUTHORIZATION_START: DEVELOPER_TEST_MODE_AUTHORIZATION_START,
DEVELOPER_TEST_MODE_AUTHORIZATION_SUCCESS: DEVELOPER_TEST_MODE_AUTHORIZATION_SUCCESS,
DEVELOPER_TEST_MODE_AUTHORIZATION_FAIL: DEVELOPER_TEST_MODE_AUTHORIZATION_FAIL,
OVERLAY_INITIALIZE: function(a0) {
env0_10 = a0.testModeApplicationId;
}, DEVELOPER_TEST_MODE_RESET_ERROR: closure, LOGOUT: closure2, DEVELOPER_TEST_MODE_RESET: closure2});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/game_store/TestModeStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_60514() { // fn#60514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:178, offset: 0x01704fe1, 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_60514_isNativeReflectConstruct = function() {
return !!result;
})();
}
function DEVELOPER_TEST_MODE_RESET_60518() { // fn#60518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:467, offset: 0x0170504c, size: 77 bytes, params: 1, frame: 11
const Set = global.Set;
const set = new Set();
env0_14.applicationId = null;
env0_14.originURL = null;
DEVELOPER_TEST_MODE_RESET_ERROR();
}
function _fun60519(a0) { // fn#60519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:565, offset: 0x01705099, size: 360 bytes, params: 2, frame: 16
const closure = TestModeStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: value_60521}, {key: 'getTestModeApplicationId',
value: value_60524}, {key: 'inTestModeForApplication', value: value_60525},
{key: 'inTestModeForEmbeddedApplication', value: value_60526}, {key: 'shouldDisplayTestMode',
value: value_60527}, {key: 'getState', value: value_60528}, {key: 'isTestMode', get: get_60529},
{key: 'isFetchingAuthorization', get: get_60530}, {key: 'testModeEmbeddedApplicationId', get: get_60531},
{key: 'testModeApplicationId', get: get_60532}, {key: 'testModeOriginURL', get: get_60533}, {key: 'error',
get: get_60534}, {key: 'whenInitialized', value: function(a0) {
var env0_0 = a0;
this.addConditionalChangeListener(_fun60536);
}}]);
}
function DEVELOPER_TEST_MODE_AUTHORIZATION_START({applicationId}) { // fn#60537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1983, offset: 0x01705375, size: 35 bytes, params: 2, frame: 12
env0_15.add(applicationId);
}
function DEVELOPER_TEST_MODE_AUTHORIZATION_SUCCESS({applicationId, originURL}) { // fn#60538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:2112, offset: 0x01705398, size: 69 bytes, params: 2, frame: 13
env0_15.delete(applicationId);
env0_14.applicationId = applicationId;
env0_14.originURL = originURL;
}
function DEVELOPER_TEST_MODE_AUTHORIZATION_FAIL({applicationId, error}) { // fn#60539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:2295, offset: 0x017053dd, size: 38 bytes, params: 2, frame: 13
env0_15.delete(applicationId);
}
function value_60521(a0) { // fn#60521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:860, offset: 0x01705201, size: 139 bytes, params: 2, frame: 17
var environment;
let value = a0;
const object2 = {};
copyDataProperties(object2, value ?? env1_13, undefined);
value = environment.__proto__;
env1_14 = object2;
env1_10 = object2.applicationId;
env1_11 = env1_14.originURL;
this.waitFor(LibraryApplicationStore, SelectivelySyncedUserSettingsStore, UserSettingsProtoStore);
this.syncWith([UserSettingsProtoStore, SelectivelySyncedUserSettingsStore], function() {
return true;
});
LibraryApplicationStore.whenInitialized(function() {
env2_16 = true;
});
}
function value_60525(a0) { // fn#60525, offset: 0x01705299, size: 16 bytes, params: 2, frame: 2
return env1_10 === a0;
}
function value_60526(a0) { // fn#60526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1178, offset: 0x017052a9, size: 29 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_10 === a0 && env1_11 != null;
}
function value_60527(a0) { // fn#60527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1249, offset: 0x017052c6, size: 63 bytes, params: 2, frame: 12
const value = environment.__proto__;
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
return DeveloperMode.getSetting() && this.inTestModeForApplication(a0);
}
function get_60530() { // fn#60530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1468, offset: 0x01705305, size: 20 bytes, params: 1, frame: 2
return env1_15.size > 0;
}
function get_60531() { // fn#60531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1538, offset: 0x01705319, size: 22 bytes, params: 1, frame: 3
const value2 = null;
return value2 != env1_11 ? env1_10 : value2;
}
function value_60535(a0) { // fn#60535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1747, offset: 0x0170532f, size: 32 bytes, params: 2, frame: 11
const env0_0 = a0;
this.addConditionalChangeListener(_fun60536);
}
function _fun60536() { // fn#60536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1794, offset: 0x0170534f, size: 38 bytes, params: 1, frame: 11
if (env2_16) {
global.setImmediate(env0_0);
return false;
}
}