decord/source/modules/libdiscore/LibdiscoreExperimentManager.tsx

67 lines
2.3 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 17078
// Function ID: 17079
2026-07-29 08:29:29 +00:00
// Name: experimentStoreUpdateHandler
2026-08-15 05:55:55 +00:00
// Dependencies: [1212, 1917, 1914, 643, 1472, 5038, 2]
2026-07-20 16:05:17 +00:00
2026-08-15 05:55:55 +00:00
// Module 17078 (experimentStoreUpdateHandler)
2026-07-29 08:29:29 +00:00
import initialize from "initialize";
import "initialize";
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
function experimentStoreUpdateHandler() {
2026-08-11 06:20:06 +00:00
let obj = require(1917) /* isBlockedDomain */;
2026-07-20 16:05:17 +00:00
if (obj.isLibdiscoreInitialized()) {
2026-07-29 08:29:29 +00:00
if (!tmpResult.isExperimentSyncDisabled()) {
2026-07-20 16:05:17 +00:00
obj = {};
2026-08-11 06:20:06 +00:00
const ALL_LIBDISCORE_EXPERIMENTS = tmp(1914).ALL_LIBDISCORE_EXPERIMENTS;
2026-07-29 08:29:29 +00:00
for (const item10018 of ALL_LIBDISCORE_EXPERIMENTS) {
obj[item10018.id] = item10018.getCurrentConfig();
continue;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp7 = null != obj;
if (tmp7) {
tmp7 = importDefault(643)(obj, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp7) {
2026-08-11 06:20:06 +00:00
const experimentCacher = require(1917) /* isBlockedDomain */.getExperimentCacher();
2026-07-20 16:05:17 +00:00
const _JSON = JSON;
experimentCacher.flushToCache(JSON.stringify(obj));
2026-08-11 06:20:06 +00:00
const obj4 = require(1917) /* isBlockedDomain */;
2026-07-20 16:05:17 +00:00
}
}
2026-08-11 06:20:06 +00:00
tmpResult = tmp(1914);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
let c4 = null;
class LibdiscoreExperimentManager extends tmp2 {
constructor() {
applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
applyArgumentsResult.actions = {};
map = new Map();
applyArgumentsResult.stores = map.set(experimentStoreUpdateHandler, experimentStoreUpdateHandler);
return applyArgumentsResult;
}
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const prototype = LibdiscoreExperimentManager.prototype;
prototype["_initialize"] = function _initialize() {
2026-08-11 06:20:06 +00:00
const prop = require(1914) /* items */.ALL_LIBDISCORE_EXPERIMENTS;
2026-07-29 08:29:29 +00:00
const item = prop.forEach((id) => {
let obj = callback(table[4]);
obj = { kind: "user", name: id.id, defaultConfig: { treatmentId: -1 }, variations: null };
const treatments = id.getTreatments();
obj[3] = Object.fromEntries(treatments.map((treatmentId) => {
treatmentId = treatmentId.treatmentId;
const items = [treatmentId, { treatmentId }];
return items;
}));
id.setExperiment(obj.createApexExperiment(obj));
});
};
prototype["_terminate"] = function _terminate() {
};
const libdiscoreExperimentManager = new LibdiscoreExperimentManager();
const result = require("items").fileFinishedImporting("modules/libdiscore/LibdiscoreExperimentManager.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default libdiscoreExperimentManager;