decord/source/modules/devtools/AnalyticsLogStore.tsx

121 lines
3.5 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 13774
// Function ID: 13775
2026-07-29 08:29:29 +00:00
// Name: initialize
2026-08-15 05:55:55 +00:00
// Dependencies: [1218, 7472, 513, 514, 589, 709, 2]
2026-07-20 16:05:17 +00:00
2026-08-15 05:55:55 +00:00
// Module 13774 (initialize)
2026-07-29 08:29:29 +00:00
import fetchFingerprint from "fetchFingerprint";
import init from "init";
import { Store } from "initialize";
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
let c4 = 0;
let closure_5 = [];
let c6 = 0;
let closure_7 = [];
let c8 = false;
class AnalyticsLogStore extends Store {
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const prototype = AnalyticsLogStore.prototype;
prototype["initialize"] = function initialize() {
this.waitFor(fetchFingerprint, init);
};
Object.defineProperty(prototype, "loggedEvents", {
get: function loggedEvents() {
return closure_5;
},
set: undefined
});
Object.defineProperty(prototype, "loggedEventsVersion", {
get: function loggedEventsVersion() {
return c6;
},
set: undefined
});
Object.defineProperty(prototype, "loggedTriggers", {
get: function loggedTriggers() {
return closure_7;
},
set: undefined
});
Object.defineProperty(prototype, "trackTriggers", {
get: function trackTriggers() {
return c8;
},
set: undefined
});
AnalyticsLogStore.displayName = "AnalyticsLogStore";
const analyticsLogStore = new AnalyticsLogStore(require("dispatcher"), {
TRACK: function handleTrack(fingerprint) {
fingerprint = fingerprint.fingerprint;
if (init.isDeveloper) {
const obj = { key: null, event: null, properties: null, fingerprint: null, timestamp: null };
let closure_4 = str + 1;
obj[0] = +closure_4.toString();
obj[1] = tmp;
obj[2] = tmp2;
if (null != fingerprint) {
let extractIdResult = require(513) /* extractId */.extractId(fingerprint);
const obj2 = require(513) /* extractId */;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
extractIdResult = id.getId();
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[3] = extractIdResult;
2026-07-20 16:05:17 +00:00
const _Date = Date;
const date = new Date();
2026-07-29 08:29:29 +00:00
obj[4] = date;
2026-07-23 10:11:24 +00:00
arr = arr.push(obj);
2026-07-29 08:29:29 +00:00
closure_6 = closure_6 + 1;
2026-07-20 16:05:17 +00:00
if (arr.length > 500) {
const _Math = Math;
arr = arr.slice(-Math.floor(250));
}
}
},
TRACK_TRIGGER: function handleTrackTrigger(arg0) {
let _location;
let descriptor;
let excluded;
let experimentId;
let exposureType;
let previouslyTracked;
2026-07-29 08:29:29 +00:00
let isDeveloper = init.isDeveloper;
2026-07-20 16:05:17 +00:00
({ experimentId, descriptor, exposureType, excluded, location: _location, previouslyTracked } = arg0);
if (isDeveloper) {
2026-07-29 08:29:29 +00:00
isDeveloper = c8;
2026-07-20 16:05:17 +00:00
}
if (isDeveloper) {
const items = [];
2026-07-29 08:29:29 +00:00
const obj = { key: null, experimentId: null, descriptor: null, exposureType: null, excluded: null, location: null, previouslyTracked: null, timestamp: null };
2026-07-23 10:11:24 +00:00
const arraySpreadResult = HermesBuiltin.arraySpread(items, 0);
2026-07-29 08:29:29 +00:00
obj[0] = require(514) /* v1 */.v4();
obj[1] = experimentId;
obj[2] = descriptor;
obj[3] = exposureType;
obj[4] = excluded;
obj[5] = _location;
obj[6] = previouslyTracked;
2026-07-20 16:05:17 +00:00
const _Date = Date;
const date = new Date();
2026-07-29 08:29:29 +00:00
obj[7] = date;
2026-07-20 16:05:17 +00:00
items[arraySpreadResult] = obj;
isDeveloper = items.length > 500;
2026-07-29 08:29:29 +00:00
const obj2 = require(514) /* v1 */;
2026-07-20 16:05:17 +00:00
}
if (isDeveloper) {
2026-07-23 10:11:24 +00:00
items.shift();
2026-07-20 16:05:17 +00:00
}
},
SET_TRACK_TRIGGERS: function handleSetTrackTriggers(enabled) {
enabled = enabled.enabled;
},
ANALYTICS_LOG_CLEAR: function handleAnalyticsLogClear() {
2026-07-29 08:29:29 +00:00
let closure_5 = [];
closure_6 = closure_6 + 1;
let closure_7 = [];
2026-07-20 16:05:17 +00:00
}
});
2026-07-29 08:29:29 +00:00
const result = require("extractId").fileFinishedImporting("modules/devtools/AnalyticsLogStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default analyticsLogStore;