108 lines
5.7 KiB
TypeScript
108 lines
5.7 KiB
TypeScript
/* Metro module 5119; source: modules/parent_tools/FamilyCenterControlledSettingsStore.tsx; dependencies: [6, 7, 15, 17, 18, 1350, 1314, 566, 694, 2] */
|
|
function _fun44876(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:6, offset: 0x0117afe8, size: 333 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
|
let env0_8 = {};
|
|
let env0_9 = {};
|
|
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
|
let value = _fun44880(Store);
|
|
value.displayName = 'FamilyCenterControlledSettingsStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
|
{FAMILY_CENTER_TEEN_SETTINGS_FETCH_START: function() {
|
|
env0_7 = true;
|
|
}, FAMILY_CENTER_TEEN_SETTINGS_AND_CONSENTS_FETCH_SUCCESS: FAMILY_CENTER_TEEN_SETTINGS_AND_CONSENTS_FETCH_SUCCESS,
|
|
FAMILY_CENTER_TEEN_CONSENTS_UPDATE_SUCCESS: FAMILY_CENTER_TEEN_CONSENTS_UPDATE_SUCCESS,
|
|
FAMILY_CENTER_TEEN_UPDATE_SETTINGS_SUCCESS: FAMILY_CENTER_TEEN_UPDATE_SETTINGS_SUCCESS, LOGOUT: function() {
|
|
env0_8 = {};
|
|
env0_9 = {};
|
|
env0_7 = false;
|
|
}});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/FamilyCenterControlledSettingsStore.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_44877() { // fn#44877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:148, offset: 0x0117b135, size: 94 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_44877_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun44880(a0) { // fn#44880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:366, offset: 0x0117b193, size: 189 bytes, params: 2, frame: 16
|
|
const closure = FamilyCenterControlledSettingsStore;
|
|
env0_6(closure, a0);
|
|
return env0_3(closure, [{key: 'getSettings', value: value_44882}, {key: 'getControlledSettings',
|
|
value: value_44883}, {key: 'hasSettingsForUser', value: value_44884}, {key: 'getConsents', value: value_44885},
|
|
{key: 'hasConsented', value: value_44886}, {key: 'isLoading', get: get_44887}]);
|
|
}
|
|
|
|
function FAMILY_CENTER_TEEN_SETTINGS_AND_CONSENTS_FETCH_SUCCESS({userId, settings, consents}) { // fn#44889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:1367, offset: 0x0117b2af, size: 98 bytes, params: 2, frame: 16
|
|
var value;
|
|
var binding;
|
|
if (settings != null) {
|
|
binding = env0_8;
|
|
value = require(1350) /* metro dependency 1350: UserSettingsUtils */;
|
|
binding[userId] = value.b64ToPreloadedUserSettingsProto(settings);
|
|
}
|
|
if (consents != null) {
|
|
env0_9[userId] = consents;
|
|
}
|
|
}
|
|
|
|
function FAMILY_CENTER_TEEN_CONSENTS_UPDATE_SUCCESS({userId, consents}) { // fn#44890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:1578, offset: 0x0117b311, size: 29 bytes, params: 2, frame: 3
|
|
env0_9[userId] = consents;
|
|
}
|
|
|
|
function FAMILY_CENTER_TEEN_UPDATE_SETTINGS_SUCCESS({userId, settings}) { // fn#44891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:1693, offset: 0x0117b32e, size: 108 bytes, params: 2, frame: 20
|
|
const value2 = (require(1350) /* metro dependency 1350: UserSettingsUtils */).b64ToPreloadedUserSettingsProto(settings);
|
|
const binding = env0_8;
|
|
const userSettingsUtilsModule = require(1350) /* metro dependency 1350: UserSettingsUtils */;
|
|
const mergeTopLevelFields = userSettingsUtilsModule.mergeTopLevelFields;
|
|
const PreloadedUserSettings = (require(1314) /* metro dependency 1314: preloaded_user_settings */).PreloadedUserSettings;
|
|
binding[userId] = Reflect.apply(mergeTopLevelFields, userSettingsUtilsModule, [PreloadedUserSettings,
|
|
env0_8[userId], value2]);
|
|
}
|
|
|
|
function value_44884(a0) { // fn#44884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:891, offset: 0x0117b250, size: 22 bytes, params: 2, frame: 2
|
|
return env1_8[a0] != null;
|
|
}
|
|
|
|
function value_44886(a0, a1) { // fn#44886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:1000, offset: 0x0117b266, size: 60 bytes, params: 3, frame: 5
|
|
if (a0 == null) {
|
|
return false;
|
|
}
|
|
const value = environment.__proto__;
|
|
const property = env1_9[a0];
|
|
return property != null && (property[a1] != null && property[a1].consented);
|
|
}
|
|
|