import { U as w, z as D, y as c, g as U, S as y, h as Q } from "./use-debounce-search-V04Zachp.js";
import { M as Y, S as C, e as H, a as N, b as M } from "./_MapCache-CdMtAzzF.js";
import { useRef as b, useEffect as m, useState as J } from "react";
var W = "__lodash_hash_undefined__";
function q(r) {
  return this.__data__.set(r, W), this;
}
function K(r) {
  return this.__data__.has(r);
}
function O(r) {
  var n = -1, a = r == null ? 0 : r.length;
  for (this.__data__ = new Y(); ++n < a; )
    this.add(r[n]);
}
O.prototype.add = O.prototype.push = q;
O.prototype.has = K;
function X(r, n) {
  for (var a = -1, f = r == null ? 0 : r.length; ++a < f; )
    if (n(r[a], a, r))
      return !0;
  return !1;
}
function Z(r, n) {
  return r.has(n);
}
var h = 1, V = 2;
function G(r, n, a, f, i, e) {
  var s = a & h, l = r.length, u = n.length;
  if (l != u && !(s && u > l))
    return !1;
  var _ = e.get(r), d = e.get(n);
  if (_ && d)
    return _ == n && d == r;
  var g = -1, t = !0, A = a & V ? new O() : void 0;
  for (e.set(r, n), e.set(n, r); ++g < l; ) {
    var T = r[g], E = n[g];
    if (f)
      var L = s ? f(E, T, g, n, r, e) : f(T, E, g, r, n, e);
    if (L !== void 0) {
      if (L)
        continue;
      t = !1;
      break;
    }
    if (A) {
      if (!X(n, function(S, p) {
        if (!Z(A, p) && (T === S || i(T, S, a, f, e)))
          return A.push(p);
      })) {
        t = !1;
        break;
      }
    } else if (!(T === E || i(T, E, a, f, e))) {
      t = !1;
      break;
    }
  }
  return e.delete(r), e.delete(n), t;
}
function z(r) {
  var n = -1, a = Array(r.size);
  return r.forEach(function(f, i) {
    a[++n] = [i, f];
  }), a;
}
function j(r) {
  var n = -1, a = Array(r.size);
  return r.forEach(function(f) {
    a[++n] = f;
  }), a;
}
var k = 1, rr = 2, nr = "[object Boolean]", er = "[object Date]", ar = "[object Error]", fr = "[object Map]", sr = "[object Number]", tr = "[object RegExp]", ir = "[object Set]", ur = "[object String]", lr = "[object Symbol]", _r = "[object ArrayBuffer]", gr = "[object DataView]", x = C ? C.prototype : void 0, P = x ? x.valueOf : void 0;
function Tr(r, n, a, f, i, e, s) {
  switch (a) {
    case gr:
      if (r.byteLength != n.byteLength || r.byteOffset != n.byteOffset)
        return !1;
      r = r.buffer, n = n.buffer;
    case _r:
      return !(r.byteLength != n.byteLength || !e(new w(r), new w(n)));
    case nr:
    case er:
    case sr:
      return H(+r, +n);
    case ar:
      return r.name == n.name && r.message == n.message;
    case tr:
    case ur:
      return r == n + "";
    case fr:
      var l = z;
    case ir:
      var u = f & k;
      if (l || (l = j), r.size != n.size && !u)
        return !1;
      var _ = s.get(r);
      if (_)
        return _ == n;
      f |= rr, s.set(r, n);
      var d = G(l(r), l(n), f, i, e, s);
      return s.delete(r), d;
    case lr:
      if (P)
        return P.call(r) == P.call(n);
  }
  return !1;
}
var Er = 1, dr = Object.prototype, Ar = dr.hasOwnProperty;
function Lr(r, n, a, f, i, e) {
  var s = a & Er, l = D(r), u = l.length, _ = D(n), d = _.length;
  if (u != d && !s)
    return !1;
  for (var g = u; g--; ) {
    var t = l[g];
    if (!(s ? t in n : Ar.call(n, t)))
      return !1;
  }
  var A = e.get(r), T = e.get(n);
  if (A && T)
    return A == n && T == r;
  var E = !0;
  e.set(r, n), e.set(n, r);
  for (var L = s; ++g < u; ) {
    t = l[g];
    var S = r[t], p = n[t];
    if (f)
      var o = s ? f(p, S, t, n, r, e) : f(S, p, t, r, n, e);
    if (!(o === void 0 ? S === p || i(S, p, a, f, e) : o)) {
      E = !1;
      break;
    }
    L || (L = t == "constructor");
  }
  if (E && !L) {
    var v = r.constructor, R = n.constructor;
    v != R && "constructor" in r && "constructor" in n && !(typeof v == "function" && v instanceof v && typeof R == "function" && R instanceof R) && (E = !1);
  }
  return e.delete(r), e.delete(n), E;
}
var Sr = 1, F = "[object Arguments]", $ = "[object Array]", I = "[object Object]", pr = Object.prototype, B = pr.hasOwnProperty;
function vr(r, n, a, f, i, e) {
  var s = N(r), l = N(n), u = s ? $ : c(r), _ = l ? $ : c(n);
  u = u == F ? I : u, _ = _ == F ? I : _;
  var d = u == I, g = _ == I, t = u == _;
  if (t && U(r)) {
    if (!U(n))
      return !1;
    s = !0, d = !1;
  }
  if (t && !d)
    return e || (e = new y()), s || Q(r) ? G(r, n, a, f, i, e) : Tr(r, n, u, a, f, i, e);
  if (!(a & Sr)) {
    var A = d && B.call(r, "__wrapped__"), T = g && B.call(n, "__wrapped__");
    if (A || T) {
      var E = A ? r.value() : r, L = T ? n.value() : n;
      return e || (e = new y()), i(E, L, a, f, e);
    }
  }
  return t ? (e || (e = new y()), Lr(r, n, a, f, i, e)) : !1;
}
function Rr(r, n, a, f, i) {
  return r === n ? !0 : r == null || n == null || !M(r) && !M(n) ? r !== r && n !== n : vr(r, n, a, f, Rr, i);
}
const or = () => {
  const r = b(!1);
  return m(() => (r.current = !0, () => {
    r.current = !1;
  }), []), r;
};
var Ir = /* @__PURE__ */ ((r) => (r.SPACE_ID = "spaceId", r.SIDEBAR_WIDTH = "sidebarWidth", r.CURRENT_USER = "currentUser", r.DIFF_VIEW_STYLE = "DIFF_VIEW_STYLE", r.PULL_REQUEST_CREATION_OPTION = "PULL_REQUEST_CREATION_OPTION", r.PULL_REQUEST_ACTIVITY_FILTER = "PULL_REQUEST_ACTIVITY_FILTER", r.PULL_REQUEST_ACTIVITY_ORDER = "PULL_REQUEST_ACTIVITY_ORDER", r))(Ir || {});
function wr(r, n) {
  const [a, f] = J(() => {
    try {
      const e = localStorage.getItem(r);
      return e ? JSON.parse(e) : n;
    } catch (e) {
      return console.error("Error reading from localStorage:", e), n;
    }
  });
  return [a, (e) => {
    try {
      f(e), localStorage.setItem(r, JSON.stringify(e));
    } catch (s) {
      console.error("Error writing to localStorage:", s);
    }
  }];
}
export {
  O as S,
  Ir as U,
  X as a,
  Rr as b,
  Z as c,
  or as d,
  j as s,
  wr as u
};
//# sourceMappingURL=use-local-storage-WAcc3MCo.js.map
