"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../frameloop/sync-time.mjs.js"),t=require("../render/dom/style-set.mjs.js"),i=require("./JSAnimation.mjs.js"),s=require("./NativeAnimation.mjs.js"),a=require("./utils/replace-transition-type.mjs.js"),o=require("./waapi/utils/unsupported-easing.mjs.js"),r=require("../../../../motion-utils/dist/es/clamp.mjs.js");class n extends s.NativeAnimation{constructor(e){o.replaceStringEasing(e),a.replaceTransitionType(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(s){const{motionValue:a,onUpdate:o,onComplete:n,element:m,...p}=this.options;if(!a)return;if(void 0!==s)return void a.set(s);const u=new i.JSAnimation({...p,autoplay:!1}),l=Math.max(10,e.time.now()-this.startTime),j=r.clamp(0,10,l-10),c=u.sample(l).value,{name:d}=this.options;m&&d&&t.setStyle(m,d,c),a.setWithVelocity(u.sample(Math.max(0,l-j)).value,c,j),u.stop()}}exports.NativeAnimationExtended=n;
//# sourceMappingURL=NativeAnimationExtended.mjs.js.map
