657 lines
37 KiB
TypeScript
657 lines
37 KiB
TypeScript
/* Metro module 5118; source: modules/parent_tools/FamilyCenterActionCreators.tsx; dependencies: [5, 5119, 5117, 661, 5120, 694, 507, 683, 1363, 1314, 1350, 2] */
|
|
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
|
|
import FamilyCenterControlledSettingsStore from './FamilyCenterControlledSettingsStore.tsx'; /* Metro dependency 5119 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as HTTPUtilsModule from '../../external/discord_common/js/packages/http-utils/HTTPUtils.tsx'; /* Metro dependency 507 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as FamilyCenterConstantsModule from './FamilyCenterConstants.tsx'; /* Metro dependency 5117 */
|
|
|
|
function _fun44816(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:6, offset: 0x011799f9, size: 419 bytes, params: 8, frame: 19
|
|
let env0_0 = require;
|
|
const maybeFetchCollectiblesForInvoices = function() {
|
|
return _maybeFetchCollectiblesForInvoices.apply(this, arguments);
|
|
};
|
|
const maybeFetchCollectiblesForGifts = function() {
|
|
return _maybeFetchCollectiblesForGifts.apply(this, arguments);
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
object = {initialPageLoad: initialPageLoad, fetchLinkedUsers: fetchLinkedUsers,
|
|
getConnectionPrerequisites: getConnectionPrerequisites, setPendingConnection: setPendingConnection,
|
|
clearPendingConnection: clearPendingConnection, requestLink: requestLink, fetchTeenActivity: fetchTeenActivity,
|
|
fetchMoreTeenActivity: function(a0, a1, a2, a3) {
|
|
var env0_0 = a0;
|
|
var env0_1 = a1;
|
|
var env0_2 = a2;
|
|
return a3(_fun44862)();
|
|
}, selectTab: selectTab, fetchTeenSettingsAndConsents: fetchTeenSettingsAndConsents,
|
|
updateTeenSettings: updateTeenSettings, updateTeenConsents: updateTeenConsents};
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/FamilyCenterActionCreators.tsx');
|
|
exports.default = object;
|
|
exports.updateLinkForUserId = function() {
|
|
return _updateLinkForUserId.apply(this, arguments);
|
|
};
|
|
exports.removeLinkForUserId = function() {
|
|
return _removeLinkForUserId.apply(this, arguments);
|
|
};
|
|
exports.getLinkCodeForCurrentUser = function() {
|
|
return _getLinkCodeForCurrentUser.apply(this, arguments);
|
|
};
|
|
exports.shareIarWithParents = function() {
|
|
return _shareIarWithParents.apply(this, arguments);
|
|
};
|
|
function _maybeFetchCollectiblesForInvoices() { // fn#44818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:297, offset: 0x01179b9c, size: 48 bytes, params: 1, frame: 14
|
|
return Module00005(_fun44820).apply(this, arguments);
|
|
function* _fun44820(a0) { // fn#44820, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:388, offset: 0x01179bd5, size: 132 bytes, params: 2, frame: 16
|
|
if (true) {
|
|
var Set = global.Set;
|
|
var set = new Set();
|
|
a0.forEach(_fun44821);
|
|
var Promise = global.Promise;
|
|
var all = Promise.all;
|
|
var Array = global.Array;
|
|
set = Array.from(set);
|
|
yield Reflect.apply(all, Promise, [set.map(_fun44822)]);
|
|
}
|
|
function _fun44821(a0) { // fn#44821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:426, offset: 0x01179c59, size: 79 bytes, params: 2, frame: 12
|
|
var property;
|
|
var binding;
|
|
if (a0.invoice_items != null) {
|
|
if (a0.invoice_items.length > 0) {
|
|
property = a0.invoice_items[0];
|
|
if (property.sku_id != null) {
|
|
binding = env0_0;
|
|
binding.add(property.sku_id);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun44822(a0) { // fn#44822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:580, offset: 0x01179ca8, size: 41 bytes, params: 2, frame: 11
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
return env3_0(env3_2[4]).maybeFetchCollectiblesProduct(a0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _maybeFetchCollectiblesForGifts() { // fn#44824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:756, offset: 0x01179cd1, size: 48 bytes, params: 1, frame: 14
|
|
return Module00005(_fun44826).apply(this, arguments);
|
|
function* _fun44826(a0) { // fn#44826, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:841, offset: 0x01179d0a, size: 132 bytes, params: 2, frame: 16
|
|
if (true) {
|
|
var Set = global.Set;
|
|
var set = new Set();
|
|
a0.forEach(_fun44827);
|
|
var Promise = global.Promise;
|
|
var all = Promise.all;
|
|
var Array = global.Array;
|
|
set = Array.from(set);
|
|
yield Reflect.apply(all, Promise, [set.map(_fun44828)]);
|
|
}
|
|
function _fun44827(a0) { // fn#44827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:879, offset: 0x01179d8e, size: 42 bytes, params: 2, frame: 11
|
|
var binding;
|
|
if (a0.sku_id != null) {
|
|
binding = env0_0;
|
|
binding.add(a0.sku_id);
|
|
}
|
|
}
|
|
|
|
function _fun44828(a0) { // fn#44828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:955, offset: 0x01179ca8, size: 41 bytes, params: 2, frame: 11
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
return env3_0(env3_2[4]).maybeFetchCollectiblesProduct(a0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _updateLinkForUserId() { // fn#44829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:1028, offset: 0x01179db8, size: 48 bytes, params: 1, frame: 14
|
|
return Module00005(_fun44831).apply(this, arguments);
|
|
function* _fun44831(a0, a1) { // fn#44831, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:1091, offset: 0x01179df1, size: 128 bytes, params: 3, frame: 15
|
|
var environment;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var HTTP = env2_0(env2_2[6]).HTTP;
|
|
var patch = HTTP.patch;
|
|
var FAMILY_CENTER_LINKED_USERS = env2_7.FAMILY_CENTER_LINKED_USERS;
|
|
value = Reflect.apply(patch, HTTP, [{url: FAMILY_CENTER_LINKED_USERS, body: {linked_user_id: a0,
|
|
link_status: a1},
|
|
rejectWithError: false}]);
|
|
yield value.then(_fun44832);
|
|
}
|
|
function _fun44832({body}) { // fn#44832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:1230, offset: 0x01179e71, size: 62 bytes, params: 2, frame: 13
|
|
let value = environment.__proto__.__proto__.__proto__;
|
|
value = env3_1(env3_2[5]);
|
|
value.dispatch({type: 'FAMILY_CENTER_REQUEST_LINK_UPDATE_SUCCESS', linkedUsers: body});
|
|
return body;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _removeLinkForUserId() { // fn#44833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:1357, offset: 0x01179eaf, size: 48 bytes, params: 1, frame: 14
|
|
return Module00005(_fun44835).apply(this, arguments);
|
|
function* _fun44835(a0) { // fn#44835, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:1420, offset: 0x01179ee8, size: 124 bytes, params: 2, frame: 16
|
|
var environment;
|
|
if (true) {
|
|
var env0_0 = a0;
|
|
value = environment.__proto__.__proto__;
|
|
var HTTP = env2_0(env2_2[6]).HTTP;
|
|
var del = HTTP.del;
|
|
var FAMILY_CENTER_LINKED_USERS = env2_7.FAMILY_CENTER_LINKED_USERS;
|
|
value = Reflect.apply(del, HTTP, [{url: FAMILY_CENTER_LINKED_USERS, body: {linked_user_id: a0},
|
|
rejectWithError: false}]);
|
|
yield value.then(_fun44836);
|
|
}
|
|
function _fun44836({body}) { // fn#44836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:1541, offset: 0x01179f64, size: 76 bytes, params: 2, frame: 13
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
env3_1(env3_2[5]).dispatch({type: 'FAMILY_CENTER_REQUEST_LINK_REMOVE_SUCCESS', linkedUsers: body,
|
|
deletedUserId: env0_0});
|
|
return body;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _getLinkCodeForCurrentUser() { // fn#44837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:1684, offset: 0x01179fb0, size: 48 bytes, params: 1, frame: 14
|
|
return Module00005(_fun44839).apply(this, arguments);
|
|
function* _fun44839() { // fn#44839, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:1759, offset: 0x01179fe9, size: 105 bytes, params: 1, frame: 14
|
|
var environment;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var HTTP = env2_0(env2_2[6]).HTTP;
|
|
var get = HTTP.get;
|
|
var FAMILY_CENTER_LINK_CODE = env2_7.FAMILY_CENTER_LINK_CODE;
|
|
value = Reflect.apply(get, HTTP, [{url: FAMILY_CENTER_LINK_CODE, rejectWithError: false}]);
|
|
yield value.then(_fun44840);
|
|
}
|
|
function _fun44840({body}) { // fn#44840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:1852, offset: 0x0117a052, size: 79 bytes, params: 2, frame: 14
|
|
const link_code = body.link_code;
|
|
const expires_at = body.expires_at;
|
|
let value = environment.__proto__.__proto__.__proto__;
|
|
value = env3_1(env3_2[5]);
|
|
value.dispatch({type: 'FAMILY_CENTER_LINK_CODE_FETCH_SUCCESS', linkCode: link_code, expiresAt: expires_at});
|
|
return link_code;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _shareIarWithParents() { // fn#44841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:2024, offset: 0x0117a0a1, size: 48 bytes, params: 1, frame: 14
|
|
return Module00005(_fun44843).apply(this, arguments);
|
|
function* _fun44843() { // fn#44843, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:2087, offset: 0x0117a0da, size: 89 bytes, params: 1, frame: 14
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var HTTP = env2_0(env2_2[6]).HTTP;
|
|
var post = HTTP.post;
|
|
var FAMILY_CENTER_SHARE_IAR_WITH_PARENTS = env2_7.FAMILY_CENTER_SHARE_IAR_WITH_PARENTS;
|
|
yield Reflect.apply(post, HTTP, [{url: FAMILY_CENTER_SHARE_IAR_WITH_PARENTS, rejectWithError: true}]);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function initialPageLoad() { // fn#44844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:2237, offset: 0x0117a133, size: 27 bytes, params: 1, frame: 11
|
|
return Module00005(_fun44846)();
|
|
function* _fun44846() { // fn#44846, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:2244, offset: 0x0117a157, size: 840 bytes, params: 1, frame: 25
|
|
var value16;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
let binding = env2_1;
|
|
const binding2 = env2_2;
|
|
const value3 = undefined;
|
|
binding(binding2[5]).dispatch({type: 'FAMILY_CENTER_FETCH_START'});
|
|
const HTTP = env2_0(binding2[6]).HTTP;
|
|
const get = HTTP.get;
|
|
const FAMILY_CENTER_TEEN_ACTIVITY_ME = env2_7.FAMILY_CENTER_TEEN_ACTIVITY_ME;
|
|
yield Reflect.apply(get, HTTP, [{url: FAMILY_CENTER_TEEN_ACTIVITY_ME, rejectWithError: false}]);
|
|
const value5 = undefined;
|
|
if (false) {
|
|
return value5;
|
|
}
|
|
const body = value5.body;
|
|
const teen_audit_log = body.teen_audit_log;
|
|
const linked_users = body.linked_users;
|
|
const users2 = body.users;
|
|
const age_group = body.age_group;
|
|
object = {};
|
|
const value7 = null;
|
|
object.teenId = value7 == teen_audit_log ? value3 : teen_audit_log.teen_user_id;
|
|
object.rangeStartId = value7 == teen_audit_log ? value3 : teen_audit_log.range_start_id;
|
|
const totals = value7 == teen_audit_log ? value3 : teen_audit_log.totals;
|
|
object.totals = value7 != totals ? totals : {};
|
|
const actions = value7 == teen_audit_log ? value3 : teen_audit_log.actions;
|
|
object.actions = value7 != actions ? actions : [];
|
|
const users = value7 == teen_audit_log ? value3 : teen_audit_log.users;
|
|
object.users = value7 != users ? users : [];
|
|
const guilds = value7 == teen_audit_log ? value3 : teen_audit_log.guilds;
|
|
object.guilds = value7 != guilds ? guilds : [];
|
|
const top_user_activities = value7 == teen_audit_log ? value3 : teen_audit_log.top_user_activities;
|
|
object.topUserActivities = value7 != top_user_activities ? top_user_activities : [];
|
|
const top_guild_activities = value7 == teen_audit_log ? value3 : teen_audit_log.top_guild_activities;
|
|
object.topGuildActivities = value7 != top_guild_activities ? top_guild_activities : [];
|
|
const amount = value7 == teen_audit_log || value7 == teen_audit_log.total_spend ? value3 : teen_audit_log.total_spend.amount;
|
|
object.totalSpendAmount = value7 != amount ? amount : value7;
|
|
const currency = value7 == teen_audit_log || value7 == teen_audit_log.total_spend ? value3 : teen_audit_log.total_spend.currency;
|
|
object.totalSpendCurrency = value7 != currency ? currency : value7;
|
|
const spending_limit = body.spending_limit;
|
|
object.spendingLimit = value7 != spending_limit ? spending_limit : value7;
|
|
const monthly_purchases = body.monthly_purchases;
|
|
object.monthlyPurchases = value7 != monthly_purchases ? monthly_purchases : value7;
|
|
const invoices = value7 == teen_audit_log ? value3 : teen_audit_log.invoices;
|
|
object.invoices = value7 != invoices ? invoices : [];
|
|
const gifts = value7 == teen_audit_log ? value3 : teen_audit_log.gifts;
|
|
object.gifts = value7 != gifts ? gifts : [];
|
|
if (value7 != object.invoices && object.invoices.length > 0) {
|
|
binding = env2_8;
|
|
yield binding(object.invoices);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
if (value7 != object.gifts && object.gifts.length > 0) {
|
|
binding = env2_10;
|
|
yield binding(object.gifts);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
binding = env2_1;
|
|
binding(env2_2[5]).dispatch({type: 'FAMILY_CENTER_INITIAL_LOAD', familyCenterTeenActivity: object,
|
|
linkedUsers: linked_users, users: users2, ageGroup: age_group});
|
|
if (value7 != body.restricted_schedule && value7 != object.teenId) {
|
|
env2_1(env2_2[5]).dispatch({type: 'USER_RESTRICTED_SCHEDULE_UPDATE', userId: object.teenId,
|
|
restrictedSchedule: body.restricted_schedule});
|
|
}
|
|
return object;
|
|
}
|
|
binding = env2_1;
|
|
binding(env2_2[5]).dispatch({type: 'FAMILY_CENTER_INITIAL_LOAD', familyCenterTeenActivity: object,
|
|
linkedUsers: linked_users, users: users2, ageGroup: age_group});
|
|
} else {
|
|
if (value7 != object.gifts && object.gifts.length > 0) {
|
|
binding = env2_10;
|
|
yield binding(object.gifts);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
binding = env2_1;
|
|
binding(env2_2[5]).dispatch({type: 'FAMILY_CENTER_INITIAL_LOAD', familyCenterTeenActivity: object,
|
|
linkedUsers: linked_users, users: users2, ageGroup: age_group});
|
|
if (value7 != body.restricted_schedule && value7 != object.teenId) {
|
|
env2_1(env2_2[5]).dispatch({type: 'USER_RESTRICTED_SCHEDULE_UPDATE', userId: object.teenId,
|
|
restrictedSchedule: body.restricted_schedule});
|
|
}
|
|
return object;
|
|
}
|
|
value16 = env2_1(env2_2[5]);
|
|
value16.dispatch({type: 'FAMILY_CENTER_INITIAL_LOAD', familyCenterTeenActivity: object,
|
|
linkedUsers: linked_users,
|
|
users: users2, ageGroup: age_group});
|
|
}
|
|
if (value7 != body.restricted_schedule && value7 != object.teenId) {
|
|
env2_1(env2_2[5]).dispatch({type: 'USER_RESTRICTED_SCHEDULE_UPDATE', userId: object.teenId,
|
|
restrictedSchedule: body.restricted_schedule});
|
|
}
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
function fetchLinkedUsers() { // fn#44847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:3754, offset: 0x0117a49f, size: 27 bytes, params: 1, frame: 11
|
|
return Module00005(_fun44849)();
|
|
function* _fun44849() { // fn#44849, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:3761, offset: 0x0117a4c3, size: 170 bytes, params: 1, frame: 16
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
const HTTP = env2_0(env2_2[6]).HTTP;
|
|
const get = HTTP.get;
|
|
const FAMILY_CENTER_LINKED_USERS = env2_7.FAMILY_CENTER_LINKED_USERS;
|
|
yield Reflect.apply(get, HTTP, [{url: FAMILY_CENTER_LINKED_USERS, rejectWithError: false}]);
|
|
const value3 = undefined;
|
|
if (false) {
|
|
return value3;
|
|
}
|
|
const body = value3.body;
|
|
object = {};
|
|
object.linkedUsers = body.linked_users;
|
|
const users = body.users;
|
|
object.users = users;
|
|
value = env2_1(env2_2[5]);
|
|
const dispatch = value.dispatch;
|
|
const object2 = {type: 'FAMILY_CENTER_LINKED_USERS_FETCH_SUCCESS'};
|
|
copyDataProperties(object2, object, 'FAMILY_CENTER_LINKED_USERS_FETCH_SUCCESS');
|
|
Reflect.apply(dispatch, value, [object2]);
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
function getConnectionPrerequisites(a0, a1) { // fn#44850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:4023, offset: 0x0117a56d, size: 41 bytes, params: 3, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
return Module00005(_fun44852)();
|
|
function* _fun44852() { // fn#44852, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:4033, offset: 0x0117a59f, size: 123 bytes, params: 1, frame: 15
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
const HTTP = env2_0(env2_2[6]).HTTP;
|
|
const get = HTTP.get;
|
|
const FAMILY_CENTER_CONNECTION_PREREQUISITES = env2_7.FAMILY_CENTER_CONNECTION_PREREQUISITES;
|
|
value = environment.__proto__;
|
|
yield Reflect.apply(get, HTTP, [{url: FAMILY_CENTER_CONNECTION_PREREQUISITES, query: {teen_id: require,
|
|
link_code: importDefault}, rejectWithError: true}]);
|
|
value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
return value.body;
|
|
}
|
|
|
|
}
|
|
|
|
function setPendingConnection(a0, a1) { // fn#44853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:4183, offset: 0x0117a61a, size: 65 bytes, params: 3, frame: 13
|
|
(Dispatcher).dispatch({type: 'FAMILY_CENTER_PENDING_CONNECTION_SET',
|
|
teenId: a0, linkCode: a1});
|
|
}
|
|
|
|
function clearPendingConnection() { // fn#44854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:4294, offset: 0x0117a65b, size: 49 bytes, params: 1, frame: 13
|
|
(Dispatcher).dispatch({type: 'FAMILY_CENTER_PENDING_CONNECTION_CLEAR'});
|
|
}
|
|
|
|
function requestLink(a0, a1) { // fn#44855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:4398, offset: 0x0117a68c, size: 41 bytes, params: 3, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
return Module00005(_fun44857)();
|
|
function* _fun44857() { // fn#44857, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:4408, offset: 0x0117a6be, size: 197 bytes, params: 1, frame: 18
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
const HTTP = env2_0(env2_2[6]).HTTP;
|
|
const post = HTTP.post;
|
|
const FAMILY_CENTER_LINKED_USERS = env2_7.FAMILY_CENTER_LINKED_USERS;
|
|
yield Reflect.apply(post, HTTP, [{url: FAMILY_CENTER_LINKED_USERS, body: {recipient_id: require,
|
|
code: importDefault}, rejectWithError: false}]);
|
|
const value4 = undefined;
|
|
if (false) {
|
|
return value4;
|
|
}
|
|
const body = value4.body;
|
|
object = {};
|
|
object.linkedUsers = body.linked_users;
|
|
const users = body.users;
|
|
object.users = users;
|
|
value = env2_1(env2_2[5]);
|
|
const dispatch = value.dispatch;
|
|
const object3 = {type: 'FAMILY_CENTER_REQUEST_LINK_SUCCESS'};
|
|
copyDataProperties(object3, object, require);
|
|
Reflect.apply(dispatch, value, [object3]);
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
function fetchTeenActivity(a0) { // fn#44858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:4685, offset: 0x0117a783, size: 34 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
return Module00005(_fun44860)();
|
|
function* _fun44860() { // fn#44860, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:4691, offset: 0x0117a7ae, size: 686 bytes, params: 1, frame: 23
|
|
var value16;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
let binding = env2_1;
|
|
const binding2 = env2_2;
|
|
const value3 = undefined;
|
|
binding(binding2[5]).dispatch({type: 'FAMILY_CENTER_FETCH_START'});
|
|
const value6 = env2_7.FAMILY_CENTER_TEEN_ACTIVITY(require);
|
|
const HTTP = env2_0(binding2[6]).HTTP;
|
|
const get = HTTP.get;
|
|
yield Reflect.apply(get, HTTP, [{url: value6, rejectWithError: false}]);
|
|
const value7 = undefined;
|
|
if (false) {
|
|
return value7;
|
|
}
|
|
const body = value7.body;
|
|
const teen_audit_log = body.teen_audit_log;
|
|
object = {};
|
|
object.teenId = teen_audit_log.teen_user_id;
|
|
object.rangeStartId = teen_audit_log.range_start_id;
|
|
object.totals = teen_audit_log.totals;
|
|
object.actions = teen_audit_log.actions;
|
|
const users = teen_audit_log.users;
|
|
object.users = users;
|
|
object.guilds = teen_audit_log.guilds;
|
|
const top_user_activities = teen_audit_log.top_user_activities;
|
|
const value9 = null;
|
|
object.topUserActivities = value9 != top_user_activities ? top_user_activities : [];
|
|
const top_guild_activities = teen_audit_log.top_guild_activities;
|
|
object.topGuildActivities = value9 != top_guild_activities ? top_guild_activities : [];
|
|
const amount = value9 == teen_audit_log || value9 == teen_audit_log.total_spend ? value3 : teen_audit_log.total_spend.amount;
|
|
object.totalSpendAmount = value9 != amount ? amount : value9;
|
|
const currency = value9 == teen_audit_log || value9 == teen_audit_log.total_spend ? value3 : teen_audit_log.total_spend.currency;
|
|
object.totalSpendCurrency = value9 != currency ? currency : value9;
|
|
const spending_limit = body.spending_limit;
|
|
object.spendingLimit = value9 != spending_limit ? spending_limit : value9;
|
|
const monthly_purchases = body.monthly_purchases;
|
|
object.monthlyPurchases = value9 != monthly_purchases ? monthly_purchases : value9;
|
|
const invoices = value9 == teen_audit_log ? value3 : teen_audit_log.invoices;
|
|
object.invoices = value9 != invoices ? invoices : [];
|
|
const gifts = value9 == teen_audit_log ? value3 : teen_audit_log.gifts;
|
|
object.gifts = value9 != gifts ? gifts : [];
|
|
if (object.invoices && object.invoices.length > 0) {
|
|
binding = env2_8;
|
|
yield binding(object.invoices);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
if (object.gifts && object.gifts.length > 0) {
|
|
binding = env2_10;
|
|
yield binding(object.gifts);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
binding = env2_1;
|
|
binding(env2_2[5]).dispatch({type: 'FAMILY_CENTER_TEEN_ACTIVITY_FETCH_SUCCESS',
|
|
familyCenterTeenActivity: object});
|
|
if (value9 != body.restricted_schedule) {
|
|
env2_1(env2_2[5]).dispatch({type: 'USER_RESTRICTED_SCHEDULE_UPDATE', userId: require,
|
|
restrictedSchedule: body.restricted_schedule});
|
|
}
|
|
return object;
|
|
}
|
|
binding = env2_1;
|
|
binding(env2_2[5]).dispatch({type: 'FAMILY_CENTER_TEEN_ACTIVITY_FETCH_SUCCESS',
|
|
familyCenterTeenActivity: object});
|
|
} else {
|
|
if (object.gifts && object.gifts.length > 0) {
|
|
binding = env2_10;
|
|
yield binding(object.gifts);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
binding = env2_1;
|
|
binding(env2_2[5]).dispatch({type: 'FAMILY_CENTER_TEEN_ACTIVITY_FETCH_SUCCESS',
|
|
familyCenterTeenActivity: object});
|
|
if (value9 != body.restricted_schedule) {
|
|
env2_1(env2_2[5]).dispatch({type: 'USER_RESTRICTED_SCHEDULE_UPDATE', userId: require,
|
|
restrictedSchedule: body.restricted_schedule});
|
|
}
|
|
return object;
|
|
}
|
|
value16 = env2_1(env2_2[5]);
|
|
value16.dispatch({type: 'FAMILY_CENTER_TEEN_ACTIVITY_FETCH_SUCCESS', familyCenterTeenActivity: object});
|
|
}
|
|
if (value9 != body.restricted_schedule) {
|
|
env2_1(env2_2[5]).dispatch({type: 'USER_RESTRICTED_SCHEDULE_UPDATE', userId: require,
|
|
restrictedSchedule: body.restricted_schedule});
|
|
}
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
function fetchMoreTeenActivity(a0, a1, a2, a3) { // fn#44861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:5928, offset: 0x0117aa5c, size: 55 bytes, params: 5, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
return a3(_fun44863)();
|
|
function _fun44862() { // fn#44862, offset: 0x0117aa93, size: 9 bytes, params: 1, frame: 1
|
|
return _fun44863;
|
|
}
|
|
|
|
function* _fun44863() { // fn#44863, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:5942, offset: 0x0117aa9c, size: 492 bytes, params: 1, frame: 24
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
let binding = env2_0;
|
|
const value3 = undefined;
|
|
const HTTP = binding(env2_2[6]).HTTP;
|
|
const get = HTTP.get;
|
|
binding = env2_7;
|
|
const FAMILY_CENTER_TEEN_ACTIVITY_MORE = binding.FAMILY_CENTER_TEEN_ACTIVITY_MORE;
|
|
yield Reflect.apply(get, HTTP, [{url: Reflect.apply(FAMILY_CENTER_TEEN_ACTIVITY_MORE, binding, [env1_0, env1_1,
|
|
env1_2, env1_3]), rejectWithError: false}]);
|
|
const value5 = undefined;
|
|
if (false) {
|
|
return value5;
|
|
}
|
|
const teen_audit_log = value5.body.teen_audit_log;
|
|
object = {};
|
|
object.teenId = teen_audit_log.teen_user_id;
|
|
object.rangeStartId = teen_audit_log.range_start_id;
|
|
object.actions = teen_audit_log.actions;
|
|
const users = teen_audit_log.users;
|
|
object.users = users;
|
|
object.guilds = teen_audit_log.guilds;
|
|
const top_user_activities = teen_audit_log.top_user_activities;
|
|
const value7 = null;
|
|
object.topUserActivities = value7 != top_user_activities ? top_user_activities : [];
|
|
const top_guild_activities = teen_audit_log.top_guild_activities;
|
|
object.topGuildActivities = value7 != top_guild_activities ? top_guild_activities : [];
|
|
const amount = value7 == teen_audit_log || value7 == teen_audit_log.total_spend ? value3 : teen_audit_log.total_spend.amount;
|
|
object.totalSpendAmount = value7 != amount ? amount : value7;
|
|
const currency = value7 == teen_audit_log || value7 == teen_audit_log.total_spend ? value3 : teen_audit_log.total_spend.currency;
|
|
object.totalSpendCurrency = value7 != currency ? currency : value7;
|
|
const invoices = value7 == teen_audit_log ? value3 : teen_audit_log.invoices;
|
|
object.invoices = value7 != invoices ? invoices : [];
|
|
const gifts = value7 == teen_audit_log ? value3 : teen_audit_log.gifts;
|
|
object.gifts = value7 != gifts ? gifts : [];
|
|
binding = env2_1;
|
|
const binding5 = env2_2;
|
|
const value8 = binding(binding5[7]);
|
|
const track = value8.track;
|
|
const FAMILY_CENTER_ACTION = env2_6.FAMILY_CENTER_ACTION;
|
|
const LoadMore = env2_5.LoadMore;
|
|
Reflect.apply(track, value8, [FAMILY_CENTER_ACTION, {action: LoadMore, selected_teen_id: env1_0,
|
|
action_display_type: env1_1}]);
|
|
value = binding(binding5[5]);
|
|
value.dispatch({type: 'FAMILY_CENTER_TEEN_ACTIVITY_MORE_FETCH_SUCCESS', familyCenterTeenActivity: object});
|
|
return teen_audit_log;
|
|
}
|
|
|
|
}
|
|
|
|
function selectTab(a0) { // fn#44864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:6785, offset: 0x0117ac88, size: 57 bytes, params: 2, frame: 13
|
|
(Dispatcher).dispatch({type: 'FAMILY_CENTER_HANDLE_TAB_SELECT',
|
|
tab: a0});
|
|
}
|
|
|
|
function fetchTeenSettingsAndConsents(a0) { // fn#44865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:6893, offset: 0x0117acc1, size: 93 bytes, params: 2, frame: 15
|
|
const env0_0 = a0;
|
|
const HTTP = (HTTPUtilsModule).HTTP;
|
|
const get = HTTP.get;
|
|
const object = {};
|
|
object.url = Endpoints.FAMILY_CENTER_TEEN_SETTINGS_AND_CONSENTS(a0);
|
|
object.rejectWithError = false;
|
|
return Reflect.apply(get, HTTP, [object]).then(_fun44866);
|
|
function _fun44866({body}) { // fn#44866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:6991, offset: 0x0117ad1e, size: 90 bytes, params: 2, frame: 15
|
|
const settings = body.settings;
|
|
const consents = body.consents;
|
|
const value = environment.__proto__;
|
|
(Dispatcher).dispatch({type: 'FAMILY_CENTER_TEEN_SETTINGS_AND_CONSENTS_FETCH_SUCCESS',
|
|
userId: env0_0, settings: settings, consents: consents});
|
|
}
|
|
|
|
}
|
|
|
|
function updateTeenSettings(a0, a1, a2) { // fn#44867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:7169, offset: 0x0117ad78, size: 48 bytes, params: 4, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
return Module00005(_fun44869)();
|
|
function* _fun44869() { // fn#44869, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:7181, offset: 0x0117adb1, size: 378 bytes, params: 1, frame: 26
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
let binding = env2_0;
|
|
const binding2 = env2_2;
|
|
const value3 = undefined;
|
|
const value4 = binding(binding2[8]);
|
|
const getProtoFieldClass = value4.getProtoFieldClass;
|
|
let PreloadedUserSettings = binding(binding2[9]).PreloadedUserSettings;
|
|
const value6 = Reflect.apply(getProtoFieldClass, value4, [PreloadedUserSettings, importDefault]);
|
|
const settings = env2_4.getSettings(require);
|
|
const r10 = settings == null ? value3 : settings[importDefault];
|
|
binding = env2_0;
|
|
const binding3 = env2_2;
|
|
const value8 = binding(binding3[8]);
|
|
const createModifiedProto = value8.createModifiedProto;
|
|
PreloadedUserSettings = binding(binding3[9]).PreloadedUserSettings;
|
|
const modifiedProto = Reflect.apply(createModifiedProto, value8, [r10, dependencyMap, value6, PreloadedUserSettings,
|
|
importDefault]);
|
|
if (modifiedProto != null) {
|
|
binding = env2_0;
|
|
var binding4 = env2_2;
|
|
var HTTP = binding(binding4[6]).HTTP;
|
|
var patch = HTTP.patch;
|
|
var object = {};
|
|
object.url = env2_7.FAMILY_CENTER_TEEN_SETTINGS(require);
|
|
var value9 = binding(binding4[10]);
|
|
object.body = {settings: value9.protoToB64(binding(binding4[9]).PreloadedUserSettings, modifiedProto)};
|
|
object.rejectWithError = false;
|
|
yield Reflect.apply(patch, HTTP, [object]);
|
|
var value10 = undefined;
|
|
if (false) {
|
|
return value10;
|
|
}
|
|
env2_1(env2_2[5]).dispatch({type: 'FAMILY_CENTER_TEEN_UPDATE_SETTINGS_SUCCESS', userId: require,
|
|
settings: value10.body.settings});
|
|
}
|
|
return value3;
|
|
}
|
|
|
|
}
|
|
|
|
function updateTeenConsents(a0, a1, a2) { // fn#44870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:7673, offset: 0x0117af2b, size: 116 bytes, params: 4, frame: 15
|
|
const env0_0 = a0;
|
|
const HTTP = (HTTPUtilsModule).HTTP;
|
|
const patch = HTTP.patch;
|
|
const object = {};
|
|
object.url = Endpoints.FAMILY_CENTER_TEEN_CONSENTS(a0);
|
|
object.body = {grant: a1, revoke: a2};
|
|
object.rejectWithError = false;
|
|
return Reflect.apply(patch, HTTP, [object]).then(_fun44871);
|
|
function _fun44871({body}) { // fn#44871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:7790, offset: 0x0117af9f, size: 73 bytes, params: 2, frame: 14
|
|
const value = environment.__proto__;
|
|
(Dispatcher).dispatch({type: 'FAMILY_CENTER_TEEN_CONSENTS_UPDATE_SUCCESS',
|
|
userId: env0_0, consents: body});
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun44816, 5118, [5, 5119, 5117, 661, 5120, 694, 507, 683, 1363, 1314, 1350,
|
|
2]) /* metro module 5118, dependencies: [5, 5119, 5117, 661, 5120, 694, 507, 683, 1363, 1314, 1350, 2] */;
|