103 lines
8.7 KiB
JavaScript
103 lines
8.7 KiB
JavaScript
/* Metro module 1689; source: unknown; dependencies: [1650] */
|
|
import * as Module01650Module from './module-01650.js'; /* Metro dependency 1650 */
|
|
|
|
function _fun18425(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#18425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1816:6, offset: 0x00e8bd69, size: 166 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = {code: "function pnpm_delayTs2(){const{_nextAnimation,delayMs,getReduceMotionForAnimation,reduceMotion}=this.__closure;const nextAnimation=typeof _nextAnimation==='function'?_nextAnimation():_nextAnimation;function delay(animation,now){const{startTime:startTime,started:started,previousAnimation:previousAnimation}=animation;const current=animation.current;if(now-startTime>=delayMs||animation.reduceMotion){if(!started){nextAnimation.onStart(nextAnimation,current,now,previousAnimation);animation.previousAnimation=null;animation.started=true;}const finished=nextAnimation.onFrame(nextAnimation,now);animation.current=nextAnimation.current;return finished;}else if(previousAnimation){const finished=previousAnimation.finished||previousAnimation.onFrame(previousAnimation,now);animation.current=previousAnimation.current;if(finished){animation.previousAnimation=null;}}return false;}function onStart(animation,value,now,previousAnimation){animation.startTime=now;animation.started=false;animation.current=value;if(previousAnimation===animation){animation.previousAnimation=previousAnimation.previousAnimation;}else{animation.previousAnimation=previousAnimation;}if(nextAnimation.reduceMotion===undefined){nextAnimation.reduceMotion=animation.reduceMotion;}}const callback=function(finished){if(nextAnimation.callback){nextAnimation.callback(finished);}};return{isHigherOrder:true,onFrame:delay,onStart:onStart,current:nextAnimation.current,callback:callback,previousAnimation:null,startTime:0,started:false,reduceMotion:getReduceMotionForAnimation(reduceMotion)};}"};
|
|
const withDelay2 = withDelay;
|
|
const object2 = {};
|
|
object2.defineAnimation = (require(1650) /* metro dependency 1650 */).defineAnimation;
|
|
const getReduceMotionForAnimation = (require(1650) /* metro dependency 1650 */).getReduceMotionForAnimation;
|
|
object2.getReduceMotionForAnimation = getReduceMotionForAnimation;
|
|
withDelay2.__closure = object2;
|
|
withDelay2.__workletHash = 10965419997083;
|
|
withDelay2.__initData = {code: "function pnpm_delayTs1(delayMs,_nextAnimation,reduceMotion){const{defineAnimation,getReduceMotionForAnimation}=this.__closure;return defineAnimation(_nextAnimation,function(){'worklet';const nextAnimation=typeof _nextAnimation==='function'?_nextAnimation():_nextAnimation;function delay(animation,now){const{startTime:startTime,started:started,previousAnimation:previousAnimation}=animation;const current=animation.current;if(now-startTime>=delayMs||animation.reduceMotion){if(!started){nextAnimation.onStart(nextAnimation,current,now,previousAnimation);animation.previousAnimation=null;animation.started=true;}const finished=nextAnimation.onFrame(nextAnimation,now);animation.current=nextAnimation.current;return finished;}else if(previousAnimation){const finished=previousAnimation.finished||previousAnimation.onFrame(previousAnimation,now);animation.current=previousAnimation.current;if(finished){animation.previousAnimation=null;}}return false;}function onStart(animation,value,now,previousAnimation){animation.startTime=now;animation.started=false;animation.current=value;if(previousAnimation===animation){animation.previousAnimation=previousAnimation.previousAnimation;}else{animation.previousAnimation=previousAnimation;}if(nextAnimation.reduceMotion===undefined){nextAnimation.reduceMotion=animation.reduceMotion;}}const callback=function(finished){if(nextAnimation.callback){nextAnimation.callback(finished);}};return{isHigherOrder:true,onFrame:delay,onStart:onStart,current:nextAnimation.current,callback:callback,previousAnimation:null,startTime:0,started:false,reduceMotion:getReduceMotionForAnimation(reduceMotion)};});}"};
|
|
exports.withDelay = withDelay2;
|
|
function withDelay(a0, a1, a2) { // fn#18426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1816:3317, offset: 0x00e8be0f, size: 135 bytes, params: 4, frame: 22
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
const defineAnimation = Module01650Module.defineAnimation;
|
|
const pnpm_delayTs22 = pnpm_delayTs2;
|
|
const getReduceMotionForAnimation = Module01650Module.getReduceMotionForAnimation;
|
|
pnpm_delayTs22.__closure = {_nextAnimation: a1, delayMs: a0,
|
|
getReduceMotionForAnimation: getReduceMotionForAnimation, reduceMotion: a2};
|
|
pnpm_delayTs22.__workletHash = 7904568249320;
|
|
pnpm_delayTs22.__initData = env0_2;
|
|
return Reflect.apply(defineAnimation, Module01650Module, [a1, pnpm_delayTs22]);
|
|
function pnpm_delayTs2() { // fn#18427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1816:3384, owner: withDelay.pnpm_delayTs2, offset: 0x00e8be96, size: 153 bytes, params: 1, frame: 13
|
|
const r3 = typeof require === 'function' ? require() : require;
|
|
const object = {isHigherOrder: true, onFrame: onFrame_18428, onStart: onStart_18429};
|
|
object.current = r3.current;
|
|
object.callback = callback_18430;
|
|
object.previousAnimation = null;
|
|
object.startTime = 0;
|
|
object.started = false;
|
|
object.reduceMotion = (require(1650) /* metro dependency 1650 */).getReduceMotionForAnimation(importDefault);
|
|
return object;
|
|
function pnpm_delayTs2OnFrame(a0, a1) { // fn#18428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1816:3474, owner: withDelay.pnpm_delayTs2.onFrame, offset: 0x00e8bf2f, size: 195 bytes, params: 3, frame: 18
|
|
var r1;
|
|
var value3;
|
|
const startTime = a0.startTime;
|
|
const started = a0.started;
|
|
const previousAnimation = a0.previousAnimation;
|
|
let current = a0.current;
|
|
if (a1 - startTime >= env1_0) {
|
|
if (!started) {
|
|
env0_0.onStart(env0_0, current, a1, previousAnimation);
|
|
a0.previousAnimation = null;
|
|
a0.started = true;
|
|
}
|
|
value3 = env0_0.onFrame(env0_0, a1);
|
|
current = env0_0.current;
|
|
a0.current = current;
|
|
return value3;
|
|
}
|
|
if (a0.reduceMotion) {
|
|
if (!started) {
|
|
env0_0.onStart(env0_0, current, a1, previousAnimation);
|
|
a0.previousAnimation = null;
|
|
a0.started = true;
|
|
}
|
|
value3 = env0_0.onFrame(env0_0, a1);
|
|
current = env0_0.current;
|
|
a0.current = current;
|
|
return value3;
|
|
}
|
|
if (previousAnimation) {
|
|
r1 = previousAnimation.finished || previousAnimation.onFrame(previousAnimation, a1);
|
|
a0.current = previousAnimation.current;
|
|
if (r1) {
|
|
a0.previousAnimation = null;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function pnpm_delayTs2OnStart(a0, a1, a2, a3) { // fn#18429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1816:3804, owner: withDelay.pnpm_delayTs2.onStart, offset: 0x00e8bff2, size: 88 bytes, params: 5, frame: 4
|
|
const value = a3;
|
|
a0.startTime = a2;
|
|
a0.started = false;
|
|
a0.current = a1;
|
|
a0.previousAnimation = value !== a0 ? value : value.previousAnimation;
|
|
if (env0_0.reduceMotion === undefined) {
|
|
env0_0.reduceMotion = a0.reduceMotion;
|
|
}
|
|
}
|
|
|
|
function pnpm_delayTs2Callback(a0) { // fn#18430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1816:4002, owner: withDelay.pnpm_delayTs2.callback, offset: 0x00e8b19d, size: 38 bytes, params: 2, frame: 11
|
|
if (env0_0.callback) {
|
|
env0_0.callback(a0);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun18425, 1689, [1650]) /* metro module 1689, dependencies: [1650] */;
|