Files
discord-decomp/sources/by-id/module-00134.jsx
T
2026-07-27 16:20:00 +03:00

212 lines
10 KiB
React

/* Metro module 134; source: unknown; dependencies: [57, 6, 7, 135, 133, 138, 129, 139] */
function _fun2188(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#2188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:159:6, offset: 0x00c7b0e4, size: 312 bytes, params: 8, frame: 22
const env0_0 = require;
const closure = getChildNodes;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
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 value = _fun2192();
value.ELEMENT_NODE = 1;
value.ATTRIBUTE_NODE = 2;
value.TEXT_NODE = 3;
value.CDATA_SECTION_NODE = 4;
value.ENTITY_REFERENCE_NODE = 5;
value.ENTITY_NODE = 6;
value.PROCESSING_INSTRUCTION_NODE = 7;
value.COMMENT_NODE = 8;
value.DOCUMENT_NODE = 9;
value.DOCUMENT_TYPE_NODE = 10;
value.DOCUMENT_FRAGMENT_NODE = 11;
value.NOTATION_NODE = 12;
value.DOCUMENT_POSITION_DISCONNECTED = 1;
value.DOCUMENT_POSITION_PRECEDING = 2;
value.DOCUMENT_POSITION_FOLLOWING = 4;
value.DOCUMENT_POSITION_CONTAINS = 8;
value.DOCUMENT_POSITION_CONTAINED_BY = 16;
value.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32;
(require(129) /* metro dependency 129 */).setPlatformObject(value);
exports.default = value;
exports.getChildNodes = closure;
}
function getChildNodes(a0) { // fn#2189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:159:2631, offset: 0x00c7b21c, size: 119 bytes, params: 2, frame: 13
var r0;
var value;
const nativeNodeReference = (require(135) /* metro dependency 135 */).getNativeNodeReference(a0);
if (nativeNodeReference == null) {
r0 = [];
} else {
value = importDefault(138) /* metro dependency 138 */;
value = value.getChildNodes(nativeNodeReference);
value = value.map(_fun2190);
value = value.filter(global.Boolean);
r0 = value;
}
return r0;
}
function getNodeSiblingsAndPosition(a0) { // fn#2191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:159:2830, offset: 0x00c7b2bc, size: 124 bytes, params: 2, frame: 12
const parentNode = a0.parentNode;
if (parentNode == null) {
return [[a0], 0];
}
var value;
const value2 = getChildNodes(parentNode).indexOf(a0);
if (value2 === -1) {
throw new global.TypeError("Missing node in parent's child node list");
}
return [value, value2];
}
function _fun2192() { // fn#2192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:159:130, offset: 0x00c7b338, size: 427 bytes, params: 1, frame: 15
return env0_6(ReadOnlyNode, [{key: 'childNodes', get: get_2194}, {key: 'firstChild', get: get_2195},
{key: 'isConnected', get: get_2196}, {key: 'lastChild', get: get_2197}, {key: 'nextSibling', get: get_2198},
{key: 'nodeName', get: function() {
var TypeError = global.TypeError;
throw new TypeError('`nodeName` is abstract and must be implemented in a subclass of `ReadOnlyNode`');
}}, {key: 'nodeType', get: function() {
var TypeError = global.TypeError;
throw new TypeError('`nodeType` is abstract and must be implemented in a subclass of `ReadOnlyNode`');
}}, {key: 'nodeValue', get: function() {
var TypeError = global.TypeError;
throw new TypeError('`nodeValue` is abstract and must be implemented in a subclass of `ReadOnlyNode`');
}}, {key: 'ownerDocument', get: get_2202}, {key: 'parentElement', get: get_2203}, {key: 'parentNode',
get: get_2204}, {key: 'previousSibling', get: get_2205}, {key: 'textContent', get: function() {
var TypeError = global.TypeError;
throw new TypeError('`textContent` is abstract and must be implemented in a subclass of `ReadOnlyNode`');
}}, {key: 'compareDocumentPosition', value: value_2207}, {key: 'contains', value: value_2208}, {key: 'getRootNode',
value: function() {
var value = this;
return value.isConnected ? value.ownerDocument ?? value : value;
}}, {key: 'hasChildNodes', value: function() {
return getChildNodes(this).length > 0;
}}]);
}
function _fun2190(a0) { // fn#2190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:159:2745, offset: 0x00c7b293, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (require(135) /* metro dependency 135 */).getPublicInstanceFromInstanceHandle(a0);
}
function ReadOnlyNode(a0, a1) { // fn#2193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:159:141, offset: 0x00c7b4e3, size: 86 bytes, params: 3, frame: 17
const value = environment.__proto__;
env1_5(this, ReadOnlyNode);
(require(135) /* metro dependency 135 */).setOwnerDocument(this, a1);
(require(135) /* metro dependency 135 */).setInstanceHandle(this, a0);
}
function get_2194() { // fn#2194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:159:301, offset: 0x00c7b539, size: 50 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (require(133) /* metro dependency 133 */).createNodeList(getChildNodes(this));
}
function get_2195() { // fn#2195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:159:399, offset: 0x00c7b56b, size: 36 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = getChildNodes(this);
return value.length === 0 ? null : value[0];
}
function get_2196() { // fn#2196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:159:495, offset: 0x00c7b58f, size: 81 bytes, params: 1, frame: 14
var r0;
let value = environment.__proto__;
const nativeNodeReference = (require(135) /* metro dependency 135 */).getNativeNodeReference(this);
const value3 = nativeNodeReference != null;
if (value3) {
value = importDefault(138) /* metro dependency 138 */;
value = value.isConnected(nativeNodeReference);
r0 = value;
} else {
r0 = value3;
}
return r0;
}
function get_2197() { // fn#2197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:159:615, offset: 0x00c7b5e0, size: 48 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = getChildNodes(this);
return value.length === 0 ? null : value[value.length - 1];
}
function get_2198() { // fn#2198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:159:720, offset: 0x00c7b610, size: 68 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = env1_4(getNodeSiblingsAndPosition(this), 2);
const property = value[0];
const property2 = value[1];
return property2 === property.length - 1 ? null : property[property2 + 1];
}
function get_2202() { // fn#2202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:159:1277, offset: 0x00c7b6c0, size: 41 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(135) /* metro dependency 135 */).getOwnerDocument(this);
}
function get_2203() { // fn#2203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:159:1357, offset: 0x00c7b6e9, size: 71 bytes, params: 1, frame: 14
const parentNode = this.parentNode;
const value2 = null;
env1_3 = value2 == env1_3 ? (require(139) /* metro dependency 139 */).default : env1_3;
return parentNode instanceof env1_3 ? parentNode : value2;
}
function get_2204() { // fn#2204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:159:1521, offset: 0x00c7b730, size: 132 bytes, params: 1, frame: 16
var r1;
let value = environment.__proto__;
const nativeNodeReference = (require(135) /* metro dependency 135 */).getNativeNodeReference(this);
const value3 = null;
if (value3 == nativeNodeReference) {
return value3;
}
const parentNode = (importDefault(138) /* metro dependency 138 */).getParentNode(nativeNodeReference);
if (value3 == parentNode) {
r1 = value3;
} else {
value = require(135) /* metro dependency 135 */;
value = value.getPublicInstanceFromInstanceHandle(parentNode);
r1 = value3 != value ? value : value3;
}
return r1;
}
function get_2205() { // fn#2205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:159:1748, offset: 0x00c7b7b4, size: 59 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = env1_4(getNodeSiblingsAndPosition(this), 2);
const property = value[0];
const property2 = value[1];
return property2 === 0 ? null : property[property2 - 1];
}
function value_2207(a0) { // fn#2207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:159:2034, offset: 0x00c7b813, size: 129 bytes, params: 2, frame: 18
var r0;
if (a0 === this) {
return 0;
}
let value = environment.__proto__;
const nativeNodeReference = (require(135) /* metro dependency 135 */).getNativeNodeReference(this);
const nativeNodeReference2 = (require(135) /* metro dependency 135 */).getNativeNodeReference(a0);
if (nativeNodeReference == null) {
r0 = ReadOnlyNode.DOCUMENT_POSITION_DISCONNECTED;
} else if (nativeNodeReference2 == null) {
r0 = ReadOnlyNode.DOCUMENT_POSITION_DISCONNECTED;
} else {
value = importDefault(138) /* metro dependency 138 */;
value = value.compareDocumentPosition(nativeNodeReference, nativeNodeReference2);
r0 = value;
}
return r0;
}
function value_2208(a0) { // fn#2208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:159:2299, offset: 0x00c7b894, size: 49 bytes, params: 2, frame: 12
var r0;
let value = a0 === this;
if (value) {
r0 = value;
} else {
value = this.compareDocumentPosition(a0);
value = !!(value & ReadOnlyNode.DOCUMENT_POSITION_CONTAINED_BY);
r0 = value;
}
return r0;
}