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

489 lines
23 KiB
React

/* Metro module 1695; source: unknown; dependencies: [77, 65, 6, 7, 1635, 1682, 1662, 1621, 1650] */
function _fun18508(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#18508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:6, offset: 0x00e8e4b4, size: 213 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(77) /* metro dependency 77 */;
const env0_3 = importDefault(65) /* metro dependency 65 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
object = {code: "function pnpm_KeyframeTs1(){const{keyframes,delayFunction,delay,withTiming,Easing,withSequence,initialValues,makeKeyframeKey,callback}=this.__closure;const animations={};const addAnimation=function(key){const keyframePoints=keyframes[key];if(keyframePoints.length===0){return;}const animation=delayFunction(delay,keyframePoints.length===1?withTiming(keyframePoints[0].value,{duration:keyframePoints[0].duration,easing:keyframePoints[0].easing?keyframePoints[0].easing:Easing.linear}):withSequence(...keyframePoints.map(function(keyframePoint){return withTiming(keyframePoint.value,{duration:keyframePoint.duration,easing:keyframePoint.easing?keyframePoint.easing:Easing.linear});})));if(key.includes('transform')){if(!('transform'in animations)){animations.transform=[];}animations.transform.push({[key.split(':')[1]]:animation});}else{animations[key]=animation;}};Object.keys(initialValues).forEach(function(key){if(key.includes('transform')){initialValues[key].forEach(function(transformProp,index){Object.keys(transformProp).forEach(function(transformPropKey){addAnimation(makeKeyframeKey(index,transformPropKey));});});}else{addAnimation(key);}});return{animations:animations,initialValues:initialValues,callback:callback};}"};
object = {code: 'function pnpm_KeyframeTs2(delay,animation){const{withDelay,reduceMotion}=this.__closure;return withDelay(delay,animation,reduceMotion);}'};
object = {code: 'function pnpm_KeyframeTs3(_,animation){const{getReduceMotionFromConfig,reduceMotion}=this.__closure;animation.reduceMotion=getReduceMotionFromConfig(reduceMotion);return animation;}'};
const value = _fun18509();
object = {code: 'function makeKeyframeKey_Pnpm_KeyframeTs4(index,transformProp){return index+"_transform:"+transformProp;}'};
const env0_10 = _fun18538();
exports.Keyframe = value;
}
function _fun18509() { // fn#18509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:1720, offset: 0x00e8e589, size: 174 bytes, params: 1, frame: 15
return env0_5(InnerKeyframe, [{key: 'parseDefinitions', value: value_18518}, {key: 'duration', value: function(a0) {
this.durationV = a0;
return this;
}}, {key: 'delay', value: function(a0) {
this.delayV = a0;
return this;
}}, {key: 'withCallback', value: function(a0) {
this.callbackV = a0;
return this;
}}, {key: 'reduceMotion', value: function(a0) {
this.reduceMotionV = a0;
return this;
}}, {key: 'getDelayFunction', value: value_18535}]);
}
function _fun18538() { // fn#18538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:5940, offset: 0x00e8f0bb, size: 46 bytes, params: 1, frame: 2
const closure = function(a0, a1) {
return '' + a0 + '_transform:' + a1;
};
closure.__closure = {};
closure.__workletHash = 11090453666227;
closure.__initData = env0_9;
return closure;
}
function InnerKeyframe(a0) { // fn#18510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:1741, offset: 0x00e8e637, size: 91 bytes, params: 2, frame: 15
env1_4(this, InnerKeyframe);
const ReduceMotion = (require(1635) /* metro dependency 1635 */).ReduceMotion;
const System = ReduceMotion.System;
this.reduceMotionV = System;
this.build = build;
this.definitions = a0;
}
function value_18518() { // fn#18518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:3025, offset: 0x00e8ea56, size: 531 bytes, params: 1, frame: 17
var environment;
var durationV;
var value;
const ReanimatedError = (require(1621) /* metro dependency 1621 */).ReanimatedError;
var property;
var Object;
var keys;
var Array;
const object2 = {};
let definitions = this.definitions;
let from = definitions.from;
if (from) {
definitions = this.definitions;
if (definitions[0]) {
value = environment.__proto__;
throw new ReanimatedError("You cannot provide both keyframe 0 and 'from' as they both specified initial values.");
}
definitions = this.definitions;
from = this.definitions.from;
definitions[0] = from;
definitions = this.definitions;
delete definitions.from;
definitions = this.definitions;
if (definitions.to) {
definitions = this.definitions;
if (definitions[100]) {
value = environment.__proto__;
throw new ReanimatedError("You cannot provide both keyframe 100 and 'to' as they both specified values at the end of the animation.");
}
definitions = this.definitions;
definitions[100] = this.definitions.to;
definitions = this.definitions;
delete definitions.to;
definitions = this.definitions;
if (definitions[0]) {
definitions = this.definitions;
property = definitions[0];
Object = global.Object;
value = Object.keys(property);
value.forEach(_fun18519);
durationV = this.durationV;
value = 500;
durationV = durationV ? this.durationV : value;
Array = global.Array;
from = Array.from;
Object = global.Object;
keys = Object.keys;
definitions = this.definitions;
value = Reflect.apply(from, Array, [Reflect.apply(keys, Object, [definitions])]);
value = value.map(global.Number);
value = value.filter(function(a0) {
return a0 !== 0;
});
value = value.sort(_fun18525);
value.forEach(_fun18526);
return {initialValues: property, keyframes: object2};
}
value = environment.__proto__;
throw new ReanimatedError("Please provide 0 or 'from' keyframe with initial state of your object.");
}
definitions = this.definitions;
if (definitions[0]) {
definitions = this.definitions;
property = definitions[0];
Object = global.Object;
value = Object.keys(property);
value.forEach(_fun18519);
durationV = this.durationV;
value = 500;
durationV = durationV ? this.durationV : value;
Array = global.Array;
from = Array.from;
Object = global.Object;
keys = Object.keys;
definitions = this.definitions;
value = Reflect.apply(from, Array, [Reflect.apply(keys, Object, [definitions])]);
value = value.map(global.Number);
value = value.filter(_fun18524);
value = value.sort(_fun18525);
value.forEach(_fun18526);
return {initialValues: property, keyframes: object2};
}
value = environment.__proto__;
throw new ReanimatedError("Please provide 0 or 'from' keyframe with initial state of your object.");
}
if (this.definitions.to) {
definitions = this.definitions;
if (definitions[100]) {
value = environment.__proto__;
throw new ReanimatedError("You cannot provide both keyframe 100 and 'to' as they both specified values at the end of the animation.");
}
definitions = this.definitions;
definitions[100] = this.definitions.to;
definitions = this.definitions;
delete definitions.to;
definitions = this.definitions;
if (definitions[0]) {
definitions = this.definitions;
property = definitions[0];
Object = global.Object;
value = Object.keys(property);
value.forEach(_fun18519);
durationV = this.durationV;
value = 500;
durationV = durationV ? this.durationV : value;
Array = global.Array;
from = Array.from;
Object = global.Object;
keys = Object.keys;
definitions = this.definitions;
value = Reflect.apply(from, Array, [Reflect.apply(keys, Object, [definitions])]);
value = value.map(global.Number);
value = value.filter(function(a0) {
return a0 !== 0;
});
value = value.sort(_fun18525);
value.forEach(_fun18526);
return {initialValues: property, keyframes: object2};
}
value = environment.__proto__;
throw new ReanimatedError("Please provide 0 or 'from' keyframe with initial state of your object.");
}
definitions = this.definitions;
if (definitions[0]) {
definitions = this.definitions;
property = definitions[0];
Object = global.Object;
value = Object.keys(property);
value.forEach(_fun18519);
durationV = this.durationV;
value = 500;
durationV = durationV ? this.durationV : value;
Array = global.Array;
from = Array.from;
Object = global.Object;
keys = Object.keys;
definitions = this.definitions;
value = Reflect.apply(from, Array, [Reflect.apply(keys, Object, [definitions])]);
value = value.map(global.Number);
value = value.filter(function(a0) {
return a0 !== 0;
});
value = value.sort(_fun18525);
value.forEach(_fun18526);
return {initialValues: property, keyframes: object2};
}
value = environment.__proto__;
throw new ReanimatedError("Please provide 0 or 'from' keyframe with initial state of your object.");
}
function value_18535() { // fn#18535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:5329, offset: 0x00e8ef91, size: 191 bytes, params: 1, frame: 16
var environment;
var r0;
var closure;
var object2;
var value;
const delayV = this.delayV;
const reduceMotionV = this.reduceMotionV;
if (delayV) {
closure = pnpm_KeyframeTs2;
object2 = {};
value = environment.__proto__;
object2.withDelay = (require(1682) /* metro dependency 1682 */).withDelay;
object2.reduceMotion = reduceMotionV;
closure.__closure = object2;
closure.__workletHash = 6884672498893;
closure.__initData = env1_7;
r0 = closure;
} else {
closure = pnpm_KeyframeTs3;
object2 = {};
value = environment.__proto__;
object2.getReduceMotionFromConfig = (require(1650) /* metro dependency 1650 */).getReduceMotionFromConfig;
object2.reduceMotion = reduceMotionV;
closure.__closure = object2;
closure.__workletHash = 14632587413843;
closure.__initData = env1_8;
r0 = closure;
}
return r0;
}
function InnerKeyframeBuild() { // fn#18511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:1858, owner: InnerKeyframe.build, offset: 0x00e8e692, size: 261 bytes, params: 1, frame: 20
var environment;
var closure;
var object2;
var value3;
let binding = env0_0;
const delayV = binding.delayV;
var env0_0 = delayV;
const delayFunction = binding.getDelayFunction();
const definitions = binding.parseDefinitions();
if (!binding.parsedAnimation) {
binding = env0_0;
closure = function() {
var env0_1 = _fun18513;
var Object = global.Object;
var initialValuesBinding = initialValues;
Object.keys(initialValuesBinding).forEach(_fun18515);
return {animations: {}, initialValues: initialValuesBinding, callback: callbackV};
};
object2 = {keyframes: definitions.keyframes, delayFunction: delayFunction, delay: delayV};
value3 = environment.__proto__.__proto__;
object2.withTiming = (require(1682) /* metro dependency 1682 */).withTiming;
object2.Easing = (require(1662) /* metro dependency 1662 */).Easing;
object2.withSequence = (require(1682) /* metro dependency 1682 */).withSequence;
object2.initialValues = definitions.initialValues;
object2.makeKeyframeKey = env2_10;
object2.callback = binding.callbackV;
closure.__closure = object2;
closure.__workletHash = 2209924843920;
closure.__initData = env2_6;
binding.parsedAnimation = closure;
}
return env0_0.parsedAnimation;
}
function _fun18519(a0) { // fn#18519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:3756, offset: 0x00e8ec69, size: 95 bytes, params: 2, frame: 12
var Array;
if (a0 === 'transform') {
Array = global.Array;
if (Array.isArray(env0_2.transform)) {
env0_2.transform.forEach(function(a0, a1) {
var env0_0 = a1;
var Object = global.Object;
Object.keys(a0).forEach(_fun18521);
});
return undefined;
}
} else {
env0_1[a0] = [];
}
}
function getAnimationDuration(a0, a1) { // fn#18522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:4030, owner: value_18518.getAnimationDuration, offset: 0x00e8ed23, size: 59 bytes, params: 3, frame: 14
let value = a1 / 100;
value *= durationV;
const property = env0_1[a0];
return value - property.reduce(function(a0, a1) {
return a0 + a1.duration;
}, 0);
}
function _fun18526(a0) { // fn#18526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:4221, offset: 0x00e8ed6f, size: 163 bytes, params: 2, frame: 12
var environment;
var value;
const ReanimatedError = (require(1621) /* metro dependency 1621 */).ReanimatedError;
const env0_0 = a0;
if (a0 < 0) {
value = environment.__proto__.__proto__;
throw new ReanimatedError('Keyframe should be in between range 0 - 100.');
}
if (a0 > 100) {
value = environment.__proto__.__proto__;
throw new ReanimatedError('Keyframe should be in between range 0 - 100.');
}
const property = env0_0.definitions[a0];
const env0_2 = property.easing;
delete property.easing;
const Object = global.Object;
Object.keys(property).forEach(_fun18528);
}
function pnpm_KeyframeTs2(a0, a1) { // fn#18536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:5412, owner: value_18535.pnpm_KeyframeTs2, offset: 0x00e8f050, size: 53 bytes, params: 3, frame: 15
let value = environment.__proto__.__proto__;
value = require(1682) /* metro dependency 1682 */;
return value.withDelay(a0, a1, reduceMotionV);
}
function pnpm_KeyframeTs3(a0, a1) { // fn#18537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:5585, owner: value_18535.pnpm_KeyframeTs3, offset: 0x00e8f085, size: 54 bytes, params: 3, frame: 12
let value = environment.__proto__.__proto__;
value = require(1650) /* metro dependency 1650 */;
const getReduceMotionFromConfig = value.getReduceMotionFromConfig;
a1.reduceMotion = Reflect.apply(getReduceMotionFromConfig, value, [reduceMotionV]);
return a1;
}
function parsedAnimation() { // fn#18512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:2027, owner: InnerKeyframe.build.parsedAnimation, offset: 0x00e8e797, size: 80 bytes, params: 1, frame: 14
const Object = global.Object;
const keys = Object.keys;
const initialValuesBinding = initialValues;
Reflect.apply(keys, Object, [initialValuesBinding]).forEach(_fun18515);
return {animations: {}, initialValues: initialValuesBinding, callback: callbackV};
}
function _fun18520(a0, a1) { // fn#18520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:3847, offset: 0x00e8ecc8, size: 49 bytes, params: 3, frame: 12
const env0_0 = a1;
const Object = global.Object;
Object.keys(a0).forEach(_fun18521);
}
function addKeyPointWith(a0, a1) { // fn#18527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:4386, offset: 0x00e8ee12, size: 179 bytes, params: 3, frame: 18
var property;
var push;
let object2 = {key: a0, value: a1};
object2.currentKeyPoint = env0_0;
object2.easing = easing;
const key = object2.key;
if (key in env1_1) {
property = env1_1[key];
push = property.push;
object2 = {};
object2.duration = getAnimationDuration(key, object2.currentKeyPoint);
object2.value = object2.value;
object2.easing = object2.easing;
Reflect.apply(push, property, [object2]);
return undefined;
}
const value = environment.__proto__.__proto__.__proto__;
const ReanimatedError = (require(1621) /* metro dependency 1621 */).ReanimatedError;
throw new ReanimatedError("Keyframe can contain only that set of properties that were provide with initial values (keyframe 0 or 'from')");
}
function _fun18528(a0) { // fn#18528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:4777, offset: 0x00e8eec5, size: 103 bytes, params: 2, frame: 13
var Array;
if (a0 === 'transform') {
Array = global.Array;
if (Array.isArray(env0_1.transform)) {
env0_1.transform.forEach(function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
var Object = global.Object;
Object.keys(a0).forEach(_fun18530);
});
return undefined;
}
} else {
addKeyPointWith(a0, env0_1[a0]);
}
}
function addAnimation(a0) { // fn#18513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:2066, owner: InnerKeyframe.build.parsedAnimation.addAnimation, offset: 0x00e8e7e7, size: 356 bytes, params: 2, frame: 25
var environment;
var r0;
var binding;
var delayVBinding;
var withSequence;
var moduleValue;
var withTiming;
var value2;
var object2;
var value3;
var transform;
var push;
var value5;
let value = environment.__proto__;
const property = keyframes[a0];
if (property.length !== 0) {
binding = env1_1;
delayVBinding = delayV;
if (property.length === 1) {
value = environment.__proto__.__proto__.__proto__.__proto__;
moduleValue = require(1682) /* metro dependency 1682 */;
withTiming = moduleValue.withTiming;
value2 = property[0].value;
object2 = {};
object2.duration = property[0].duration;
object2.easing = property[0].easing || (require(1662) /* metro dependency 1662 */).Easing.linear;
value = Reflect.apply(withTiming, moduleValue, [value2, object2]);
r0 = value;
} else {
value = environment.__proto__.__proto__.__proto__.__proto__;
withSequence = (require(1682) /* metro dependency 1682 */).withSequence;
value = withSequence.apply(undefined, env4_3(property.map(function(a0) {
var moduleValue = require(dependencyMap[5]);
var withTiming = moduleValue.withTiming;
var value2 = a0.value;
var object = {duration: a0.duration};
object.easing = a0.easing || require(dependencyMap[6]).Easing.linear;
return Reflect.apply(withTiming, moduleValue, [value2, object]);
})));
r0 = value;
}
value = binding(delayVBinding, r0);
value3 = a0.includes('transform');
binding = env0_0;
if (value3) {
if (!('transform' in binding)) {
env0_0.transform = [];
}
transform = env0_0.transform;
push = transform.push;
value5 = environment.__proto__.__proto__.__proto__.__proto__;
binding = env4_2;
Reflect.apply(push, transform, [binding({}, a0.split(':')[1], value)]);
} else {
binding[a0] = value;
}
}
}
function _fun18515(a0) { // fn#18515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:2558, offset: 0x00e8e9ba, size: 68 bytes, params: 2, frame: 11
var environment;
var value;
if (a0.includes('transform')) {
value = environment.__proto__;
initialValues[a0].forEach(function(a0, a1) {
var env0_0 = a1;
var Object = global.Object;
Object.keys(a0).forEach(_fun18517);
});
} else {
addAnimation(a0);
}
}
function _fun18521(a0) { // fn#18521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:3885, offset: 0x00e8ecf9, size: 42 bytes, params: 2, frame: 14
let value = environment.__proto__.__proto__;
const binding = env2_1;
value = environment.__proto__.__proto__.__proto__.__proto__;
binding[env4_10(require, a0)] = [];
}
function _fun18529(a0, a1) { // fn#18529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:4868, offset: 0x00e8ef2c, size: 53 bytes, params: 3, frame: 12
const env0_0 = a0;
const env0_1 = a1;
const Object = global.Object;
Object.keys(a0).forEach(_fun18530);
}
function _fun18516(a0, a1) { // fn#18516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:2608, offset: 0x00e8e9fe, size: 49 bytes, params: 3, frame: 12
const env0_0 = a1;
const Object = global.Object;
Object.keys(a0).forEach(_fun18517);
}
function _fun18530(a0) { // fn#18530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:4906, offset: 0x00e8ef61, size: 48 bytes, params: 2, frame: 15
addKeyPointWith(env5_10(require, a0), env0_0[a0]);
}
function _fun18517(a0) { // fn#18517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1822:2646, offset: 0x00e8ea2f, size: 39 bytes, params: 2, frame: 14
addAnimation(env6_10(require, a0));
}