import { c as x, m } from "./_baseUniq-e54e3d96.mjs";
import { cg as I, bH as O, bK as P, c6 as w, ch as c, bw as F, bC as g, by as _, ci as N, c8 as $, bU as E, bV as h, cj as b, ck as M, cl as A, bz as C, c9 as G } from "./main-255328c3.mjs";
var v = 1 / 0, H = 17976931348623157e292;
function K(n) {
  if (!n)
    return n === 0 ? n : 0;
  if (n = I(n), n === v || n === -v) {
    var t = n < 0 ? -1 : 1;
    return t * H;
  }
  return n === n ? n : 0;
}
function L(n) {
  var t = K(n), a = t % 1;
  return t === t ? a ? t - a : t : 0;
}
function Z(n) {
  var t = n == null ? 0 : n.length;
  return t ? x(n, 1) : [];
}
var o = Object.prototype, R = o.hasOwnProperty, S = O(function(n, t) {
  n = Object(n);
  var a = -1, s = t.length, r = s > 2 ? t[2] : void 0;
  for (r && P(t[0], t[1], r) && (s = 1); ++a < s; )
    for (var f = t[a], i = w(f), e = -1, d = i.length; ++e < d; ) {
      var u = i[e], l = n[u];
      (l === void 0 || c(l, o[u]) && !R.call(n, u)) && (n[u] = f[u]);
    }
  return n;
});
const V = S;
function y(n) {
  var t = n == null ? 0 : n.length;
  return t ? n[t - 1] : void 0;
}
function T(n) {
  return function(t, a, s) {
    var r = Object(t);
    if (!F(t)) {
      var f = g(a);
      t = _(t), a = function(e) {
        return f(r[e], e, r);
      };
    }
    var i = n(t, a, s);
    return i > -1 ? r[f ? t[i] : i] : void 0;
  };
}
var q = Math.max;
function B(n, t, a) {
  var s = n == null ? 0 : n.length;
  if (!s)
    return -1;
  var r = a == null ? 0 : L(a);
  return r < 0 && (r = q(s + r, 0)), m(n, g(t), r);
}
var U = T(B);
const k = U;
var X = Object.prototype, Y = X.hasOwnProperty;
function p(n, t) {
  return n != null && Y.call(n, t);
}
function j(n, t) {
  return n != null && N(n, t, p);
}
function z(n, t) {
  return n < t;
}
function D(n, t, a) {
  for (var s = -1, r = n.length; ++s < r; ) {
    var f = n[s], i = t(f);
    if (i != null && (e === void 0 ? i === i && !$(i) : a(i, e)))
      var e = i, d = f;
  }
  return d;
}
function nn(n) {
  return n && n.length ? D(n, E, z) : void 0;
}
function J(n, t, a, s) {
  if (!h(n))
    return n;
  t = b(t, n);
  for (var r = -1, f = t.length, i = f - 1, e = n; e != null && ++r < f; ) {
    var d = M(t[r]), u = a;
    if (d === "__proto__" || d === "constructor" || d === "prototype")
      return n;
    if (r != i) {
      var l = e[d];
      u = s ? s(l, d, e) : void 0, u === void 0 && (u = h(l) ? l : A(t[r + 1]) ? [] : {});
    }
    C(e, d, u), e = e[d];
  }
  return n;
}
function tn(n, t, a) {
  for (var s = -1, r = t.length, f = {}; ++s < r; ) {
    var i = t[s], e = G(n, i);
    a(e, i) && J(f, b(i, n), e);
  }
  return f;
}
export {
  k as a,
  tn as b,
  D as c,
  V as d,
  z as e,
  Z as f,
  K as g,
  j as h,
  y as l,
  nn as m,
  L as t
};
