function LoadAnimation(animation, callbackLoaded) {
  var hasAnimationAuxiliaryObject = (0,_crud_animation_objects__WEBPACK_IMPORTED_MODULE_2__.getAnimationAuxiliaryObject)(animation.animationId);

  if (!hasAnimationAuxiliaryObject) {
    (0,_animation_listeners_animations_listeners_handlers__WEBPACK_IMPORTED_MODULE_5__.propagateAnimationEventListener)(_animation_listeners_animations_listeners_handlers__WEBPACK_IMPORTED_MODULE_5__.LISTENERS_NAMES[6], animation);
  }

  if (animation.state !== _sauce_constants__WEBPACK_IMPORTED_MODULE_0__.ANIMATION_STATES[0] || hasAnimationAuxiliaryObject) {
    if (hasAnimationAuxiliaryObject) {
      if (hasAnimationAuxiliaryObject.dataLoadingState === 'loading') {
        var setTimeoutId = setTimeout(function () {
          clearTimeout(setTimeoutId);

          if (animation.state !== _sauce_constants__WEBPACK_IMPORTED_MODULE_0__.ANIMATION_STATES[1]) {
            LoadAnimation(animation, callbackLoaded);
          }
        });
      } else {
        (0,_animation_engine_start_animation_execution_cycle__WEBPACK_IMPORTED_MODULE_6__.default)((0,_animation_engine_reset_animation_progress__WEBPACK_IMPORTED_MODULE_9__.default)(hasAnimationAuxiliaryObject), true);
      }

      return;
    }
  }

  var currentTime = (0,_utilities_index__WEBPACK_IMPORTED_MODULE_4__.getTimeNow)();
  var animationAuxiliaryObject = (0,_create_animation_auxiliary_object__WEBPACK_IMPORTED_MODULE_3__.default)(animation);
  (0,_crud_animation_objects__WEBPACK_IMPORTED_MODULE_2__.addAnimationAuxiliaryObject)(animationAuxiliaryObject);
  Object.assign(animationAuxiliaryObject.animation, {
    state: _sauce_constants__WEBPACK_IMPORTED_MODULE_0__.ANIMATION_STATES[6],
    delay: animation.delay
  });
  forwardAnimation(animationAuxiliaryObject, currentTime, callbackLoaded);
}
/**
 * Creates an object with the properties of the user's animation instance, and adds control-related properties and the execution of the animation, thus maintaining hidden complexity.
 */
Creates an object with the properties of the user's animation instance, and adds control-related properties and the execution of the animation, thus maintaining hidden complexity.
Creates an object with the properties of the user ' s animation instance and adds control - related properties and the execution of the animation thus maintaining hidden complexity .
function LoadAnimation(animation, callbackLoaded) {
  var hasAnimationAuxiliaryObject = (0,_crud_animation_objects__WEBPACK_IMPORTED_MODULE_2__.getAnimationAuxiliaryObject)(animation.animationId);
  if (!hasAnimationAuxiliaryObject) {
    (0,_animation_listeners_animations_listeners_handlers__WEBPACK_IMPORTED_MODULE_5__.propagateAnimationEventListener)(_animation_listeners_animations_listeners_handlers__WEBPACK_IMPORTED_MODULE_5__.LISTENERS_NAMES[6], animation);
  }
  if (animation.state !== _sauce_constants__WEBPACK_IMPORTED_MODULE_0__.ANIMATION_STATES[0] || hasAnimationAuxiliaryObject) {
    if (hasAnimationAuxiliaryObject) {
      if (hasAnimationAuxiliaryObject.dataLoadingState === 'loading') {
        var setTimeoutId = setTimeout(function () {
          clearTimeout(setTimeoutId);
          if (animation.state !== _sauce_constants__WEBPACK_IMPORTED_MODULE_0__.ANIMATION_STATES[1]) {
            LoadAnimation(animation, callbackLoaded);
          }
        });
      } else {
        (0,_animation_engine_start_animation_execution_cycle__WEBPACK_IMPORTED_MODULE_6__.default)((0,_animation_engine_reset_animation_progress__WEBPACK_IMPORTED_MODULE_9__.default)(hasAnimationAuxiliaryObject), true);
      }
      return;
    }
  }
  var currentTime = (0,_utilities_index__WEBPACK_IMPORTED_MODULE_4__.getTimeNow)();
  var animationAuxiliaryObject = (0,_create_animation_auxiliary_object__WEBPACK_IMPORTED_MODULE_3__.default)(animation);
  (0,_crud_animation_objects__WEBPACK_IMPORTED_MODULE_2__.addAnimationAuxiliaryObject)(animationAuxiliaryObject);
  Object.assign(animationAuxiliaryObject.animation, {
    state: _sauce_constants__WEBPACK_IMPORTED_MODULE_0__.ANIMATION_STATES[6],
    delay: animation.delay
  });
  forwardAnimation(animationAuxiliaryObject, currentTime, callbackLoaded);
}
function LoadAnimation ( animation , callbackLoaded ) { var hasAnimationAuxiliaryObject = ( 0 , _crud_animation_objects__WEBPACK_IMPORTED_MODULE_2__ . getAnimationAuxiliaryObject ) ( animation . animationId ) ; if ( ! hasAnimationAuxiliaryObject ) { ( 0 , _animation_listeners_animations_listeners_handlers__WEBPACK_IMPORTED_MODULE_5__ . propagateAnimationEventListener ) ( _animation_listeners_animations_listeners_handlers__WEBPACK_IMPORTED_MODULE_5__ . LISTENERS_NAMES [ 6 ] , animation ) ; } if ( animation . state !== _sauce_constants__WEBPACK_IMPORTED_MODULE_0__ . ANIMATION_STATES [ 0 ] || hasAnimationAuxiliaryObject ) { if ( hasAnimationAuxiliaryObject ) { if ( hasAnimationAuxiliaryObject . dataLoadingState === 'loading' ) { var setTimeoutId = setTimeout ( function ( ) { clearTimeout ( setTimeoutId ) ; if ( animation . state !== _sauce_constants__WEBPACK_IMPORTED_MODULE_0__ . ANIMATION_STATES [ 1 ] ) { LoadAnimation ( animation , callbackLoaded ) ; } } ) ; } else { ( 0 , _animation_engine_start_animation_execution_cycle__WEBPACK_IMPORTED_MODULE_6__ . default ) ( ( 0 , _animation_engine_reset_animation_progress__WEBPACK_IMPORTED_MODULE_9__ . default ) ( hasAnimationAuxiliaryObject ) , true ) ; } return ; } } var currentTime = ( 0 , _utilities_index__WEBPACK_IMPORTED_MODULE_4__ . getTimeNow ) ( ) ; var animationAuxiliaryObject = ( 0 , _create_animation_auxiliary_object__WEBPACK_IMPORTED_MODULE_3__ . default ) ( animation ) ; ( 0 , _crud_animation_objects__WEBPACK_IMPORTED_MODULE_2__ . addAnimationAuxiliaryObject ) ( animationAuxiliaryObject ) ; Object . assign ( animationAuxiliaryObject . animation , { state : _sauce_constants__WEBPACK_IMPORTED_MODULE_0__ . ANIMATION_STATES [ 6 ] , delay : animation . delay } ) ; forwardAnimation ( animationAuxiliaryObject , currentTime , callbackLoaded ) ; }
Creates an object with the properties of the user's animation instance, and adds control-related properties and the execution of the animation, thus maintaining hidden complexity.
Creates an object with the properties of the user ' s animation instance and adds control - related properties and the execution of the animation thus maintaining hidden complexity .