decord/stable/source/modules/soundpacks/SoundpackStore.tsx
github-actions e2bc0408ee chore: update source for stable 346.13
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-22 22:11:40 +00:00

52 lines
1.8 KiB
TypeScript

// Module ID: 10033
// Function ID: 10034
// Name: SoundpackStore
// Dependencies: [10034, 504, 573, 2]
// Module 10033 (SoundpackStore)
import initializeDefault from "initialize" /* 504 */;
import DispatcherDefault from "Dispatcher" /* 573 */;
import Constants from "Constants" /* 10034 */;
import size from "module_2" /* 2 */;
const Soundpacks = Constants.Soundpacks;
let obj = { soundpack: Soundpacks.CLASSIC, lastSoundpackExperimentId: null };
const PersistedStore = initializeDefault.PersistedStore;
class SoundpackStore extends PersistedStore {
}
const prototype = SoundpackStore.prototype;
prototype["initialize"] = function initialize(arg0) {
if (null != arg0) {
const _Object = Object;
const values = Object.values(Soundpacks);
if (!values.includes(arg0.soundpack)) {
obj.soundpack = tmp2.CLASSIC;
}
tmp2 = Soundpacks;
}
};
prototype["getState"] = function getState() {
return obj;
};
prototype["getSoundpack"] = function getSoundpack() {
return obj.soundpack;
};
prototype["getLastSoundpackExperimentId"] = function getLastSoundpackExperimentId() {
return obj.lastSoundpackExperimentId;
};
SoundpackStore.displayName = "SoundpackStore";
SoundpackStore.persistKey = "SoundpackStore";
obj = {
SET_SOUNDPACK: function handleSetSoundpack(forExperimentId) {
let lastSoundpackExperimentId = forExperimentId.forExperimentId;
obj = { soundpack: forExperimentId.soundpack, lastSoundpackExperimentId: null };
if (undefined === lastSoundpackExperimentId) {
lastSoundpackExperimentId = obj.lastSoundpackExperimentId;
}
obj.lastSoundpackExperimentId = lastSoundpackExperimentId;
}
};
const soundpackStore = new SoundpackStore(DispatcherDefault, obj);
const result = size.fileFinishedImporting("modules/soundpacks/SoundpackStore.tsx");
export default soundpackStore;