{"ast":null,"code":"import { transformAxes } from '../../../render/html/utils/transform.js';\nfunction resetRotate(child) {\n  // If there's no detected rotation values, we can early return without a forced render.\n  var hasRotate = false;\n  // Keep a record of all the values we've reset\n  var resetValues = {};\n  // Check the rotate value of all axes and reset to 0\n  for (var i = 0; i < transformAxes.length; i++) {\n    var axis = transformAxes[i];\n    var key = \"rotate\" + axis;\n    // If this rotation doesn't exist as a motion value, then we don't\n    // need to reset it\n    if (!child.hasValue(key) || child.getStaticValue(key) === 0) continue;\n    hasRotate = true;\n    // Record the rotation and then temporarily set it to 0\n    resetValues[key] = child.getStaticValue(key);\n    child.setStaticValue(key, 0);\n  }\n  // If there's no rotation values, we don't need to do any more.\n  if (!hasRotate) return;\n  // Force a render of this element to apply the transform with all rotations\n  // set to 0.\n  child.syncRender();\n  // Put back all the values we reset\n  for (var key in resetValues) {\n    child.setStaticValue(key, resetValues[key]);\n  }\n  // Schedule a render for the next frame. This ensures we won't visually\n  // see the element with the reset rotate value applied.\n  child.scheduleRender();\n}\nexport { resetRotate };","map":{"version":3,"names":["transformAxes","resetRotate","child","hasRotate","resetValues","i","length","axis","key","hasValue","getStaticValue","setStaticValue","syncRender","scheduleRender"],"sources":["D:/DSP_Management/node_modules/framer-motion/dist/es/components/AnimateSharedLayout/utils/rotate.js"],"sourcesContent":["import { transformAxes } from '../../../render/html/utils/transform.js';\n\nfunction resetRotate(child) {\n    // If there's no detected rotation values, we can early return without a forced render.\n    var hasRotate = false;\n    // Keep a record of all the values we've reset\n    var resetValues = {};\n    // Check the rotate value of all axes and reset to 0\n    for (var i = 0; i < transformAxes.length; i++) {\n        var axis = transformAxes[i];\n        var key = \"rotate\" + axis;\n        // If this rotation doesn't exist as a motion value, then we don't\n        // need to reset it\n        if (!child.hasValue(key) || child.getStaticValue(key) === 0)\n            continue;\n        hasRotate = true;\n        // Record the rotation and then temporarily set it to 0\n        resetValues[key] = child.getStaticValue(key);\n        child.setStaticValue(key, 0);\n    }\n    // If there's no rotation values, we don't need to do any more.\n    if (!hasRotate)\n        return;\n    // Force a render of this element to apply the transform with all rotations\n    // set to 0.\n    child.syncRender();\n    // Put back all the values we reset\n    for (var key in resetValues) {\n        child.setStaticValue(key, resetValues[key]);\n    }\n    // Schedule a render for the next frame. This ensures we won't visually\n    // see the element with the reset rotate value applied.\n    child.scheduleRender();\n}\n\nexport { resetRotate };\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,yCAAyC;AAEvE,SAASC,WAAWA,CAACC,KAAK,EAAE;EACxB;EACA,IAAIC,SAAS,GAAG,KAAK;EACrB;EACA,IAAIC,WAAW,GAAG,CAAC,CAAC;EACpB;EACA,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGL,aAAa,CAACM,MAAM,EAAED,CAAC,EAAE,EAAE;IAC3C,IAAIE,IAAI,GAAGP,aAAa,CAACK,CAAC,CAAC;IAC3B,IAAIG,GAAG,GAAG,QAAQ,GAAGD,IAAI;IACzB;IACA;IACA,IAAI,CAACL,KAAK,CAACO,QAAQ,CAACD,GAAG,CAAC,IAAIN,KAAK,CAACQ,cAAc,CAACF,GAAG,CAAC,KAAK,CAAC,EACvD;IACJL,SAAS,GAAG,IAAI;IAChB;IACAC,WAAW,CAACI,GAAG,CAAC,GAAGN,KAAK,CAACQ,cAAc,CAACF,GAAG,CAAC;IAC5CN,KAAK,CAACS,cAAc,CAACH,GAAG,EAAE,CAAC,CAAC;EAChC;EACA;EACA,IAAI,CAACL,SAAS,EACV;EACJ;EACA;EACAD,KAAK,CAACU,UAAU,CAAC,CAAC;EAClB;EACA,KAAK,IAAIJ,GAAG,IAAIJ,WAAW,EAAE;IACzBF,KAAK,CAACS,cAAc,CAACH,GAAG,EAAEJ,WAAW,CAACI,GAAG,CAAC,CAAC;EAC/C;EACA;EACA;EACAN,KAAK,CAACW,cAAc,CAAC,CAAC;AAC1B;AAEA,SAASZ,WAAW","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}