430 lines
18 KiB
JavaScript
430 lines
18 KiB
JavaScript
/* Metro module 1287; source: unknown; dependencies: [57] */
|
|
import * as Module00057Module from './module-00057.js'; /* Metro dependency 57 */
|
|
|
|
function _fun14154(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#14154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1414:6, offset: 0x00dfc970, size: 326 bytes, params: 8, frame: 19
|
|
const hydrateArray = function(a0) {
|
|
var r3;
|
|
var value = 0;
|
|
if (value < a0.length) {
|
|
for (r3 = value; true; r3 = value) {
|
|
a0[r3] = hydrateSingle(a0[r3]);
|
|
value = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
|
|
if (!(value < a0.length)) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
};
|
|
let Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
exports.FormatJsNodeType = undefined;
|
|
exports.FORMAT_JS_POUND = undefined;
|
|
exports.hydrateFormatJsAst = hydrateFormatJsAst;
|
|
exports.compressFormatJsToAst = compressFormatJsToAst;
|
|
exports.isCompressedAst = function(a0) {
|
|
var r0;
|
|
var value = typeof a0 === 'string';
|
|
if (value) {
|
|
r0 = value;
|
|
} else {
|
|
value = global.Array.isArray(a0);
|
|
r0 = value ? global.Array.isArray(a0[0]) || typeof a0[0] === 'string' : !!value;
|
|
}
|
|
return r0;
|
|
};
|
|
object = {};
|
|
exports.FormatJsNodeType = object;
|
|
object.Literal = 0;
|
|
object[0] = 'Literal';
|
|
object.Argument = 1;
|
|
object[1] = 'Argument';
|
|
object.Number = 2;
|
|
object[2] = 'Number';
|
|
object.Date = 3;
|
|
object[3] = 'Date';
|
|
object.Time = 4;
|
|
object[4] = 'Time';
|
|
object.Select = 5;
|
|
object[5] = 'Select';
|
|
object.Plural = 6;
|
|
object[6] = 'Plural';
|
|
object.Pound = 7;
|
|
object[7] = 'Pound';
|
|
object.Tag = 8;
|
|
object[8] = 'Tag';
|
|
Object = global.Object;
|
|
exports.FORMAT_JS_POUND = Object.freeze({type: 7});
|
|
function hydrateSingle(a0) { // fn#14156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1414:146, offset: 0x00dfcaed, size: 532 bytes, params: 2, frame: 27
|
|
var r11;
|
|
var object2;
|
|
var Time;
|
|
var Select;
|
|
var Plural;
|
|
var Pound;
|
|
var Tag;
|
|
var Error;
|
|
var HermesInternal;
|
|
var concat;
|
|
var prototype;
|
|
var value3;
|
|
var error;
|
|
var value4;
|
|
var property2;
|
|
var property3;
|
|
var property4;
|
|
var value5;
|
|
var property5;
|
|
var property6;
|
|
var property7;
|
|
var property8;
|
|
var properties;
|
|
var properties2;
|
|
var properties3;
|
|
var propertyName;
|
|
var propertyName2;
|
|
if (typeof a0 === 'string') {
|
|
return {type: 0, value: a0};
|
|
}
|
|
let value = environment;
|
|
let property = Module00057Module(a0, 1)[0];
|
|
const Argument = env0_1.Argument;
|
|
if (Argument === property) {
|
|
return {type: property, value: a0[1]};
|
|
}
|
|
const Number = env0_1.Number;
|
|
if (Number !== property) {
|
|
reducibleJoin21: while (true) {
|
|
if (env0_1.Date === property) {
|
|
break reducibleJoin21;
|
|
}
|
|
Time = env0_1.Time;
|
|
if (Time !== property) {
|
|
Select = env0_1.Select;
|
|
if (Select !== property) {
|
|
reducibleJoin14: while (true) {
|
|
if (env0_1.Plural !== property) {
|
|
Pound = env0_1.Pound;
|
|
if (Pound === property) {
|
|
return env0_0.FORMAT_JS_POUND;
|
|
}
|
|
Tag = env0_1.Tag;
|
|
if (Tag === property) {
|
|
value4 = Module00057Module(a0, 4);
|
|
property = value4[0];
|
|
property2 = value4[1];
|
|
property3 = value4[2];
|
|
property4 = value4[3];
|
|
hydrateArray(property3);
|
|
reducibleJoin12: while (true) {
|
|
if (property4 == null) {
|
|
break reducibleJoin12;
|
|
}
|
|
hydrateArray(property4);
|
|
break reducibleJoin12;
|
|
}
|
|
return {type: property, value: property2, children: property3, control: property4};
|
|
}
|
|
Error = global.Error;
|
|
HermesInternal = global.HermesInternal;
|
|
concat = HermesInternal.concat;
|
|
value = 'FormatJS keyless JSON encountered an unknown type: ' + property;
|
|
prototype = Error.prototype;
|
|
value3 = Object.create(prototype, {constructor: {value: Error}});
|
|
error = new Error(value);
|
|
value = error instanceof Object ? error : value3;
|
|
throw value;
|
|
}
|
|
break reducibleJoin14;
|
|
}
|
|
}
|
|
value5 = Module00057Module(a0, 5);
|
|
property = value5[0];
|
|
property5 = value5[1];
|
|
property6 = value5[2];
|
|
property7 = value5[3];
|
|
property8 = value5[4];
|
|
properties = Object.keys(property6);
|
|
properties2 = 0;
|
|
properties3 = properties.length;
|
|
if (properties !== undefined) {
|
|
r11 = properties2;
|
|
reducibleLoop15: while (true) {
|
|
propertyName = properties[r11];
|
|
propertyName2 = r11 + 1;
|
|
if (propertyName === undefined) {
|
|
break reducibleLoop15;
|
|
}
|
|
hydrateArray(property6[propertyName]);
|
|
property6[propertyName] = {value: property6[propertyName]};
|
|
r11 = propertyName2;
|
|
continue reducibleLoop15;
|
|
}
|
|
}
|
|
Plural = env0_1.Plural;
|
|
if (property === Plural) {
|
|
object2 = {type: property, value: property5, options: property6, offset: property7,
|
|
pluralType: property8};
|
|
} else {
|
|
object2 = {type: property, value: property5, options: property6, offset: property7};
|
|
}
|
|
return object2;
|
|
}
|
|
break reducibleJoin21;
|
|
}
|
|
}
|
|
return {type: property, value: a0[1], style: a0[2]};
|
|
}
|
|
|
|
function hydrateFormatJsAst(a0) { // fn#14157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1414:1004, offset: 0x00dfcd01, size: 124 bytes, params: 2, frame: 12
|
|
if (typeof a0 !== 'string') {
|
|
if (typeof a0[0] === 'string') {
|
|
hydrateArray(a0);
|
|
return a0;
|
|
}
|
|
if (a0.length === 0) {
|
|
return a0;
|
|
}
|
|
var Array = global.Array;
|
|
if (Array.isArray(a0[0])) {
|
|
hydrateArray(a0);
|
|
return a0;
|
|
}
|
|
}
|
|
return hydrateSingle(a0);
|
|
}
|
|
|
|
function compressFormatJsToAst(a0) { // fn#14158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1414:1254, offset: 0x00dfcd7d, size: 611 bytes, params: 2, frame: 24
|
|
var environment;
|
|
var r5;
|
|
var r3;
|
|
var Array;
|
|
var isArray;
|
|
var type;
|
|
var value;
|
|
var Literal;
|
|
var Argument;
|
|
var Number;
|
|
var Date;
|
|
var Time;
|
|
var Select;
|
|
var Plural;
|
|
var Pound;
|
|
var Tag;
|
|
var object;
|
|
var compressFormatJsToAstBinding;
|
|
var Object;
|
|
var entries;
|
|
var options;
|
|
var iterator;
|
|
var iterator2;
|
|
var item;
|
|
var item2;
|
|
var binding;
|
|
var value3;
|
|
var property;
|
|
var property2;
|
|
var value4;
|
|
var value5;
|
|
var error;
|
|
var offset;
|
|
var pluralType;
|
|
var iterator3;
|
|
var item3;
|
|
var value6;
|
|
var property3;
|
|
var value7;
|
|
var value8;
|
|
exceptionSkip37: while (true) {
|
|
exceptionLanding37: while (true) {
|
|
exceptionSkip24: while (true) {
|
|
exceptionLanding24: while (true) {
|
|
Array = global.Array;
|
|
isArray = Array.isArray;
|
|
if (Reflect.apply(isArray, Array, [a0])) {
|
|
return a0.map(function(a0) {
|
|
return compressFormatJsToAst(a0);
|
|
});
|
|
}
|
|
type = a0.type;
|
|
value = environment;
|
|
Literal = env0_1.Literal;
|
|
if (Literal === type) {
|
|
return a0.value;
|
|
}
|
|
Argument = env0_1.Argument;
|
|
if (Argument === type) {
|
|
return [a0.type, a0.value];
|
|
}
|
|
Number = env0_1.Number;
|
|
if (Number === type) {
|
|
return [a0.type, a0.value, a0.style];
|
|
}
|
|
Date = env0_1.Date;
|
|
if (Date === type) {
|
|
return [a0.type, a0.value, a0.style];
|
|
}
|
|
Time = env0_1.Time;
|
|
if (Time === type) {
|
|
return [a0.type, a0.value, a0.style];
|
|
}
|
|
Select = env0_1.Select;
|
|
if (Select === type) {
|
|
object = {};
|
|
Object = global.Object;
|
|
entries = Object.entries;
|
|
options = a0.options;
|
|
iterator = Reflect.apply(entries, Object, [options])[Symbol.iterator]();
|
|
iterator3 = iterator.next;
|
|
for (r3 = iterator; true; r3 = item3) {
|
|
item3 = Reflect.apply(iterator3, r3, []);
|
|
item = item3.value;
|
|
item3 = item3.done ? undefined : r3;
|
|
if (item3 === undefined) {
|
|
break;
|
|
}
|
|
try {
|
|
binding = Module00057Module;
|
|
} catch (error) {
|
|
break exceptionLanding37;
|
|
}
|
|
try {
|
|
value6 = binding(item, 2);
|
|
} catch (error) {
|
|
break exceptionLanding37;
|
|
}
|
|
try {
|
|
property = value6[0];
|
|
} catch (error) {
|
|
break exceptionLanding37;
|
|
}
|
|
try {
|
|
property3 = value6[1];
|
|
} catch (error) {
|
|
break exceptionLanding37;
|
|
}
|
|
try {
|
|
compressFormatJsToAstBinding = compressFormatJsToAst;
|
|
} catch (error) {
|
|
break exceptionLanding37;
|
|
}
|
|
try {
|
|
value7 = property3.value;
|
|
} catch (error) {
|
|
break exceptionLanding37;
|
|
}
|
|
try {
|
|
value8 = compressFormatJsToAstBinding(value7);
|
|
} catch (error) {
|
|
break exceptionLanding37;
|
|
}
|
|
try {
|
|
object[property] = value8;
|
|
} catch (error) {
|
|
break exceptionLanding37;
|
|
}
|
|
}
|
|
type = a0.type;
|
|
value = a0.value;
|
|
return [type, value, object];
|
|
}
|
|
Plural = env0_1.Plural;
|
|
if (Plural === type) {
|
|
object = {};
|
|
Object = global.Object;
|
|
entries = Object.entries;
|
|
options = a0.options;
|
|
iterator = Reflect.apply(entries, Object, [options])[Symbol.iterator]();
|
|
iterator2 = iterator.next;
|
|
for (r5 = iterator; true; r5 = item2) {
|
|
item2 = Reflect.apply(iterator2, r5, []);
|
|
item = item2.value;
|
|
item2 = item2.done ? undefined : r5;
|
|
if (item2 === undefined) {
|
|
break;
|
|
}
|
|
try {
|
|
binding = Module00057Module;
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
value3 = binding(item, 2);
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
property = value3[0];
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
property2 = value3[1];
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
compressFormatJsToAstBinding = compressFormatJsToAst;
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
value4 = property2.value;
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
value5 = compressFormatJsToAstBinding(value4);
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
object[property] = value5;
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
}
|
|
type = a0.type;
|
|
value = a0.value;
|
|
offset = a0.offset;
|
|
pluralType = a0.pluralType;
|
|
return [type, value, object, offset, pluralType];
|
|
}
|
|
Pound = env0_1.Pound;
|
|
if (Pound === type) {
|
|
return [a0.type];
|
|
}
|
|
Tag = env0_1.Tag;
|
|
if (Tag === type) {
|
|
object = [a0.type];
|
|
object[1] = a0.value;
|
|
compressFormatJsToAstBinding = compressFormatJsToAst;
|
|
object[2] = compressFormatJsToAstBinding(a0.children);
|
|
object[3] = compressFormatJsToAstBinding(a0.control);
|
|
return object;
|
|
}
|
|
return undefined;
|
|
break exceptionSkip24;
|
|
}
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
break exceptionSkip24;
|
|
}
|
|
break exceptionSkip37;
|
|
}
|
|
try {
|
|
item3.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
break exceptionSkip37;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun14154, 1287, [57]) /* metro module 1287, dependencies: [57] */;
|