{"ast":null,"code":"import { motionValue } from '../value/index.js';\nimport { isMotionValue } from '../value/utils/is-motion-value.js';\nimport { startAnimation } from './utils/transitions.js';\n\n/**\n * Animate a single value or a `MotionValue`.\n *\n * The first argument is either a `MotionValue` to animate, or an initial animation value.\n *\n * The second is either a value to animate to, or an array of keyframes to animate through.\n *\n * The third argument can be either tween or spring options, and optional lifecycle methods: `onUpdate`, `onPlay`, `onComplete`, `onRepeat` and `onStop`.\n *\n * Returns `AnimationPlaybackControls`, currently just a `stop` method.\n *\n * ```javascript\n * const x = useMotionValue(0)\n *\n * useEffect(() => {\n *   const controls = animate(x, 100, {\n *     type: \"spring\",\n *     stiffness: 2000,\n *     onComplete: v => {}\n *   })\n *\n *   return controls.stop\n * })\n * ```\n *\n * @public\n */\nfunction animate(from, to, transition) {\n  if (transition === void 0) {\n    transition = {};\n  }\n  var value = isMotionValue(from) ? from : motionValue(from);\n  startAnimation(\"\", value, to, transition);\n  return {\n    stop: function stop() {\n      return value.stop();\n    }\n  };\n}\nexport { animate };","map":{"version":3,"names":["motionValue","isMotionValue","startAnimation","animate","from","to","transition","value","stop"],"sources":["C:/ldt/LDT/Safemate_Management/node_modules/framer-motion/dist/es/animation/animate.js"],"sourcesContent":["import { motionValue } from '../value/index.js';\nimport { isMotionValue } from '../value/utils/is-motion-value.js';\nimport { startAnimation } from './utils/transitions.js';\n\n/**\n * Animate a single value or a `MotionValue`.\n *\n * The first argument is either a `MotionValue` to animate, or an initial animation value.\n *\n * The second is either a value to animate to, or an array of keyframes to animate through.\n *\n * The third argument can be either tween or spring options, and optional lifecycle methods: `onUpdate`, `onPlay`, `onComplete`, `onRepeat` and `onStop`.\n *\n * Returns `AnimationPlaybackControls`, currently just a `stop` method.\n *\n * ```javascript\n * const x = useMotionValue(0)\n *\n * useEffect(() => {\n *   const controls = animate(x, 100, {\n *     type: \"spring\",\n *     stiffness: 2000,\n *     onComplete: v => {}\n *   })\n *\n *   return controls.stop\n * })\n * ```\n *\n * @public\n */\nfunction animate(from, to, transition) {\n    if (transition === void 0) { transition = {}; }\n    var value = isMotionValue(from) ? from : motionValue(from);\n    startAnimation(\"\", value, to, transition);\n    return {\n        stop: function () { return value.stop(); },\n    };\n}\n\nexport { animate };\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,aAAa,QAAQ,mCAAmC;AACjE,SAASC,cAAc,QAAQ,wBAAwB;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,OAAOA,CAACC,IAAI,EAAEC,EAAE,EAAEC,UAAU,EAAE;EACnC,IAAIA,UAAU,KAAK,KAAK,CAAC,EAAE;IAAEA,UAAU,GAAG,CAAC,CAAC;EAAE;EAC9C,IAAIC,KAAK,GAAGN,aAAa,CAACG,IAAI,CAAC,GAAGA,IAAI,GAAGJ,WAAW,CAACI,IAAI,CAAC;EAC1DF,cAAc,CAAC,EAAE,EAAEK,KAAK,EAAEF,EAAE,EAAEC,UAAU,CAAC;EACzC,OAAO;IACHE,IAAI,EAAE,SAANA,IAAIA,CAAA,EAAc;MAAE,OAAOD,KAAK,CAACC,IAAI,CAAC,CAAC;IAAE;EAC7C,CAAC;AACL;AAEA,SAASL,OAAO","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}