{"ast":null,"code":"import * as React from 'react';\n\n/**\n * Returns the ref of a React element handling differences between React 19 and older versions.\n * It will throw runtime error if the element is not a valid React element.\n *\n * @param element React.ReactElement\n * @returns React.Ref | null\n */\nexport default function getReactElementRef(element) {\n // 'ref' is passed as prop in React 19, whereas 'ref' is directly attached to children in older versions\n if (parseInt(React.version, 10) >= 19) {\n var _element$props;\n return (element == null || (_element$props = element.props) == null ? void 0 : _element$props.ref) || null;\n }\n // @ts-expect-error element.ref is not included in the ReactElement type\n // https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/70189\n return (element == null ? void 0 : element.ref) || null;\n}","map":{"version":3,"names":["React","getReactElementRef","element","parseInt","version","_element$props","props","ref"],"sources":["/home/gnx/Desktop/ETB/ETB-FrontEnd/node_modules/@mui/utils/esm/getReactElementRef/getReactElementRef.js"],"sourcesContent":["import * as React from 'react';\n\n/**\n * Returns the ref of a React element handling differences between React 19 and older versions.\n * It will throw runtime error if the element is not a valid React element.\n *\n * @param element React.ReactElement\n * @returns React.Ref | null\n */\nexport default function getReactElementRef(element) {\n // 'ref' is passed as prop in React 19, whereas 'ref' is directly attached to children in older versions\n if (parseInt(React.version, 10) >= 19) {\n var _element$props;\n return (element == null || (_element$props = element.props) == null ? void 0 : _element$props.ref) || null;\n }\n // @ts-expect-error element.ref is not included in the ReactElement type\n // https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/70189\n return (element == null ? void 0 : element.ref) || null;\n}"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,kBAAkBA,CAACC,OAAO,EAAE;EAClD;EACA,IAAIC,QAAQ,CAACH,KAAK,CAACI,OAAO,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE;IACrC,IAAIC,cAAc;IAClB,OAAO,CAACH,OAAO,IAAI,IAAI,IAAI,CAACG,cAAc,GAAGH,OAAO,CAACI,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAGD,cAAc,CAACE,GAAG,KAAK,IAAI;EAC5G;EACA;EACA;EACA,OAAO,CAACL,OAAO,IAAI,IAAI,GAAG,KAAK,CAAC,GAAGA,OAAO,CAACK,GAAG,KAAK,IAAI;AACzD","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}