decord/alpha/source/stores/PremiumPromoStore.tsx

43 lines
1.6 KiB
TypeScript
Raw Normal View History

// Module ID: 14029
// Function ID: 14030
// Name: PremiumPromoStore
// Dependencies: [502, 4406, 1091, 11, 504, 573, 2]
2026-07-23 10:11:24 +00:00
// Module 14029 (PremiumPromoStore)
import SnowflakeUtilsDefault from "SnowflakeUtils" /* 11 */;
import initializeDefault from "initialize" /* 504 */;
import DispatcherDefault from "Dispatcher" /* 573 */;
import DurationsDefault from "Durations" /* 1091 */;
import AuthenticationStore from "AuthenticationStore" /* 502 */;
import RelationshipStore from "RelationshipStore" /* 4406 */;
2026-07-20 16:05:17 +00:00
let closure_4 = 180 * DurationsDefault.Millis.DAY;
let closure_5 = false;
2026-08-24 06:08:38 +00:00
const Store = initializeDefault.Store;
2026-07-29 08:29:29 +00:00
class PremiumPromoStore extends Store {
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const prototype = PremiumPromoStore.prototype;
prototype["initialize"] = function initialize() {
this.waitFor(RelationshipStore, AuthenticationStore);
2026-07-29 08:29:29 +00:00
};
prototype["isEligible"] = function isEligible() {
return closure_5;
2026-07-29 08:29:29 +00:00
};
PremiumPromoStore.displayName = "PremiumPromoStore";
const premiumPromoStore = new PremiumPromoStore(DispatcherDefault, {
2026-07-20 16:05:17 +00:00
CONNECTION_OPEN: function updatePremiumPromoEligibility() {
let tmp2 = RelationshipStore.getFriendIDs().length >= 10;
2026-07-20 16:05:17 +00:00
if (tmp2) {
const _Date = Date;
tmp2 = SnowflakeUtilsDefault.extractTimestamp(AuthenticationStore.getId()) < Date.now() - closure_4;
const extractTimestampResult = SnowflakeUtilsDefault.extractTimestamp(AuthenticationStore.getId());
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
closure_5 = tmp2;
return closure_5 !== tmp2;
2026-07-20 16:05:17 +00:00
}
});
const size = fn(2);
const result = size.fileFinishedImporting("stores/PremiumPromoStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default premiumPromoStore;