import { A as _baseAssignValue_default, B as isArray_default, D as _copyObject_default, H as _baseGetTag_default, L as isFunction_default, P as _copyArray_default, V as isObjectLike_default, c as _Stack_default, f as keysIn_default, h as isTypedArray_default, i as _cloneTypedArray_default, k as eq_default, l as _getPrototype_default, n as _baseFor_default, r as _initCloneObject_default, s as _cloneBuffer_default, t as isArrayLikeObject_default, v as isBuffer_default, x as _createAssigner_default, y as isArguments_default, z as isObject_default } from "./isArrayLikeObject-LXbTYiBa.js";
var objectTag = "[object Object]", funcProto = Function.prototype, objectProto = Object.prototype, funcToString = funcProto.toString, hasOwnProperty = objectProto.hasOwnProperty, objectCtorString = funcToString.call(Object);
function isPlainObject(i) {
  if (!isObjectLike_default(i) || _baseGetTag_default(i) != objectTag) return false;
  var C = _getPrototype_default(i);
  if (C === null) return true;
  var w = hasOwnProperty.call(C, "constructor") && C.constructor;
  return typeof w == "function" && w instanceof w && funcToString.call(w) == objectCtorString;
}
var isPlainObject_default = isPlainObject;
function assignMergeValue(C, w, T) {
  (T !== void 0 && !eq_default(C[w], T) || T === void 0 && !(w in C)) && _baseAssignValue_default(C, w, T);
}
var _assignMergeValue_default = assignMergeValue;
function safeGet(i, C) {
  if (!(C === "constructor" && typeof i[C] == "function") && C != "__proto__") return i[C];
}
var _safeGet_default = safeGet;
function toPlainObject(i) {
  return _copyObject_default(i, keysIn_default(i));
}
var toPlainObject_default = toPlainObject;
function baseMergeDeep(i, w, T, O, k, A, j) {
  var M = _safeGet_default(i, T), N = _safeGet_default(w, T), P = j.get(N);
  if (P) {
    _assignMergeValue_default(i, T, P);
    return;
  }
  var F = A ? A(M, N, T + "", i, w, j) : void 0, I = F === void 0;
  if (I) {
    var L = isArray_default(N), R = !L && isBuffer_default(N), z = !L && !R && isTypedArray_default(N);
    F = N, L || R || z ? isArray_default(M) ? F = M : isArrayLikeObject_default(M) ? F = _copyArray_default(M) : R ? (I = false, F = _cloneBuffer_default(N, true)) : z ? (I = false, F = _cloneTypedArray_default(N, true)) : F = [] : isPlainObject_default(N) || isArguments_default(N) ? (F = M, isArguments_default(M) ? F = toPlainObject_default(M) : (!isObject_default(M) || isFunction_default(M)) && (F = _initCloneObject_default(N))) : I = false;
  }
  I && (j.set(N, F), k(F, N, O, A, j), j.delete(N)), _assignMergeValue_default(i, T, F);
}
var _baseMergeDeep_default = baseMergeDeep;
function baseMerge(i, C, w, T, E) {
  i !== C && _baseFor_default(C, function(D, O) {
    if (E || (E = new _Stack_default()), isObject_default(D)) _baseMergeDeep_default(i, C, O, w, baseMerge, T, E);
    else {
      var A = T ? T(_safeGet_default(i, O), D, O + "", i, C, E) : void 0;
      A === void 0 && (A = D), _assignMergeValue_default(i, O, A);
    }
  }, keysIn_default);
}
var _baseMerge_default = baseMerge, merge_default = _createAssigner_default(function(i, C, w) {
  _baseMerge_default(i, C, w);
});
export {
  merge_default as t
};
