Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}).map(function (_ref2) {
var _ref3 = slicedToArray(_ref2, 2),
key = _ref3[0],
geometry = _ref3[1];
var animation = prevAnimations.get(key);
if (!animation) return [key, geometry];
var progress = easeOutCubic(getAnimationProgress(animation));
var left = (animation.left.to - animation.left.from) * progress + animation.left.from;
return [key, {
left: left,
right: geometry.right - (geometry.left - left)
}];
}));
return new Map([].concat(toConsumableArray(animations.entries())).map(function (_ref6) {
var _ref7 = slicedToArray(_ref6, 2),
key = _ref7[0],
animation = _ref7[1];
var progress = easeOutCubic(getAnimationProgress(animation));
var result = _extends({}, animation.style);
if (animation.left) {
var offset = (animation.left.to - animation.left.from) * (progress - 1);
result.transform = 'translateX(' + offset + 'px)';
}
return [key, result];
}));
};