{"ast":null,"code":"import { useEffect } from 'react';\nimport { useMotionValue } from './use-motion-value.js';\n\n/**\n * Creates a `MotionValue` that updates when the velocity of the provided `MotionValue` changes.\n *\n * ```javascript\n * const x = useMotionValue(0)\n * const xVelocity = useVelocity(x)\n * const xAcceleration = useVelocity(xVelocity)\n * ```\n *\n * @public\n */\nfunction useVelocity(value) {\n  var velocity = useMotionValue(value.getVelocity());\n  useEffect(function () {\n    return value.velocityUpdateSubscribers.add(function (newVelocity) {\n      velocity.set(newVelocity);\n    });\n  }, [value]);\n  return velocity;\n}\nexport { useVelocity };","map":{"version":3,"names":["useEffect","useMotionValue","useVelocity","value","velocity","getVelocity","velocityUpdateSubscribers","add","newVelocity","set"],"sources":["C:/LDT/DSP_Management/node_modules/framer-motion/dist/es/value/use-velocity.js"],"sourcesContent":["import { useEffect } from 'react';\nimport { useMotionValue } from './use-motion-value.js';\n\n/**\n * Creates a `MotionValue` that updates when the velocity of the provided `MotionValue` changes.\n *\n * ```javascript\n * const x = useMotionValue(0)\n * const xVelocity = useVelocity(x)\n * const xAcceleration = useVelocity(xVelocity)\n * ```\n *\n * @public\n */\nfunction useVelocity(value) {\n    var velocity = useMotionValue(value.getVelocity());\n    useEffect(function () {\n        return value.velocityUpdateSubscribers.add(function (newVelocity) {\n            velocity.set(newVelocity);\n        });\n    }, [value]);\n    return velocity;\n}\n\nexport { useVelocity };\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,OAAO;AACjC,SAASC,cAAc,QAAQ,uBAAuB;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,WAAWA,CAACC,KAAK,EAAE;EACxB,IAAIC,QAAQ,GAAGH,cAAc,CAACE,KAAK,CAACE,WAAW,CAAC,CAAC,CAAC;EAClDL,SAAS,CAAC,YAAY;IAClB,OAAOG,KAAK,CAACG,yBAAyB,CAACC,GAAG,CAAC,UAAUC,WAAW,EAAE;MAC9DJ,QAAQ,CAACK,GAAG,CAACD,WAAW,CAAC;IAC7B,CAAC,CAAC;EACN,CAAC,EAAE,CAACL,KAAK,CAAC,CAAC;EACX,OAAOC,QAAQ;AACnB;AAEA,SAASF,WAAW","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}