170 lines
8.7 KiB
TypeScript
170 lines
8.7 KiB
TypeScript
/* Metro module 8339; source: utils/ChangeLogUtils.tsx; dependencies: [3855, 8340, 6629, 6644, 6645, 6622, 2] */
|
|
import Module03855 from '../by-id/module-03855.js'; /* Metro dependency 3855 */
|
|
import MarkupUtils from '../modules/markup/MarkupUtils.tsx'; /* Metro dependency 6622 */
|
|
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ChangeLogUtilsModule from './native/ChangeLogUtils.tsx'; /* Metro dependency 8340 */
|
|
|
|
function _fun66399(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:6, offset: 0x01bf9fea, size: 412 bytes, params: 8, frame: 20
|
|
let env0_0 = require;
|
|
const parseWithClassNameExtraction = function({transformUpperCase = false}) {
|
|
var env0_0 = transformUpperCase;
|
|
return _fun66401;
|
|
};
|
|
const closure = function(a0) {
|
|
var object = {};
|
|
var defaultRules_2Binding = defaultRules_2;
|
|
copyDataProperties(object, defaultRules_2Binding(a0), defaultRules_2Binding);
|
|
return object;
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_10 = RegExp('\\{(.+?)}', '');
|
|
const env0_11 = RegExp('^\\$(\\w+?)\\$', '');
|
|
object = {getDefaultRules: closure, getSpecialRules: function(a0) {
|
|
var object = {};
|
|
var defaultRules_2Binding = defaultRules_2;
|
|
copyDataProperties(object, specialRules(a0), copyDataProperties(object, defaultRules_2Binding(a0),
|
|
defaultRules_2Binding));
|
|
return object;
|
|
}, getMessageRules: function(a0) {
|
|
var object = {};
|
|
var messageRulesBinding = messageRules;
|
|
copyDataProperties(object, messageRulesBinding(a0), messageRulesBinding);
|
|
return object;
|
|
}};
|
|
(FileImportTrackerModule).fileFinishedImporting('utils/ChangeLogUtils.tsx');
|
|
exports.default = object;
|
|
exports.renderChangelogMessageMarkup = renderChangelogMessageMarkup;
|
|
function parseWithClassNameExtraction({transformUpperCase}) { // fn#66400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:340, offset: 0x01bfa186, size: 32 bytes, params: 2, frame: 3
|
|
if (transformUpperCase !== undefined) {
|
|
}
|
|
return _fun66401;
|
|
function _fun66401(a0, a1, a2) { // fn#66401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:411, offset: 0x01bfa1a6, size: 163 bytes, params: 4, frame: 18
|
|
const value = environment.__proto__;
|
|
const binding = env1_10;
|
|
const value2 = 1;
|
|
const value3 = binding.exec(a0[value2]);
|
|
const value4 = a0[value2].replace(env1_10, '');
|
|
const r5 = transformUpperCase ? value4.toUpperCase() : value4;
|
|
const object = {};
|
|
const value7 = null;
|
|
object.className = value7 != value3 ? value3[value2] : value7;
|
|
const value8 = 2;
|
|
object.level = a0[value8] !== '=' ? value8 : value2;
|
|
object.content = (importDefault(3855) /* metro dependency 3855 */).parseInline(a1, r5, a2);
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
function defaultRules(a0) { // fn#66402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:578, offset: 0x01bfa249, size: 1077 bytes, params: 2, frame: 20
|
|
var r10;
|
|
var r1;
|
|
const object = {};
|
|
copyDataProperties(object, (ChangeLogUtilsModule).baseRules, r10);
|
|
const object2 = {};
|
|
copyDataProperties(object2, image, r10);
|
|
const customRules = (ChangeLogUtilsModule).customRules;
|
|
if (typeof customRules.image === 'function') {
|
|
r1 = customRules.image(a0);
|
|
r10 = customRules;
|
|
} else {
|
|
r1 = customRules.image;
|
|
}
|
|
copyDataProperties(object2, r1, r10);
|
|
object['image'] = object2;
|
|
const object3 = {};
|
|
copyDataProperties(object3, link, r10);
|
|
if (typeof customRules.link === 'function') {
|
|
r1 = customRules.link(a0);
|
|
r10 = customRules;
|
|
} else {
|
|
r1 = customRules.link;
|
|
}
|
|
copyDataProperties(object3, r1, r10);
|
|
object['link'] = object3;
|
|
const object4 = {};
|
|
copyDataProperties(object4, list, r10);
|
|
if (typeof customRules.list === 'function') {
|
|
r1 = customRules.list(a0);
|
|
r10 = customRules;
|
|
} else {
|
|
r1 = customRules.list;
|
|
}
|
|
copyDataProperties(object4, r1, r10);
|
|
object['list'] = object4;
|
|
const object5 = {};
|
|
object5.order = (importDefault(6629) /* metro dependency 6629: MarkupTextRule */).order;
|
|
object5.match = match_66403;
|
|
object5.parse = function(a0, a1, {interpolations}) {
|
|
interpolations = interpolations[a0[1]];
|
|
return interpolations == null ? {type: 'text', content: a0[0]} : {type: 'interpolation',
|
|
renderer: interpolations};
|
|
};
|
|
object5.react = function(a0) {
|
|
return a0.renderer();
|
|
};
|
|
object['interpolation'] = object5;
|
|
const object6 = {};
|
|
copyDataProperties(object6, lheading, importDefault);
|
|
object6['parse'] = parseWithClassNameExtraction({transformUpperCase: true});
|
|
copyDataProperties(object6,
|
|
typeof customRules.lheading === 'function' ? customRules.lheading(a0) : customRules.lheading, true);
|
|
object['lheading'] = object6;
|
|
const object8 = {};
|
|
copyDataProperties(object8, heading, true);
|
|
copyDataProperties(object8,
|
|
typeof customRules.heading === 'function' ? customRules.heading(a0) : customRules.heading, true);
|
|
object['heading'] = object8;
|
|
const object9 = {};
|
|
copyDataProperties(object9, blockQuote, true);
|
|
copyDataProperties(object9,
|
|
typeof customRules.blockQuote === 'function' ? customRules.blockQuote(a0) : customRules.blockQuote, true);
|
|
object['blockQuote'] = object9;
|
|
const object10 = {};
|
|
copyDataProperties(object10, paragraph, true);
|
|
copyDataProperties(object10,
|
|
typeof customRules.paragraph === 'function' ? customRules.paragraph(a0) : customRules.paragraph, true);
|
|
object['paragraph'] = object10;
|
|
return object;
|
|
function defaultRulesMatch(a0) { // fn#66403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:1012, owner: defaultRules.match, offset: 0x01bfa67e, size: 23 bytes, params: 2, frame: 11
|
|
return env1_11.exec(a0);
|
|
}
|
|
|
|
}
|
|
|
|
function specialRules(a0) { // fn#66406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:1748, offset: 0x01bfa6ef, size: 175 bytes, params: 2, frame: 16
|
|
const object2 = {};
|
|
copyDataProperties(object2, lheading, undefined);
|
|
object2['parse'] = parseWithClassNameExtraction({transformUpperCase: false});
|
|
const customRules = (ChangeLogUtilsModule).customRules;
|
|
copyDataProperties(object2,
|
|
typeof customRules.lheading === 'function' ? customRules.lheading(a0) : customRules.lheading, 1);
|
|
return {lheading: object2};
|
|
}
|
|
|
|
function messageRules(a0) { // fn#66407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:1969, offset: 0x01bfa79e, size: 140 bytes, params: 2, frame: 15
|
|
const object = {};
|
|
copyDataProperties(object, defaultRules_2(a0), undefined);
|
|
const object2 = {};
|
|
copyDataProperties(object2, (Module03855).defaultRules.newline, object2);
|
|
object['newline'] = object2;
|
|
object['text'] = importDefault(6629) /* metro dependency 6629: MarkupTextRule */;
|
|
object['list'] = importDefault(6644) /* metro dependency 6644: MarkupListRule */;
|
|
object['subtext'] = importDefault(6645) /* metro dependency 6645: MarkupSubtextRule */;
|
|
return object;
|
|
}
|
|
|
|
function renderChangelogMessageMarkup({content}, a1, a2) { // fn#66411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:2404, offset: 0x01bfa88e, size: 108 bytes, params: 4, frame: 18
|
|
const object = {'hasSpoilerEmbeds': false, 'hasBailedAst': false};
|
|
const defaultImport = MarkupUtils;
|
|
object.content = defaultImport.reactParserFor(getDefaultRules(a1))(content, false,
|
|
a2 != null ? {changeLog: a2} : {});
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun66399, 8339, [3855, 8340, 6629, 6644, 6645, 6622,
|
|
2]) /* metro module 8339, dependencies: [3855, 8340, 6629, 6644, 6645, 6622, 2] */;
|