/* Metro module 10132; source: modules/virtual_currency/native/BalanceCounter.tsx; dependencies: [57, 31, 33, 4017, 3875, 4577, 10133, 4573, 2] */ function _fun79049(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10318:6, offset: 0x01e426d5, size: 241 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(57) /* metro dependency 57 */; const value = require(31) /* metro dependency 31 */; const env0_4 = value.useState; const env0_5 = value.useEffect; const env0_6 = value.useRef; const env0_7 = value.useCallback; const env0_8 = importAll(31) /* metro dependency 31 */; const env0_9 = (require(33) /* metro dependency 33 */).jsx; object = {code: 'function BalanceCounterTsx1(){const{runOnJS,setIsAnimating}=this.__closure;runOnJS(setIsAnimating)(false);}'}; object = {code: 'function BalanceCounterTsx2(){const{isAnimating,animatedValue,runOnJS,setDisplayValue,setMaxDigits}=this.__closure;if(isAnimating){const roundedValue=Math.round(animatedValue.get());runOnJS(setDisplayValue)(roundedValue);runOnJS(setMaxDigits)(roundedValue.toString().length);}return{};}'}; const closure = BalanceCounter; (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/virtual_currency/native/BalanceCounter.tsx'); exports.default = closure; exports.BalanceCounter = closure; } function BalanceCounter({value, onValueChange, onValueReached, style}) { // fn#79050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10318:626, offset: 0x01e427c6, size: 560 bytes, params: 2, frame: 32 const env0_2 = useRef(null); const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0); const env0_3 = value4; const env0_4 = useRef(null); let binding = env0_8; const useContext = binding.useContext; const AccessibilityPreferencesContext = (require(3875) /* metro dependency 3875: AccessibilityPreferencesContext */).AccessibilityPreferencesContext; const enabled = Reflect.apply(useContext, binding, [AccessibilityPreferencesContext]).reducedMotion.enabled; const value5 = useState(0); binding = env0_3; const value6 = binding(value5, 2); const property = value6[0]; const property2 = value6[1]; const [property3, property4] = binding(useState(1), 2); const [property5, env0_9] = binding(useState(false), 2); let closure = _fun79051; let object = [value, onValueChange, onValueReached, value4, useCallback(closure, []), enabled]; useEffect(_fun79054, object); const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */; const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle; closure = BalanceCounterF; object = {isAnimating: property5, animatedValue: value4}; object.runOnJS = reanimatedRexportModule.runOnJS; object.setDisplayValue = property2; object.setMaxDigits = property4; closure.__closure = object; closure.__workletHash = 4408542396979; closure.__initData = env0_11; if (value === null) { return null; } else { const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View; return ( {((Text) => {property.toFixed(0)})((require(4573) /* metro dependency 4573: Text */).Text)} ); } } function _fun79051(a0, a1, a2) { // fn#79051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10318:907, offset: 0x01e429f6, size: 175 bytes, params: 4, frame: 24 const binding = env0_9; binding(true); const set = a0.set; const springModule = require(4577) /* metro dependency 4577: spring */; const withSpring = springModule.withSpring; const closure = s_79052; const object = {}; object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS; object.setIsAnimating = binding; closure.__closure = object; closure.__workletHash = 16153226572520; closure.__initData = env1_10; Reflect.apply(set, a0, [Reflect.apply(withSpring, springModule, [a1, {'duration': null, 'damping': 15, 'stiffness': 150, 'mass': 1, duration: a2}, 'respect-motion-settings', closure])]); } function clearAnimationTimeout() { // fn#79053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10318:1198, owner: BalanceCounter.clearAnimationTimeout, offset: 0x01e42ad8, size: 63 bytes, params: 1, frame: 14 var clearTimeout; var binding; if (env0_4.current != null) { clearTimeout = global.clearTimeout; binding = env0_4; clearTimeout(binding.current); binding.current = null; } env0_9(false); } function _fun79054() { // fn#79054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10318:1271, offset: 0x01e42b17, size: 260 bytes, params: 1, frame: 18 var environment; var binding; var value3; var value4; var moduleValue; var value5; var duration; var delay; var clearAnimationTimeoutBinding; let valueBinding = value; if (valueBinding !== null) { var current = env0_2.current; if (current === null) { binding = env0_6; valueBinding = value; binding(valueBinding); binding = env0_3; binding.set(valueBinding); env0_2.current = valueBinding; return undefined; } if (enabled) { binding = env0_6; valueBinding = value; binding(valueBinding); binding = env0_3; binding.set(valueBinding); env0_2.current = valueBinding; return undefined; } valueBinding = value; current = env0_2.current; if (valueBinding !== current) { valueBinding = value; binding = env0_2; value3 = valueBinding - binding.current; onValueChange(value3); binding.current = valueBinding; value4 = environment.__proto__; moduleValue = require(10133) /* metro dependency 10133: AnimationUtils */; value5 = moduleValue.getDesiredAnimationConfigs(value3, (require(10133) /* metro dependency 10133: AnimationUtils */).EXPECTED_ORB_LOTTIE_ANIMATION_DURATION_MS); duration = value5.duration; delay = value5.delay; clearAnimationTimeoutBinding = clearAnimationTimeout; clearAnimationTimeoutBinding(); binding = env0_4; binding.current = global.setTimeout(_fun79055, delay); return clearAnimationTimeoutBinding; } binding = env0_6; binding(value); } } function BalanceCounterF() { // fn#79056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10318:1690, owner: BalanceCounter.F, offset: 0x01e42c48, size: 131 bytes, params: 1, frame: 17 var Math; var round; var binding; var value2; var value3; var moduleValue; if (env0_8) { Math = global.Math; round = Math.round; binding = env0_3; value2 = Reflect.apply(round, Math, [binding.get()]); value3 = environment.__proto__; moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */; moduleValue.runOnJS(env0_6)(value2); (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(env0_7)(value2.toString().length); } return {}; } function s_79052() { // fn#79052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10318:1031, offset: 0x01e42aa5, size: 51 bytes, params: 1, frame: 12 let value = environment.__proto__.__proto__; value = require(4017) /* metro dependency 4017: ReanimatedRexport */; value = value.runOnJS(env1_9); value(false); } function _fun79055() { // fn#79055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10318:1574, offset: 0x01e42c1b, size: 45 bytes, params: 1, frame: 16 env1_10(env1_3, value, duration); env1_4.current = null; }