Files
discord-decomp/sources/modules/skus/utils/getPricesFromServer.tsx
T
2026-07-28 01:06:53 +03:00

82 lines
3.3 KiB
TypeScript

/* Metro module 4275; source: modules/skus/utils/getPricesFromServer.tsx; dependencies: [3803, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as SubscriptionPlanRecordModule from '../../../records/SubscriptionPlanRecord.tsx'; /* Metro dependency 3803 */
function _fun36249(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4447:6, offset: 0x010869e1, size: 107 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(FileImportTrackerModule).fileFinishedImporting('modules/skus/utils/getPricesFromServer.tsx');
exports.default = function(a0) {
var r0;
var value;
if (a0 == null) {
r0 = {};
} else {
value = global.Object.entries(a0);
value = value.reduce(_fun36251, {});
r0 = value;
}
return r0;
};
function getPricesFromServer(a0) { // fn#36250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4447:211, offset: 0x01086a4c, size: 55 bytes, params: 2, frame: 13
var r0;
var value;
if (a0 == null) {
r0 = {};
} else {
value = global.Object.entries(a0);
value = value.reduce(_fun36251, {});
r0 = value;
}
return r0;
function _fun36251(a0, a1) { // fn#36251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4447:287, offset: 0x01086a83, size: 139 bytes, params: 3, frame: 16
var r1;
var r3;
var r4;
var item3;
var value3;
const iterator = a1[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r2 = value2 ? value : item;
if (value2) {
r1 = item2;
r3 = value2;
r4 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r3 = value3;
r4 = value;
} else {
r1 = item3;
r3 = value3;
r4 = item;
}
}
if (!r3) {
r1.return();
}
const object2 = {};
object2.countryCode = r4.country_prices.country_code;
object2.prices = r4.country_prices.prices.map(function(a0) {
return getPriceFromServer(a0, true);
});
a0[r2] = {countryPrices: object2, paymentSourcePrices: {}};
return a0;
}
}
}
global.__d(_fun36249, 4275, [3803, 2]) /* metro module 4275, dependencies: [3803, 2] */;