decord/beta/source/stores/DeveloperOptionsStore.tsx

282 lines
9.2 KiB
TypeScript
Raw Permalink Normal View History

2026-10-12 16:32:48 +00:00
// Module ID: 1370
// Function ID: 1371
// Name: DeveloperOptionsStore
2026-10-12 16:32:48 +00:00
// Dependencies: [1085, 569, 1102, 1295, 1111, 1371, 510, 1255, 504, 584, 2]
2026-10-12 16:32:48 +00:00
// Module 1370 (DeveloperOptionsStore)
2026-10-01 14:13:23 +00:00
import get_initializedDefault from "get initialized" /* 504 */;
import Storage3 from "Storage" /* 510 */;
2026-10-07 22:43:51 +00:00
import DispatcherDefault from "Dispatcher" /* 584 */;
import Constants from "Constants" /* 1085 */;
import DurationsDefault from "Durations" /* 1102 */;
import TokenManagerAll from "TokenManager" /* 1111 */;
2026-10-12 16:32:48 +00:00
import SentryUtilsDefault from "SentryUtils" /* 1255 */;
import HTTPUtils from "HTTPUtils" /* 1295 */;
2026-10-02 13:37:24 +00:00
import Backoff from "Backoff" /* 569 */;
import size from "module_2" /* 2 */;
const UserFlags = Constants.UserFlags;
function refreshSourceMapCookie() {
2026-10-01 14:13:23 +00:00
let closure_1;
let obj2;
let obj3;
const HTTP = HTTPUtils.HTTP;
obj = { url, headers: obj2, oldFormErrors: true, rejectWithError: true };
const put = HTTP.put;
obj2 = { Authorization: obj3.getToken() };
obj3 = TokenManagerAll;
const putResult = put(obj);
putResult.then((status) => {
if (401 !== status.status) {
if (403 !== status.status) {
if (200 !== status.status) {
const _setTimeout2 = setTimeout;
2026-10-01 14:13:23 +00:00
let timeout = setTimeout(closure_1_3, importDefaultResult1.fail());
} else {
importDefaultResult1.succeed();
const _setTimeout = setTimeout;
2026-10-01 14:13:23 +00:00
timeout = setTimeout(closure_1_3, status.body.sourceMapCookieTTLSeconds * c1(refreshSourceMapCookie[2]).Millis.SECOND * 0.75);
}
}
}
timeout = null;
2026-10-01 14:13:23 +00:00
obj = url(refreshSourceMapCookie[5]);
const result = obj.setDeveloperOptionSettings({ sourceMapsEnabled: false });
}, () => {
2026-10-01 14:13:23 +00:00
const timeout = setTimeout(refreshSourceMapCookie, importDefaultResult1.fail());
});
}
2026-10-01 14:13:23 +00:00
const React = "" + location.protocol + "//" + location.host + "/__development/source_maps";
let c1 = null;
let result = 5 * DurationsDefault.Millis.SECOND;
const importDefaultResult1 = new Backoff(result, DurationsDefault.Millis.MINUTE, true);
let closure_5 = {
set(arg0) {
2026-10-01 14:13:23 +00:00
let obj2;
let obj3;
let timeout;
if (arg0 !== null != timeout) {
if (arg0) {
const _setTimeout = setTimeout;
timeout = setTimeout(refreshSourceMapCookie, 0);
} else {
const _clearTimeout = clearTimeout;
clearTimeout(timeout);
timeout = null;
2026-10-01 14:13:23 +00:00
const HTTP = HTTPUtils.HTTP;
obj = { url, headers: obj2, oldFormErrors: true, rejectWithError: true };
const del = HTTP.del;
obj2 = { Authorization: obj3.getToken() };
obj3 = TokenManagerAll;
del(obj);
}
}
}
};
2026-10-01 14:13:23 +00:00
const DeveloperOptionsStore_str = "DeveloperOptionsStore";
2026-10-07 22:43:51 +00:00
let obj = { trace: false, canary: false, logGatewayEvents: false, logOverlayEvents: false, logAnalyticsEvents: false, logInteractionTTIAnalytics: false, sourceMapsEnabled: false, axeEnabled: false, cssDebuggingEnabled: false, layoutDebuggingEnabled: false, bugReporterEnabled: true, idleStatusIndicatorEnabled: false, onlyShowPreviewAppCollections: false, disableAppCollectionsCache: false, isStreamInfoOverlayEnabled: false, preventPopoutClose: false, logKeyboardMismatches: false, alertStartupMetrics: false, logQuestEvents: false };
2026-10-01 14:13:23 +00:00
let obj2 = {};
let merged = Object.assign(obj);
2026-10-01 14:13:23 +00:00
obj = obj2;
const DeveloperOptionsRoutingKey = "DeveloperOptionsRoutingKey";
let tags = [];
2026-10-01 14:13:23 +00:00
const Store = get_initializedDefault.Store;
class DeveloperOptionsStore extends Store {
2026-10-01 14:13:23 +00:00
initialize() {
const Storage = Storage3.Storage;
const value = Storage.get(DeveloperOptionsStore_str);
if (null != value) {
obj = {};
const merged = Object.assign(obj);
const merged1 = Object.assign(value);
}
const Storage2 = Storage3.Storage;
const value2 = Storage2.get(DeveloperOptionsRoutingKey);
if (null != value2) {
tags = value2;
}
}
2026-10-01 14:13:23 +00:00
getDebugOptionsHeaderValue() {
const keys = Object.keys(obj);
const mapped = keys.map((item) => obj[item]);
const keys1 = Object.keys(obj);
const found = keys1.filter((item) => obj[item]);
return found.join(",");
}
2026-10-01 14:13:23 +00:00
getRoutingKeyHeaderValue() {
let joined = null;
if (0 !== tags.length) {
joined = tags.join(",");
}
return joined;
}
}
const prototype = DeveloperOptionsStore.prototype;
Object.defineProperty(prototype, "isTracingRequests", {
get: function isTracingRequests() {
return obj.trace;
},
set: undefined
});
Object.defineProperty(prototype, "isForcedCanary", {
get: function isForcedCanary() {
return obj.canary;
},
set: undefined
});
Object.defineProperty(prototype, "isLoggingGatewayEvents", {
get: function isLoggingGatewayEvents() {
return obj.logGatewayEvents;
},
set: undefined
});
Object.defineProperty(prototype, "isLoggingOverlayEvents", {
get: function isLoggingOverlayEvents() {
return obj.logOverlayEvents;
},
set: undefined
});
Object.defineProperty(prototype, "isLoggingAnalyticsEvents", {
get: function isLoggingAnalyticsEvents() {
return obj.logAnalyticsEvents;
},
set: undefined
});
2026-10-07 22:43:51 +00:00
Object.defineProperty(prototype, "isLoggingInteractionTTIAnalytics", {
get: function isLoggingInteractionTTIAnalytics() {
return obj.logInteractionTTIAnalytics;
},
set: undefined
});
Object.defineProperty(prototype, "isAxeEnabled", {
get: function isAxeEnabled() {
return obj.axeEnabled;
},
set: undefined
});
Object.defineProperty(prototype, "cssDebuggingEnabled", {
get: function cssDebuggingEnabled() {
return obj.cssDebuggingEnabled;
},
set: undefined
});
Object.defineProperty(prototype, "layoutDebuggingEnabled", {
get: function layoutDebuggingEnabled() {
return obj.layoutDebuggingEnabled;
},
set: undefined
});
Object.defineProperty(prototype, "sourceMapsEnabled", {
get: function sourceMapsEnabled() {
return obj.sourceMapsEnabled;
},
set: undefined
});
Object.defineProperty(prototype, "isBugReporterEnabled", {
get: function isBugReporterEnabled() {
return obj.bugReporterEnabled;
},
set: undefined
});
Object.defineProperty(prototype, "isIdleStatusIndicatorEnabled", {
get: function isIdleStatusIndicatorEnabled() {
return obj.idleStatusIndicatorEnabled;
},
set: undefined
});
Object.defineProperty(prototype, "onlyShowPreviewAppCollections", {
get: function onlyShowPreviewAppCollections() {
return obj.onlyShowPreviewAppCollections;
},
set: undefined
});
Object.defineProperty(prototype, "disableAppCollectionsCache", {
get: function disableAppCollectionsCache() {
return obj.disableAppCollectionsCache;
},
set: undefined
});
Object.defineProperty(prototype, "isStreamInfoOverlayEnabled", {
get: function isStreamInfoOverlayEnabled() {
return obj.isStreamInfoOverlayEnabled;
},
set: undefined
});
Object.defineProperty(prototype, "preventPopoutClose", {
get: function preventPopoutClose() {
return obj.preventPopoutClose;
},
set: undefined
});
Object.defineProperty(prototype, "logKeyboardMismatches", {
get: function logKeyboardMismatches() {
return obj.logKeyboardMismatches;
},
set: undefined
});
Object.defineProperty(prototype, "alertStartupMetrics", {
get: function alertStartupMetrics() {
return obj.alertStartupMetrics;
},
set: undefined
});
Object.defineProperty(prototype, "isLoggingQuestEvents", {
get: function isLoggingQuestEvents() {
return obj.logQuestEvents;
},
set: undefined
});
Object.defineProperty(prototype, "routingKeyTags", {
get: function routingKeyTags() {
return tags;
},
set: undefined
});
DeveloperOptionsStore.displayName = "DeveloperOptionsStore";
2026-10-01 14:13:23 +00:00
let obj3 = {
LOGOUT: function handleLogout(arg0) {
obj = {};
const merged = Object.assign(obj);
const merged1 = Object.assign(obj);
const merged2 = Object.assign(obj);
const result = closure_5.set(obj.sourceMapsEnabled);
2026-10-01 14:13:23 +00:00
const Storage = Storage3.Storage;
const result1 = Storage.set(DeveloperOptionsStore_str, obj);
tags = [];
2026-10-01 14:13:23 +00:00
const Storage2 = Storage3.Storage;
const result2 = Storage2.set(DeveloperOptionsRoutingKey, tags);
},
CONNECTION_OPEN: function handleConnectionOpen(user) {
let num = user.user.flags;
if (num == null) {
num = 0;
}
2026-10-01 14:13:23 +00:00
const str = (num & UserFlags.STAFF) === UserFlags.STAFF || null != user.user.personal_connection_id;
if ((num & UserFlags.STAFF) === UserFlags.STAFF) {
const result = closure_5.set(obj.sourceMapsEnabled);
}
2026-10-01 14:13:23 +00:00
obj = SentryUtilsDefault;
const obj2 = { isStaff: str.toString() };
obj.setTags(obj2);
},
DEVELOPER_OPTIONS_UPDATE_SETTINGS: function handleUpdateSettings(settings) {
2026-10-01 14:13:23 +00:00
settings = settings.settings;
obj = {};
const merged = Object.assign(obj);
const merged1 = Object.assign(obj);
2026-10-01 14:13:23 +00:00
const merged2 = Object.assign(settings);
const result = closure_5.set(obj.sourceMapsEnabled);
2026-10-01 14:13:23 +00:00
const Storage = Storage3.Storage;
const result1 = Storage.set(DeveloperOptionsStore_str, obj);
},
DEVELOPER_OPTIONS_SET_ROUTING_KEY: function handleSetRoutingKey(tags) {
tags = tags.tags;
2026-10-01 14:13:23 +00:00
const Storage = Storage3.Storage;
const result = Storage.set(DeveloperOptionsRoutingKey, tags);
}
2026-10-01 14:13:23 +00:00
};
const developerOptionsStore = new DeveloperOptionsStore(DispatcherDefault, obj3);
let result1 = size.fileFinishedImporting("stores/DeveloperOptionsStore.tsx");
export default developerOptionsStore;