decord/source/modules/quests/lib/analytics/QuestHomeSearchSession.tsx
github-actions f0f877e8ce chore: update source for alpha 347.1
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4824.js (118.4 MB)
2026-09-15 14:23:42 +00:00

34 lines
1.2 KiB
TypeScript

// Module ID: 7839
// Function ID: 7840
// Name: QuestHomeSearchSession
// Dependencies: [1255, 7578, 2]
// Exports: clearQuestHomeSearchSession, getCurrentQuestHomeSearchSession, getOrCreateQuestHomeSearchSession
// Module 7839 (QuestHomeSearchSession)
import v1 from "v1" /* 1255 */;
import SessionUtils from "SessionUtils" /* 7578 */;
import size from "module_2" /* 2 */;
let c2 = null;
const result = size.fileFinishedImporting("modules/quests/lib/analytics/QuestHomeSearchSession.tsx");
export const getOrCreateQuestHomeSearchSession = function getOrCreateQuestHomeSearchSession() {
const timestamp = Date.now();
if (null == searchSession) {
const obj2 = { searchSession: null, isNew: true };
const obj3 = { uuid: v1.v4(), createdAtTimestamp: timestamp, lastUsedTimestamp: timestamp, version: SessionUtils.CLIENT_SESSION_STORAGE_VERSION };
searchSession = obj3;
obj2.searchSession = obj3;
let obj = obj2;
} else {
searchSession.lastUsedTimestamp = timestamp;
obj = { searchSession, isNew: false };
}
return obj;
};
export function clearQuestHomeSearchSession() {
c2 = null;
}
export function getCurrentQuestHomeSearchSession() {
return c2;
}