{"ast":null,"code":"import { __assign } from 'tslib';\nimport { useMemo } from 'react';\nimport { isForcedMotionValue } from '../../motion/utils/is-forced-motion-value.js';\nimport { isMotionValue } from '../../value/utils/is-motion-value.js';\nimport { buildHTMLStyles } from './utils/build-styles.js';\nimport { createHtmlRenderState } from './utils/create-render-state.js';\nfunction copyRawValuesOnly(target, source, props) {\n  for (var key in source) {\n    if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n      target[key] = source[key];\n    }\n  }\n}\nfunction useInitialMotionValues(_a, visualState, isStatic) {\n  var transformTemplate = _a.transformTemplate;\n  return useMemo(function () {\n    var state = createHtmlRenderState();\n    buildHTMLStyles(state, visualState, undefined, undefined, {\n      enableHardwareAcceleration: !isStatic\n    }, transformTemplate);\n    var vars = state.vars,\n      style = state.style;\n    return __assign(__assign({}, vars), style);\n  }, [visualState]);\n}\nfunction useStyle(props, visualState, isStatic) {\n  var styleProp = props.style || {};\n  var style = {};\n  /**\n   * Copy non-Motion Values straight into style\n   */\n  copyRawValuesOnly(style, styleProp, props);\n  Object.assign(style, useInitialMotionValues(props, visualState, isStatic));\n  if (props.transformValues) {\n    style = props.transformValues(style);\n  }\n  return style;\n}\nfunction useHTMLProps(props, visualState, isStatic) {\n  // The `any` isn't ideal but it is the type of createElement props argument\n  var htmlProps = {};\n  var style = useStyle(props, visualState, isStatic);\n  if (Boolean(props.drag)) {\n    // Disable the ghost element when a user drags\n    htmlProps.draggable = false;\n    // Disable text selection\n    style.userSelect = style.WebkitUserSelect = style.WebkitTouchCallout = \"none\";\n    // Disable scrolling on the draggable direction\n    style.touchAction = props.drag === true ? \"none\" : \"pan-\" + (props.drag === \"x\" ? \"y\" : \"x\");\n  }\n  htmlProps.style = style;\n  return htmlProps;\n}\nexport { copyRawValuesOnly, useHTMLProps, useStyle };","map":{"version":3,"names":["__assign","useMemo","isForcedMotionValue","isMotionValue","buildHTMLStyles","createHtmlRenderState","copyRawValuesOnly","target","source","props","key","useInitialMotionValues","_a","visualState","isStatic","transformTemplate","state","undefined","enableHardwareAcceleration","vars","style","useStyle","styleProp","Object","assign","transformValues","useHTMLProps","htmlProps","Boolean","drag","draggable","userSelect","WebkitUserSelect","WebkitTouchCallout","touchAction"],"sources":["D:/DSP_Management/node_modules/framer-motion/dist/es/render/html/use-props.js"],"sourcesContent":["import { __assign } from 'tslib';\nimport { useMemo } from 'react';\nimport { isForcedMotionValue } from '../../motion/utils/is-forced-motion-value.js';\nimport { isMotionValue } from '../../value/utils/is-motion-value.js';\nimport { buildHTMLStyles } from './utils/build-styles.js';\nimport { createHtmlRenderState } from './utils/create-render-state.js';\n\nfunction copyRawValuesOnly(target, source, props) {\n    for (var key in source) {\n        if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n            target[key] = source[key];\n        }\n    }\n}\nfunction useInitialMotionValues(_a, visualState, isStatic) {\n    var transformTemplate = _a.transformTemplate;\n    return useMemo(function () {\n        var state = createHtmlRenderState();\n        buildHTMLStyles(state, visualState, undefined, undefined, { enableHardwareAcceleration: !isStatic }, transformTemplate);\n        var vars = state.vars, style = state.style;\n        return __assign(__assign({}, vars), style);\n    }, [visualState]);\n}\nfunction useStyle(props, visualState, isStatic) {\n    var styleProp = props.style || {};\n    var style = {};\n    /**\n     * Copy non-Motion Values straight into style\n     */\n    copyRawValuesOnly(style, styleProp, props);\n    Object.assign(style, useInitialMotionValues(props, visualState, isStatic));\n    if (props.transformValues) {\n        style = props.transformValues(style);\n    }\n    return style;\n}\nfunction useHTMLProps(props, visualState, isStatic) {\n    // The `any` isn't ideal but it is the type of createElement props argument\n    var htmlProps = {};\n    var style = useStyle(props, visualState, isStatic);\n    if (Boolean(props.drag)) {\n        // Disable the ghost element when a user drags\n        htmlProps.draggable = false;\n        // Disable text selection\n        style.userSelect = style.WebkitUserSelect = style.WebkitTouchCallout =\n            \"none\";\n        // Disable scrolling on the draggable direction\n        style.touchAction =\n            props.drag === true\n                ? \"none\"\n                : \"pan-\" + (props.drag === \"x\" ? \"y\" :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