import { motionValue as s } from "../../value/index.es.js";
import { resolveVariant as f } from "./resolve-dynamic-variants.es.js";
import { isKeyframesTarget as l } from "./is-keyframes-target.es.js";
function u(t, o, e) {
  t.hasValue(o) ? t.getValue(o).set(e) : t.addValue(o, s(e));
}
function V(t) {
  return l(t) ? t[t.length - 1] || 0 : t;
}
function p(t, o) {
  const e = f(t, o);
  let { transitionEnd: a = {}, transition: c = {}, ...r } = e || {};
  r = { ...r, ...a };
  for (const n in r) {
    const i = V(r[n]);
    u(t, n, i);
  }
}
export {
  p as setTarget
};
//# sourceMappingURL=setters.es.js.map
