import m from "../../../@babel/runtime/helpers/esm/toConsumableArray.mjs";
import l from "../../../rc-util/es/raf.mjs";
function i(e) {
  let t;
  const u = (r) => () => {
    t = null, e.apply(void 0, m(r));
  }, o = function() {
    if (t == null) {
      for (var r = arguments.length, a = new Array(r), n = 0; n < r; n++)
        a[n] = arguments[n];
      t = l(u(a));
    }
  };
  return o.cancel = () => {
    l.cancel(t), t = null;
  }, o;
}
export {
  i as default
};
