import { color as m } from "../color/index.es.js";
import { number as b } from "../numbers/index.es.js";
import { isString as g, floatRegex as c, colorRegex as l, sanitize as k } from "../utils.es.js";
const i = "${c}", p = "${n}";
function x(e) {
  var o, n, r, t;
  return isNaN(e) && g(e) && ((n = (o = e.match(c)) === null || o === void 0 ? void 0 : o.length) !== null && n !== void 0 ? n : 0) + ((t = (r = e.match(l)) === null || r === void 0 ? void 0 : r.length) !== null && t !== void 0 ? t : 0) > 0;
}
function f(e) {
  typeof e == "number" && (e = `${e}`);
  const o = [];
  let n = 0;
  const r = e.match(l);
  r && (n = r.length, e = e.replace(l, i), o.push(...r.map(m.parse)));
  const t = e.match(c);
  return t && (e = e.replace(c, p), o.push(...t.map(b.parse))), { values: o, numColors: n, tokenised: e };
}
function d(e) {
  return f(e).values;
}
function h(e) {
  const { values: o, numColors: n, tokenised: r } = f(e), t = o.length;
  return (u) => {
    let a = r;
    for (let s = 0; s < t; s++)
      a = a.replace(s < n ? i : p, s < n ? m.transform(u[s]) : k(u[s]));
    return a;
  };
}
const N = (e) => typeof e == "number" ? 0 : e;
function T(e) {
  const o = d(e);
  return h(e)(o.map(N));
}
const C = { test: x, parse: d, createTransformer: h, getAnimatableNone: T };
export {
  C as complex
};
//# sourceMappingURL=index.es.js.map
