/* Metro module 1294; source: unknown; dependencies: [65, 6, 7, 15, 17, 18, 57, 1286] */ function _fun14274(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#14274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1421:6, offset: 0x00e00df2, size: 389 bytes, params: 8, frame: 20 var object2; const closure = formatToAst; const env0_1 = require(65) /* metro dependency 65 */; const env0_2 = require(6) /* metro dependency 6 */; const env0_3 = require(7) /* metro dependency 7 */; const env0_4 = require(15) /* metro dependency 15 */; const env0_5 = require(17) /* metro dependency 17 */; const env0_6 = require(18) /* metro dependency 18 */; const env0_7 = require(57) /* metro dependency 57 */; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); exports.RichTextNodeType = undefined; exports.astFormatter = undefined; exports.formatToAst = closure; object2 = {}; exports.RichTextNodeType = object2; object2.Text = 'text'; object2.Strong = 'strong'; object2.Emphasis = 'em'; object2.Strikethrough = 's'; object2.Code = 'inlineCode'; object2.Link = 'link'; object2.Paragraph = 'paragraph'; object2 = {$b: $b_14279, $i: $i_14280, $del: $del_14281, $code: $code_14282, $link: $link_14283, $p: $p_14284}; const FormatBuilder = (require(1286) /* metro dependency 1286 */).FormatBuilder; exports.astFormatter = {format: closure, builder: _fun14285(FormatBuilder)}; } function _isNativeReflectConstruct_14275() { // fn#14275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1421:120, offset: 0x00e00f77, 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_14275_isNativeReflectConstruct = function() { return !!result; })(); } function format(a0, a1) { // fn#14278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1421:1830, offset: 0x00e00fd5, size: 77 bytes, params: 3, frame: 15 return typeof a0 === 'string' ? [{type: env0_0.Text, content: a0}] : this.bindFormatValues(env0_9, a0, a1); } function $b_14279(a0) { // fn#14279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1421:639, offset: 0x00e01022, size: 28 bytes, params: 2, frame: 2 const Strong = env0_0.Strong; return {type: Strong, content: a0}; } function $i_14280(a0) { // fn#14280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1421:690, offset: 0x00e0103e, size: 28 bytes, params: 2, frame: 2 const Emphasis = env0_0.Emphasis; return {type: Emphasis, content: a0}; } function $del_14281(a0) { // fn#14281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1421:745, offset: 0x00e0105a, size: 28 bytes, params: 2, frame: 2 const Strikethrough = env0_0.Strikethrough; return {type: Strikethrough, content: a0}; } function $code_14282(a0) { // fn#14282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1421:808, offset: 0x00e01076, size: 28 bytes, params: 2, frame: 2 const Code = env0_0.Code; return {type: Code, content: a0}; } function $link_14283(a0, a1, a2) { // fn#14283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1421:863, offset: 0x00e01092, size: 57 bytes, params: 4, frame: 14 const property = env0_7(a2, 1)[0]; const Link = env0_0.Link; return {type: Link, target: property, content: a0}; } function $p_14284(a0) { // fn#14284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1421:944, offset: 0x00e010cb, size: 28 bytes, params: 2, frame: 2 const Paragraph = env0_0.Paragraph; return {type: Paragraph, content: a0}; } function _fun14285(a0) { // fn#14285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1421:998, offset: 0x00e010e7, size: 139 bytes, params: 2, frame: 16 const closure = AstBuilder; env0_6(closure, a0); return env0_3(closure, [{key: 'pushRichTextTag', value: value_14287}, {key: 'pushLiteralText', value: value_14288}, {key: 'pushObject', value: function(a0) { this.result.push(a0); }}, {key: 'finish', value: function() { return this.result; }}]); } function AstBuilder() { // fn#14286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1421:1010, offset: 0x00e01172, size: 123 bytes, params: 1, frame: 20 let value = environment.__proto__; env1_2(this, AstBuilder); const value3 = env1_5(AstBuilder); value = env1_4(this, _isNativeReflectConstruct_14275() ? global.Reflect.construct(value3, arguments, env1_5(this).constructor) : value3.apply(this, arguments)); value.result = []; return value; } function value_14287(a0, a1, a2) { // fn#14287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1421:1305, offset: 0x00e011ed, size: 141 bytes, params: 4, frame: 16 var value2; var isArray2; var result; var push; if (a0 in env1_8) { value2 = env1_8[a0](a1, '', a2); isArray2 = global.Array.isArray(value2); result = this.result; push = result.push; if (isArray2) { push.apply(result, env1_1(value2)); } else { Reflect.apply(push, result, [value2]); } return undefined; } throw '' + a0 + ' is not a known rich text formatting tag'; } function value_14288(a0) { // fn#14288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1421:1526, offset: 0x00e0127a, size: 120 bytes, params: 2, frame: 14 var type; var value; var push; let result = this.result; const property = result[this.result.length - 1]; if (property == null) { result = this.result; push = result.push; value = environment.__proto__; Reflect.apply(push, result, [{type: env1_0.Text, content: a0}]); } else { type = property.type; value = environment.__proto__; if (type === env1_0.Text) { property.content = property.content + a0; } else { result = this.result; push = result.push; value = environment.__proto__; Reflect.apply(push, result, [{type: env1_0.Text, content: a0}]); } } }