Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
74 lines
2.4 KiB
TypeScript
74 lines
2.4 KiB
TypeScript
// Module ID: 13484
|
|
// Function ID: 13485
|
|
// Name: useSubscriptionPlansLoaded
|
|
// Dependencies: [4297, 4299, 4300, 1373, 3, 504, 2]
|
|
// Exports: useSubscriptionPlansLoaded
|
|
|
|
// Module 13484 (useSubscriptionPlansLoaded)
|
|
import LoggerDefault from "Logger" /* 3 */;
|
|
import PaymentSourceStore from "PaymentSourceStore" /* 4297 */;
|
|
import SubscriptionPlanStore from "SubscriptionPlanStore" /* 4299 */;
|
|
import SubscriptionStore from "SubscriptionStore" /* 4300 */;
|
|
|
|
const require = fn;
|
|
function getSubscriptionPlansLoaded(items, items2) {
|
|
let tmp = items;
|
|
if (items === undefined) {
|
|
items = [];
|
|
HermesBuiltin.arraySpread(ACTIVE_PREMIUM_SKUS, 0);
|
|
tmp = items;
|
|
}
|
|
let tmp5 = items2;
|
|
if (items2 === undefined) {
|
|
const items1 = [PaymentSourceStore, SubscriptionPlanStore, SubscriptionStore];
|
|
tmp5 = items1;
|
|
}
|
|
[tmp9, obj, obj2] = tmp5;
|
|
({ paymentSourceIds, defaultPaymentSourceId } = tmp9);
|
|
const premiumTypeSubscription = obj2.getPremiumTypeSubscription();
|
|
let paymentSourceId;
|
|
if (premiumTypeSubscription != null) {
|
|
paymentSourceId = premiumTypeSubscription.paymentSourceId;
|
|
}
|
|
if (null != paymentSourceId) {
|
|
if (!obj.hasPaymentSourceForSKUIds(paymentSourceId, tmp)) {
|
|
return false;
|
|
}
|
|
}
|
|
if (null != defaultPaymentSourceId) {
|
|
if (!obj.hasPaymentSourceForSKUIds(defaultPaymentSourceId, tmp)) {
|
|
return false;
|
|
}
|
|
}
|
|
for (const item10046 of paymentSourceIds) {
|
|
if (obj.hasPaymentSourceForSKUIds(item10046, tmp)) {
|
|
continue;
|
|
} else {
|
|
obj3.return();
|
|
let flag3 = false;
|
|
return false;
|
|
}
|
|
}
|
|
return obj.isLoadedForSKUs(tmp);
|
|
}
|
|
const ACTIVE_PREMIUM_SKUS = fn(1373).ACTIVE_PREMIUM_SKUS;
|
|
new LoggerDefault("useSubscriptionPlansLoaded");
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/billing/hooks/useSubscriptionPlansLoaded.tsx");
|
|
|
|
export const useSubscriptionPlansLoaded = function useSubscriptionPlansLoaded() {
|
|
let tmp = arg0;
|
|
if (arg0 === undefined) {
|
|
let items = [];
|
|
HermesBuiltin.arraySpread(ACTIVE_PREMIUM_SKUS, 0);
|
|
tmp = items;
|
|
}
|
|
items = tmp;
|
|
const items1 = [PaymentSourceStore, SubscriptionPlanStore, SubscriptionStore];
|
|
const items2 = [tmp];
|
|
return items(504).useStateFromStores(items1, () => {
|
|
items = [PaymentSourceStore, SubscriptionPlanStore, SubscriptionStore];
|
|
return getSubscriptionPlansLoaded(items, items);
|
|
}, items2);
|
|
};
|
|
export { getSubscriptionPlansLoaded };
|