import e from "./isObject.js";
import t from "./_assignValue.js";
import n from "./_isIndex.js";
import r from "./_castPath.js";
import i from "./_toKey.js";
//#region ../../node_modules/lodash-es/_baseSet.js
function a(a, o, s, c) {
	if (!e(a)) return a;
	o = r(o, a);
	for (var l = -1, u = o.length, d = u - 1, f = a; f != null && ++l < u;) {
		var p = i(o[l]), m = s;
		if (p === "__proto__" || p === "constructor" || p === "prototype") return a;
		if (l != d) {
			var h = f[p];
			m = c ? c(h, p, f) : void 0, m === void 0 && (m = e(h) ? h : n(o[l + 1]) ? [] : {});
		}
		t(f, p, m), f = f[p];
	}
	return a;
}
//#endregion
export { a as default };
