{"version":3,"file":"index.DSq3fLla.js","sources":["../../../node_modules/@radix-ui/react-use-size/dist/index.mjs"],"sourcesContent":["// packages/react/use-size/src/useSize.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nfunction useSize(element) {\n const [size, setSize] = React.useState(void 0);\n useLayoutEffect(() => {\n if (element) {\n setSize({ width: element.offsetWidth, height: element.offsetHeight });\n const resizeObserver = new ResizeObserver((entries) => {\n if (!Array.isArray(entries)) {\n return;\n }\n if (!entries.length) {\n return;\n }\n const entry = entries[0];\n let width;\n let height;\n if (\"borderBoxSize\" in entry) {\n const borderSizeEntry = entry[\"borderBoxSize\"];\n const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;\n width = borderSize[\"inlineSize\"];\n height = borderSize[\"blockSize\"];\n } else {\n width = element.offsetWidth;\n height = element.offsetHeight;\n }\n setSize({ width, height });\n });\n resizeObserver.observe(element, { box: \"border-box\" });\n return () => resizeObserver.unobserve(element);\n } else {\n setSize(void 0);\n }\n }, [element]);\n return size;\n}\nexport {\n useSize\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useSize","element","size","setSize","React.useState","useLayoutEffect","resizeObserver","entries","entry","width","height","borderSizeEntry","borderSize"],"mappings":"yYAGA,SAASA,EAAQC,EAAS,CACxB,KAAM,CAACC,EAAMC,CAAO,EAAIC,EAAAA,SAAe,MAAM,EAC7CC,OAAAA,EAAgB,IAAM,CACpB,GAAIJ,EAAS,CACXE,EAAQ,CAAE,MAAOF,EAAQ,YAAa,OAAQA,EAAQ,YAAY,CAAE,EACpE,MAAMK,EAAiB,IAAI,eAAgBC,GAAY,CAIrD,GAHI,CAAC,MAAM,QAAQA,CAAO,GAGtB,CAACA,EAAQ,OACX,OAEF,MAAMC,EAAQD,EAAQ,CAAC,EACvB,IAAIE,EACAC,EACJ,GAAI,kBAAmBF,EAAO,CAC5B,MAAMG,EAAkBH,EAAM,cACxBI,EAAa,MAAM,QAAQD,CAAe,EAAIA,EAAgB,CAAC,EAAIA,EACzEF,EAAQG,EAAW,WACnBF,EAASE,EAAW,SAC9B,MACUH,EAAQR,EAAQ,YAChBS,EAAST,EAAQ,aAEnBE,EAAQ,CAAE,MAAAM,EAAO,OAAAC,CAAM,CAAE,CACjC,CAAO,EACD,OAAAJ,EAAe,QAAQL,EAAS,CAAE,IAAK,YAAc,CAAA,EAC9C,IAAMK,EAAe,UAAUL,CAAO,CACnD,MACME,EAAQ,MAAM,CAEpB,EAAK,CAACF,CAAO,CAAC,EACLC,CACT","x_google_ignoreList":[0]}