Files
discord-decomp/sources/modules/billing/native/GenericIAPStore.tsx
T
2026-07-28 01:06:53 +03:00

111 lines
5.6 KiB
TypeScript

/* Metro module 5142; source: modules/billing/native/GenericIAPStore.tsx; dependencies: [6, 7, 15, 17, 18, 22, 5143, 566, 694, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun45368(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5320:6, offset: 0x0118cbbf, size: 337 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Store = (Flux).Store;
let value = _fun45372(Store);
value.displayName = 'GenericIAPStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{IAP_LOAD_GENERIC_PRODUCTS: function({products, storeFront}) {
env0_8 = products;
env0_10 = storeFront;
}, GENERIC_IAP_INIT_CONNECTION: function(a0) {
env0_9 = a0.connected;
}, GENERIC_IAP_INIT_CONNECTION_FAILED: function() {
env0_9 = false;
}, GENERIC_IAP_END_CONNECTION: function() {
env0_9 = false;
}, GENERIC_IAP_SET_STORE_FRONT: function(a0) {
env0_10 = a0.storeFront;
}});
(FileImportTrackerModule).fileFinishedImporting('modules/billing/native/GenericIAPStore.tsx');
exports.default = value;
function _isNativeReflectConstruct_45369() { // fn#45369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5320:148, offset: 0x0118cd10, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_45369_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun45372(a0) { // fn#45372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5320:370, offset: 0x0118cd6e, size: 143 bytes, params: 2, frame: 16
const GenericIAPStore2 = GenericIAPStore;
Inherits(GenericIAPStore2, a0);
return CreateClass(GenericIAPStore2, [{key: 'isGenericIapConnected', value: value_45374}, {key: 'genericProductsLoaded',
value: value_45375}, {key: 'getProducts', value: value_45377}, {key: 'getStoreFront', value: value_45378}]);
function GenericIAPStore() { // fn#45373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5320:382, offset: 0x0102b796, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, GenericIAPStore);
const value3 = env1_6(GenericIAPStore);
return env1_5(this, _isNativeReflectConstruct_45369() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_45374() { // fn#45374, offset: 0x00e07a77, size: 9 bytes, params: 1, frame: 1
return env1_9;
}
function value_45375() { // fn#45375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5320:743, offset: 0x0118cdfd, size: 98 bytes, params: 1, frame: 17
var environment;
var r0;
var defaultImport;
const value = environment.__proto__;
const value2 = env1_8 != null;
if (value2) {
defaultImport = importDefault(22) /* metro dependency 22 */;
r0 = defaultImport.filter(env1_8, function(a0) {
var GenericProductIds = require(dependencyMap[6]).GenericProductIds;
return GenericProductIds.includes(a0.identifier);
}).length === (require(5143) /* metro dependency 5143: ProductIdsAndroid */).GenericProductIds.length;
} else {
r0 = value2;
}
return r0;
}
function value_45377() { // fn#45377, offset: 0x00fbd9d4, size: 9 bytes, params: 1, frame: 1
return env1_8;
}
function value_45378() { // fn#45378, offset: 0x00fbd9ec, size: 9 bytes, params: 1, frame: 1
return env1_10;
}
}
}
global.__d(_fun45368, 5142, [6, 7, 15, 17, 18, 22, 5143, 566, 694,
2]) /* metro module 5142, dependencies: [6, 7, 15, 17, 18, 22, 5143, 566, 694, 2] */;