38 lines
2.2 KiB
TypeScript
38 lines
2.2 KiB
TypeScript
/* Metro module 8040; source: modules/applications/utils/isApplicationAgeRestricted.tsx; dependencies: [4234, 8041, 5203, 5205, 2] */
|
|
function _fun63740(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8218:6, offset: 0x01b8f005, size: 133 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const closure = isAgeRestrictedContentClassification;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/utils/isApplicationAgeRestricted.tsx');
|
|
exports.default = function(a0) {
|
|
if (importDefault(dependencyMap[1]).getConfig({location: 'isApplicationAgeRestricted'}).enabled) {
|
|
return isAgeRestrictedContentClassification(ApplicationStore.getApplication(a0)?.contentClassification);
|
|
}
|
|
return false;
|
|
};
|
|
exports.isAgeRestrictedContentClassification = closure;
|
|
}
|
|
|
|
function isAgeRestrictedContentClassification(a0) { // fn#63741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8218:106, offset: 0x01b8f08a, size: 109 bytes, params: 2, frame: 17
|
|
var r0;
|
|
var contentClassificationToAgeRestriction;
|
|
var object2;
|
|
let value = a0 != null;
|
|
if (value) {
|
|
value = require(5203) /* metro dependency 5203: ContentClassificationToAgeRestriction */;
|
|
contentClassificationToAgeRestriction = value.contentClassificationToAgeRestriction;
|
|
object2 = {};
|
|
object2.type = (require(5203) /* metro dependency 5203: ContentClassificationToAgeRestriction */).ContentClassificationVariant.MINIMAL;
|
|
object2.data = a0;
|
|
value = Reflect.apply(contentClassificationToAgeRestriction, value, [object2]);
|
|
value = value === (require(5205) /* metro dependency 5205: AgeRestrictionStatus */).AgeRestrictionStatus.ADULT;
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|