function g(o, t) {
  const r = typeof o == "number" ? o : o.offsetWidth, f = t.length > 0 && typeof t[0] == "number" ? t : t.map((e) => e.offsetWidth);
  if (f.length <= 1 || r === 0) return 0;
  const n = f.length;
  let a = 0, i = n;
  for (let e = 0; e < n; e++) {
    const s = f[e], l = e > 0 ? 4 : 0, c = n - (e + 1) > 0 ? 40 : 0;
    if (a + l + s + c > r) {
      i = Math.max(1, e);
      break;
    }
    a += l + s;
  }
  return n - i;
}
export {
  g as default
};
//# sourceMappingURL=calculateTagOverflow.js.map
