import { millisecondsToSeconds } from "./index105.js";
import { calcGeneratorDuration, maxGeneratorDuration } from "./index150.js";
//#region node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs
/**
* Create a progress => progress easing function from a generator.
*/
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)
	};
}
//#endregion
export { createGeneratorEasing };

//# sourceMappingURL=index151.js.map