function l(n) {
  return n();
}
function m(n) {
  let t = !1;
  return function(...o) {
    t || (requestAnimationFrame(() => {
      n(...o), t = !1;
    }), t = !0);
  };
}
function p(n) {
  return new Promise((t) => setTimeout(t, n));
}
function d(n, t) {
  const e = setTimeout(n, t);
  return () => {
    clearTimeout(e);
  };
}
function c(n, t) {
  return n = Math.ceil(n), t = Math.floor(t), Math.floor(Math.random() * (t - n)) + n;
}
function g(n) {
  let t = "";
  for (let e = 0; e < n; e++)
    t += String.fromCharCode(c(65, 91));
  return t;
}
function h(n) {
  return function(t) {
    return 1 - n(1 - t);
  };
}
function w(n) {
  return function(t) {
    return t < 0.5 ? n(2 * t) / 2 : (2 - n(2 * (1 - t))) / 2;
  };
}
function T(n) {
  const { duration: t, draw: e, timing: o } = n, r = performance.now();
  let u = !1;
  return requestAnimationFrame(function a(f) {
    let i = (f - r) / t;
    (i > 1 || u) && (i = 1);
    const s = o(i);
    e(s), i < 1 && requestAnimationFrame(a);
  }), function() {
    u = !0;
  };
}
function A(n) {
  const { getFraction: t, draw: e, timing: o } = n, r = performance.now();
  let u = !1;
  return requestAnimationFrame(function a(f) {
    let i = t(f - r);
    if (u)
      return;
    i > 1 && (i = 1);
    const s = o(i);
    e(s), i < 1 && requestAnimationFrame(a);
  }), function() {
    u = !0;
  };
}
function q(n, t, e = !0) {
  let o = 0, r;
  return function(...u) {
    r = () => {
      n.apply(this, u), o = (/* @__PURE__ */ new Date()).getTime() + t, r = null, e && setTimeout(() => {
        r == null || r();
      }, t);
    }, (/* @__PURE__ */ new Date()).getTime() > o && r();
  };
}
function F(n) {
  return n.map((t) => ({ text: String(t), value: t }));
}
function k(n) {
  if (!Array.isArray(n))
    throw Error("Invalid component options: " + String(n));
  return n.map((t) => ({
    label: "label" in t ? t.label : t.text,
    value: t.value,
    description: t.description,
    group: t.group
  }));
}
export {
  T as animate,
  A as animateInfinite,
  l as call,
  p as delay,
  F as listToOptions,
  w as makeEaseInOut,
  h as makeEaseOut,
  k as normalizeListOptions,
  c as randomInt,
  g as randomString,
  m as requestTick,
  q as throttle,
  d as timeout
};
//# sourceMappingURL=utils.js.map
