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

700 lines
42 KiB
React

/* Metro module 1650; source: unknown; dependencies: [65, 1613, 1635, 1621, 1651, 1652, 1653, 1617] */
function _fun18041(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#18041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:6, offset: 0x00e7de89, size: 514 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(65) /* metro dependency 65 */;
let value = require(1613) /* metro dependency 1613 */;
value = value.shouldBeUseWeb();
const env0_5 = {'originX': true, 'originY': true, 'width': true, 'height': true, 'borderRadius': true,
'globalOriginX': true, 'globalOriginY': true, 'opacity': true, 'transform': true, 'backgroundColor': true};
object = {code: 'function isValidLayoutAnimationProp_Pnpm_utilTs1(prop){const{LAYOUT_ANIMATION_SUPPORTED_PROPS}=this.__closure;return prop in LAYOUT_ANIMATION_SUPPORTED_PROPS;}'};
let value2 = _fun18042();
object = {code: "function assertEasingIsWorklet_Pnpm_utilTs2(easing){const{SHOULD_BE_USE_WEB,isWorkletFunction}=this.__closure;if(_WORKLET){return;}if(SHOULD_BE_USE_WEB){return;}if(easing!==null&&easing!==void 0&&easing.factory){return;}if(!isWorkletFunction(easing)){throw new ReanimatedError('The easing function is not a worklet. Please make sure you import `Easing` from react-native-reanimated.');}}"};
const value3 = _fun18044();
object = {code: 'function recognizePrefixSuffix_Pnpm_utilTs3(value){if(typeof value===\'string\'){var _match$;const match=value.match(/([A-Za-z]*)(-?\\d*\\.?\\d*)([eE][-+]?[0-9]+)?([A-Za-z%]*)/);if(!match){throw new ReanimatedError("Couldn\'t parse animation value.");}const prefix=match[1];const suffix=match[4];const number=match[2]+((_match$=match[3])!==null&&_match$!==void 0?_match$:\'\');return{prefix:prefix,suffix:suffix,strippedValue:parseFloat(number)};}else{return{strippedValue:value};}}'};
const value4 = _fun18046();
const ReducedMotionManager = (require(1651) /* metro dependency 1651 */).ReducedMotionManager;
const env0_10 = ReducedMotionManager.uiValue;
object = {code: 'function getReduceMotionFromConfig_Pnpm_utilTs4(config){const{ReduceMotion,isReduceMotionOnUI}=this.__closure;return!config||config===ReduceMotion.System?isReduceMotionOnUI.value:config===ReduceMotion.Always;}'};
const value5 = _fun18048();
object = {code: 'function getReduceMotionForAnimation_Pnpm_utilTs5(config){const{getReduceMotionFromConfig}=this.__closure;if(!config){return undefined;}return getReduceMotionFromConfig(config);}'};
const value6 = _fun18050();
object = {code: 'function applyProgressToMatrix_Pnpm_utilTs6(progress,a,b){const{addMatrices,scaleMatrix,subtractMatrices}=this.__closure;return addMatrices(a,scaleMatrix(subtractMatrices(b,a),progress));}'};
const env0_15 = _fun18052();
object = {code: 'function applyProgressToNumber_Pnpm_utilTs7(progress,a,b){return a+progress*(b-a);}'};
const env0_17 = _fun18054();
object = {code: "function decorateAnimation_Pnpm_utilTs8(animation){const{getReduceMotionFromConfig,recognizePrefixSuffix,isColor,toLinearSpace,convertToRGBA,clampRGBA,rgbaArrayToRGBAColor,toGammaSpace,decomposeMatrixIntoMatricesAndAngles,applyProgressToMatrix,applyProgressToNumber,getRotationMatrix,multiplyMatrices,flatten,isAffineMatrixFlat}=this.__closure;const baseOnStart=animation.onStart;const baseOnFrame=animation.onFrame;if(animation.isHigherOrder){animation.onStart=function(animation,value,timestamp,previousAnimation){if(animation.reduceMotion===undefined){animation.reduceMotion=getReduceMotionFromConfig();}return baseOnStart(animation,value,timestamp,previousAnimation);};return;}const animationCopy=Object.assign({},animation);delete animationCopy.callback;const prefNumberSuffOnStart=function(animation,value,timestamp,previousAnimation){var _animation$__prefix,_animation$__suffix;const{prefix:prefix,suffix:suffix,strippedValue:strippedValue}=recognizePrefixSuffix(value);animation.__prefix=prefix;animation.__suffix=suffix;animation.strippedCurrent=strippedValue;const{strippedValue:strippedToValue}=recognizePrefixSuffix(animation.toValue);animation.current=strippedValue;animation.startValue=strippedValue;animation.toValue=strippedToValue;if(previousAnimation&&previousAnimation!==animation){const{prefix:paPrefix,suffix:paSuffix,strippedValue:paStrippedValue}=recognizePrefixSuffix(previousAnimation.current);previousAnimation.current=paStrippedValue;previousAnimation.__prefix=paPrefix;previousAnimation.__suffix=paSuffix;}baseOnStart(animation,strippedValue,timestamp,previousAnimation);animation.current=((_animation$__prefix=animation.__prefix)!==null&&_animation$__prefix!==void 0?_animation$__prefix:'')+animation.current+((_animation$__suffix=animation.__suffix)!==null&&_animation$__suffix!==void 0?_animation$__suffix:'');if(previousAnimation&&previousAnimation!==animation){var _previousAnimation$__,_previousAnimation$__2;previousAnimation.current=((_previousAnimation$__=previousAnimation.__prefix)!==null&&_previousAnimation$__!==void 0?_previousAnimation$__:'')+previousAnimation.current+((_previousAnimation$__2=previousAnimation.__suffix)!==null&&_previousAnimation$__2!==void 0?_previousAnimation$__2:'');}};const prefNumberSuffOnFrame=function(animation,timestamp){var _animation$__prefix2,_animation$__suffix2;animation.current=animation.strippedCurrent;const res=baseOnFrame(animation,timestamp);animation.strippedCurrent=animation.current;animation.current=((_animation$__prefix2=animation.__prefix)!==null&&_animation$__prefix2!==void 0?_animation$__prefix2:'')+animation.current+((_animation$__suffix2=animation.__suffix)!==null&&_animation$__suffix2!==void 0?_animation$__suffix2:'');return res;};const tab=['R','G','B','A'];const colorOnStart=function(animation,value,timestamp,previousAnimation){let RGBAValue;let RGBACurrent;let RGBAToValue;const res=[];if(isColor(value)){RGBACurrent=toLinearSpace(convertToRGBA(animation.current));RGBAValue=toLinearSpace(convertToRGBA(value));if(animation.toValue){RGBAToValue=toLinearSpace(convertToRGBA(animation.toValue));}}tab.forEach(function(i,index){animation[i]=Object.assign({},animationCopy);animation[i].current=RGBACurrent[index];animation[i].toValue=RGBAToValue?RGBAToValue[index]:undefined;animation[i].onStart(animation[i],RGBAValue[index],timestamp,previousAnimation?previousAnimation[i]:undefined);res.push(animation[i].current);});animation.unroundedCurrent=res;clampRGBA(res);animation.current=rgbaArrayToRGBAColor(toGammaSpace(res));};const colorOnFrame=function(animation,timestamp){const res=[];let finished=true;animation.current=animation.nonscaledCurrent;tab.forEach(function(i){const result=animation[i].onFrame(animation[i],timestamp);finished=finished&&result;res.push(animation[i].current);});clampRGBA(res);animation.nonscaledCurrent=res;animation.current=rgbaArrayToRGBAColor(toGammaSpace(res));return finished;};const transformationMatrixOnStart=function(animation,value,timestamp,previousAnimation){const toValue=animation.toValue;animation.startMatrices=decomposeMatrixIntoMatricesAndAngles(value);animation.stopMatrices=decomposeMatrixIntoMatricesAndAngles(toValue);animation[0]=Object.assign({},animationCopy);animation[0].current=0;animation[0].toValue=100;animation[0].onStart(animation[0],0,timestamp,previousAnimation?previousAnimation[0]:undefined);animation.current=value;};const transformationMatrixOnFrame=function(animation,timestamp){let finished=true;const result=animation[0].onFrame(animation[0],timestamp);finished=finished&&result;const progress=animation[0].current/100;const transforms=['translationMatrix','scaleMatrix','skewMatrix'];const mappedTransforms=[];transforms.forEach(function(key,_){return mappedTransforms.push(applyProgressToMatrix(progress,animation.startMatrices[key],animation.stopMatrices[key]));});const[currentTranslation,currentScale,skewMatrix]=mappedTransforms;const rotations=['x','y','z'];const mappedRotations=[];rotations.forEach(function(key,_){const angle=applyProgressToNumber(progress,animation.startMatrices['r'+key],animation.stopMatrices['r'+key]);mappedRotations.push(getRotationMatrix(angle,key));});const[rotationMatrixX,rotationMatrixY,rotationMatrixZ]=mappedRotations;const rotationMatrix=multiplyMatrices(rotationMatrixX,multiplyMatrices(rotationMatrixY,rotationMatrixZ));const updated=flatten(multiplyMatrices(multiplyMatrices(currentScale,multiplyMatrices(skewMatrix,rotationMatrix)),currentTranslation));animation.current=updated;return finished;};const arrayOnStart=function(animation,value,timestamp,previousAnimation){value.forEach(function(v,i){animation[i]=Object.assign({},animationCopy);animation[i].current=v;animation[i].toValue=animation.toValue[i];animation[i].onStart(animation[i],v,timestamp,previousAnimation?previousAnimation[i]:undefined);});animation.current=[...value];};const arrayOnFrame=function(animation,timestamp){let finished=true;animation.current.forEach(function(_,i){const result=animation[i].onFrame(animation[i],timestamp);finished=finished&&result;animation.current[i]=animation[i].current;});return finished;};const objectOnStart=function(animation,value,timestamp,previousAnimation){for(const key in value){animation[key]=Object.assign({},animationCopy);animation[key].onStart=animation.onStart;animation[key].current=value[key];animation[key].toValue=animation.toValue[key];animation[key].onStart(animation[key],value[key],timestamp,previousAnimation?previousAnimation[key]:undefined);}animation.current=value;};const objectOnFrame=function(animation,timestamp){let finished=true;const newObject={};for(const key in animation.current){const result=animation[key].onFrame(animation[key],timestamp);finished=finished&&result;newObject[key]=animation[key].current;}animation.current=newObject;return finished;};animation.onStart=function(animation,value,timestamp,previousAnimation){if(animation.reduceMotion===undefined){animation.reduceMotion=getReduceMotionFromConfig();}if(animation.reduceMotion){if(animation.toValue!==undefined){animation.current=animation.toValue;}else{baseOnStart(animation,value,timestamp,previousAnimation);}animation.startTime=0;animation.onFrame=function(){return true;};return;}if(isColor(value)){colorOnStart(animation,value,timestamp,previousAnimation);animation.onFrame=colorOnFrame;return;}else if(isAffineMatrixFlat(value)){transformationMatrixOnStart(animation,value,timestamp,previousAnimation);animation.onFrame=transformationMatrixOnFrame;return;}else if(Array.isArray(value)){arrayOnStart(animation,value,timestamp,previousAnimation);animation.onFrame=arrayOnFrame;return;}else if(typeof value==='string'){prefNumberSuffOnStart(animation,value,timestamp,previousAnimation);animation.onFrame=prefNumberSuffOnFrame;return;}else if(typeof value==='object'&&value!==null){objectOnStart(animation,value,timestamp,previousAnimation);animation.onFrame=objectOnFrame;return;}baseOnStart(animation,value,timestamp,previousAnimation);};}"};
const env0_19 = _fun18056();
object = {code: "function defineAnimation_Pnpm_utilTs9(starting,factory){const{IN_STYLE_UPDATER,decorateAnimation,SHOULD_BE_USE_WEB}=this.__closure;if(IN_STYLE_UPDATER){return starting;}const create=function(){'worklet';const animation=factory();decorateAnimation(animation);return animation;};if(_WORKLET||SHOULD_BE_USE_WEB){return create();}create.__isAnimationDefinition=true;return create;}"};
object = {code: 'function pnpm_utilTs10(){const{factory,decorateAnimation}=this.__closure;const animation=factory();decorateAnimation(animation);return animation;}'};
const value7 = _fun18074();
object = {code: "function cancelAnimationNative_Pnpm_utilTs11(sharedValue){const{runOnUI}=this.__closure;if(_WORKLET){sharedValue.value=sharedValue.value;}else{runOnUI(function(){'worklet';sharedValue.value=sharedValue.value;})();}}"};
object = {code: 'function pnpm_utilTs12(){const{sharedValue}=this.__closure;sharedValue.value=sharedValue.value;}'};
const r1 = value ? function(a0) {
a0.value = a0.value;
} : _fun18077();
exports.isValidLayoutAnimationProp = value2;
exports.assertEasingIsWorklet = value3;
exports.initialUpdaterRun = function(a0) {
env0_3 = true;
var value2 = a0();
env0_3 = false;
return value2;
};
exports.recognizePrefixSuffix = value4;
exports.getReduceMotionFromConfig = value5;
exports.getReduceMotionForAnimation = value6;
exports.defineAnimation = value7;
exports.cancelAnimation = r1;
}
function _fun18042() { // fn#18042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:452, offset: 0x00e7e08b, size: 57 bytes, params: 1, frame: 4
const closure = isValidLayoutAnimationProp;
closure.__closure = {LAYOUT_ANIMATION_SUPPORTED_PROPS: env0_5};
closure.__workletHash = 13235833688548;
closure.__initData = env0_6;
return closure;
}
function _fun18044() { // fn#18044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:1030, offset: 0x00e7e0d4, size: 88 bytes, params: 1, frame: 14
const closure = assertEasingIsWorklet;
const object2 = {};
object2.SHOULD_BE_USE_WEB = env0_4;
object2.isWorkletFunction = (require(1635) /* metro dependency 1635 */).isWorkletFunction;
closure.__closure = object2;
closure.__workletHash = 8431488219943;
closure.__initData = env0_7;
return closure;
}
function _fun18046() { // fn#18046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:1927, offset: 0x00e7e1b1, size: 46 bytes, params: 1, frame: 2
const closure = recognizePrefixSuffix;
closure.__closure = {};
closure.__workletHash = 11076682371077;
closure.__initData = env0_8;
return closure;
}
function _fun18048() { // fn#18048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:2611, offset: 0x00e7e29f, size: 90 bytes, params: 1, frame: 14
const closure = function(a0) {
return a0 && a0 !== require(dependencyMap[2]).ReduceMotion.System ? a0 === require(dependencyMap[2]).ReduceMotion.Always : uiValue.value;
};
const ReduceMotion = (require(1635) /* metro dependency 1635 */).ReduceMotion;
closure.__closure = {ReduceMotion: ReduceMotion, isReduceMotionOnUI: uiValue};
closure.__workletHash = 7977910521960;
closure.__initData = env0_11;
return closure;
}
function _fun18050() { // fn#18050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:3067, offset: 0x00e7e359, size: 55 bytes, params: 1, frame: 4
const closure = getReduceMotionForAnimation;
closure.__closure = {getReduceMotionFromConfig: env0_12};
closure.__workletHash = 10866808344662;
closure.__initData = env0_13;
return closure;
}
function _fun18052() { // fn#18052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:3443, offset: 0x00e7e3a8, size: 119 bytes, params: 1, frame: 16
const closure = applyProgressToMatrix;
const object2 = {};
object2.addMatrices = (require(1652) /* metro dependency 1652 */).addMatrices;
object2.scaleMatrix = (require(1652) /* metro dependency 1652 */).scaleMatrix;
object2.subtractMatrices = (require(1652) /* metro dependency 1652 */).subtractMatrices;
closure.__closure = object2;
closure.__workletHash = 4822273347900;
closure.__initData = env0_14;
return closure;
}
function _fun18054() { // fn#18054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:3856, offset: 0x00e7e479, size: 46 bytes, params: 1, frame: 2
const closure = function(a0, a1, a2) {
return a1 + a0 * (a2 - a1);
};
closure.__closure = {};
closure.__workletHash = 954128472665;
closure.__initData = env0_16;
return closure;
}
function _fun18056() { // fn#18056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:11983, offset: 0x00e7e4a7, size: 322 bytes, params: 1, frame: 16
const closure = decorateAnimation;
const object2 = {};
object2.getReduceMotionFromConfig = env0_12;
object2.recognizePrefixSuffix = env0_9;
object2.isColor = (require(1653) /* metro dependency 1653 */).isColor;
object2.toLinearSpace = (require(1653) /* metro dependency 1653 */).toLinearSpace;
object2.convertToRGBA = (require(1653) /* metro dependency 1653 */).convertToRGBA;
object2.clampRGBA = (require(1653) /* metro dependency 1653 */).clampRGBA;
object2.rgbaArrayToRGBAColor = (require(1653) /* metro dependency 1653 */).rgbaArrayToRGBAColor;
object2.toGammaSpace = (require(1653) /* metro dependency 1653 */).toGammaSpace;
object2.decomposeMatrixIntoMatricesAndAngles = (require(1652) /* metro dependency 1652 */).decomposeMatrixIntoMatricesAndAngles;
object2.applyProgressToMatrix = env0_15;
object2.applyProgressToNumber = env0_17;
const getRotationMatrix = (require(1652) /* metro dependency 1652 */).getRotationMatrix;
object2.getRotationMatrix = getRotationMatrix;
object2.multiplyMatrices = (require(1652) /* metro dependency 1652 */).multiplyMatrices;
object2.flatten = (require(1652) /* metro dependency 1652 */).flatten;
object2.isAffineMatrixFlat = (require(1652) /* metro dependency 1652 */).isAffineMatrixFlat;
closure.__closure = object2;
closure.__workletHash = 6240615473022;
closure.__initData = env0_18;
return closure;
}
function _fun18074() { // fn#18074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:16944, offset: 0x00e7f1b7, size: 75 bytes, params: 1, frame: 4
const closure = defineAnimation;
closure.__closure = {IN_STYLE_UPDATER: env0_3, decorateAnimation: env0_19, SHOULD_BE_USE_WEB: env0_4};
closure.__workletHash = 8998026617746;
closure.__initData = env0_20;
return closure;
}
function _fun18077() { // fn#18077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:17682, offset: 0x00e7f291, size: 79 bytes, params: 1, frame: 14
const closure = cancelAnimationNative;
const object2 = {};
object2.runOnUI = (require(1617) /* metro dependency 1617 */).runOnUI;
closure.__closure = object2;
closure.__workletHash = 796831326214;
closure.__initData = env0_22;
return closure;
}
function isValidLayoutAnimationProp(a0) { // fn#18043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:469, offset: 0x00e7e0c4, size: 16 bytes, params: 2, frame: 2
return a0 in env1_5;
}
function assertEasingIsWorklet(a0) { // fn#18045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:1047, offset: 0x00e7e12c, size: 133 bytes, params: 2, frame: 13
var moduleValue;
const ReanimatedError = (require(1621) /* metro dependency 1621 */).ReanimatedError;
if (global._WORKLET) {
return undefined;
}
const value = environment.__proto__;
if (env1_4) {
return undefined;
}
if (a0 == null) {
moduleValue = require(1635) /* metro dependency 1635 */;
if (moduleValue.isWorkletFunction(a0)) {
return undefined;
}
throw new ReanimatedError('The easing function is not a worklet. Please make sure you import `Easing` from react-native-reanimated.');
}
if (a0.factory) {
return undefined;
}
moduleValue = require(1635) /* metro dependency 1635 */;
if (moduleValue.isWorkletFunction(a0)) {
return undefined;
}
throw new ReanimatedError('The easing function is not a worklet. Please make sure you import `Easing` from react-native-reanimated.');
}
function recognizePrefixSuffix(a0) { // fn#18047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:1944, offset: 0x00e7e1df, size: 192 bytes, params: 2, frame: 14
var object2;
var value;
var property;
var property2;
var property3;
var property4;
if (typeof a0 === 'string') {
value = a0.match(RegExp('([A-Za-z]*)(-?\\d*\\.?\\d*)([eE][-+]?[0-9]+)?([A-Za-z%]*)', ''));
if (value) {
property = value[1];
property2 = value[4];
property3 = value[2];
property4 = value[3];
value = '';
value = property3 + (property4 ?? value);
object2 = {prefix: property, suffix: property2};
object2.strippedValue = global.parseFloat(value);
return object2;
}
value = environment.__proto__;
throw new (require(1621) /* metro dependency 1621 */).ReanimatedError("Couldn't parse animation value.");
}
return {strippedValue: a0};
}
function getReduceMotionForAnimation(a0) { // fn#18051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:3084, offset: 0x00e7e390, size: 24 bytes, params: 2, frame: 11
var value;
if (a0) {
value = environment.__proto__;
return env1_12(a0);
}
}
function applyProgressToMatrix(a0, a1, a2) { // fn#18053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:3460, offset: 0x00e7e41f, size: 90 bytes, params: 4, frame: 18
let value = environment.__proto__;
value = require(1652) /* metro dependency 1652 */;
const addMatrices = value.addMatrices;
const moduleValue = require(1652) /* metro dependency 1652 */;
return Reflect.apply(addMatrices, value, [a1, moduleValue.scaleMatrix(moduleValue.subtractMatrices(a2, a1), a0)]);
}
function decorateAnimation(a0) { // fn#18057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:12000, offset: 0x00e7e5e9, size: 151 bytes, params: 2, frame: 14
const env0_0 = a0.onStart;
const env0_1 = a0.onFrame;
if (a0.isHigherOrder) {
a0.onStart = onStart_18058;
} else {
delete global.Object.assign({}, a0).callback;
var env0_4 = ['R', 'G', 'B', 'A'];
var objectOnFrame = function(a0, a1) {
var r3;
var r6;
var r10;
var r0;
var propertyName;
var propertyName2;
var property;
var object = {};
var current = a0.current;
var value = true;
var properties = Object.keys(current);
var properties2 = 0;
var properties3 = properties.length;
if (properties === undefined) {
r0 = value;
} else {
r3 = value;
r6 = properties2;
while (true) {
propertyName = properties[r6];
propertyName2 = r6 + 1;
if (propertyName === undefined) {
r0 = r3;
break;
}
property = a0[propertyName];
value = property.onFrame(a0[propertyName], a1);
if (r3) {
r10 = value;
continue;
}
r10 = r3;
continue;
object[propertyName] = a0[propertyName].current;
r3 = r10;
r6 = propertyName2;
}
}
a0.current = object;
return r0;
};
a0.onStart = onStart_18068;
}
}
function defineAnimation(a0, a1) { // fn#18075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:16961, offset: 0x00e7f202, size: 116 bytes, params: 3, frame: 11
var environment;
var r0;
const env0_0 = a1;
const value = environment.__proto__;
if (env1_3) {
return a0;
}
const closure = pnpm_utilTs10;
closure.__closure = {factory: a1, decorateAnimation: env1_19};
closure.__workletHash = 9825023081203;
closure.__initData = env1_21;
if (global._WORKLET) {
r0 = closure();
} else if (env1_4) {
r0 = closure();
} else {
closure.__isAnimationDefinition = true;
r0 = closure;
}
return r0;
}
function cancelAnimationNative(a0) { // fn#18078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:17699, offset: 0x00e7f2e0, size: 121 bytes, params: 2, frame: 16
var environment;
var value;
var moduleValue;
var runOnUI;
var closure;
const env0_0 = a0;
if (global._WORKLET) {
a0.value = a0.value;
} else {
value = environment.__proto__;
moduleValue = require(1617) /* metro dependency 1617 */;
runOnUI = moduleValue.runOnUI;
closure = pnpm_utilTs12;
closure.__closure = {sharedValue: a0};
closure.__workletHash = 14261344384038;
closure.__initData = env1_23;
Reflect.apply(runOnUI, moduleValue, [closure])();
}
}
function decorateAnimationOnStart(a0, a1, a2, a3) { // fn#18058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:12087, owner: decorateAnimation.onStart, offset: 0x00e7e680, size: 59 bytes, params: 5, frame: 17
var value;
if (a0.reduceMotion === undefined) {
value = environment.__proto__.__proto__;
a0.reduceMotion = env2_12();
}
return onStart(a0, a1, a2, a3);
}
function prefNumberSuffOnFrame(a0, a1) { // fn#18059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:12225, owner: decorateAnimation.prefNumberSuffOnFrame, offset: 0x00e7e6bb, size: 106 bytes, params: 3, frame: 16
a0.current = a0.strippedCurrent;
const value = onFrame(a0, a1);
a0.strippedCurrent = a0.current;
const __prefix = a0.__prefix;
const value2 = '';
a0.current = (__prefix ?? value2) + a0.current + (a0.__suffix ?? value2);
return value;
}
function colorOnFrame(a0, a1) { // fn#18060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:12446, owner: decorateAnimation.colorOnFrame, offset: 0x00e7e725, size: 158 bytes, params: 3, frame: 17
var environment;
const env0_0 = a0;
const env0_1 = a1;
const items2 = [];
const env0_3 = true;
a0.current = a0.nonscaledCurrent;
env0_4.forEach(_fun18061);
let value = environment.__proto__.__proto__;
(require(1653) /* metro dependency 1653 */).clampRGBA(items2);
a0.nonscaledCurrent = items2;
value = require(1653) /* metro dependency 1653 */;
const rgbaArrayToRGBAColor = value.rgbaArrayToRGBAColor;
const moduleValue = require(1653) /* metro dependency 1653 */;
a0.current = Reflect.apply(rgbaArrayToRGBAColor, value, [moduleValue.toGammaSpace(items2)]);
return env0_3;
}
function transformationMatrixOnFrame(a0, a1) { // fn#18062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:12715, owner: decorateAnimation.transformationMatrixOnFrame, offset: 0x00e7e812, size: 299 bytes, params: 3, frame: 25
const env0_0 = a0;
let property = a0[0];
const value = property.onFrame(a0[0], a1);
const env0_1 = a0[0].current / 100;
let items2 = [];
['translationMatrix', 'scaleMatrix', 'skewMatrix'].forEach(_fun18063);
property = items2[0];
const property2 = items2[1];
const property3 = items2[2];
items2 = [];
['x', 'y', 'z'].forEach(_fun18064);
const property4 = items2[0];
const property5 = items2[1];
const property6 = items2[2];
const moduleValue = require(1652) /* metro dependency 1652 */;
let multiplyMatrices = moduleValue.multiplyMatrices;
const moduleValue2 = moduleValue;
const value3 = Reflect.apply(multiplyMatrices, moduleValue, [property4, moduleValue2.multiplyMatrices(property5,
property6)]);
const moduleValue3 = moduleValue;
const flatten = moduleValue3.flatten;
const moduleValue4 = moduleValue;
multiplyMatrices = moduleValue4.multiplyMatrices;
const moduleValue5 = moduleValue;
const multiplyMatrices3 = moduleValue5.multiplyMatrices;
const moduleValue6 = moduleValue;
a0.current = Reflect.apply(flatten, moduleValue3, [Reflect.apply(multiplyMatrices, moduleValue4,
[Reflect.apply(multiplyMatrices3, moduleValue5, [property2, moduleValue6.multiplyMatrices(property3, value3)]),
property])]);
return value;
}
function arrayOnFrame(a0, a1) { // fn#18065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:13335, owner: decorateAnimation.arrayOnFrame, offset: 0x00e7e9ed, size: 48 bytes, params: 3, frame: 12
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = true;
a0.current.forEach(_fun18066);
return env0_2;
}
function decorateAnimationOnStart_18068(a0, a1, a2, a3) { // fn#18068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:13629, owner: decorateAnimation.onStart, offset: 0x00e7eac6, size: 1044 bytes, params: 5, frame: 34
var environment;
var r16;
var r9;
var value3;
var value4;
var moduleValue;
var moduleValue2;
var Array;
var value5;
var propertyName;
var Object;
var assign;
var binding;
var property;
var onStart2;
var toValue;
var onStart3;
var property2;
var property3;
var property4;
var value8;
var prefix;
var suffix;
var strippedValue;
var strippedValue2;
var value9;
var __prefix;
var value11;
var value12;
var moduleValue3;
var decomposeMatrixIntoMatricesAndAngles;
var moduleValue4;
const value = a3;
const reduceMotion = a0.reduceMotion;
const value2 = undefined;
if (value2 === reduceMotion) {
value3 = environment.__proto__.__proto__;
a0.reduceMotion = env2_12();
}
if (a0.reduceMotion) {
if (value2 !== a0.toValue) {
a0.current = a0.toValue;
} else {
onStart(a0, a1, a2, value);
}
a0.startTime = 0;
a0.onFrame = function() {
return true;
};
} else {
value4 = environment.__proto__.__proto__;
moduleValue = require(1653) /* metro dependency 1653 */;
if (moduleValue.isColor(a1)) {
colorOnStart(a0, a1, a2, value);
a0.onFrame = colorOnFrame;
} else {
moduleValue2 = require(1652) /* metro dependency 1652 */;
if (moduleValue2.isAffineMatrixFlat(a1)) {
toValue = a0.toValue;
moduleValue3 = require(1652) /* metro dependency 1652 */;
decomposeMatrixIntoMatricesAndAngles = moduleValue3.decomposeMatrixIntoMatricesAndAngles;
a0.startMatrices = Reflect.apply(decomposeMatrixIntoMatricesAndAngles, moduleValue3, [a1]);
moduleValue4 = require(1652) /* metro dependency 1652 */;
decomposeMatrixIntoMatricesAndAngles = moduleValue4.decomposeMatrixIntoMatricesAndAngles;
a0.stopMatrices = Reflect.apply(decomposeMatrixIntoMatricesAndAngles, moduleValue4, [toValue]);
Object = global.Object;
a0[0] = Object.assign({}, env0_2);
a0[0].current = 0;
a0[0].toValue = 100;
property = a0[0];
property.onStart(a0[0], 0, a2, value ? value[0] : value2);
a0.current = a1;
a0.onFrame = transformationMatrixOnFrame;
} else {
Array = global.Array;
if (Array.isArray(a1)) {
arrayOnStart(a0, a1, a2, value);
a0.onFrame = arrayOnFrame;
} else {
value5 = typeof a1;
if (value5 === 'string') {
binding = env2_9;
value8 = binding(a1);
prefix = value8.prefix;
suffix = value8.suffix;
strippedValue = value8.strippedValue;
a0.__prefix = prefix;
a0.__suffix = suffix;
a0.strippedCurrent = strippedValue;
strippedValue2 = binding(a0.toValue).strippedValue;
a0.current = strippedValue;
a0.startValue = strippedValue;
a0.toValue = strippedValue2;
if (value) {
if (value !== a0) {
value9 = env2_9(value.current);
prefix = value9.prefix;
suffix = value9.suffix;
value.current = value9.strippedValue;
value.__prefix = prefix;
value.__suffix = suffix;
}
}
onStart(a0, strippedValue, a2, value);
__prefix = a0.__prefix;
value11 = '';
value12 = (__prefix ?? value11) + a0.current;
r9 = a0.__suffix ?? value11;
a0.current = value12 + r9;
r9 = value && value !== a0;
if (r9) {
value.current = (value.__prefix ?? value11) + value.current + (value.__suffix ?? value11);
}
a0.onFrame = prefNumberSuffOnFrame;
} else if (value5 !== 'object') {
onStart(a0, a1, a2, value);
} else if (a1 !== null) {
for (propertyName in a1) {
Object = global.Object;
assign = Object.assign;
binding = env0_2;
a0[propertyName] = Reflect.apply(assign, Object, [{}, binding]);
property = a0[propertyName];
onStart2 = a0.onStart;
property.onStart = onStart2;
property = a0[propertyName];
property.current = a1[propertyName];
property = a0[propertyName];
toValue = a0.toValue;
property.toValue = toValue[propertyName];
property = a0[propertyName];
onStart3 = property.onStart;
property2 = a0[propertyName];
property3 = a1[propertyName];
if (!value) {
r16 = value2;
continue;
}
property4 = value[propertyName];
r16 = property4;
Reflect.apply(onStart3, property, [property2, property3, a2, r16]);
}
a0.current = a1;
a0.onFrame = objectOnFrame;
} else {
onStart(a0, a1, a2, value);
}
}
}
}
}
return value2;
}
function pnpm_utilTs10() { // fn#18076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:17017, owner: defineAnimation.pnpm_utilTs10, offset: 0x00e7f276, size: 27 bytes, params: 1, frame: 11
const moduleValue = require();
env2_19(moduleValue);
return moduleValue;
}
function pnpm_utilTs12() { // fn#18079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:17784, owner: cancelAnimationNative.pnpm_utilTs12, offset: 0x00e7f359, size: 22 bytes, params: 1, frame: 2
const binding = env0_0;
binding.value = binding.value;
}
function _fun18061(a0) { // fn#18061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:12534, offset: 0x00e7e7c3, size: 79 bytes, params: 2, frame: 15
let binding = env0_0;
const property = binding[a0];
env0_3 = env0_3 && property.onFrame(binding[a0], require);
binding = env0_2;
binding.push(env0_0[a0].current);
}
function _fun18063(a0, a1) { // fn#18063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:12882, offset: 0x00e7e93d, size: 66 bytes, params: 3, frame: 17
const binding = env0_2;
const push = binding.push;
const binding2 = env3_15;
const binding3 = env0_1;
const binding4 = env0_0;
return Reflect.apply(push, binding, [binding2(binding3, binding4.startMatrices[a0], binding4.stopMatrices[a0])]);
}
function _fun18064(a0, a1) { // fn#18064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:13009, offset: 0x00e7e97f, size: 110 bytes, params: 3, frame: 19
let value = environment.__proto__.__proto__.__proto__;
let binding = env3_17;
const binding2 = env0_1;
const binding3 = env0_0;
const value3 = binding(binding2, binding3.startMatrices['r' + a0], binding3.stopMatrices['r' + a0]);
binding = env0_3;
const push = binding.push;
value = require(1652) /* metro dependency 1652 */;
const getRotationMatrix = value.getRotationMatrix;
Reflect.apply(push, binding, [Reflect.apply(getRotationMatrix, value, [value3, a0])]);
}
function _fun18066(a0, a1) { // fn#18066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:13397, offset: 0x00e7ea1d, size: 74 bytes, params: 3, frame: 15
let binding = env0_0;
const property = binding[a1];
env0_2 = env0_2 && property.onFrame(binding[a1], require);
binding = env0_0;
binding.current[a1] = binding[a1].current;
}
function colorOnStart(a0, a1, a2, a3) { // fn#18070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:13838, owner: decorateAnimation.onStart.colorOnStart, offset: 0x00e7eeda, size: 350 bytes, params: 5, frame: 22
var environment;
var moduleValue2;
var toLinearSpace;
var moduleValue3;
var convertToRGBA;
var moduleValue4;
var moduleValue5;
var moduleValue6;
var moduleValue7;
const env0_0 = a0;
const env0_1 = a2;
const env0_2 = a3;
const items2 = [];
let value = environment.__proto__.__proto__.__proto__;
const moduleValue = require(1653) /* metro dependency 1653 */;
if (moduleValue.isColor(a1)) {
moduleValue2 = moduleValue;
toLinearSpace = moduleValue2.toLinearSpace;
moduleValue3 = require(1653) /* metro dependency 1653 */;
convertToRGBA = moduleValue3.convertToRGBA;
var env0_4 = Reflect.apply(toLinearSpace, moduleValue2, [Reflect.apply(convertToRGBA, moduleValue3,
[a0.current])]);
moduleValue4 = require(1653) /* metro dependency 1653 */;
toLinearSpace = moduleValue4.toLinearSpace;
moduleValue5 = require(1653) /* metro dependency 1653 */;
convertToRGBA = moduleValue5.convertToRGBA;
var env0_3 = Reflect.apply(toLinearSpace, moduleValue4, [Reflect.apply(convertToRGBA, moduleValue5, [a1])]);
if (a0.toValue) {
moduleValue6 = require(1653) /* metro dependency 1653 */;
toLinearSpace = moduleValue6.toLinearSpace;
moduleValue7 = require(1653) /* metro dependency 1653 */;
var env0_5 = Reflect.apply(toLinearSpace, moduleValue6, [moduleValue7.convertToRGBA(a0.toValue)]);
}
}
env1_4.forEach(_fun18071);
a0.unroundedCurrent = items2;
moduleValue.clampRGBA(items2);
value = moduleValue;
const rgbaArrayToRGBAColor = value.rgbaArrayToRGBAColor;
const moduleValue8 = moduleValue;
a0.current = Reflect.apply(rgbaArrayToRGBAColor, value, [moduleValue8.toGammaSpace(items2)]);
}
function arrayOnStart(a0, a1, a2, a3) { // fn#18072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:14752, owner: decorateAnimation.onStart.arrayOnStart, offset: 0x00e7f0f3, size: 63 bytes, params: 5, frame: 12
const env0_0 = a0;
const env0_1 = a2;
const env0_2 = a3;
a1.forEach(_fun18073);
a0.current = env3_2(a1);
}
function _fun18071(a0, a1) { // fn#18071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:14096, offset: 0x00e7f038, size: 187 bytes, params: 3, frame: 21
let binding = env0_0;
const Object = global.Object;
binding[a0] = Object.assign({}, env2_2);
let property = binding[a0];
property.current = env0_4[a1];
property = binding[a0];
const value3 = undefined;
property.toValue = env0_5 ? env0_5[a1] : value3;
binding = env0_0;
property = binding[a0];
property.onStart(binding[a0], env0_3[a1], importDefault, importAll ? importAll[a0] : value3);
binding = env0_6;
binding.push(env0_0[a0].current);
return value3;
}
function _fun18073(a0, a1) { // fn#18073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1777:14794, offset: 0x00e7f132, size: 133 bytes, params: 3, frame: 21
const binding = env0_0;
const Object = global.Object;
binding[a1] = Object.assign({}, env2_2);
binding[a1].current = a0;
let property = binding[a1];
property.toValue = binding.toValue[a1];
property = binding[a1];
const onStart = property.onStart;
const property2 = binding[a1];
const value3 = undefined;
Reflect.apply(onStart, property, [property2, a0, importDefault, importAll ? importAll[a1] : value3]);
return value3;
}