decord/source/modules/virtual_currency/native/BalanceCounter.tsx

154 lines
5.3 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 9827
// Function ID: 76301
2026-07-20 16:05:17 +00:00
// Name: BalanceCounter
2026-07-24 07:16:23 +00:00
// Dependencies: [57, 31, 33, 3991, 3849, 4542, 9828, 4126, 2]
2026-07-20 16:05:17 +00:00
2026-07-24 07:16:23 +00:00
// Module 9827 (BalanceCounter)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
import result from "result";
import closure_8 from "result";
import { jsx } from "jsxProd";
let closure_4;
let closure_5;
let closure_6;
let closure_7;
let require = arg1;
({ useState: closure_4, useEffect: closure_5, useRef: closure_6, useCallback: closure_7 } = result);
2026-07-20 16:05:17 +00:00
let closure_10 = { code: "function BalanceCounterTsx1(){const{runOnJS,setIsAnimating}=this.__closure;runOnJS(setIsAnimating)(false);}" };
let closure_11 = { 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{};}" };
class BalanceCounter {
constructor(arg0) {
value = global.value;
2026-07-23 10:11:24 +00:00
closure_0 = value;
2026-07-20 16:05:17 +00:00
onValueChange = global.onValueChange;
2026-07-23 10:11:24 +00:00
c4 = undefined;
c9 = undefined;
2026-07-20 16:05:17 +00:00
clearAnimationTimeout = function clearAnimationTimeout() {
if (null != ref2.current) {
const _clearTimeout = clearTimeout;
clearTimeout(ref2.current);
ref2.current = null;
}
callback(false);
};
tmp = null;
({ onValueReached, style } = global);
2026-07-23 10:11:24 +00:00
closure_2 = useRef(null);
obj = require("module_3991");
sharedValue = require("_slicedToArray");
_slicedToArray = sharedValue;
c4 = useRef(null);
enabled = c8.useContext(require("context").AccessibilityPreferencesContext).reducedMotion.enabled;
tmp3 = _slicedToArray(require("_slicedToArray"), 2);
2026-07-20 16:05:17 +00:00
first = tmp3[0];
tmp4 = tmp3[1];
useRef = tmp4;
2026-07-23 10:11:24 +00:00
tmp5 = _slicedToArray(require("result"), 2);
2026-07-20 16:05:17 +00:00
tmp6 = tmp5[1];
useCallback = tmp6;
2026-07-23 10:11:24 +00:00
tmp7 = _slicedToArray(c4(false), 2);
2026-07-20 16:05:17 +00:00
first1 = tmp7[0];
2026-07-23 10:11:24 +00:00
c8 = first1;
c9 = tmp7[1];
2026-07-24 07:16:23 +00:00
tmp9 = useCallback((set, value, duration) => {
2026-07-20 16:05:17 +00:00
callback(true);
2026-07-23 10:11:24 +00:00
let obj = value(ref[5]);
obj = { duration, damping: 15, stiffness: 150, mass: 1 };
2026-07-20 16:05:17 +00:00
const fn = function l() {
2026-07-23 10:11:24 +00:00
value(table[3]).runOnJS(outer1_9)(false);
2026-07-20 16:05:17 +00:00
};
2026-07-23 10:11:24 +00:00
obj = { runOnJS: value(ref[3]).runOnJS, setIsAnimating: callback };
2026-07-20 16:05:17 +00:00
fn.__closure = obj;
fn.__workletHash = 16153226572520;
2026-07-23 10:11:24 +00:00
fn.__initData = closure_10;
2026-07-24 07:16:23 +00:00
const result = set.set(obj.withSpring(value, obj, "respect-motion-settings", fn));
2026-07-20 16:05:17 +00:00
}, []);
jsx = tmp9;
items = [, , , , , ];
items[0] = value;
items[1] = onValueChange;
items[2] = onValueReached;
items[3] = sharedValue;
items[4] = tmp9;
items[5] = enabled;
2026-07-23 10:11:24 +00:00
tmp10 = enabled(() => {
if (null !== duration) {
2026-07-20 16:05:17 +00:00
if (null !== ref.current) {
if (!enabled) {
2026-07-23 10:11:24 +00:00
if (duration !== ref.current) {
const diff = duration - ref.current;
2026-07-20 16:05:17 +00:00
onValueChange(diff);
2026-07-23 10:11:24 +00:00
ref.current = duration;
2026-07-20 16:05:17 +00:00
const desiredAnimationConfigs = value(ref[6]).getDesiredAnimationConfigs(diff, value(ref[6]).EXPECTED_ORB_LOTTIE_ANIMATION_DURATION_MS);
2026-07-23 10:11:24 +00:00
duration = desiredAnimationConfigs.duration;
2026-07-20 16:05:17 +00:00
clearAnimationTimeout();
const _setTimeout = setTimeout;
closure_4.current = setTimeout(() => {
2026-07-23 10:11:24 +00:00
outer1_10(outer1_3, duration, duration);
outer1_4.current = null;
2026-07-20 16:05:17 +00:00
}, desiredAnimationConfigs.delay);
return clearAnimationTimeout;
} else {
2026-07-23 10:11:24 +00:00
tmp4(duration);
2026-07-20 16:05:17 +00:00
}
}
}
2026-07-23 10:11:24 +00:00
tmp4(duration);
const result = sharedValue.set(duration);
ref.current = duration;
2026-07-20 16:05:17 +00:00
}
}, items);
2026-07-23 10:11:24 +00:00
tmp11 = require("module_3991");
2026-07-20 16:05:17 +00:00
class F {
constructor() {
2026-07-23 10:11:24 +00:00
if (c8) {
2026-07-20 16:05:17 +00:00
tmp = globalThis;
_Math = Math;
2026-07-23 10:11:24 +00:00
tmp2 = _slicedToArray;
str = Math.round(_slicedToArray.get());
2026-07-20 16:05:17 +00:00
tmp3 = value;
2026-07-23 10:11:24 +00:00
tmp4 = outer1_2;
2026-07-20 16:05:17 +00:00
num = 3;
2026-07-23 10:11:24 +00:00
obj = require("module_3991");
2026-07-20 16:05:17 +00:00
tmp5 = closure_6;
tmp6 = obj.runOnJS(closure_6)(str);
2026-07-23 10:11:24 +00:00
obj2 = require("module_3991");
2026-07-20 16:05:17 +00:00
tmp7 = closure_7;
runOnJSResult = obj2.runOnJS(closure_7);
tmp8Result = runOnJSResult(str.toString().length);
}
return {};
}
}
2026-07-23 10:11:24 +00:00
obj = { isAnimating: first1, animatedValue: sharedValue, runOnJS: require("module_3991").runOnJS, setDisplayValue: tmp4, setMaxDigits: tmp6 };
2026-07-20 16:05:17 +00:00
F.__closure = obj;
F.__workletHash = 4408542396979;
F.__initData = clearAnimationTimeout;
if (null !== value) {
2026-07-23 10:11:24 +00:00
tmp13 = c9;
tmp14 = onValueChange;
tmp15 = closure_2;
2026-07-20 16:05:17 +00:00
obj1 = {};
items1 = [, ];
items1[0] = tmp12;
obj2 = {};
num = 7;
obj2.minWidth = 7 * tmp5[0];
items1[1] = obj2;
obj1.style = items1;
2026-07-23 10:11:24 +00:00
tmp16 = closure_0;
obj3 = { variant: "text-sm/semibold", style: null, maxFontSizeMultiplier: 2 };
2026-07-20 16:05:17 +00:00
obj3.style = style;
2026-07-23 10:11:24 +00:00
obj3.children = require("_slicedToArray");
obj1.children = c9(require("Text").Text, obj3);
tmp = c9(require("module_3991").View, obj1);
2026-07-20 16:05:17 +00:00
}
return tmp;
}
}
2026-07-23 10:11:24 +00:00
result = require("jsxProd").fileFinishedImporting("modules/virtual_currency/native/BalanceCounter.tsx");
2026-07-20 16:05:17 +00:00
export default BalanceCounter;
export { BalanceCounter };