function c() {
  var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], t = r.length, u = n.length;
  if (Math.abs(t - u) !== 1)
    return {
      add: !1,
      key: null
    };
  function a(d, f) {
    var e = /* @__PURE__ */ new Map();
    d.forEach(function(i) {
      e.set(i, !0);
    });
    var s = f.filter(function(i) {
      return !e.has(i);
    });
    return s.length === 1 ? s[0] : null;
  }
  return t < u ? {
    add: !0,
    key: a(r, n)
  } : {
    add: !1,
    key: a(n, r)
  };
}
function l(r, n, t) {
  var u = r.findIndex(function(e) {
    return e.key === t;
  }), a = r[u + 1], d = n.findIndex(function(e) {
    return e.key === t;
  });
  if (a) {
    var f = n.findIndex(function(e) {
      return e.key === a.key;
    });
    return n.slice(d + 1, f);
  }
  return n.slice(d + 1);
}
export {
  c as findExpandedKeys,
  l as getExpandRange
};
