import _Stack from "./_Stack.js";
import _assignMergeValue from "./_assignMergeValue.js";
import _baseFor from "./_baseFor.js";
import _baseMergeDeep from "./_baseMergeDeep.js";
import isObject_1 from "./isObject.js";
import keysIn_1 from "./keysIn.js";
import _safeGet from "./_safeGet.js";
var Stack = _Stack, assignMergeValue = _assignMergeValue, baseFor = _baseFor, baseMergeDeep = _baseMergeDeep, isObject = isObject_1, keysIn = keysIn_1, safeGet = _safeGet;
function baseMerge(object, source, srcIndex, customizer, stack) {
  if (object === source) {
    return;
  }
  baseFor(source, function(srcValue, key) {
    stack || (stack = new Stack());
    if (isObject(srcValue)) {
      baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
    } else {
      var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : void 0;
      if (newValue === void 0) {
        newValue = srcValue;
      }
      assignMergeValue(object, key, newValue);
    }
  }, keysIn);
}
var _baseMerge = baseMerge;
export {
  _baseMerge as default
};
//# sourceMappingURL=_baseMerge.js.map
