2026-07-29 08:29:29 +00:00
// Module ID: 379
// Function ID: 380
// Name: Animation
// Dependencies: [41, 42, 357, 380, 27]
// Module 379 (Animation)
2026-08-24 06:08:38 +00:00
import _createClassDefault from "_createClass" /* 42 */ ;
import closure _3 from "_classCallCheck" /* 41 */ ;
2026-07-29 08:29:29 +00:00
let Animation = importDefault ;
let c4 = 1 ;
class Animation {
constructor ( arg0 ) {
self = this ;
2026-08-24 06:08:38 +00:00
tmp = closure _3 ( this , Animation ) ;
2026-07-29 08:29:29 +00:00
obj = require ( "set" ) ;
this . _useNativeDriver = obj . shouldUseNativeDriver ( global ) ;
this . _ _active = false ;
isInteraction = global . isInteraction ;
if ( isInteraction == null ) {
isInteraction = ! self . _useNativeDriver ;
}
self . _ _isInteraction = isInteraction ;
( { isLooping : self . _ _isLooping , iterations } = global ) ;
if ( iterations == null ) {
iterations = 1 ;
}
self . _ _iterations = iterations ;
return ;
}
}
let items = [
{
key : "start" ,
value : function start ( arg0 , arg1 , _onEnd , arg3 , _ _isNative ) {
const self = this ;
if ( ! this . _useNativeDriver ) {
if ( true === _ _isNative . _ _isNative ) {
const _Error = Error ;
2026-08-24 06:08:38 +00:00
error = new Error ( "Attempting to run JS driven animation on animated node that has been moved to \"native\" earlier by starting an animation with `useNativeDriver: true`" ) ;
2026-07-29 08:29:29 +00:00
throw error ;
}
}
self . _onEnd = _onEnd ;
self . _ _active = true ;
}
} ,
{
key : "stop" ,
value : function stop ( ) {
const self = this ;
if ( null != this . _nativeID ) {
const _nativeID = self . _nativeID ;
const _HermesInternal = HermesInternal ;
const combined = "" + _nativeID + ":stopAnimation" ;
try {
const API = Animation ( 357 ) . API ;
const result = API . setWaitingForIdentifier ( combined ) ;
const API2 = Animation ( 357 ) . API ;
API2 . stopAnimation ( _nativeID ) ;
const API3 = Animation ( 357 ) . API ;
const result1 = API3 . unsetWaitingForIdentifier ( combined ) ;
const tmp2 = Animation ;
const tmp3 = Animation ;
const tmp4 = dependencyMap ;
} catch ( tmp11 ) {
const API4 = Animation ( 357 ) . API ;
const result2 = API4 . unsetWaitingForIdentifier ( tmp ) ;
throw tmp11 ;
}
}
self . _ _active = false ;
}
} ,
{
key : "__getNativeAnimationConfig" ,
value : function _ _getNativeAnimationConfig ( ) {
2026-08-24 06:08:38 +00:00
error = new Error ( "This animation type cannot be offloaded to native" ) ;
2026-07-29 08:29:29 +00:00
throw error ;
}
} ,
{
key : "__findAnimatedPropsNodes" ,
value : function _ _findAnimatedPropsNodes ( item10014 ) {
const self = this ;
const items = [ ] ;
if ( item10014 instanceof Animation ( 380 ) ) {
items . push ( item10014 ) ;
return items ;
} else {
const _ _getChildrenResult = item10014 . _ _getChildren ( ) ;
for ( const item10014 of _ _getChildrenResult ) {
let push = items . push ;
let items1 = [ ] ;
let tmp4 = items1 ;
let num = 0 ;
let arraySpreadResult = HermesBuiltin . arraySpread ( self . _ _findAnimatedPropsNodes ( item10014 ) , 0 ) ;
let tmp6 = push ;
let tmp7 = items1 ;
let tmp8 = items ;
let applyResult = HermesBuiltin . apply ( items1 , items ) ;
continue ;
}
return items ;
}
}
} ,
{
key : "__startAnimationIfNative" ,
value : function _ _startAnimationIfNative ( self ) {
self = this ;
self = this ;
2026-08-24 06:08:38 +00:00
Animation = self ;
2026-07-29 08:29:29 +00:00
if ( this . _useNativeDriver ) {
const _HermesInternal = HermesInternal ;
const combined = "" + closure _4 + ":startAnimation" ;
closure _4 = closure _4 + 1 ;
const API = Animation ( 357 ) . API ;
let result = API . setWaitingForIdentifier ( combined ) ;
try {
let result1 = self . _ _getNativeAnimationConfig ( ) ;
self . _ _makeNative ( result1 . platformConfig ) ;
self . _nativeID = tmp9 ( 357 ) . generateNewAnimationId ( ) ;
const API2 = tmp9 ( 357 ) . API ;
API2 . startAnimatingNode ( self . _nativeID , self . _ _getNativeTag ( ) , result1 , ( value ) => {
self . _ _notifyAnimationEnd ( value ) ;
value = value . value ;
if ( null != value ) {
const result = _self . _ _onAnimatedValueUpdateReceived ( value , tmp2 ) ;
const result1 = obj . _ _findAnimatedPropsNodes ( _self ) ;
const item = result1 . forEach ( ( update ) => update . update ( ) ) ;
2026-08-24 06:08:38 +00:00
const obj2 = self ( closure _1 _2 [ 4 ] ) ;
2026-07-29 08:29:29 +00:00
const tmp3 = _self ;
}
} ) ;
const API3 = tmp9 ( 357 ) . API ;
const result2 = API3 . unsetWaitingForIdentifier ( combined ) ;
return true ;
} catch ( tmp18 ) {
const API4 = tmp4 ( tmp [ 2 ] ) . API ;
const result3 = API4 . unsetWaitingForIdentifier ( tmp3 ) ;
throw tmp18 ;
}
} else {
return false ;
}
}
} ,
{
key : "__notifyAnimationEnd" ,
value : function _ _notifyAnimationEnd ( value ) {
const _onEnd = this . _onEnd ;
if ( null != _onEnd ) {
tmp . _onEnd = null ;
_onEnd ( value ) ;
}
}
} ,
{
key : "__getDebugID" ,
value : function _ _getDebugID ( ) {
}
}
] ;
2026-08-24 06:08:38 +00:00
export default _createClassDefault ( Animation , items ) ;