Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

+129
View File
@@ -0,0 +1,129 @@
/* Metro module 6730; source: lib/spellcheck/LanguageDetector.tsx; dependencies: [6, 7, 6731, 2] */
function _fun52864(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:6, offset: 0x01338c37, size: 132 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const value = _fun52865();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/spellcheck/LanguageDetector.tsx');
exports.default = value;
}
function _fun52865() { // fn#52865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:122, offset: 0x01338cbb, size: 135 bytes, params: 1, frame: 15
return env0_3(LanguageDetector, [{key: 'language', get: function() {
return this._language;
}, set: function(a0) {
if (this._language !== a0) {
this._language = a0;
this._onChange(a0);
}
}}, {key: 'languageHint', set: function(a0) {
this._languageHint = a0;
}}, {key: 'process', value: function(a0) {
var env0_0 = this;
var env0_1 = a0;
if (!this._processing) {
this._processing = true;
global.requestIdleCallback(_fun52871);
}
}}, {key: '_processEnd', value: function() {
var r1;
var _minimumTimeRemaining;
var value = a0;
r1 = value !== undefined ? value : false;
this._processing = false;
if (r1) {
_minimumTimeRemaining = this._minimumTimeRemaining;
this._minimumTimeRemaining = typeof _minimumTimeRemaining === 'bigint' ? _minimumTimeRemaining + 1n : +_minimumTimeRemaining + 1;
}
}}]);
}
function LanguageDetector(a0, a1) { // fn#52866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:143, offset: 0x01338d42, size: 81 bytes, params: 3, frame: 15
env1_2(this, LanguageDetector);
this._shouldProcess = false;
this._processing = false;
this._minimumTimeRemaining = 5;
this._language = a0;
this._languageHint = a0;
this._onChange = a1;
a1(a0);
}
function value_52870(a0) { // fn#52870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:543, offset: 0x01338dd3, size: 57 bytes, params: 2, frame: 11
const env0_1 = a0;
if (!this._processing) {
this._processing = true;
global.requestIdleCallback(_fun52871);
}
}
function _fun52871(a0) { // fn#52871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:615, offset: 0x01338e0c, size: 144 bytes, params: 2, frame: 15
const env0_0 = a0;
if (a0.timeRemaining() <= env0_0._minimumTimeRemaining) {
env0_0._processEnd();
} else {
env0_1 = env0_1.length > 256 ? env0_1.slice(0, 256) : env0_1;
detectLanguage(env0_1, env0_0._languageHint).then(_fun52876, _fun52877);
}
}
function detectLanguage(a0, a1) { // fn#52872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:718, offset: 0x01338e9c, size: 75 bytes, params: 3, frame: 12
var environment;
const env0_0 = a0;
const env0_1 = a1;
let value = environment.__proto__.__proto__.__proto__;
value = importDefault(6731) /* metro dependency 6731: DesktopNativeUtils */;
value = value.ensureModule('discord_spellcheck');
return value.then(_fun52873);
}
function _fun52876(a0) { // fn#52876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:1143, offset: 0x01339063, size: 44 bytes, params: 2, frame: 11
const binding = env1_0;
binding.language = a0;
binding._processEnd(env0_0.didTimeout);
}
function _fun52877() { // fn#52877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:1197, offset: 0x0133908f, size: 35 bytes, params: 1, frame: 11
const binding = env1_0;
binding._processEnd(env0_0.didTimeout);
}
function _fun52873() { // fn#52873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:803, offset: 0x01338ee7, size: 91 bytes, params: 1, frame: 12
var environment;
let value = environment.__proto__.__proto__.__proto__.__proto__;
value = importDefault(6731) /* metro dependency 6731: DesktopNativeUtils */;
const env0_0 = value.requireModule('discord_spellcheck').cld;
const Promise = global.Promise;
value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun52874);
return promise instanceof Object ? promise : value;
}
function _fun52874(a0, a1) { // fn#52874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:882, offset: 0x01338f42, size: 80 bytes, params: 3, frame: 16
const env0_0 = a0;
const env0_1 = a1;
const cldBinding = cld;
cldBinding.detect(env1_0, {httpHint: require, encodingHint: 'UTF8'}, _fun52875);
}
function _fun52875(a0, a1) { // fn#52875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:935, offset: 0x01338f92, size: 209 bytes, params: 3, frame: 13
var Error;
var message;
if (a0 != null) {
Error = global.Error;
message = a0.message;
require(new Error());
} else if (a1.reliable) {
if (a1.languages[0].percent < 90) {
require(new global.Error('Not enough reliable text.'));
} else if (a1.languages[0].score < 500) {
require(new global.Error('Not enough reliable text.'));
} else {
env0_0(a1.languages[0].code);
}
} else {
require(new global.Error('Not enough reliable text.'));
}
}
+211
View File
@@ -0,0 +1,211 @@
/* Metro module 6727; source: lib/spellcheck/Spellchecker.tsx; dependencies: [5, 57, 6, 7, 1949, 3, 3767, 6728, 6729, 6730, 22, 1864, 1360, 2] */
function _fun52835(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:6, offset: 0x013380be, size: 339 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = undefined;
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importDefault(6) /* metro dependency 6 */;
const env0_6 = importDefault(7) /* metro dependency 7 */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const value4 = new (importDefault(3) /* metro dependency 3: Logger */)('Spellchecker');
const env0_9 = (importDefault(3767) /* metro dependency 3767: DiscordNative */) == null ? value : (importDefault(3767) /* metro dependency 3767: DiscordNative */).spellCheck;
const value7 = _fun52842();
const env0_11 = (importDefault(22) /* metro dependency 22 */).debounce(_fun52859, 250);
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/spellcheck/Spellchecker.tsx');
exports.Spellchecker = value7;
exports.install = function() {
return _install.apply(this, arguments);
};
return value;
}
function normalizeLocale(a0) { // fn#52836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:221, offset: 0x01338211, size: 255 bytes, params: 2, frame: 19
let value = a0;
const r3 = (importDefault(6728) /* metro dependency 6728: fallbackLocales */)[value] ?? value;
value = Reflect.apply((require(6729) /* metro dependency 6729 */).parse, value, [r3.replace(RegExp('[_-]', 'g'),
'-')]);
if (value == null) {
env0_8.error('' + r3 + ' is not a valid locale.');
} else {
var langtag = value.langtag;
var language = langtag.language;
if (language == null) {
env0_8.error('' + r3 + ' is not a valid locale.');
return undefined;
}
langtag = value.langtag;
var region = langtag.region;
if (region != null) {
langtag = value.langtag;
language = langtag.language;
region = langtag.region;
language = language.language;
value = language.toLowerCase();
return '' + value + '-' + region.toUpperCase();
}
env0_8.error('' + r3 + ' is not a valid locale.');
}
}
function _install() { // fn#52837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:2371, offset: 0x01338310, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun52839).apply(this, arguments);
}
function _fun52842() { // fn#52842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:528, offset: 0x01338444, size: 277 bytes, params: 1, frame: 15
return env0_6(Spellchecker, [{key: 'enabled', get: function() {
return this._enabled;
}, set: function(a0) {
this._enabled = a0;
}}, {key: 'setLearnedWords', value: function(a0) {
spellCheck.setLearnedWords(a0);
}}, {key: 'setLocale', value: value_52849}, {key: 'setAppLocale', value: function(a0) {
this.regionPreference = a0.split('-')[1];
}}, {key: 'detectLanguage', value: function(a0) {
if (this.enabled) {
this.languageDetector.process(a0);
}
}}, {key: 'getAvailableLanguages', value: function(a0) {
a0.forEach(_fun52854);
return {};
}}, {key: 'isMisspelled', value: function(a0) {
return this.misspelledWord !== '' && a0 === this.misspelledWord;
}}, {key: 'getCorrectionsForMisspelling', value: function(a0, a1) {
return this.isMisspelled(a0, a1) ? this.corrections : [];
}}, {key: 'getCachedMisspelling', value: function() {
return {misspelledWord: this.misspelledWord, corrections: this.corrections};
}}, {key: 'replaceMisspelling', value: function(a0) {
spellCheck.replaceMisspelling(a0);
}}]);
}
function _fun52859(a0, a1) { // fn#52859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:2080, offset: 0x013388db, size: 195 bytes, params: 3, frame: 20
var r1;
var value3;
var moduleValue;
var moduleValue2;
var moduleValue3;
const value = null;
if (value == a1) {
r1 = value;
} else {
value3 = undefined;
moduleValue = require(1864) /* metro dependency 1864: DOMUtils */;
if (moduleValue.isElement(a1, global.HTMLInputElement)) {
r1 = a1.value;
} else {
moduleValue2 = require(1864) /* metro dependency 1864: DOMUtils */;
if (moduleValue2.isElement(a1, global.HTMLTextAreaElement)) {
r1 = a1.value;
} else {
moduleValue3 = require(1864) /* metro dependency 1864: DOMUtils */;
r1 = moduleValue3.isElement(a1) && a1.hasAttribute('contenteditable') ? a1.textContent : value3;
}
}
}
if (value != r1) {
a0.detectLanguage(r1);
}
}
function* _fun52839() { // fn#52839, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:2410, offset: 0x01338349, size: 149 bytes, params: 1, frame: 16
var environment;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const binding = env2_9;
const getAvailableDictionaries = binding.getAvailableDictionaries;
yield Reflect.apply(getAvailableDictionaries, binding, []);
const value3 = undefined;
if (false) {
return value3;
}
const value5 = (value3 ?? []).map(env2_12);
const env2_102 = new env2_10(value5.filter(env2_0(env2_2[12]).isNotNullish));
((a0) => {
var env0_0 = a0;
if (global.document.body != null) {
global.document.body.addEventListener('beforeinput', _fun52841, true);
}
})(env2_102);
return env2_102;
}
function Spellchecker(a0) { // fn#52843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:549, offset: 0x01338559, size: 226 bytes, params: 2, frame: 17
const env0_1 = a0;
env1_5(this, Spellchecker);
this._enabled = true;
this.misspelledWord = '';
this.corrections = [];
const value4 = env1_4(LocaleStore.locale.split('-'), 2);
const property = value4[0];
this.regionPreference = value4[1];
const env0_3 = this.getAvailableLanguages(a0);
const defaultImport = importDefault(6730) /* metro dependency 6730: LanguageDetector */;
const value5 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
const defaultImport2 = new defaultImport(property, _fun52844);
this.languageDetector = defaultImport2 instanceof Object ? defaultImport2 : value5;
spellCheck.on('spellcheck-result', _fun52845);
}
function value_52849(a0) { // fn#52849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:1231, offset: 0x01338739, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
let value = environment.__proto__;
value = spellCheck.setLocale(a0);
if (value != null) {
value.then(_fun52850);
}
}
function value_52853(a0) { // fn#52853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:1554, offset: 0x013387fd, size: 28 bytes, params: 2, frame: 12
a0.forEach(_fun52854);
return {};
}
function attachToInput(a0) { // fn#52840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:2551, offset: 0x013383de, size: 69 bytes, params: 2, frame: 15
const env0_0 = a0;
if (global.document.body != null) {
global.document.body.addEventListener('beforeinput', _fun52841, true);
}
}
function _fun52844(a0) { // fn#52844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:802, offset: 0x0133863b, size: 156 bytes, params: 2, frame: 17
var r4;
const value2 = '' + a0 + '-' + env0_0.regionPreference;
if (env0_1.indexOf(value2) !== -1) {
env0_0.setLocale(value2);
} else {
r4 = env0_3[a0] ?? (importDefault(6728) /* metro dependency 6728: fallbackLocales */)[env0_2];
if (r4 != null) {
env0_0.setLocale(r4);
}
}
}
function _fun52845(a0, a1) { // fn#52845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:981, offset: 0x013386d7, size: 57 bytes, params: 3, frame: 7
const value = a0;
const value2 = a1;
env0_0.misspelledWord = value ?? '';
env0_0.corrections = value2 ?? [];
}
function _fun52850(a0) { // fn#52850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:1283, offset: 0x0133876d, size: 72 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__;
const binding = env2_8;
binding.info('Switching to ' + env0_0, a0 ? '(available)' : '(unavailable)');
}
function _fun52854(a0) { // fn#52854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:1593, offset: 0x01338819, size: 67 bytes, params: 2, frame: 15
const value = a0;
const property = env2_4(value.split('-'), 1)[0];
const binding = env0_0;
binding[property] = binding[property] ?? value;
}
function _fun52841({target}) { // fn#52841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:2644, offset: 0x01338423, size: 33 bytes, params: 2, frame: 13
return env4_11(env0_0, target);
}
@@ -0,0 +1,27 @@
/* Metro module 6728; source: lib/spellcheck/fallbackLocales.tsx; dependencies: [2] */
function _fun52861(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6906:6, offset: 0x0133899e, size: 92 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/spellcheck/fallbackLocales.tsx');
exports.default = {'aa': 'aa-ET', 'af': 'af-ZA', 'ak': 'ak-GH', 'am': 'am-ET', 'an': 'an-ES', 'ar': 'ar-MA',
'as': 'as-IN', 'ay': 'ay-PE', 'az': 'az-AZ', 'be': 'be-BY', 'bg': 'bg-BG', 'bi': 'bi-TV', 'bn': 'bn-BD',
'bo': 'bo-CN', 'br': 'br-FR', 'bs': 'bs-BA', 'ca': 'ca-ES', 'ce': 'ce-RU', 'cs': 'cs-CZ', 'cv': 'cv-RU',
'cy': 'cy-GB', 'da': 'da-DK', 'de': 'de-DE', 'dv': 'dv-MV', 'dz': 'dz-BT', 'el': 'el-GR', 'en': 'en-US',
'es': 'es-ES', 'et': 'et-EE', 'eu': 'eu-ES', 'fa': 'fa-IR', 'ff': 'ff-SN', 'fi': 'fi-FI', 'fo': 'fo-FO',
'fr': 'fr-FR', 'fy': 'fy-DE', 'ga': 'ga-IE', 'gd': 'gd-GB', 'gl': 'gl-ES', 'gu': 'gu-IN', 'gv': 'gv-GB',
'ha': 'ha-NG', 'he': 'he-IL', 'hi': 'hi-IN', 'hr': 'hr-HR', 'ht': 'ht-HT', 'hu': 'hu-HU', 'hy': 'hy-AM',
'ia': 'ia-FR', 'id': 'id-ID', 'ig': 'ig-NG', 'ik': 'ik-CA', 'is': 'is-IS', 'it': 'it-IT', 'iu': 'iu-CA',
'ja': 'ja-JP', 'ka': 'ka-GE', 'kk': 'kk-KZ', 'kl': 'kl-GL', 'km': 'km-KH', 'kn': 'kn-IN', 'ko': 'ko-KR',
'ks': 'ks-IN', 'ku': 'ku-TR', 'kw': 'kw-GB', 'ky': 'ky-KG', 'lb': 'lb-LU', 'lg': 'lg-UG', 'li': 'li-BE',
'ln': 'ln-CD', 'lo': 'lo-LA', 'lt': 'lt-LT', 'lv': 'lv-LV', 'mg': 'mg-MG', 'mh': 'mh-MH', 'mi': 'mi-NZ',
'mk': 'mk-MK', 'ml': 'ml-IN', 'mn': 'mn-MN', 'mr': 'mr-IN', 'ms': 'ms-MY', 'mt': 'mt-MT', 'my': 'my-MM',
'nb': 'nb-NO', 'ne': 'ne-NP', 'nl': 'nl-NL', 'nn': 'nn-NO', 'nr': 'nr-ZA', 'oc': 'oc-FR', 'om': 'om-KE',
'or': 'or-IN', 'os': 'os-RU', 'pa': 'pa-PK', 'pl': 'pl-PL', 'ps': 'ps-AF', 'pt': 'pt-PT', 'ro': 'ro-RO',
'ru': 'ru-RU', 'rw': 'rw-RW', 'sa': 'sa-IN', 'sc': 'sc-IT', 'sd': 'sd-IN', 'se': 'se-NO', 'si': 'si-LK',
'sk': 'sk-SK', 'sl': 'sl-SI', 'so': 'so-SO', 'sq': 'sq-AL', 'sr': 'sr-RS', 'ss': 'ss-ZA', 'st': 'st-ZA',
'sv': 'sv-SE', 'sw': 'sw-KE', 'ta': 'ta-IN', 'te': 'te-IN', 'tg': 'tg-TJ', 'th': 'th-TH', 'ti': 'ti-ER',
'tk': 'tk-TM', 'tl': 'tl-PH', 'tn': 'tn-ZA', 'tr': 'tr-TR', 'ts': 'ts-ZA', 'tt': 'tt-RU', 'ug': 'ug-CN',
'uk': 'uk-UA', 'ur': 'ur-PK', 'uz': 'uz-UZ', 've': 've-ZA', 'vi': 'vi-VN', 'wa': 'wa-BE', 'wo': 'wo-SN',
'xh': 'xh-ZA', 'yi': 'yi-US', 'yo': 'yo-NG', 'zh': 'zh-CN', 'zu': 'zu-ZA'};
}