\x89PNG\r\n\x1a\n\x00\x00\x00\x0DIHDR\x00\x00\x00\x01\x00 \x00\x00\x01\x08\x06\x00\x00\x00\x1F\x15\xC4\x89\x00\x00\x00 \x0AIDATx\x9Ccb\x00\x00\x00\x06\x00\x03\x1A\x05\x9D\x00\x00 \x00\x00IEND\xAE\x42\x60\x82
| Path : /var/www/html/infraai.ai/frontend/node_modules/recharts/lib/animation/ |
|
B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H |
| Current File : /var/www/html/infraai.ai/frontend/node_modules/recharts/lib/animation/AnimationManager.js |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createAnimateManager = createAnimateManager;
/**
* Represents a single item in the ReactSmoothQueue.
* The item can be:
* - A number representing a delay in milliseconds.
* - An object representing a style change
* - A StartAnimationFunction that starts eased transition and calls different render
* because of course in Recharts we have to have three ways to do everything
* - An arbitrary function to be executed
*/
function createAnimateManager(timeoutController) {
var currStyle;
var handleChange = () => null;
var shouldStop = false;
var cancelTimeout = null;
var setStyle = _style => {
if (shouldStop) {
return;
}
if (Array.isArray(_style)) {
if (!_style.length) {
return;
}
var styles = _style;
var [curr, ...restStyles] = styles;
if (typeof curr === 'number') {
cancelTimeout = timeoutController.setTimeout(setStyle.bind(null, restStyles), curr);
return;
}
setStyle(curr);
cancelTimeout = timeoutController.setTimeout(setStyle.bind(null, restStyles));
return;
}
if (typeof _style === 'string') {
currStyle = _style;
handleChange(currStyle);
}
if (typeof _style === 'object') {
currStyle = _style;
handleChange(currStyle);
}
if (typeof _style === 'function') {
_style();
}
};
return {
stop: () => {
shouldStop = true;
},
start: style => {
shouldStop = false;
if (cancelTimeout) {
cancelTimeout();
cancelTimeout = null;
}
setStyle(style);
},
subscribe: _handleChange => {
handleChange = _handleChange;
return () => {
handleChange = () => null;
};
},
getTimeoutController: () => timeoutController
};
}