Files
2026-07-28 01:06:53 +03:00

100 lines
5.6 KiB
TypeScript

/* Metro module 15841; source: modules/premium/native/UserOfferManager.tsx; dependencies: [7, 6, 15, 17, 18, 1878, 7064, 1900, 7507, 4860, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import AutomaticLifecycleManager from '../../../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */
import UserOfferStore from '../../../stores/billing/UserOfferStore.tsx'; /* Metro dependency 7064 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun121789(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16049:6, offset: 0x0255145d, size: 258 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = AutomaticLifecycleManager;
value = _fun121793(value);
value = new value();
(FileImportTrackerModule).fileFinishedImporting('modules/premium/native/UserOfferManager.tsx');
exports.default = value;
function _isNativeReflectConstruct_121790() { // fn#121790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16049:168, offset: 0x0255155f, 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_121790_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun121793(a0) { // fn#121793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16049:371, offset: 0x025515c1, size: 42 bytes, params: 2, frame: 14
const UserOfferManager2 = UserOfferManager;
Inherits(UserOfferManager2, a0);
return CreateClass(UserOfferManager2);
function UserOfferManager(a0) { // fn#121794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16049:383, offset: 0x025515eb, size: 165 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, UserOfferManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(UserOfferManager);
binding = env1_4;
if (_isNativeReflectConstruct_121790()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.actions = {POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_121795};
value.handlePostConnectionOpen = handlePostConnectionOpen_121796;
return value;
function UserOfferManagerPOST_CONNECTION_OPEN() { // fn#121795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16049:649, owner: UserOfferManager.POST_CONNECTION_OPEN, offset: 0x01148776, size: 19 bytes, params: 1, frame: 9
return env0_0.handlePostConnectionOpen();
}
function UserOfferManagerHandlePostConnectionOpen() { // fn#121796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16049:710, owner: UserOfferManager.handlePostConnectionOpen, offset: 0x02551690, size: 133 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__;
const currentUser = UserStore.getCurrentUser();
let r1 = currentUser == null || !currentUser.verified;
r1 = !r1 ? (require(1900) /* metro dependency 1900: PremiumTypeUtils */).isPremium(currentUser) : r1;
r1 = !r1 ? UserOfferStore.isFetchingOffer() : r1;
if (!r1) {
(require(7507) /* metro dependency 7507: UserOfferActionCreators */).fetchUserOffer('MobilePremiumOfferManager');
}
}
}
}
}
global.__d(_fun121789, 15841, [7, 6, 15, 17, 18, 1878, 7064, 1900, 7507, 4860,
2]) /* metro module 15841, dependencies: [7, 6, 15, 17, 18, 1878, 7064, 1900, 7507, 4860, 2] */;