import { C as isArray_default, D as _root_default, S as isObject_default, T as _baseGetTag_default, _ as _isIndex_default, b as isFunction_default, c as isTypedArray_default, d as isBuffer_default, f as isArguments_default, g as eq_default, m as isArrayLike_default, n as _Uint8Array_default, o as _overArg_default, p as _isPrototype_default, r as _Stack_default, s as _arrayLikeKeys_default, t as _baseFor_default, v as _getNative_default, w as isObjectLike_default, x as identity_default } from "./_baseFor-BGiY-cm1.js";
var objectCreate = Object.create, _baseCreate_default = /* @__PURE__ */ (function() {
  function a() {
  }
  return function(P) {
    if (!isObject_default(P)) return {};
    if (objectCreate) return objectCreate(P);
    a.prototype = P;
    var I = new a();
    return a.prototype = void 0, I;
  };
})();
function apply(a, P, F) {
  switch (F.length) {
    case 0:
      return a.call(P);
    case 1:
      return a.call(P, F[0]);
    case 2:
      return a.call(P, F[0], F[1]);
    case 3:
      return a.call(P, F[0], F[1], F[2]);
  }
  return a.apply(P, F);
}
var _apply_default = apply;
function copyArray(a, P) {
  var F = -1, I = a.length;
  for (P || (P = Array(I)); ++F < I; ) P[F] = a[F];
  return P;
}
var _copyArray_default = copyArray, HOT_COUNT = 800, HOT_SPAN = 16, nativeNow = Date.now;
function shortOut(a) {
  var P = 0, F = 0;
  return function() {
    var I = nativeNow(), L = HOT_SPAN - (I - F);
    if (F = I, L > 0) {
      if (++P >= HOT_COUNT) return arguments[0];
    } else P = 0;
    return a.apply(void 0, arguments);
  };
}
var _shortOut_default = shortOut;
function constant(a) {
  return function() {
    return a;
  };
}
var constant_default = constant, _defineProperty_default = (function() {
  try {
    var a = _getNative_default(Object, "defineProperty");
    return a({}, "", {}), a;
  } catch {
  }
})(), _setToString_default = _shortOut_default(_defineProperty_default ? function(a, P) {
  return _defineProperty_default(a, "toString", {
    configurable: true,
    enumerable: false,
    value: constant_default(P),
    writable: true
  });
} : identity_default);
function baseAssignValue(a, P, F) {
  P == "__proto__" && _defineProperty_default ? _defineProperty_default(a, P, {
    configurable: true,
    enumerable: true,
    value: F,
    writable: true
  }) : a[P] = F;
}
var _baseAssignValue_default = baseAssignValue, hasOwnProperty$2 = Object.prototype.hasOwnProperty;
function assignValue(a, P, F) {
  var I = a[P];
  (!(hasOwnProperty$2.call(a, P) && eq_default(I, F)) || F === void 0 && !(P in a)) && _baseAssignValue_default(a, P, F);
}
var _assignValue_default = assignValue;
function copyObject(a, P, F, I) {
  var L = !F;
  F || (F = {});
  for (var R = -1, z = P.length; ++R < z; ) {
    var B = P[R], V = I ? I(F[B], a[B], B, F, a) : void 0;
    V === void 0 && (V = a[B]), L ? _baseAssignValue_default(F, B, V) : _assignValue_default(F, B, V);
  }
  return F;
}
var _copyObject_default = copyObject, nativeMax = Math.max;
function overRest(a, P, F) {
  return P = nativeMax(P === void 0 ? a.length - 1 : P, 0), function() {
    for (var I = arguments, L = -1, R = nativeMax(I.length - P, 0), z = Array(R); ++L < R; ) z[L] = I[P + L];
    L = -1;
    for (var B = Array(P + 1); ++L < P; ) B[L] = I[L];
    return B[P] = F(z), _apply_default(a, this, B);
  };
}
var _overRest_default = overRest;
function baseRest(a, P) {
  return _setToString_default(_overRest_default(a, P, identity_default), a + "");
}
var _baseRest_default = baseRest;
function isIterateeCall(a, P, I) {
  if (!isObject_default(I)) return false;
  var R = typeof P;
  return (R == "number" ? isArrayLike_default(I) && _isIndex_default(P, I.length) : R == "string" && P in I) ? eq_default(I[P], a) : false;
}
var _isIterateeCall_default = isIterateeCall;
function createAssigner(a) {
  return _baseRest_default(function(P, F) {
    var I = -1, L = F.length, R = L > 1 ? F[L - 1] : void 0, z = L > 2 ? F[2] : void 0;
    for (R = a.length > 3 && typeof R == "function" ? (L--, R) : void 0, z && _isIterateeCall_default(F[0], F[1], z) && (R = L < 3 ? void 0 : R, L = 1), P = Object(P); ++I < L; ) {
      var B = F[I];
      B && a(P, B, I, R);
    }
    return P;
  });
}
var _createAssigner_default = createAssigner;
function nativeKeysIn(a) {
  var P = [];
  if (a != null) for (var F in Object(a)) P.push(F);
  return P;
}
var _nativeKeysIn_default = nativeKeysIn, hasOwnProperty$1 = Object.prototype.hasOwnProperty;
function baseKeysIn(a) {
  if (!isObject_default(a)) return _nativeKeysIn_default(a);
  var P = _isPrototype_default(a), I = [];
  for (var L in a) L == "constructor" && (P || !hasOwnProperty$1.call(a, L)) || I.push(L);
  return I;
}
var _baseKeysIn_default = baseKeysIn;
function keysIn(a) {
  return isArrayLike_default(a) ? _arrayLikeKeys_default(a, true) : _baseKeysIn_default(a);
}
var keysIn_default = keysIn, _getPrototype_default = _overArg_default(Object.getPrototypeOf, Object), objectTag = "[object Object]", funcProto = Function.prototype, objectProto = Object.prototype, funcToString = funcProto.toString, hasOwnProperty = objectProto.hasOwnProperty, objectCtorString = funcToString.call(Object);
function isPlainObject(a) {
  if (!isObjectLike_default(a) || _baseGetTag_default(a) != objectTag) return false;
  var P = _getPrototype_default(a);
  if (P === null) return true;
  var F = hasOwnProperty.call(P, "constructor") && P.constructor;
  return typeof F == "function" && F instanceof F && funcToString.call(F) == objectCtorString;
}
var isPlainObject_default = isPlainObject, freeExports = typeof exports == "object" && exports && !exports.nodeType && exports, freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module, Buffer = freeModule && freeModule.exports === freeExports ? _root_default.Buffer : void 0, allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0;
function cloneBuffer(a, P) {
  if (P) return a.slice();
  var F = a.length, I = allocUnsafe ? allocUnsafe(F) : new a.constructor(F);
  return a.copy(I), I;
}
var _cloneBuffer_default = cloneBuffer;
function cloneArrayBuffer(a) {
  var P = new a.constructor(a.byteLength);
  return new _Uint8Array_default(P).set(new _Uint8Array_default(a)), P;
}
var _cloneArrayBuffer_default = cloneArrayBuffer;
function cloneTypedArray(a, P) {
  var F = P ? _cloneArrayBuffer_default(a.buffer) : a.buffer;
  return new a.constructor(F, a.byteOffset, a.length);
}
var _cloneTypedArray_default = cloneTypedArray;
function initCloneObject(a) {
  return typeof a.constructor == "function" && !_isPrototype_default(a) ? _baseCreate_default(_getPrototype_default(a)) : {};
}
var _initCloneObject_default = initCloneObject;
function assignMergeValue(a, P, F) {
  (F !== void 0 && !eq_default(a[P], F) || F === void 0 && !(P in a)) && _baseAssignValue_default(a, P, F);
}
var _assignMergeValue_default = assignMergeValue;
function isArrayLikeObject(a) {
  return isObjectLike_default(a) && isArrayLike_default(a);
}
var isArrayLikeObject_default = isArrayLikeObject;
function safeGet(a, P) {
  if (!(P === "constructor" && typeof a[P] == "function") && P != "__proto__") return a[P];
}
var _safeGet_default = safeGet;
function toPlainObject(a) {
  return _copyObject_default(a, keysIn_default(a));
}
var toPlainObject_default = toPlainObject;
function baseMergeDeep(P, I, L, H, U, W, G) {
  var K = _safeGet_default(P, L), q = _safeGet_default(I, L), J = G.get(q);
  if (J) {
    _assignMergeValue_default(P, L, J);
    return;
  }
  var Y = W ? W(K, q, L + "", P, I, G) : void 0, X = Y === void 0;
  if (X) {
    var Z = isArray_default(q), Q = !Z && isBuffer_default(q), $ = !Z && !Q && isTypedArray_default(q);
    Y = q, Z || Q || $ ? isArray_default(K) ? Y = K : isArrayLikeObject_default(K) ? Y = _copyArray_default(K) : Q ? (X = false, Y = _cloneBuffer_default(q, true)) : $ ? (X = false, Y = _cloneTypedArray_default(q, true)) : Y = [] : isPlainObject_default(q) || isArguments_default(q) ? (Y = K, isArguments_default(K) ? Y = toPlainObject_default(K) : (!isObject_default(K) || isFunction_default(K)) && (Y = _initCloneObject_default(q))) : X = false;
  }
  X && (G.set(q, Y), U(Y, q, H, W, G), G.delete(q)), _assignMergeValue_default(P, L, Y);
}
var _baseMergeDeep_default = baseMergeDeep;
function baseMerge(a, P, I, L, R) {
  a !== P && _baseFor_default(P, function(z, B) {
    if (R || (R = new _Stack_default()), isObject_default(z)) _baseMergeDeep_default(a, P, B, I, baseMerge, L, R);
    else {
      var V = L ? L(_safeGet_default(a, B), z, B + "", a, P, R) : void 0;
      V === void 0 && (V = z), _assignMergeValue_default(a, B, V);
    }
  }, keysIn_default);
}
var _baseMerge_default = baseMerge, merge_default = _createAssigner_default(function(a, P, F) {
  _baseMerge_default(a, P, F);
});
export {
  _copyArray_default as _,
  _cloneArrayBuffer_default as a,
  keysIn_default as c,
  _overRest_default as d,
  _copyObject_default as f,
  constant_default as g,
  _setToString_default as h,
  _cloneTypedArray_default as i,
  _isIterateeCall_default as l,
  _baseAssignValue_default as m,
  isArrayLikeObject_default as n,
  _cloneBuffer_default as o,
  _assignValue_default as p,
  _initCloneObject_default as r,
  _getPrototype_default as s,
  merge_default as t,
  _baseRest_default as u
};
