/* Metro module 3814; source: modules/premium/PremiumSubscription.tsx; dependencies: [1880, 2] */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as PremiumConstantsModule from './PremiumConstants.tsx'; /* Metro dependency 1880 */ function _fun29504(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#29504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3941:6, offset: 0x00fc3bc2, size: 172 bytes, params: 8, frame: 20 const getNonePlanIdForIntervalType2 = getNonePlanIdForIntervalType; const closure2 = function(a0) { return a0.find(_fun29508); }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/premium/PremiumSubscription.tsx'); exports.getNonePlanIdForIntervalType = getNonePlanIdForIntervalType2; exports.getNonePlanIdForSubscription = function(a0) { var property = SubscriptionPlanInfo[a0.items[0].planId]; return getNonePlanIdForIntervalType(property.interval, property.intervalCount); }; exports.getBaseSubscriptionItemForSubscriptionItems = closure2; exports.getBasePlanIdForSubscriptionItems = function(a0, a1, a2) { var r2; var r3; var property; var interval; var value = a1; var value2 = a2; var value4 = getBaseSubscriptionItemForSubscriptionItems(a0); if (value4 == null) { if (a0.length > 0) { property = SubscriptionPlanInfo[a0[0].planId]; interval = property.interval; property = property.intervalCount; r2 = property; r3 = interval; } else { r2 = value2; r3 = value; } return getNonePlanIdForIntervalType(r3, r2); } return value4.planId; }; function getNonePlanIdForIntervalType(a0) { // fn#29505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3941:181, offset: 0x00fc3c6e, size: 84 bytes, params: 2, frame: 13 const value = a1; const env0_0 = a0; const env0_1 = value !== undefined ? value : 1; const Object = global.Object; return Object.keys(SubscriptionPlanInfo).find(_fun29506) ?? SubscriptionPlans.NONE_MONTH; function _fun29506(a0) { // fn#29506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3941:269, offset: 0x00fc3cc2, size: 84 bytes, params: 2, frame: 4 const value = environment.__proto__; const property = SubscriptionPlanInfo[a0]; return property != null && property.skuId === PremiumSubscriptionSKUs.NONE && property.interval === env0_0 && property.intervalCount === env0_1; } } function getBaseSubscriptionItemForSubscriptionItems(a0) { // fn#29507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3941:373, offset: 0x00fc3d16, size: 23 bytes, params: 2, frame: 11 return a0.find(_fun29508); function _fun29508({planId}) { // fn#29508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3941:444, offset: 0x00fc3d2d, size: 41 bytes, params: 2, frame: 4 const value = environment.__proto__; const property = SubscriptionPlanInfo[planId]; return property != null && property.premiumType != null; } } } global.__d(_fun29504, 3814, [1880, 2]) /* metro module 3814, dependencies: [1880, 2] */;