"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../utils/interpolate.mjs.js"),s=require("../keyframes/offsets/default.mjs.js"),t=require("../keyframes/offsets/time.mjs.js"),i=require("../../../../../motion-utils/dist/es/easing/utils/is-easing-array.mjs.js"),n=require("../../../../../motion-utils/dist/es/easing/utils/map.mjs.js"),r=require("../../../../../motion-utils/dist/es/easing/ease.mjs.js");function a(e,s){return e.map((()=>s||r.easeInOut)).splice(0,e.length-1)}exports.defaultEasing=a,exports.keyframes=function(r){let{duration:u=300,keyframes:o,times:l,ease:f="easeInOut"}=r;const m=i.isEasingArray(f)?f.map(n.easingDefinitionToFunction):n.easingDefinitionToFunction(f),j={done:!1,value:o[0]},d=t.convertOffsetToTimes(l&&l.length===o.length?l:s.defaultOffset(o),u),c=e.interpolate(d,o,{ease:Array.isArray(m)?m:a(o,m)});return{calculatedDuration:u,next:e=>(j.value=c(e),j.done=e>=u,j)}};
//# sourceMappingURL=keyframes.mjs.js.map
