311 lines
14 KiB
TypeScript
311 lines
14 KiB
TypeScript
/* Metro module 6598; source: modules/guild_onboarding/doGuildOnboarding.native.tsx; dependencies: [5, 27, 3969, 6599, 6600, 661, 6601, 4080, 5080, 6593, 6602, 1423, 1852, 6604, 6605, 6606, 6615, 1962, 1230, 2] */
|
|
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import SelectedGuildStore from '../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
|
|
import GuildOnboardingStore from './GuildOnboardingStore.tsx'; /* Metro dependency 6599 */
|
|
import GuildOnboardingActionCreators from './GuildOnboardingActionCreators.tsx'; /* Metro dependency 6606 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as GuildOnboardingConstantsModule from './native/GuildOnboardingConstants.tsx'; /* Metro dependency 6600 */
|
|
|
|
function _fun51984(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:6, offset: 0x012e9b3b, size: 304 bytes, params: 8, frame: 20
|
|
let env0_0 = require;
|
|
const closure = function(a0) {
|
|
var env0_0 = a0;
|
|
_fun51993(a0);
|
|
var Promise = global.Promise;
|
|
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
|
var value2 = new Promise(_fun51995);
|
|
return value2 instanceof Object ? value2 : value;
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const getBaseAnimationData = function() {
|
|
var JSON = global.JSON;
|
|
var JSON2 = global.JSON;
|
|
return JSON.parse(JSON2.stringify(require(dependencyMap[6])));
|
|
};
|
|
const env0_11 = {};
|
|
const env0_12 = {};
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/guild_onboarding/doGuildOnboarding.native.tsx');
|
|
exports.default = function() {
|
|
return _doGuildOnboarding.apply(this, arguments);
|
|
};
|
|
exports.openAndWaitForOnboarding = closure;
|
|
exports.discardOnboardingPromise = discardOnboardingPromise;
|
|
exports.isOnboardingActiveForGuild = isOnboardingActiveForGuild;
|
|
function _doGuildOnboarding() { // fn#51985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:297, offset: 0x012e9c6b, size: 48 bytes, params: 1, frame: 14
|
|
return Module00005(_fun51987).apply(this, arguments);
|
|
async function _fun51987({guildId}) { // fn#51987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:356, offset: 0x012e9cad, size: 320 bytes, params: 2, frame: 18
|
|
var environment;
|
|
var value11;
|
|
var value14;
|
|
if (true) {
|
|
await undefined;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_1;
|
|
var binding2 = env2_2;
|
|
binding(binding2[7]).hideActionSheet();
|
|
binding(binding2[8]).popAll();
|
|
var value6 = env2_0(binding2[9]);
|
|
await value6.waitForGuild(guildId);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
var features = undefined.features;
|
|
var has = features.has;
|
|
var GUILD_ONBOARDING = env2_8.GUILD_ONBOARDING;
|
|
if (Reflect.apply(has, features, [GUILD_ONBOARDING]) && undefined.features.has(env2_8.COMMUNITY)) {
|
|
binding = env2_0;
|
|
value11 = binding(env2_2[10]);
|
|
await value11.maybeFetchOnboardingPrompts(guildId);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
binding = env2_6;
|
|
if (binding.shouldShowOnboarding(guildId)) {
|
|
binding = env2_12;
|
|
await fetchLandingAsset(undefined);
|
|
value14 = undefined;
|
|
if (false) {
|
|
return value14;
|
|
}
|
|
binding[guildId] = value14;
|
|
binding = env2_15;
|
|
await binding(undefined.id);
|
|
return undefined;
|
|
}
|
|
}
|
|
}
|
|
function fetchLandingAsset() { // fn#51988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:609, offset: 0x012e9ded, size: 30 bytes, params: 1, frame: 13
|
|
return env3_14.apply(this, arguments);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _fetchLandingAsset() { // fn#51989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:773, offset: 0x012e9e0b, size: 48 bytes, params: 1, frame: 14
|
|
return Module00005(_fun51991).apply(this, arguments);
|
|
function* _fun51991({id, icon}) { // fn#51991, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:832, offset: 0x012e9e44, size: 268 bytes, params: 2, frame: 22
|
|
var ImageManager;
|
|
var getAvatarBase64;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var getDominantColors;
|
|
var value9;
|
|
var value10;
|
|
var value11;
|
|
var binding3;
|
|
var property;
|
|
var value12;
|
|
var value13;
|
|
var concat;
|
|
var value14;
|
|
var value15;
|
|
var error;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
let binding = env2_1;
|
|
const binding2 = env2_2;
|
|
const value3 = binding(binding2[11]);
|
|
const getGuildIconSource = value3.getGuildIconSource;
|
|
const object = {};
|
|
object.id = id;
|
|
object.icon = icon;
|
|
object.canAnimate = false;
|
|
object.size = 96 / binding(binding2[12])();
|
|
const value5 = Reflect.apply(getGuildIconSource, value3, [object]);
|
|
try {
|
|
binding = env2_4;
|
|
} catch (error) {
|
|
return env2_10();
|
|
}
|
|
try {
|
|
ImageManager = binding.ImageManager;
|
|
} catch (error) {
|
|
return env2_10();
|
|
}
|
|
try {
|
|
getAvatarBase64 = ImageManager.getAvatarBase64;
|
|
} catch (error) {
|
|
return env2_10();
|
|
}
|
|
try {
|
|
value6 = Reflect.apply(getAvatarBase64, ImageManager, [value5]);
|
|
} catch (error) {
|
|
return env2_10();
|
|
}
|
|
yield value6;
|
|
try {
|
|
value7 = undefined;
|
|
value8 = false;
|
|
} catch (error) {
|
|
return env2_10();
|
|
}
|
|
if (value8) {
|
|
return value7;
|
|
}
|
|
try {
|
|
binding = env2_4;
|
|
} catch (error) {
|
|
return env2_10();
|
|
}
|
|
try {
|
|
ImageManager = binding.ImageManager;
|
|
} catch (error) {
|
|
return env2_10();
|
|
}
|
|
try {
|
|
getDominantColors = ImageManager.getDominantColors;
|
|
} catch (error) {
|
|
return env2_10();
|
|
}
|
|
try {
|
|
value9 = Reflect.apply(getDominantColors, ImageManager, [value5]);
|
|
} catch (error) {
|
|
return env2_10();
|
|
}
|
|
yield value9;
|
|
try {
|
|
value10 = undefined;
|
|
value11 = false;
|
|
} catch (error) {
|
|
return env2_10();
|
|
}
|
|
if (value11) {
|
|
return value10;
|
|
}
|
|
try {
|
|
binding = env2_1;
|
|
} catch (error) {
|
|
return env2_10();
|
|
}
|
|
try {
|
|
binding3 = env2_2;
|
|
} catch (error) {
|
|
return env2_10();
|
|
}
|
|
try {
|
|
property = binding3[13];
|
|
} catch (error) {
|
|
return env2_10();
|
|
}
|
|
try {
|
|
value12 = binding(property);
|
|
} catch (error) {
|
|
return env2_10();
|
|
}
|
|
try {
|
|
binding = env2_10;
|
|
} catch (error) {
|
|
return env2_10();
|
|
}
|
|
try {
|
|
value13 = binding();
|
|
} catch (error) {
|
|
return env2_10();
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
return env2_10();
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
return env2_10();
|
|
}
|
|
try {
|
|
value14 = Reflect.apply(concat, 'data:image/png;base64,', [value7]);
|
|
} catch (error) {
|
|
return env2_10();
|
|
}
|
|
try {
|
|
property = value10[0];
|
|
} catch (error) {
|
|
return env2_10();
|
|
}
|
|
try {
|
|
value15 = value12(value13, value14, property);
|
|
} catch (error) {
|
|
return env2_10();
|
|
}
|
|
return value15;
|
|
}
|
|
|
|
}
|
|
|
|
function openAndWaitForOnboarding(a0) { // fn#51992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:1169, offset: 0x012e9f50, size: 56 bytes, params: 2, frame: 12
|
|
const env0_0 = a0;
|
|
waitForOnboardingCompleted(a0);
|
|
const Promise = global.Promise;
|
|
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
|
const promise = new Promise(_fun51995);
|
|
return promise instanceof Object ? promise : value;
|
|
function waitForOnboardingCompleted(a0) { // fn#51993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:1213, owner: openAndWaitForOnboarding.waitForOnboardingCompleted, offset: 0x012e9f88, size: 62 bytes, params: 2, frame: 13
|
|
var environment;
|
|
const env0_0 = a0;
|
|
let value = environment.__proto__;
|
|
value = require(6605) /* metro dependency 6605: doGuildOnboardingHelpers */;
|
|
value = value.waitForOnboardingCompletion(a0);
|
|
value.then(_fun51994);
|
|
function _fun51994() { // fn#51994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:1298, offset: 0x012e9fc6, size: 77 bytes, params: 1, frame: 12
|
|
const value = environment.__proto__.__proto__;
|
|
let binding = env2_11;
|
|
const property = binding[env0_0];
|
|
if (property != null) {
|
|
property();
|
|
}
|
|
binding = env2_11;
|
|
const binding2 = env0_0;
|
|
delete binding[binding2];
|
|
(GuildOnboardingActionCreators).finishOnboarding(binding2);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun51995(a0) { // fn#51995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:1388, offset: 0x012ea013, size: 176 bytes, params: 2, frame: 20
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
let binding = env1_11;
|
|
if (binding[env0_0] == null) {
|
|
env1_11[env0_0] = a0;
|
|
}
|
|
const defaultImport = importDefault(dependencyMap[8]);
|
|
const pushLazy = defaultImport.pushLazy;
|
|
const value3 = require(dependencyMap[17])(dependencyMap[16], dependencyMap.paths);
|
|
binding = env0_0;
|
|
Reflect.apply(pushLazy, defaultImport, [value3, {guildId: binding, backShouldLeaveGuild: true,
|
|
onFinish: function() {
|
|
}, landingAnimation: env1_12[binding], isFirstOpen: true}, GUILD_ONBOARDING_MODAL_KEY]).then(_fun51997);
|
|
function _fun51997() { // fn#51997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:1552, offset: 0x012ea0c3, size: 84 bytes, params: 1, frame: 13
|
|
var moduleValue;
|
|
if (SelectedGuildStore.getGuildId() !== env1_0) {
|
|
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
|
|
moduleValue.transitionTo(Routes.CHANNEL(env1_0));
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function discardOnboardingPromise(a0) { // fn#52000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:1874, offset: 0x012ea156, size: 18 bytes, params: 2, frame: 2
|
|
delete env0_11[a0];
|
|
}
|
|
|
|
function isOnboardingActiveForGuild(a0) { // fn#52001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:1953, offset: 0x012ea168, size: 22 bytes, params: 2, frame: 2
|
|
return env0_11[a0] != null;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun51984, 6598, [5, 27, 3969, 6599, 6600, 661, 6601, 4080, 5080, 6593, 6602, 1423, 1852, 6604, 6605,
|
|
6606, 6615, 1962, 1230,
|
|
2]) /* metro module 6598, dependencies: [5, 27, 3969, 6599, 6600, 661, 6601, 4080, 5080, 6593, 6602, 1423, 1852, 6604, 6605, 6606, 6615, 1962, 1230, 2] */;
|