import { __read } from "../../../../../../../tslib@2.6.2/node_modules/tslib/tslib.es6.js";
import { invariant } from "../../../../../../../hey-listen@1.0.8/node_modules/hey-listen/dist/hey-listen.es.js";
import { cubicBezier } from "../../../../../../../popmotion@11.0.3/node_modules/popmotion/dist/es/easing/cubic-bezier.js";
import { linear, easeIn, easeInOut, easeOut, circIn, circInOut, circOut, backIn, backInOut, backOut, anticipate, bounceIn, bounceInOut, bounceOut } from "../../../../../../../popmotion@11.0.3/node_modules/popmotion/dist/es/easing/index.js";
var easingLookup = {
  linear,
  easeIn,
  easeInOut,
  easeOut,
  circIn,
  circInOut,
  circOut,
  backIn,
  backInOut,
  backOut,
  anticipate,
  bounceIn,
  bounceInOut,
  bounceOut
};
var easingDefinitionToFunction = function(definition) {
  if (Array.isArray(definition)) {
    invariant(definition.length === 4, "Cubic bezier arrays must contain four numerical values.");
    var _a = __read(definition, 4), x1 = _a[0], y1 = _a[1], x2 = _a[2], y2 = _a[3];
    return cubicBezier(x1, y1, x2, y2);
  } else if (typeof definition === "string") {
    invariant(easingLookup[definition] !== void 0, "Invalid easing type '".concat(definition, "'"));
    return easingLookup[definition];
  }
  return definition;
};
var isEasingArray = function(ease) {
  return Array.isArray(ease) && typeof ease[0] !== "number";
};
export {
  easingDefinitionToFunction,
  isEasingArray
};
//# sourceMappingURL=easing.js.map
