const c = (s, n = !1) => {
  const a = Symbol(), o = Symbol();
  return (u, d, t) => {
    const l = t.value;
    t.value = function(...i) {
      const e = this;
      clearTimeout(e[a]), n && !e[o] && (l.apply(this, i), e[o] = !0), e[a] = window.setTimeout(() => {
        n || l.apply(this, i), e[o] = !1;
      }, s);
    }, t.configurable === !1 && (t.configurable = !0);
  };
};
export {
  c as d
};
