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,204 @@
/* Metro module 8615; source: modules/premium/roadblocks/native/hooks/useEmojiPickerViewableItemsCallback.tsx; dependencies: [31, 1878, 566, 3802, 22, 2] */
function _fun68003(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8800:6, offset: 0x01c3b253, size: 159 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_68006 = 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 Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/roadblocks/native/hooks/useEmojiPickerViewableItemsCallback.tsx');
exports.default = useEmojiPickerViewableItemsChanged;
}
function _createForOfIteratorHelperLoose_68004(a0, a1) { // fn#68004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8800:121, offset: 0x01c3b2f2, 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 _fun68005;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_68006(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_68006(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_68006(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun68005;
}
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 useEmojiPickerViewableItemsChanged(a0) { // fn#68007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8800:1156, offset: 0x01c3b466, size: 120 bytes, params: 2, frame: 16
const env0_0 = a0;
const binding = env0_3;
const env0_1 = binding.useRef(0);
return binding.useMemo(_fun68009, [a0,
(require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun68008)]);
}
function _fun68008() { // fn#68008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8800:1256, offset: 0x01c3b4de, size: 88 bytes, params: 1, frame: 14
var r0;
let value = environment.__proto__;
const currentUser = UserStore.getCurrentUser();
const canUseEmojisEverywhere2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseEmojisEverywhere(currentUser);
if (canUseEmojisEverywhere2) {
value = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
value = !value.canUseAnimatedEmojis(currentUser);
r0 = value;
} else {
r0 = !canUseEmojisEverywhere2;
}
return r0;
}
function _fun68009() { // fn#68009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8800:1382, offset: 0x01c3b536, size: 79 bytes, params: 1, frame: 15
var environment;
let value = environment.__proto__;
value = undefined;
const env0_0 = (require(22) /* metro dependency 22 */).debounce(_fun68010, 200);
return {onViewableItemsChanged: env0_2 ? _fun68011 : value};
}
function _fun68010() { // fn#68010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8800:1412, offset: 0x01c3b585, size: 32 bytes, params: 1, frame: 11
env1_0(env1_1.current > 7);
}
function _fun68011({changed}) { // fn#68011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8800:1471, offset: 0x01c3b5a5, size: 168 bytes, params: 2, frame: 27
var r2;
var isSectionNitroLocked;
var r15;
var r1;
var value8;
var binding;
var Math;
var max;
var current;
var item;
var isViewable;
var value9;
let value = environment.__proto__.__proto__;
const _createForOfIteratorHelperLoose_68004Binding = _createForOfIteratorHelperLoose_68004;
value = undefined;
const value2 = _createForOfIteratorHelperLoose_68004Binding(changed);
const value3 = value2();
let done = value3.done;
if (!done) {
r2 = value3;
while (true) {
value8 = r2.value;
binding = env1_1;
Math = global.Math;
max = Math.max;
current = binding.current;
item = value8.item;
isSectionNitroLocked = item == null ? value : item.isSectionNitroLocked;
if (isSectionNitroLocked !== true) {
r1 = 0;
continue;
}
isViewable = value8.isViewable;
if (isViewable) {
r15 = 1;
continue;
}
r15 = -1;
continue;
r1 = r15;
binding.current = Reflect.apply(max, Math, [0, current + r1]);
value9 = value2();
done = value9.done;
if (done) {
break;
}
r2 = value9;
continue;
}
}
env0_0();
return value;
}
@@ -0,0 +1,244 @@
/* Metro module 7899; source: modules/premium/roadblocks/native/hooks/usePremiumFeatureUpsellGetNitro.tsx; dependencies: [57, 31, 3808, 7064, 1880, 661, 6771, 7040, 4223, 7507, 3856, 1244, 4015, 2] */
function _fun63266(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8077:6, offset: 0x01b78195, size: 215 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
const userOfferStore = importDefault(7064) /* metro dependency 7064: UserOfferStore */;
const env0_8 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
const env0_9 = (require(661) /* metro dependency 661: Constants */).AnalyticsObjectTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/roadblocks/native/hooks/usePremiumFeatureUpsellGetNitro.tsx');
exports.default = usePremiumFeatureUpsellGetNitro;
}
function usePremiumFeatureUpsellGetNitro(a0, a1, a2, a3) { // fn#63267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8077:310, offset: 0x01b7826c, size: 186 bytes, params: 5, frame: 21
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
const binding = env0_5;
const [property, env0_4] = env0_4Binding(binding.useState(false), 2);
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const env0_6 = binding.useRef(0);
const useCallback = binding.useCallback;
let object = [a2, analyticsLocations, a1, a0, a3];
object = {loading: property, onPress: Reflect.apply(useCallback, binding, [_fun63268, object])};
return object;
}
function _fun63268() { // fn#63268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8077:466, offset: 0x01b78326, size: 534 bytes, params: 1, frame: 20
var environment;
var r6;
var Promise;
var all;
var items;
let value = environment.__proto__;
const premiumTypeSubscription = SubscriptionStore.getPremiumTypeSubscription(false);
const hasFetchedSubscriptions2 = SubscriptionStore.hasFetchedSubscriptions();
const r4 = premiumTypeSubscription == null || global.Object.keys(premiumTypeSubscription).length === 0;
const r3 = UserOfferStore.hasFetchedOffer() && !UserOfferStore.hasAnyUnexpiredOffer();
const isFetchingOffer2 = UserOfferStore.isFetchingOffer();
if (hasFetchedSubscriptions2) {
if (r4) {
if (r3) {
(importDefault(7040) /* metro dependency 7040: openPremiumPlanSelectionActionSheet */)({analyticsLocation: {page: importDefault,
objectType: AnalyticsObjectTypes.BUY}, analyticsLocations: analyticsLocations,
premiumType: env0_0 ? PremiumTypes.TIER_0 : PremiumTypes.TIER_2}, importAll);
} else if (hasFetchedSubscriptions2) {
if (isFetchingOffer2) {
require();
value = require(4015) /* metro dependency 4015: ChatInputUtils */;
value = value.getBestActiveInput();
if (value != null) {
value.closeCustomKeyboard();
}
} else if (env0_6.current < 5) {
env0_4(true);
Promise = global.Promise;
all = Promise.all;
items = [hasFetchedSubscriptions2 ? global.Promise.resolve() : (require(4223) /* metro dependency 4223: BillingActionCreators */).fetchSubscriptions()];
if (isFetchingOffer2) {
r6 = global.Promise.resolve();
} else {
value = require(7507) /* metro dependency 7507: UserOfferActionCreators */;
value = value.fetchUserOffer('usePremiumFeatureUpsellGetNitro');
r6 = value;
}
items[1] = r6;
value = Reflect.apply(all, Promise, [items]);
value = value.then(_fun63269);
value = value.catch(function() {
importAll(dependencyMap[10]).presentFailedToast(require(dependencyMap[11]).intl.string(require(dependencyMap[11]).t.R0RpRX));
});
value.finally(_fun63271);
} else {
require();
value = require(4015) /* metro dependency 4015: ChatInputUtils */;
value = value.getBestActiveInput();
if (value != null) {
value.closeCustomKeyboard();
}
}
} else if (env0_6.current < 5) {
env0_4(true);
Promise = global.Promise;
all = Promise.all;
items = [hasFetchedSubscriptions2 ? global.Promise.resolve() : (require(4223) /* metro dependency 4223: BillingActionCreators */).fetchSubscriptions()];
if (isFetchingOffer2) {
r6 = global.Promise.resolve();
} else {
value = require(7507) /* metro dependency 7507: UserOfferActionCreators */;
value = value.fetchUserOffer('usePremiumFeatureUpsellGetNitro');
r6 = value;
}
items[1] = r6;
value = Reflect.apply(all, Promise, [items]);
value = value.then(_fun63269);
value = value.catch(_fun63270);
value.finally(_fun63271);
} else {
require();
value = require(4015) /* metro dependency 4015: ChatInputUtils */;
value = value.getBestActiveInput();
if (value != null) {
value.closeCustomKeyboard();
}
}
} else if (hasFetchedSubscriptions2) {
if (isFetchingOffer2) {
require();
value = require(4015) /* metro dependency 4015: ChatInputUtils */;
value = value.getBestActiveInput();
if (value != null) {
value.closeCustomKeyboard();
}
} else if (env0_6.current < 5) {
env0_4(true);
Promise = global.Promise;
all = Promise.all;
items = [hasFetchedSubscriptions2 ? global.Promise.resolve() : (require(4223) /* metro dependency 4223: BillingActionCreators */).fetchSubscriptions()];
if (isFetchingOffer2) {
r6 = global.Promise.resolve();
} else {
value = require(7507) /* metro dependency 7507: UserOfferActionCreators */;
value = value.fetchUserOffer('usePremiumFeatureUpsellGetNitro');
r6 = value;
}
items[1] = r6;
value = Reflect.apply(all, Promise, [items]);
value = value.then(_fun63269);
value = value.catch(_fun63270);
value.finally(_fun63271);
} else {
require();
value = require(4015) /* metro dependency 4015: ChatInputUtils */;
value = value.getBestActiveInput();
if (value != null) {
value.closeCustomKeyboard();
}
}
} else if (env0_6.current < 5) {
env0_4(true);
Promise = global.Promise;
all = Promise.all;
items = [hasFetchedSubscriptions2 ? global.Promise.resolve() : (require(4223) /* metro dependency 4223: BillingActionCreators */).fetchSubscriptions()];
if (isFetchingOffer2) {
r6 = global.Promise.resolve();
} else {
value = require(7507) /* metro dependency 7507: UserOfferActionCreators */;
value = value.fetchUserOffer('usePremiumFeatureUpsellGetNitro');
r6 = value;
}
items[1] = r6;
value = Reflect.apply(all, Promise, [items]);
value = value.then(_fun63269);
value = value.catch(_fun63270);
value.finally(_fun63271);
} else {
require();
value = require(4015) /* metro dependency 4015: ChatInputUtils */;
value = value.getBestActiveInput();
if (value != null) {
value.closeCustomKeyboard();
}
}
} else if (hasFetchedSubscriptions2) {
if (isFetchingOffer2) {
require();
value = require(4015) /* metro dependency 4015: ChatInputUtils */;
value = value.getBestActiveInput();
if (value != null) {
value.closeCustomKeyboard();
}
} else if (env0_6.current < 5) {
env0_4(true);
Promise = global.Promise;
all = Promise.all;
items = [hasFetchedSubscriptions2 ? global.Promise.resolve() : (require(4223) /* metro dependency 4223: BillingActionCreators */).fetchSubscriptions()];
if (isFetchingOffer2) {
r6 = global.Promise.resolve();
} else {
value = require(7507) /* metro dependency 7507: UserOfferActionCreators */;
value = value.fetchUserOffer('usePremiumFeatureUpsellGetNitro');
r6 = value;
}
items[1] = r6;
value = Reflect.apply(all, Promise, [items]);
value = value.then(_fun63269);
value = value.catch(_fun63270);
value.finally(_fun63271);
} else {
require();
value = require(4015) /* metro dependency 4015: ChatInputUtils */;
value = value.getBestActiveInput();
if (value != null) {
value.closeCustomKeyboard();
}
}
} else if (env0_6.current < 5) {
env0_4(true);
Promise = global.Promise;
all = Promise.all;
items = [hasFetchedSubscriptions2 ? global.Promise.resolve() : (require(4223) /* metro dependency 4223: BillingActionCreators */).fetchSubscriptions()];
if (isFetchingOffer2) {
r6 = global.Promise.resolve();
} else {
value = require(7507) /* metro dependency 7507: UserOfferActionCreators */;
value = value.fetchUserOffer('usePremiumFeatureUpsellGetNitro');
r6 = value;
}
items[1] = r6;
value = Reflect.apply(all, Promise, [items]);
value = value.then(_fun63269);
value = value.catch(_fun63270);
value.finally(_fun63271);
} else {
require();
value = require(4015) /* metro dependency 4015: ChatInputUtils */;
value = value.getBestActiveInput();
if (value != null) {
value.closeCustomKeyboard();
}
}
}
function _fun63269() { // fn#63269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8077:1033, offset: 0x01b7853c, size: 37 bytes, params: 1, frame: 11
const binding = env1_6;
binding.current = binding.current + 1;
env1_7();
}
function _fun63270() { // fn#63270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8077:1065, offset: 0x01b78561, size: 89 bytes, params: 1, frame: 16
const toastUtilsModule = importAll(3856) /* metro dependency 3856: ToastUtils */;
const presentFailedToast = toastUtilsModule.presentFailedToast;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const R0RpRX = (require(1244) /* metro dependency 1244: indexNative */).t.R0RpRX;
Reflect.apply(presentFailedToast, toastUtilsModule, [Reflect.apply(string, intl, [R0RpRX])]);
}
@@ -0,0 +1,23 @@
/* Metro module 8605; source: modules/premium/roadblocks/native/hooks/useShowNitroUpsellCallback.tsx; dependencies: [31, 4017, 2] */
function _fun67953(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8790:6, offset: 0x01c39db7, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/roadblocks/native/hooks/useShowNitroUpsellCallback.tsx');
exports.default = useShowNitroUpsellCallback;
}
function useShowNitroUpsellCallback() { // fn#67954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8790:220, offset: 0x01c39e29, size: 88 bytes, params: 1, frame: 15
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const binding = env0_2;
const useCallback = binding.useCallback;
let object = [value2];
object = {shouldShowUpsell: value2, onShowNitroUpsell: Reflect.apply(useCallback, binding, [_fun67955, object])};
return object;
}
function _fun67955(a0) { // fn#67955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8790:308, offset: 0x01c39e81, size: 24 bytes, params: 2, frame: 11
env0_0.set(a0);
}