/* Metro module 6646; source: modules/markup/PlatformMarkupRules.native.tsx; dependencies: [27, 6647, 3797, 3855, 6629, 1423, 6631, 6634, 2] */ function _fun52571(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6824:6, offset: 0x01330e3b, size: 483 bytes, params: 8, frame: 20 var object2; const env0_0 = require; const decorateWithIcon = function(a0) { var r0; var value = a0; if (value == null) { r0 = value; } else if (typeof value === 'string') { r0 = value; } else { value = (value instanceof global.Array ? value : [value]).map(_fun52573); r0 = value; } return r0; }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = (require(27) /* metro dependency 27 */).Image; const env0_4 = RegExp('^[\\u200B-\\u200D\\uFEFF\\u180E\\u061C]', ''); object2 = {}; object2.escape = {requiredFirstCharacters: ['\\'], match: match_52574}; const object4 = {}; copyDataProperties(object4, (importDefault(3855) /* metro dependency 3855 */).defaultRules.escape, undefined); object4['requiredFirstCharacters'] = undefined; object4['match'] = match_52575; object4['parse'] = function() { return {'type': 'text', 'content': ''}; }; object2.invisibleUnicode = object4; object2.text = {parse: parse_52577}; object2.emoji = {parse: parse_52578}; const object5 = {}; object5.order = (importDefault(6629) /* metro dependency 6629: MarkupTextRule */).order; object5.requiredFirstCharacters = ['<']; object5.match = function(a0) { return RegExp('^<(a)?:(\\w+):(\\d+)>', '').exec(a0); }; object5.parse = parse_52580; object2.customEmoji = object5; object2.channelMention = {parse: parse_52581}; object2.channelOrMessageUrl = {parse: parse_52582}; object2.mediaPostLink = {parse: parse_52583}; object2.attachmentLink = {parse: function(a0, a1, a2) { return importDefault(dependencyMap[7]).attachmentLink.parse(a0, a1, a2); }}; const object7 = {}; object7.order = (importDefault(6629) /* metro dependency 6629: MarkupTextRule */).order; object7.requiredFirstCharacters = ['@']; object7.match = function(a0) { return RegExp('^(@silent(?![^\\s]))', '').exec(a0); }; object7.parse = function(a0) { return {type: 'text', content: a0[0]}; }; object2.silentPrefix = object7; (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/markup/PlatformMarkupRules.native.tsx'); exports.default = object2; } function decorateWithIcon(a0) { // fn#52572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6824:151, offset: 0x0133101e, size: 74 bytes, params: 2, frame: 12 var r0; let value = a0; if (value == null) { r0 = value; } else if (typeof value === 'string') { r0 = value; } else { value = (value instanceof global.Array ? value : [value]).map(_fun52573); r0 = value; } return r0; } function match_52574(a0, {allowEscape}) { // fn#52574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6824:434, offset: 0x013310dc, size: 152 bytes, params: 3, frame: 14 var r0; var defaultImport; var value4; if (allowEscape === false) { return null; } const value = RegExp('^\\\\([^0-9A-Za-z\\s])', '').exec(a0); if (value == null) { r0 = value; } else { defaultImport = importDefault(3797) /* metro dependency 3797: UnicodeEmojis */; if (defaultImport.hasSurrogates(value[0])) { r0 = null; } else { value4 = global.JSON.stringify(value[0]); r0 = value4.includes('\\ud') ? null : value; } } return r0; } function match_52575(a0) { // fn#52575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6824:695, offset: 0x01331174, size: 23 bytes, params: 2, frame: 11 return env0_4.exec(a0); } function parse_52577(a0, a1, a2) { // fn#52577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6824:752, offset: 0x0133119b, size: 126 bytes, params: 4, frame: 16 var r0; var object2; if (a2.nested) { return {content: a0[0]}; } var value; const value2 = (importDefault(3797) /* metro dependency 3797: UnicodeEmojis */).maybeTranslateSurrogatesToInlineEmoji(a0[0]); if (value2 == null) { r0 = {content: a0[0]}; } else { object2 = {}; copyDataProperties(object2, a2, value); object2['nested'] = true; value = a1(value2, object2); r0 = value; } return r0; } function parse_52578(a0) { // fn#52578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6824:917, offset: 0x01331219, size: 73 bytes, params: 2, frame: 12 let value = importDefault(3797) /* metro dependency 3797: UnicodeEmojis */; value = value.convertNameToSurrogate(a0[1]); return {type: 'emoji', content: a0[0], surrogate: value}; } function parse_52580(a0, a1, {disableAnimatedEmoji}) { // fn#52580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6824:1119, offset: 0x01331280, size: 259 bytes, params: 4, frame: 20 var r0; var r1; var r11; var r4; var r5; var item3; var value3; var item4; var value4; var item5; var value5; const iterator = a0[Symbol.iterator](); const iterator2 = iterator.next; let item2 = Reflect.apply(iterator2, iterator, []); let item = item2.value; item2 = item2.done ? undefined : iterator; let value = undefined; const value2 = item2 === value; if (value2) { r0 = item2; r1 = value2; r11 = value; } else { item3 = Reflect.apply(iterator2, item2, []); item = item3.value; item3 = item3.done ? undefined : item2; value3 = item3 === value; if (value3) { r0 = item3; r1 = value3; r11 = value; } else { r0 = item3; r1 = value3; r11 = item; } } if (r1) { r4 = value; } else { item4 = Reflect.apply(iterator2, r0, []); item = item4.value; item4 = item4.done ? undefined : r0; value4 = item4 === value; if (value4) { r0 = item4; r1 = value4; r4 = value; } else { r0 = item4; r1 = value4; r4 = item; } } if (r1) { r5 = value; } else { item5 = Reflect.apply(iterator2, r0, []); item = item5.value; item5 = item5.done ? undefined : r0; value5 = item5 === value; if (value5) { r0 = item5; r1 = value5; r5 = value; } else { r0 = item5; r1 = value5; r5 = item; } } if (!r1) { r0.return(); } disableAnimatedEmoji = !(disableAnimatedEmoji === value) && disableAnimatedEmoji; const defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */; let getEmojiURL = defaultImport.getEmojiURL; const value8 = Reflect.apply(getEmojiURL, defaultImport, [{id: r5, animated: r11 === 'a', size: 48}]); getEmojiURL = defaultImport.getEmojiURL; value = Reflect.apply(getEmojiURL, value, [{'id': null, 'animated': false, 'size': 48, id: r5}]); return {id: r5, alt: r4, src: disableAnimatedEmoji ? value : value8, frozenSrc: value}; } function parse_52581(a0, a1, a2) { // fn#52581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6824:1334, offset: 0x01331383, size: 110 bytes, params: 4, frame: 17 const value2 = (importDefault(6631) /* metro dependency 6631: MarkupChannelMentionRule */).channelMention.parse(a0, a1, a2); const object2 = {}; copyDataProperties(object2, value2, undefined); const decorateWithIconBinding = decorateWithIcon; object2['content'] = decorateWithIconBinding(value2.content); object2['inContent'] = decorateWithIconBinding(value2.inContent); return object2; } function parse_52582(a0, a1, a2) { // fn#52582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6824:1501, offset: 0x013313f1, size: 110 bytes, params: 4, frame: 17 const value2 = (importDefault(6631) /* metro dependency 6631: MarkupChannelMentionRule */).channelOrMessageUrl.parse(a0, a1, a2); const object2 = {}; copyDataProperties(object2, value2, undefined); const decorateWithIconBinding = decorateWithIcon; object2['content'] = decorateWithIconBinding(value2.content); object2['inContent'] = decorateWithIconBinding(value2.inContent); return object2; } function parse_52583(a0, a1, a2) { // fn#52583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6824:1667, offset: 0x0133145f, size: 110 bytes, params: 4, frame: 17 const value2 = (importDefault(6631) /* metro dependency 6631: MarkupChannelMentionRule */).mediaPostLink.parse(a0, a1, a2); const object2 = {}; copyDataProperties(object2, value2, undefined); const decorateWithIconBinding = decorateWithIcon; object2['content'] = decorateWithIconBinding(value2.content); object2['inContent'] = decorateWithIconBinding(value2.inContent); return object2; } function _fun52573(a0) { // fn#52573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6824:249, offset: 0x01331068, size: 116 bytes, params: 2, frame: 17 var r0; var object2; var value2; var resolveAssetSource; var value3; var moduleValue; let value = a0; if (value.type !== 'channel') { r0 = value; } else { object2 = {}; copyDataProperties(object2, value, undefined); value2 = environment.__proto__; resolveAssetSource = Image.resolveAssetSource; value3 = undefined; moduleValue = require(6647) /* metro dependency 6647: ChannelUtils */; value = Reflect.apply(resolveAssetSource, Image, [moduleValue.getChannelMentionIcon(value.iconType)]); object2['icon'] = value == null ? value3 : value.uri; r0 = object2; } return r0; }