{"version":3,"file":"index.mjs","sources":["../../../../../src/render/utils/reduced-motion/index.ts"],"sourcesContent":["import { hasReducedMotionListener, prefersReducedMotion } from \"./state\"\n\nconst isBrowser = typeof window !== \"undefined\"\n\nexport function initPrefersReducedMotion() {\n    hasReducedMotionListener.current = true\n    if (!isBrowser) return\n\n    if (window.matchMedia) {\n        const motionMediaQuery = window.matchMedia(\"(prefers-reduced-motion)\")\n\n        const setReducedMotionPreferences = () =>\n            (prefersReducedMotion.current = motionMediaQuery.matches)\n\n        motionMediaQuery.addEventListener(\"change\", setReducedMotionPreferences)\n\n        setReducedMotionPreferences()\n    } else {\n        prefersReducedMotion.current = false\n    }\n}\n\nexport { prefersReducedMotion, hasReducedMotionListener }\n"],"names":[],"mappings":";;AAEA,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,WAAW;SAE/B,wBAAwB,GAAA;AACpC,IAAA,wBAAwB,CAAC,OAAO,GAAG,IAAI;AACvC,IAAA,IAAI,CAAC,SAAS;QAAE;AAEhB,IAAA,IAAI,MAAM,CAAC,UAAU,EAAE;QACnB,MAAM,gBAAgB,GAAG,MAAM,CAAC,UAAU,CAAC,0BAA0B,CAAC;AAEtE,QAAA,MAAM,2BAA2B,GAAG,OAC/B,oBAAoB,CAAC,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC;AAE7D,QAAA,gBAAgB,CAAC,gBAAgB,CAAC,QAAQ,EAAE,2BAA2B,CAAC;AAExE,QAAA,2BAA2B,EAAE;IACjC;SAAO;AACH,QAAA,oBAAoB,CAAC,OAAO,GAAG,KAAK;IACxC;AACJ;;;;"}