This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,80 @@
// Metro module 13859 (f13860).
import { ExplicitContentRedaction } from "../../_bundle/Module1306";
import { ParentalControlledGoreContent, ParentalControlledExplicitContent, ParentalControlledLegacyExplicitContent } from "../user_settings/family_center/ParentalControlledUserSettings";
import { resolveGoreSettingWithDefaultsForTeen } from "../explicit_media_redaction/SensitiveMediaGoreRedactionSettingsUtils";
import { TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM, TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_NON_FRIEND_DM } from "../explicit_media_redaction/SensitiveMediaExplicitRedactionSettingsUtils";
let getExplicitContentSettingOrDefault;
const getGoreContentSettingOrDefault = function getGoreContentSettingOrDefault(selectedTeenId) {
let r14 = ParentalControlledGoreContent.getControlledSetting(selectedTeenId);
if (r14 == null) {
r14 = {};
}
let goreContentNonFriendDm = r14.goreContentNonFriendDm;
let goreContentFriendDm = r14.goreContentFriendDm;
if (!(goreContentNonFriendDm != null && goreContentNonFriendDm !== ExplicitContentRedaction.UNSET_EXPLICIT_CONTENT_REDACTION)) {
goreContentNonFriendDm = resolveGoreSettingWithDefaultsForTeen({
isDm: true
});
}
if (!(goreContentFriendDm != null && goreContentFriendDm !== ExplicitContentRedaction.UNSET_EXPLICIT_CONTENT_REDACTION)) {
goreContentFriendDm = resolveGoreSettingWithDefaultsForTeen({
isDm: true,
isFriend: true
});
}
return {
goreContentNonFriendDm,
goreContentFriendDm,
goreContentGuilds: ExplicitContentRedaction.BLUR
};
};
getExplicitContentSettingOrDefault = function getExplicitContentSettingOrDefault(selectedTeenId) {
const controlledSetting = ParentalControlledExplicitContent.getControlledSetting(selectedTeenId);
const r16 = {
teenId: selectedTeenId,
setting: controlledSetting?.explicitContentNonFriendDm
};
const teenId = r16.teenId;
let setting = r16.setting;
let isFriend = r16.isFriend;
if (isFriend === void 0) {
isFriend = false;
}
if (!(setting != null && setting !== ExplicitContentRedaction.UNSET_EXPLICIT_CONTENT_REDACTION)) {
const controlledSetting2 = ParentalControlledLegacyExplicitContent.getControlledSetting(teenId);
setting = isFriend ? TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM[controlledSetting2] : TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_NON_FRIEND_DM[controlledSetting2];
}
let explicitContentFriendDm = controlledSetting?.explicitContentFriendDm;
if (!(explicitContentFriendDm != null && explicitContentFriendDm !== ExplicitContentRedaction.UNSET_EXPLICIT_CONTENT_REDACTION)) {
explicitContentFriendDm = TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM[ParentalControlledLegacyExplicitContent.getControlledSetting(selectedTeenId)];
}
return {
explicitContentNonFriendDm: setting,
explicitContentFriendDm,
explicitContentGuilds: ExplicitContentRedaction.BLUR
};
};
export function isSetAndNotDefault(a0) {
return a0 != null && a0 !== ExplicitContentRedaction.UNSET_EXPLICIT_CONTENT_REDACTION;
}
export { getGoreContentSettingOrDefault };
export function updateGoreContentSetting(a0, a1) {
ParentalControlledGoreContent.updateControlledSetting(a0, {
...getGoreContentSettingOrDefault(a0),
...a1
});
}
export function resolveExplicitContentSettingWithDefaultsForTeen({ teenId, setting, isFriend = false }) {
if (setting != null && setting !== ExplicitContentRedaction.UNSET_EXPLICIT_CONTENT_REDACTION) {
return setting;
}
const controlledSetting = ParentalControlledLegacyExplicitContent.getControlledSetting(teenId);
return isFriend ? TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM[controlledSetting] : TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_NON_FRIEND_DM[controlledSetting];
}
export { getExplicitContentSettingOrDefault };
export function updateExplicitContentSetting(a0, a1) {
ParentalControlledExplicitContent.updateControlledSetting(a0, {
...getExplicitContentSettingOrDefault(a0),
...a1
});
}