decord/source/modules/cache/CacheActionCreators.tsx
2026-07-31 08:44:05 +00:00

103 lines
2.9 KiB
TypeScript

// Module ID: 14550
// Function ID: 14551
// Name: _writeCaches
// Dependencies: [5, 1372, 5737, 709, 2]
// Exports: clearCaches, writeCaches
// Module 14550 (_writeCaches)
import asyncGeneratorStep from "asyncGeneratorStep";
import { ChannelLoader } from "ensureGuildLoaded";
import handleClearCaches from "handleClearCaches";
function _writeCaches() {
const self = this;
const tmp = callback(() => {
let closure_0 = arg0;
let c3 = 0;
let c4 = 0;
const iter = (function*() {
let table = tmp2;
let flag;
if (flag === undefined) {
flag = false;
}
table = undefined;
let c3 = 1;
let c4 = 1;
yield "ct";
if (1 === tmp5) {
if (arg0 === 1) {
c4 = 3;
throw arg1;
} else if (arg0 === 2) {
c4 = 3;
let obj1 = { value: null, done: true };
obj1[0] = arg1;
return obj1;
} else if (c4.canWriteCaches(flag)) {
c3 = 2;
c4 = 1;
const obj2 = { value: null, done: false };
obj2[0] = c3.loadAllMissingChannels();
return obj2;
}
} else if (2 === tmp5) {
if (arg0 === 1) {
c4 = 3;
throw arg1;
} else if (arg0 === 2) {
c4 = 3;
const obj3 = { value: null, done: true };
obj3[0] = arg1;
return obj3;
} else {
table = [];
obj1 = flag(table[3]);
const obj4 = { type: "WRITE_CACHES", promisesToWaitOn: null };
obj4[1] = table;
obj1.dispatch(obj4);
c3 = 3;
c4 = 1;
const obj5 = { value: null, done: false };
obj5[0] = Promise.all(table);
return obj5;
}
} else if (arg0 === 1) {
c4 = 3;
throw arg1;
} else if (arg0 === 2) {
c4 = 3;
const obj = { value: null, done: true };
obj[0] = arg1;
return obj;
}
c4 = 3;
yield "HermesInternal";
})();
iter.next();
return iter;
});
const _writeCaches = tmp;
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
}
const result = require("handleClearCaches").fileFinishedImporting("modules/cache/CacheActionCreators.tsx");
export const writeCaches = function writeCaches(arg0) {
const self = this;
const apply = _writeCaches.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
};
export const clearCaches = function clearCaches() {
importDefault(709).dispatch({ type: "CLEAR_CACHES", reason: "Requested by user", preventWritingCachesAgainThisSession: true, resetSocket: true });
};