decord/source/stores/SessionsStore.tsx

110 lines
3.4 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 4546
// Function ID: 4547
2026-07-29 08:29:29 +00:00
// Name: handleUpdate
// Dependencies: [1218, 589, 12, 709, 2]
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
// Module 4546 (handleUpdate)
import applyDefault from "apply" /* 12 */;
import initializeDefault from "initialize" /* 589 */;
import dispatcherDefault from "dispatcher" /* 709 */;
import closure_2 from "fetchFingerprint" /* 1218 */;
2026-07-20 16:05:17 +00:00
function handleUpdate(sessions) {
2026-08-24 06:08:38 +00:00
closure_4 = {};
2026-07-20 16:05:17 +00:00
sessions = sessions.sessions;
const item = sessions.forEach((sessionId) => {
2026-07-29 08:29:29 +00:00
closure_4[sessionId.sessionId] = sessionId;
2026-07-20 16:05:17 +00:00
});
}
2026-07-29 08:29:29 +00:00
let closure_3 = Object.freeze([]);
let closure_4 = {};
2026-08-24 06:08:38 +00:00
const Store = initializeDefault.Store;
2026-07-29 08:29:29 +00:00
class SessionsStore extends Store {
}
const prototype = SessionsStore.prototype;
prototype["initialize"] = function initialize() {
2026-08-24 06:08:38 +00:00
this.waitFor(closure_2);
2026-07-29 08:29:29 +00:00
};
prototype["getSessions"] = function getSessions() {
return closure_4;
};
prototype["getSession"] = function getSession() {
const sessionId = store.getSessionId();
let sessionById = null;
if (null != sessionId) {
const self = this;
sessionById = this.getSessionById(sessionId);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return sessionById;
};
prototype["getRemoteActivities"] = function getRemoteActivities() {
2026-08-24 06:08:38 +00:00
importDefault = store.getSessionId();
const found = applyDefault.find(closure_4, (active) => {
2026-07-29 08:29:29 +00:00
active = active.active;
if (active) {
active = active.sessionId !== closure_0;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return active;
});
return null != found ? found.activities : closure_3;
};
prototype["getHiddenActivities"] = function getHiddenActivities() {
2026-08-24 06:08:38 +00:00
importDefault = store.getSessionId();
const found = applyDefault.find(closure_4, (active) => {
2026-07-29 08:29:29 +00:00
active = active.active;
if (active) {
active = active.sessionId !== closure_0;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return active;
});
if (null != found) {
if (null != found.hiddenActivities) {
let hiddenActivities = found.hiddenActivities;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return hiddenActivities;
}
hiddenActivities = closure_3;
};
prototype["getSessionById"] = function getSessionById(sessionId) {
return table[sessionId];
};
prototype["getActiveSession"] = function getActiveSession() {
2026-08-24 06:08:38 +00:00
return applyDefault.find(closure_4, (active) => active.active);
2026-07-29 08:29:29 +00:00
};
prototype["getRemoteApplicationActivity"] = function getRemoteApplicationActivity(application_id) {
2026-08-24 06:08:38 +00:00
importDefault = application_id;
2026-07-29 08:29:29 +00:00
if (null == application_id) {
return null;
} else {
2026-08-24 06:08:38 +00:00
dependencyMap = store.getSessionId();
const found = applyDefault.find(closure_4, (active) => {
2026-07-29 08:29:29 +00:00
active = active.active;
if (active) {
active = active.sessionId !== closure_1;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return active;
});
if (null == found) {
return null;
} else {
const activities = found.activities;
let found1 = activities.find((application_id) => application_id.application_id === closure_0);
if (null == found1) {
const hiddenActivities = found.hiddenActivities;
let found2;
if (hiddenActivities != null) {
found2 = hiddenActivities.find((application_id) => application_id.application_id === closure_0);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
found1 = found2;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return found1;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
const arr3 = applyDefault;
2026-07-29 08:29:29 +00:00
}
};
SessionsStore.displayName = "SessionsStore";
2026-08-24 06:08:38 +00:00
const sessionsStore = new SessionsStore(dispatcherDefault, { CONNECTION_OPEN: handleUpdate, SESSIONS_REPLACE: handleUpdate });
const result = require("set").fileFinishedImporting("stores/SessionsStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default sessionsStore;