Files
discord-decomp/sources/by-id/module-07768.js
T
2026-07-28 01:06:53 +03:00

388 lines
22 KiB
JavaScript

/* Metro module 7768; source: unknown; dependencies: [15, 17, 18, 6, 7, 31, 27, 7769, 7762, 7770, 7771] */
import ClassCallCheck from './module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from './module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from './module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from './module-00017.js'; /* Metro dependency 17 */
import Inherits from './module-00018-Inherits.js'; /* Metro dependency 18 */
import Module07771 from './module-07771.js'; /* Metro dependency 7771 */
import * as ReactNativeModule from './module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
import * as Module07770Module from './module-07770.js'; /* Metro dependency 7770 */
function _fun62156(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#62156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:6, offset: 0x01b58fc4, size: 361 bytes, params: 8, frame: 23
const env0_0 = require;
const multiplyMatrices_621602 = multiplyMatrices_62160;
const invert2 = invert;
const closure3 = function({a, b, c, d, e, f}, {x, y}) {
return {x: a * x + c * y + e, y: b * x + d * y + f};
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Component = (ReactModule).Component;
const Math = global.Math;
const PI = Math.PI;
const env0_9 = PI / 180;
const value = _fun62163();
const value2 = _fun62176();
object = {createSVGPoint: createSVGPoint, createSVGMatrix: createSVGMatrix};
const value3 = _fun62181(Component);
value3.prototype.ownerSVGElement = object;
exports.default = value3;
exports.multiplyMatrices = multiplyMatrices_621602;
exports.invert = invert2;
exports.SVGMatrix = value;
exports.matrixTransform = closure3;
exports.SVGPoint = value2;
exports.ownerSVGElement = object;
function _isNativeReflectConstruct_62157() { // fn#62157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:205, offset: 0x01b5912d, 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_62157_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun62163() { // fn#62163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:755, offset: 0x01b59321, size: 293 bytes, params: 1, frame: 15
return CreateClass(SVGMatrix, [{key: 'multiply', value: value_62165}, {key: 'inverse', value: value_62166},
{key: 'translate', value: value_62167}, {key: 'scale', value: value_62168}, {key: 'scaleNonUniform',
value: value_62169}, {key: 'rotate', value: value_62170}, {key: 'rotateFromVector', value: value_62171},
{key: 'flipX', value: value_62172}, {key: 'flipY', value: value_62173}, {key: 'skewX', value: value_62174},
{key: 'skewY', value: value_62175}]);
function SVGMatrix(a0) { // fn#62164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:766, offset: 0x01b59446, size: 144 bytes, params: 2, frame: 17
var a;
var b;
var c;
var d;
var e;
var f;
env1_6(this, SVGMatrix);
if (a0) {
a = a0.a;
b = a0.b;
c = a0.c;
d = a0.d;
e = a0.e;
f = a0.f;
this.a = a;
this.b = b;
this.c = c;
this.d = d;
this.e = e;
this.f = f;
} else {
this.a = 1;
this.b = 0;
this.c = 0;
this.d = 1;
this.e = 0;
this.f = 0;
}
}
function value_62165(a0) { // fn#62165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:1007, offset: 0x01b594d6, size: 50 bytes, params: 2, frame: 14
let value = environment.__proto__;
value = multiplyMatrices_62160(this, a0);
const value2 = Object.create(SVGMatrix.prototype, {constructor: {value: SVGMatrix}});
const sVGMatrix = new SVGMatrix();
return sVGMatrix instanceof Object ? sVGMatrix : value2;
}
function value_62166() { // fn#62166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:1098, offset: 0x01b59508, size: 46 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = invert(this);
const value2 = Object.create(SVGMatrix.prototype, {constructor: {value: SVGMatrix}});
const sVGMatrix = new SVGMatrix();
return sVGMatrix instanceof Object ? sVGMatrix : value2;
}
function value_62167(a0, a1) { // fn#62167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:1177, offset: 0x01b59536, size: 76 bytes, params: 3, frame: 14
let value = environment.__proto__;
value = multiplyMatrices_62160(this, {'a': 1, 'b': 0, 'c': 0, 'd': 1, e: a0, f: a1});
const value2 = Object.create(SVGMatrix.prototype, {constructor: {value: SVGMatrix}});
const sVGMatrix = new SVGMatrix();
return sVGMatrix instanceof Object ? sVGMatrix : value2;
}
function value_62168(a0) { // fn#62168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:1293, offset: 0x01b59582, size: 76 bytes, params: 2, frame: 14
let value = environment.__proto__;
value = multiplyMatrices_62160(this, {'a': null, 'b': 0, 'c': 0, 'd': null, 'e': 0, 'f': 0, a: a0, d: a0});
const value2 = Object.create(SVGMatrix.prototype, {constructor: {value: SVGMatrix}});
const sVGMatrix = new SVGMatrix();
return sVGMatrix instanceof Object ? sVGMatrix : value2;
}
function value_62169(a0, a1) { // fn#62169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:1413, offset: 0x01b595ce, size: 79 bytes, params: 3, frame: 14
let value = environment.__proto__;
value = multiplyMatrices_62160(this, {'a': null, 'b': 0, 'c': 0, 'd': null, 'e': 0, 'f': 0, a: a0, d: a1});
const value2 = Object.create(SVGMatrix.prototype, {constructor: {value: SVGMatrix}});
const sVGMatrix = new SVGMatrix();
return sVGMatrix instanceof Object ? sVGMatrix : value2;
}
function value_62170(a0) { // fn#62170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:1536, offset: 0x01b5961d, size: 131 bytes, params: 2, frame: 16
let Math = global.Math;
const cos = Math.cos;
let value = environment.__proto__;
const binding = env1_9;
const value2 = Reflect.apply(cos, Math, [binding * a0]);
Math = global.Math;
const value3 = Math.sin(binding * a0);
value = multiplyMatrices_62160(this, {a: value2, b: value3, c: -value3, d: value2, e: 0, f: 0});
const value5 = Object.create(SVGMatrix.prototype, {constructor: {value: SVGMatrix}});
const sVGMatrix = new SVGMatrix(value);
return sVGMatrix instanceof Object ? sVGMatrix : value5;
}
function value_62171(a0, a1) { // fn#62171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:1695, offset: 0x01b596a0, size: 152 bytes, params: 3, frame: 16
let Math = global.Math;
let value = Math.atan2(a1, a0);
Math = global.Math;
const cos = Math.cos;
const binding = env1_9;
const value3 = Reflect.apply(cos, Math, [binding * value]);
Math = global.Math;
value = Math.sin(binding * value);
value = multiplyMatrices_62160(this, {a: value3, b: value, c: -value, d: value3, e: 0, f: 0});
const value5 = Object.create(SVGMatrix.prototype, {constructor: {value: SVGMatrix}});
const sVGMatrix = new SVGMatrix(value);
return sVGMatrix instanceof Object ? sVGMatrix : value5;
}
function value_62172() { // fn#62172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:1873, offset: 0x01b59738, size: 61 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = multiplyMatrices_62160(this, {'a': -1, 'b': 0, 'c': 0, 'd': 1, 'e': 0, 'f': 0});
const value2 = Object.create(SVGMatrix.prototype, {constructor: {value: SVGMatrix}});
const sVGMatrix = new SVGMatrix();
return sVGMatrix instanceof Object ? sVGMatrix : value2;
}
function value_62173() { // fn#62173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:1983, offset: 0x01b59775, size: 61 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = multiplyMatrices_62160(this, {'a': 1, 'b': 0, 'c': 0, 'd': -1, 'e': 0, 'f': 0});
const value2 = Object.create(SVGMatrix.prototype, {constructor: {value: SVGMatrix}});
const sVGMatrix = new SVGMatrix();
return sVGMatrix instanceof Object ? sVGMatrix : value2;
}
function value_62174(a0) { // fn#62174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:2093, offset: 0x01b597b2, size: 97 bytes, params: 2, frame: 16
let value = environment.__proto__;
const multiplyMatrices_62160Binding = multiplyMatrices_62160;
const object = {'a': 1, 'b': 0, 'c': null, 'd': 1, 'e': 0, 'f': 0};
const Math = global.Math;
object.c = Math.tan(env1_9 * a0);
value = multiplyMatrices_62160Binding(this, object);
const value2 = Object.create(SVGMatrix.prototype, {constructor: {value: SVGMatrix}});
const sVGMatrix = new SVGMatrix();
return sVGMatrix instanceof Object ? sVGMatrix : value2;
}
function value_62175(a0) { // fn#62175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:2215, offset: 0x01b59813, size: 97 bytes, params: 2, frame: 16
let value = environment.__proto__;
const multiplyMatrices_62160Binding = multiplyMatrices_62160;
const object = {'a': 1, 'b': null, 'c': 0, 'd': 1, 'e': 0, 'f': 0};
const Math = global.Math;
object.b = Math.tan(env1_9 * a0);
value = multiplyMatrices_62160Binding(this, object);
const value2 = Object.create(SVGMatrix.prototype, {constructor: {value: SVGMatrix}});
const sVGMatrix = new SVGMatrix();
return sVGMatrix instanceof Object ? sVGMatrix : value2;
}
}
function _fun62176() { // fn#62176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:2444, offset: 0x01b59874, size: 57 bytes, params: 1, frame: 14
return CreateClass(SVGPoint, [{key: 'matrixTransform', value: value_62178}]);
function SVGPoint(a0) { // fn#62177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:2455, offset: 0x01b598ad, size: 71 bytes, params: 2, frame: 14
var x;
var y;
env1_6(this, SVGPoint);
if (a0) {
x = a0.x;
y = a0.y;
this.x = x;
this.y = y;
} else {
this.x = 0;
this.y = 0;
}
}
function value_62178(a0) { // fn#62178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:2604, offset: 0x01b598f4, size: 50 bytes, params: 2, frame: 14
let value = environment.__proto__;
value = matrixTransform(a0, this);
const value2 = Object.create(SVGPoint.prototype, {constructor: {value: SVGPoint}});
const sVGPoint = new SVGPoint();
return sVGPoint instanceof Object ? sVGPoint : value2;
}
}
function createSVGPoint() { // fn#62179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:2703, offset: 0x01b59926, size: 29 bytes, params: 1, frame: 9
const binding = env0_11;
const value = Object.create(binding.prototype, {constructor: {value: binding}});
const binding2 = new binding();
return binding2 instanceof Object ? binding2 : value;
}
function createSVGMatrix() { // fn#62180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:2759, offset: 0x01b59943, size: 29 bytes, params: 1, frame: 9
const binding = env0_10;
const value = Object.create(binding.prototype, {constructor: {value: binding}});
const binding2 = new binding();
return binding2 instanceof Object ? binding2 : value;
}
function _fun62181(a0) { // fn#62181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:2803, offset: 0x01b59960, size: 68 bytes, params: 2, frame: 15
const Shape2 = Shape;
Inherits(Shape2, a0);
return CreateClass(Shape2, [{key: 'getNativeScrollRef', value: function() {
return this.root;
}}]);
function Shape(a0) { // fn#62182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:2815, offset: 0x01b599a4, size: 253 bytes, params: 2, frame: 21
env1_6(this, Shape);
const items2 = [a0];
const value3 = env1_4(Shape);
const value6 = env1_3(this, _isNativeReflectConstruct_62157() ? global.Reflect.construct(value3, items2,
env1_4(this).constructor) : value3.apply(this, items2));
value6.root = null;
value6.refMethod = refMethod;
value6.setNativeProps = setNativeProps_62184;
value6.getBBox = getBBox;
value6.getCTM = getCTM;
value6.getScreenCTM = getScreenCTM;
value6.isPointInFill = isPointInFill;
value6.isPointInStroke = isPointInStroke;
value6.getTotalLength = getTotalLength;
value6.getPointAtLength = getPointAtLength;
(Module07771)(value6);
return value6;
function refMethod(a0) { // fn#62183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:3034, owner: Shape.refMethod, offset: 0x01b59aa1, size: 20 bytes, params: 2, frame: 2
env0_0.root = a0;
}
function ShapeSetNativeProps(a0) { // fn#62184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:3073, owner: Shape.setNativeProps, offset: 0x01b59ab5, size: 137 bytes, params: 2, frame: 21
var r7;
var propertyName;
var propertyName2;
var BrushProperties;
var includes;
var defaultImport;
for (propertyName in a0) {
BrushProperties = (require(7769) /* metro dependency 7769 */).BrushProperties;
includes = BrushProperties.includes;
if (!Reflect.apply(includes, BrushProperties, [propertyName])) {
r7 = propertyName2;
continue;
}
defaultImport = importDefault(7762) /* metro dependency 7762 */;
a0[propertyName] = defaultImport(a0[propertyName]);
r7 = propertyName2;
}
const root = env0_0.root;
if (root != null) {
root.setNativeProps(a0);
}
}
function getBBox(a0) { // fn#62185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:3216, owner: Shape.getBBox, offset: 0x01b59b3e, size: 160 bytes, params: 2, frame: 18
const r0 = a0 || ({});
const fill = r0.fill;
const r7 = fill === undefined || fill;
const stroke = r0.stroke;
const r6 = stroke === undefined || stroke;
const markers = r0.markers;
const r5 = markers === undefined || markers;
const clipped = r0.clipped;
const r4 = clipped === undefined || clipped;
value = environment.__proto__.__proto__;
return (Module07770Module).default.getBBox(findNodeHandle(env0_0.root), {fill: r7,
stroke: r6, markers: r5, clipped: r4});
}
function getCTM() { // fn#62186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:3444, owner: Shape.getCTM, offset: 0x01b59bde, size: 89 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
const nodeHandle = findNodeHandle(env0_0.root);
const property = (Module07770Module).default;
const binding = env2_10;
value = property.getCTM(nodeHandle);
const value3 = Object.create(binding.prototype, {constructor: {value: binding}});
value = new binding(value);
return value instanceof Object ? value : value3;
}
function getScreenCTM() { // fn#62187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:3533, owner: Shape.getScreenCTM, offset: 0x01b59c37, size: 89 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
const nodeHandle = findNodeHandle(env0_0.root);
const property = (Module07770Module).default;
const binding = env2_10;
value = property.getScreenCTM(nodeHandle);
const value3 = Object.create(binding.prototype, {constructor: {value: binding}});
value = new binding(value);
return value instanceof Object ? value : value3;
}
function isPointInFill(a0) { // fn#62188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:3629, owner: Shape.isPointInFill, offset: 0x01b59c90, size: 69 bytes, params: 2, frame: 14
return (Module07770Module).default.isPointInFill(findNodeHandle(env0_0.root), a0);
}
function isPointInStroke(a0) { // fn#62189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:3720, owner: Shape.isPointInStroke, offset: 0x01b59cd5, size: 69 bytes, params: 2, frame: 14
return (Module07770Module).default.isPointInStroke(findNodeHandle(env0_0.root), a0);
}
function getTotalLength() { // fn#62190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:3812, owner: Shape.getTotalLength, offset: 0x01b59d1a, size: 65 bytes, params: 1, frame: 13
return (Module07770Module).default.getTotalLength(findNodeHandle(env0_0.root));
}
function getPointAtLength(a0) { // fn#62191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:3902, owner: Shape.getPointAtLength, offset: 0x01b59d5b, size: 99 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const nodeHandle = findNodeHandle(env0_0.root);
const property = (Module07770Module).default;
const binding = env2_11;
value = property.getPointAtLength(nodeHandle, {length: a0});
const value3 = Object.create(binding.prototype, {constructor: {value: binding}});
value = new binding(value);
return value instanceof Object ? value : value3;
}
}
}
}
function multiplyMatrices_62160({a, b, c, d, e, f}, {a, b, c, d, e, f}) { // fn#62160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:424, offset: 0x01b5918b, size: 180 bytes, params: 3, frame: 15
return {a: a * a + c * b, c: a * c + c * d, e: a * e + c * f + e, b: b * a + d * b, d: b * c + d * d,
f: b * e + d * f + f};
}
function invert({a, b, c, d, e, f}) { // fn#62161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7946:603, offset: 0x01b5923f, size: 134 bytes, params: 2, frame: 9
let value = a * d;
value -= b * c;
return {a: d / value, b: -b / value, c: -c / value, d: a / value,
e: (c * f - d * e) / value, f: -(a * f - b * e) / value};
}
global.__d(_fun62156, 7768, [15, 17, 18, 6, 7, 31, 27, 7769, 7762, 7770,
7771]) /* metro module 7768, dependencies: [15, 17, 18, 6, 7, 31, 27, 7769, 7762, 7770, 7771] */;