import { calcGeneratorDuration, maxGeneratorDuration } from "./calc-duration.js";
import { millisecondsToSeconds } from "../../../../../../motion-utils/dist/es/time-conversion.js";
function createGeneratorEasing(options, scale = 100, createGenerator) {
  const generator = createGenerator({ ...options, keyframes: [0, scale] });
  const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);
  return {
    type: "keyframes",
    ease: (progress) => {
      return generator.next(duration * progress).value / scale;
    },
    duration: millisecondsToSeconds(duration)
  };
}
export {
  createGeneratorEasing
};
//# sourceMappingURL=create-generator-easing.js.map
