function d(n) {
  for (let t = n.length - 1; t > 0; t--) {
    const o = Math.floor(Math.random() * (t + 1));
    [n[t], n[o]] = [n[o], n[t]];
  }
}
function u(n, t) {
  const o = [];
  for (let l = 0; l < n.length; l++)
    n[l] === t && o.push(l);
  return o;
}
function r(n, t, o, l) {
  d(t);
  for (let e = 0; e < l && e < t.length; e++)
    n[t[e]] = o;
}
function h(n, t, o) {
  const l = n + t + o, e = new Array(l).fill("optimal");
  let c = 0, s = 1, i = 0;
  for (; Math.round(c) < l && i < o; ) {
    const f = Math.round(c);
    e[f] === "optimal" && (e[f] = "outOfRange", i++), c += s, s += 0.3;
  }
  if (i < o) {
    const f = u(e, "optimal");
    r(e, f, "outOfRange", o - i);
  }
  const p = u(e, "optimal");
  return r(e, p, "inRange", t), e;
}
export {
  h as distributePoints
};
