36 lines
1.9 KiB
TypeScript
36 lines
1.9 KiB
TypeScript
// Metro module 4599 (f4600).
|
|
import { CONFIG_NEVER_ANIMATE } from "../ReanimatedConstants";
|
|
import * as _AccessibilityPreferencesSharedValue_native from "../AccessibilityPreferencesSharedValue.native";
|
|
import * as _ReanimatedRexport from "../../../../modules/reanimated/ReanimatedRexport";
|
|
export function withSpring(a0, a1, r7 = "respect-motion-settings") {
|
|
let r1, r17;
|
|
L11: {
|
|
L6: {
|
|
const reduceMotion = _AccessibilityPreferencesSharedValue_native.accessibilityPreferencesSharedValue.get().reduceMotion;
|
|
r1 = r7 === "animate-always";
|
|
if (!r1) {
|
|
if (r7 === "respect-motion-settings" && !reduceMotion) {
|
|
break L6;
|
|
}
|
|
r17 = CONFIG_NEVER_ANIMATE;
|
|
break L11;
|
|
}
|
|
}
|
|
r17 = r1 ? {
|
|
...a1 == null ? {} : a1,
|
|
reduceMotion: _ReanimatedRexport.ReduceMotion.Never
|
|
} : a1;
|
|
}
|
|
return _ReanimatedRexport.withSpring(a0, r17, arguments[3]);
|
|
}
|
|
withSpring.__closure = {
|
|
accessibilityPreferencesSharedValue: _AccessibilityPreferencesSharedValue_native.accessibilityPreferencesSharedValue,
|
|
CONFIG_NEVER_ANIMATE,
|
|
ReduceMotion: _ReanimatedRexport.ReduceMotion,
|
|
REAwithSpring: _ReanimatedRexport.withSpring
|
|
};
|
|
withSpring.__workletHash = 14783154107972;
|
|
withSpring.__initData = {
|
|
code: "function withSpring_springTsx1(toValue,config,shouldAnimate='respect-motion-settings',callback){const{accessibilityPreferencesSharedValue,CONFIG_NEVER_ANIMATE,ReduceMotion,REAwithSpring}=this.__closure;const reducedMotionEnabled=accessibilityPreferencesSharedValue.get().reduceMotion;const animate=shouldAnimate==='animate-always'||shouldAnimate==='respect-motion-settings'&&!reducedMotionEnabled;const configForRea=!animate?CONFIG_NEVER_ANIMATE:shouldAnimate==='animate-always'?{...(config!==null&&config!==void 0?config:{}),reduceMotion:ReduceMotion.Never}:config;return REAwithSpring(toValue,configForRea,callback);}"
|
|
};
|