import { klona as f } from "../../../../../../klona@2.0.6/node_modules/klona/full/index.mjs";
import { getSplittedPath as h } from "./get-splitted-path.mjs";
function c(l, o, i) {
  const t = h(l);
  if (t.length === 0)
    return i;
  const e = f(i);
  if (t.length === 1)
    return e[t[0]] = o, e;
  let n = e[t[0]];
  for (let r = 1; r < t.length - 1; r += 1) {
    if (n === void 0)
      return e;
    n = n[t[r]];
  }
  return n[t[t.length - 1]] = o, e;
}
export {
  c as setPath
};
//# sourceMappingURL=set-path.mjs.map
