@novie/ui 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.css +4 -0
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","React","React","React","React","useId","React","React","useLayoutEffect","React","React","ITEM_NAME","useId","Root","React","React","React","React2","React","createContextScope2","RadioGroup","React2","RovingFocusGroup.Root","Primitive2","RadioGroupItem","useComposedRefs2","RovingFocusGroup.Item","composeEventHandlers2","Root2","React","computePosition","arrow","flip","hide","offset","shift","limitShift","size","getComputedStyle","offset","offset$1","shift","shift$1","flip","flip$1","size","size$1","hide","hide$1","arrow","arrow$1","limitShift","limitShift$1","React","NAME","Arrow","React","Root","React","CONTENT_NAME","arrow","floatingUIarrow","ARROW_NAME","ArrowPrimitive.Root","PORTAL_NAME","Portal","React","React","TooltipProvider","React","Tooltip","useId","PopperPrimitive.Root","TooltipTrigger","PopperPrimitive.Anchor","PortalPrimitive","TooltipContent","PopperPrimitive.Content","VisuallyHiddenPrimitive.Root","PopperPrimitive.Arrow"],"sources":["../src/lib/utils.ts","../src/components/ui/novie-logo.tsx","../src/components/ui/novie-symbol.tsx","../src/components/ui/button.tsx","../src/components/ui/input.tsx","../src/components/ui/label.tsx","../src/components/ui/checkbox.tsx","../src/components/ui/switch.tsx","../node_modules/@radix-ui/primitive/dist/index.mjs","../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../node_modules/@radix-ui/react-context/dist/index.mjs","../node_modules/@radix-ui/react-primitive/dist/index.mjs","../node_modules/@radix-ui/react-collection/dist/index.mjs","../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs","../node_modules/@radix-ui/react-id/dist/index.mjs","../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs","../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs","../node_modules/@radix-ui/react-direction/dist/index.mjs","../node_modules/@radix-ui/react-roving-focus/dist/index.mjs","../node_modules/@radix-ui/react-use-size/dist/index.mjs","../node_modules/@radix-ui/react-use-previous/dist/index.mjs","../node_modules/@radix-ui/react-presence/dist/index.mjs","../node_modules/@radix-ui/react-radio-group/dist/index.mjs","../src/components/ui/radio-group.tsx","../src/components/ui/separator.tsx","../src/components/ui/badge.tsx","../src/components/ui/tag.tsx","../src/components/ui/avatar.tsx","../src/components/ui/icon-button.tsx","../src/components/ui/progress.tsx","../src/components/ui/input-field.tsx","../src/components/ui/search-input.tsx","../src/components/ui/stepper.tsx","../src/components/ui/card.tsx","../src/components/ui/table.tsx","../src/components/ui/dialog.tsx","../node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs","../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs","../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs","../node_modules/@radix-ui/react-arrow/dist/index.mjs","../node_modules/@radix-ui/react-popper/dist/index.mjs","../node_modules/@radix-ui/react-portal/dist/index.mjs","../node_modules/@radix-ui/react-visually-hidden/dist/index.mjs","../node_modules/@radix-ui/react-tooltip/dist/index.mjs","../src/components/ui/tooltip.tsx","../src/components/ui/alert.tsx","../src/components/ui/toast.tsx"],"sourcesContent":["import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import { cn } from \"@/lib/utils\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nconst logoVariants = cva(\"inline-flex shrink-0\", {\n variants: {\n size: {\n sm: \"h-4\",\n md: \"h-6\",\n lg: \"h-8\",\n xl: \"h-12\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n})\n\n/** Merged single-SVG logo (flower is smaller, embedded top-left of text) */\nfunction PrimaryLogo(props: React.ComponentProps<\"svg\">) {\n return (\n <svg viewBox=\"0 0 152 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <path\n d=\"M29.6559 10.4545C29.4679 9.91519 29.1836 9.41218 28.8213 8.96808C27.8997 7.84424 26.5241 7.17809 25.0568 7.15543C24.1443 7.15543 22.92 7.57234 20.8795 8.26568L19.8891 8.60102V7.48624C19.8891 5.35638 19.8891 4.07846 19.5911 3.22198C19.0913 1.8625 18.0045 0.793034 16.6289 0.294556C16.0879 0.0996957 15.5147 0 14.9369 0C14.3592 0 13.786 0.0996957 13.245 0.294556C11.8694 0.788503 10.7872 1.8625 10.2828 3.22198C9.98478 4.07393 9.98478 5.35185 9.98478 7.48624V8.59649L8.97142 8.27021C6.92178 7.61313 5.68832 7.21888 4.77584 7.23247C3.31312 7.28232 1.94669 7.97113 1.04338 9.1131C0.685726 9.56173 0.415191 10.0693 0.236363 10.6131C0.0667062 11.1523 -0.0158298 11.7233 0.00251152 12.2943C0.0529502 13.7399 0.749921 15.0903 1.90542 15.983C2.63449 16.5268 3.86336 16.9211 5.91301 17.5827L6.88051 17.8909L6.28442 18.702C5.01887 20.424 4.2577 21.4618 3.99175 22.3228C3.58824 23.714 3.82668 25.2094 4.64745 26.4103C4.96843 26.8816 5.37652 27.2985 5.84422 27.6338C6.31193 27.9692 6.83466 28.223 7.38948 28.3816C8.79718 28.7803 10.3103 28.5447 11.5255 27.7335C12.2729 27.2169 13.034 26.1837 14.3042 24.4572L15.0057 23.5055L15.7073 24.4572C16.9728 26.1792 17.734 27.2169 18.486 27.7335C19.7011 28.5447 21.2143 28.7803 22.622 28.3816C23.1768 28.223 23.6995 27.9737 24.1672 27.6338C24.6349 27.2985 25.0384 26.8861 25.364 26.4103C26.1848 25.2094 26.4232 23.714 26.0197 22.3228C25.7537 21.4618 24.9926 20.424 23.727 18.702L23.1126 17.8637L24.1259 17.5193C26.1664 16.8259 27.3861 16.409 28.106 15.8516C29.2432 14.9408 29.9172 13.5813 29.9401 12.1312C29.9493 11.5602 29.8576 10.9937 29.6696 10.4545H29.6559Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M33.4573 46.6382L33.6526 17.2696L40.3887 17.3147L51.8805 35.603H52.0258L51.9123 30.6173L51.9986 17.3868L58.3032 17.4274L58.1079 46.796L52.1757 46.7554L39.9027 27.7233H39.7392L39.8709 32.6864L39.7755 46.6743L33.4527 46.6337L33.4573 46.6382Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M73.1744 47.621C69.7723 47.5984 66.9833 46.521 64.8031 44.3888C62.6274 42.2566 61.5509 39.5564 61.569 36.2882C61.5917 32.993 62.7091 30.3018 64.9212 28.2101C67.1332 26.1185 69.9312 25.0862 73.3243 25.1087C76.7128 25.1313 79.5017 26.2041 81.682 28.3319C83.8668 30.4596 84.9478 33.1643 84.9251 36.446C84.9024 39.7142 83.7941 42.4009 81.5956 44.506C79.3972 46.6112 76.5901 47.6525 73.1744 47.63V47.621Z M73.2062 42.2476C74.7369 42.2566 76.0178 41.7112 77.0489 40.6112C78.0845 39.5113 78.6069 38.1049 78.616 36.3964C78.6296 34.6609 78.1209 33.2409 77.0943 32.141C76.0678 31.0411 74.7959 30.4866 73.2834 30.4731C71.7527 30.4641 70.4672 31.0005 69.4271 32.0869C68.3869 33.1733 67.86 34.5842 67.8464 36.3243C67.8373 38.0328 68.3369 39.4437 69.3589 40.5617C70.3764 41.6751 71.6573 42.2386 73.2016 42.2476H73.2062Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M93.637 47.0349L85.2839 25.8931L91.8974 25.9382L96.3987 38.6458L96.9847 40.5797H97.13L97.7841 38.6368L102.417 26.0103L108.908 26.0509L100.064 47.08L93.637 47.0394V47.0349Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M113.968 22.7827C112.946 22.7782 112.088 22.4266 111.393 21.7324C110.693 21.0381 110.348 20.1862 110.357 19.1719C110.366 18.1441 110.72 17.3011 111.429 16.634C112.137 15.9668 113 15.6377 114.018 15.6468C115.063 15.6558 115.93 15.9939 116.616 16.67C117.302 17.3462 117.638 18.1937 117.634 19.2215C117.629 20.2357 117.275 21.0832 116.584 21.7684C115.889 22.4536 115.022 22.7962 113.973 22.7872L113.968 22.7827Z M110.561 47.1476L110.702 26.0644L117.17 26.105L117.029 47.1882L110.561 47.1476Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M131.242 47.9996C127.854 47.9771 125.142 46.8997 123.111 44.7675C121.081 42.6353 120.073 39.9351 120.095 36.6669C120.118 33.4122 121.167 30.73 123.248 28.6158C125.328 26.5017 128.017 25.4604 131.31 25.4784C134.394 25.4964 136.933 26.4746 138.927 28.4085C140.921 30.3424 141.907 32.8127 141.884 35.8239L141.871 38.0373L123.189 37.9155L123.211 34.715L135.943 34.8006C135.857 33.5159 135.398 32.4701 134.567 31.6632C133.74 30.8562 132.636 30.4505 131.26 30.4415C129.743 30.4325 128.53 30.9599 127.622 32.0283C126.713 33.0967 126.25 34.5797 126.237 36.482C126.223 38.5466 126.741 40.183 127.794 41.3866C128.848 42.5902 130.256 43.1987 132.019 43.2078C132.805 43.2123 133.504 43.1086 134.117 42.8922C134.73 42.6758 135.285 42.3918 135.775 42.0402C136.266 41.6886 136.838 41.1161 137.492 40.3272L141.253 43.2664C140.254 44.5601 139.286 45.5158 138.36 46.1379C137.433 46.76 136.42 47.2288 135.321 47.5443C134.222 47.8599 132.864 48.0086 131.237 47.9996H131.242Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M147.985 47.7427C146.867 47.7336 145.927 47.3505 145.159 46.5841C144.392 45.8178 144.015 44.8847 144.019 43.7758C144.028 42.6803 144.419 41.7607 145.196 41.0169C145.972 40.2686 146.917 39.899 148.035 39.908C149.152 39.917 150.092 40.3002 150.86 41.053C151.628 41.8103 152.005 42.7344 152 43.8298C151.991 44.9388 151.6 45.8674 150.824 46.6202C150.047 47.373 149.102 47.7472 147.985 47.7382V47.7427Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\n/** Symbol + wordmark side-by-side, bottom-aligned (flower is large, same height as text) */\nfunction SecondaryLogo(props: React.ComponentProps<\"svg\">) {\n return (\n <svg viewBox=\"0 0 202.46 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n {/* Flower symbol — 49.613 wide, 48 tall */}\n <path\n d=\"M29.6559 10.4545C29.4679 9.91519 29.1836 9.41218 28.8213 8.96808C27.8997 7.84424 26.5241 7.17809 25.0568 7.15543C24.1443 7.15543 22.92 7.57234 20.8795 8.26568L19.8891 8.60102V7.48624C19.8891 5.35638 19.8891 4.07846 19.5911 3.22198C19.0913 1.8625 18.0045 0.793034 16.6289 0.294556C16.0879 0.0996957 15.5147 0 14.9369 0C14.3592 0 13.786 0.0996957 13.245 0.294556C11.8694 0.788503 10.7872 1.8625 10.2828 3.22198C9.98478 4.07393 9.98478 5.35185 9.98478 7.48624V8.59649L8.97142 8.27021C6.92178 7.61313 5.68832 7.21888 4.77584 7.23247C3.31312 7.28232 1.94669 7.97113 1.04338 9.1131C0.685726 9.56173 0.415191 10.0693 0.236363 10.6131C0.0667062 11.1523 -0.0158298 11.7233 0.00251152 12.2943C0.0529502 13.7399 0.749921 15.0903 1.90542 15.983C2.63449 16.5268 3.86336 16.9211 5.91301 17.5827L6.88051 17.8909L6.28442 18.702C5.01887 20.424 4.2577 21.4618 3.99175 22.3228C3.58824 23.714 3.82668 25.2094 4.64745 26.4103C4.96843 26.8816 5.37652 27.2985 5.84422 27.6338C6.31193 27.9692 6.83466 28.223 7.38948 28.3816C8.79718 28.7803 10.3103 28.5447 11.5255 27.7335C12.2729 27.2169 13.034 26.1837 14.3042 24.4572L15.0057 23.5055L15.7073 24.4572C16.9728 26.1792 17.734 27.2169 18.486 27.7335C19.7011 28.5447 21.2143 28.7803 22.622 28.3816C23.1768 28.223 23.6995 27.9737 24.1672 27.6338C24.6349 27.2985 25.0384 26.8861 25.364 26.4103C26.1848 25.2094 26.4232 23.714 26.0197 22.3228C25.7537 21.4618 24.9926 20.424 23.727 18.702L23.1126 17.8637L24.1259 17.5193C26.1664 16.8259 27.3861 16.409 28.106 15.8516C29.2432 14.9408 29.9172 13.5813 29.9401 12.1312C29.9493 11.5602 29.8576 10.9937 29.6696 10.4545H29.6559Z\"\n fill=\"currentColor\"\n transform=\"translate(0, 0.58) scale(1.658)\"\n />\n {/* \"Novie.\" wordmark — offset right by 59 (49.613 symbol + 9.386 gap), bottom-aligned */}\n <g transform=\"translate(59, 9.114)\">\n <path\n d=\"M3.46758e-08 38.0536V1.90886H8.27733L22.4116 24.0932H22.5621L22.4116 18.4903V1.90886H30.2611V38.0536H22.9666L7.84942 14.96H7.67224L7.84942 20.5362V38.0536H3.46758e-08Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M48.4571 38.8861C44.3352 38.8861 40.9353 37.5723 38.2609 34.948C35.5865 32.3237 34.2493 29.0175 34.2493 25.0292C34.2493 21.041 35.5865 17.6946 38.2609 15.0837C40.9353 12.4762 44.3352 11.1724 48.4571 11.1724C52.5791 11.1724 55.9823 12.4795 58.6667 15.0971C61.3512 17.7147 62.6917 21.0243 62.6917 25.0292C62.6917 29.0342 61.3579 32.3237 58.6901 34.948C56.0224 37.5723 52.6125 38.8861 48.4538 38.8861H48.4571Z M48.4839 32.1465C50.3359 32.1465 51.8871 31.4779 53.1407 30.1407C54.3944 28.8035 55.0195 27.0986 55.0195 25.0292C55.0195 22.9599 54.3877 21.2148 53.1273 19.8943C51.8637 18.5738 50.3159 17.9119 48.4839 17.9119C46.6519 17.9119 45.0539 18.5772 43.8003 19.9044C42.5467 21.2349 41.9215 22.9432 41.9215 25.0292C41.9215 27.1153 42.5433 28.8035 43.7903 30.1407C45.0339 31.4779 46.6018 32.1465 48.4839 32.1465Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M72.2829 38.0536L62.0098 12.0048L70.1366 12.0048L75.6627 27.5265L76.3446 29.9234H76.4951L77.254 27.5265L82.7566 12.0048L90.7564 12.0048L80.2058 38.0536H72.2795H72.2829Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M96.8173 8.8891C95.5704 8.8891 94.5173 8.45785 93.6481 7.58867C92.7823 6.72282 92.3477 5.66643 92.3477 4.41948C92.3477 3.17253 92.7823 2.10611 93.6481 1.26366C94.514 0.421221 95.5704 0 96.8173 0C98.0643 0 99.1808 0.421221 100.023 1.26366C100.866 2.10611 101.287 3.15582 101.287 4.41948C101.287 5.68314 100.866 6.71948 100.023 7.58867C99.1808 8.45451 98.1144 8.8891 96.8173 8.8891Z M92.8558 38.0537L92.8558 12.0048L100.806 12.0048L100.806 38.0537L92.8558 38.0537Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M118.169 38.8861C114.047 38.8861 110.718 37.5823 108.187 34.9747C105.653 32.3672 104.389 29.0509 104.389 25.0292C104.389 21.0076 105.663 17.7347 108.214 15.1105C110.764 12.4862 114.041 11.1724 118.046 11.1724C122.05 11.1724 125.002 12.3625 127.459 14.7427C129.917 17.123 131.144 20.1752 131.144 23.8926V26.6172H108.2V22.6289H123.872C123.755 21.0644 123.177 19.7907 122.144 18.8045C121.108 17.8183 119.74 17.3269 118.042 17.3269C116.19 17.3269 114.692 17.9922 113.549 19.3193C112.406 20.6499 111.834 22.4818 111.834 24.822C111.834 27.3292 112.493 29.3116 113.817 30.7659C115.137 32.2201 116.859 32.9488 118.978 32.9488C119.938 32.9488 120.797 32.8151 121.552 32.5443C122.308 32.2769 122.99 31.9125 123.598 31.4579C124.203 31.0032 124.895 30.2711 125.668 29.2615L130.438 32.7182C129.241 34.3663 128.081 35.5965 126.955 36.4022C125.828 37.2079 124.581 37.823 123.221 38.2442C121.857 38.6654 120.175 38.876 118.173 38.876L118.169 38.8861Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M138.562 38.4582C137.181 38.4582 136.021 37.9901 135.078 37.0574C134.136 36.1247 133.664 34.9747 133.664 33.6108C133.664 32.2468 134.136 31.1002 135.078 30.1641C136.021 29.2314 137.181 28.7634 138.562 28.7634C139.942 28.7634 141.102 29.2314 142.045 30.1641C142.988 31.0968 143.459 32.2468 143.459 33.6108C143.459 34.9747 142.988 36.1214 142.045 37.0574C141.102 37.9901 139.942 38.4582 138.562 38.4582Z\"\n fill=\"currentColor\"\n />\n </g>\n </svg>\n )\n}\n\nfunction NovieLogo({\n className,\n size,\n variant = \"primary\",\n ...props\n}: React.ComponentProps<\"svg\"> &\n VariantProps<typeof logoVariants> & {\n variant?: \"primary\" | \"secondary\"\n }) {\n const Comp = variant === \"secondary\" ? SecondaryLogo : PrimaryLogo\n return (\n <Comp\n data-slot=\"novie-logo\"\n className={cn(logoVariants({ size }), \"w-auto\", className)}\n {...props}\n />\n )\n}\n\nexport { NovieLogo, logoVariants }\n","import { cn } from \"@/lib/utils\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nconst symbolVariants = cva(\"inline-block shrink-0 w-auto\", {\n variants: {\n size: {\n sm: \"h-3\",\n md: \"h-6\",\n lg: \"h-12\",\n xl: \"h-[72px]\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n})\n\nfunction NovieSymbol({\n className,\n size,\n ...props\n}: React.ComponentProps<\"svg\"> & VariantProps<typeof symbolVariants>) {\n return (\n <svg\n data-slot=\"novie-symbol\"\n viewBox=\"0 0 30 29\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={cn(symbolVariants({ size }), className)}\n {...props}\n >\n <path\n d=\"M29.6559 10.4545C29.4679 9.91519 29.1836 9.41218 28.8213 8.96808C27.8997 7.84424 26.5241 7.17809 25.0568 7.15543C24.1443 7.15543 22.92 7.57234 20.8795 8.26568L19.8891 8.60102V7.48624C19.8891 5.35638 19.8891 4.07846 19.5911 3.22198C19.0913 1.8625 18.0045 0.793034 16.6289 0.294556C16.0879 0.0996957 15.5147 0 14.9369 0C14.3592 0 13.786 0.0996957 13.245 0.294556C11.8694 0.788503 10.7872 1.8625 10.2828 3.22198C9.98478 4.07393 9.98478 5.35185 9.98478 7.48624V8.59649L8.97142 8.27021C6.92178 7.61313 5.68832 7.21888 4.77584 7.23247C3.31312 7.28232 1.94669 7.97113 1.04338 9.1131C0.685726 9.56173 0.415191 10.0693 0.236363 10.6131C0.0667062 11.1523 -0.0158298 11.7233 0.00251152 12.2943C0.0529502 13.7399 0.749921 15.0903 1.90542 15.983C2.63449 16.5268 3.86336 16.9211 5.91301 17.5827L6.88051 17.8909L6.28442 18.702C5.01887 20.424 4.2577 21.4618 3.99175 22.3228C3.58824 23.714 3.82668 25.2094 4.64745 26.4103C4.96843 26.8816 5.37652 27.2985 5.84422 27.6338C6.31193 27.9692 6.83466 28.223 7.38948 28.3816C8.79718 28.7803 10.3103 28.5447 11.5255 27.7335C12.2729 27.2169 13.034 26.1837 14.3042 24.4572L15.0057 23.5055L15.7073 24.4572C16.9728 26.1792 17.734 27.2169 18.486 27.7335C19.7011 28.5447 21.2143 28.7803 22.622 28.3816C23.1768 28.223 23.6995 27.9737 24.1672 27.6338C24.6349 27.2985 25.0384 26.8861 25.364 26.4103C26.1848 25.2094 26.4232 23.714 26.0197 22.3228C25.7537 21.4618 24.9926 20.424 23.727 18.702L23.1126 17.8637L24.1259 17.5193C26.1664 16.8259 27.3861 16.409 28.106 15.8516C29.2432 14.9408 29.9172 13.5813 29.9401 12.1312C29.9493 11.5602 29.8576 10.9937 29.6696 10.4545H29.6559Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nexport { NovieSymbol, symbolVariants }\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Loader2 } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst buttonVariants = cva(\n \"inline-flex shrink-0 items-center justify-center whitespace-nowrap font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:h-4 [&_svg]:w-4\",\n {\n variants: {\n variant: {\n default:\n \"bg-[hsl(var(--button-brand-default))] text-white hover:bg-[hsl(var(--button-brand-hover))] active:bg-[hsl(var(--button-brand-pressed))] disabled:bg-[hsl(var(--button-primary-bg-disabled))] disabled:text-[hsl(var(--button-primary-text-disabled))]\",\n secondary:\n \"bg-primary text-primary-foreground hover:bg-[hsl(var(--button-secondary-filled-hover))] disabled:bg-[hsl(var(--button-primary-bg-disabled))] disabled:text-[hsl(var(--button-text-disabled))]\",\n outline:\n \"border-[1.5px] border-primary bg-transparent text-primary hover:bg-accent disabled:border-[hsl(var(--button-primary-bg-disabled))] disabled:text-[hsl(var(--button-text-disabled))]\",\n danger:\n \"bg-destructive text-destructive-foreground hover:bg-[hsl(var(--button-danger-hover))] disabled:bg-[hsl(var(--button-danger-bg-disabled))] disabled:text-[hsl(var(--button-danger-text-disabled))]\",\n ghost:\n \"text-muted-foreground hover:bg-page-secondary disabled:text-[hsl(var(--button-ghost-text-disabled))]\",\n link:\n \"text-foreground underline underline-offset-4 hover:text-muted-foreground disabled:text-[hsl(var(--button-text-disabled))] h-auto p-0\",\n \"link-primary\":\n \"text-[hsl(var(--button-brand-default))] underline underline-offset-4 disabled:text-[hsl(var(--button-text-disabled))] h-auto p-0\",\n },\n size: {\n sm: \"h-8 gap-1.5 rounded-[20px] px-4 text-xs\",\n default: \"h-10 gap-2 rounded-[20px] px-5 text-sm\",\n lg: \"h-12 gap-2 rounded-[30px] px-6 text-sm\",\n xl: \"h-[58px] gap-2 rounded-[30px] px-8 text-base\",\n icon: \"h-10 w-10 rounded-[20px]\",\n \"icon-sm\": \"h-8 w-8 rounded-[20px]\",\n \"icon-lg\": \"h-12 w-12 rounded-[30px]\",\n \"icon-xl\": \"h-[58px] w-[58px] rounded-[30px]\",\n },\n },\n compoundVariants: [\n { variant: \"secondary\", size: \"sm\", className: \"rounded-[30px]\" },\n { variant: \"secondary\", size: \"default\", className: \"rounded-[30px]\" },\n { variant: \"outline\", size: \"sm\", className: \"rounded-[30px]\" },\n { variant: \"outline\", size: \"default\", className: \"rounded-[30px]\" },\n { variant: \"ghost\", size: \"sm\", className: \"rounded-[30px]\" },\n { variant: \"ghost\", size: \"default\", className: \"rounded-[30px]\" },\n ],\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Button({\n className,\n variant = \"default\",\n size = \"default\",\n asChild = false,\n loading = false,\n disabled,\n children,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean\n loading?: boolean\n }) {\n const Comp = asChild ? Slot : \"button\"\n const isDisabled = disabled || loading\n\n return (\n <Comp\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n className={cn(buttonVariants({ variant, size, className }))}\n disabled={isDisabled}\n aria-busy={loading || undefined}\n {...props}\n >\n {loading && <Loader2 className=\"animate-spin\" />}\n {children}\n </Comp>\n )\n}\n\nexport { Button, buttonVariants }\n","import { cn } from \"@/lib/utils\"\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n \"flex h-8 w-full rounded-lg border border-input bg-background px-2.5 py-2 text-sm ring-offset-background transition-colors\",\n \"file:border-0 file:bg-transparent file:text-sm file:font-medium\",\n \"placeholder:text-primary-secondary\",\n \"focus-visible:outline-none focus-visible:shadow-[0_1px_2px_0_hsl(var(--shadow-sm))]\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n \"aria-invalid:border-destructive aria-invalid:ring-destructive/20\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n","import { cn } from \"@/lib/utils\"\n\nfunction Label({\n className,\n ...props\n}: React.ComponentProps<\"label\">) {\n return (\n <label\n data-slot=\"label\"\n className={cn(\n \"text-xs font-medium leading-4 text-foreground\",\n \"peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n \"group-data-[disabled=true]:cursor-not-allowed group-data-[disabled=true]:opacity-50\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Label }\n","import * as React from \"react\"\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\"\nimport { Check, Minus } from \"lucide-react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst checkboxVariants = cva(\n [\n \"peer shrink-0 rounded border-[1.5px] border-border bg-background transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n \"data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-foreground\",\n \"data-[state=indeterminate]:border-border data-[state=indeterminate]:text-foreground\",\n ].join(\" \"),\n {\n variants: {\n size: {\n sm: \"h-5 w-5\",\n md: \"h-6 w-6\",\n },\n },\n defaultVariants: {\n size: \"sm\",\n },\n }\n)\n\nconst iconVariants = cva(\"\", {\n variants: {\n size: {\n sm: \"h-4 w-4\",\n md: \"h-[18px] w-[18px]\",\n },\n },\n defaultVariants: {\n size: \"sm\",\n },\n})\n\nfunction Checkbox({\n className,\n size = \"sm\",\n ...props\n}: React.ComponentProps<typeof CheckboxPrimitive.Root> &\n VariantProps<typeof checkboxVariants>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\"group\", checkboxVariants({ size, className }))}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"flex items-center justify-center text-current\"\n >\n <Check className={cn(iconVariants({ size }), \"group-data-[state=indeterminate]:hidden\")} />\n <Minus className={cn(iconVariants({ size }), \"hidden group-data-[state=indeterminate]:block\")} />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n}\n\nexport { Checkbox, checkboxVariants }\n","import * as React from \"react\"\nimport * as SwitchPrimitive from \"@radix-ui/react-switch\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst switchVariants = cva(\n [\n \"peer inline-flex shrink-0 cursor-pointer items-center rounded-full\",\n \"transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n \"disabled:cursor-not-allowed\",\n \"data-[state=checked]:bg-primary\",\n \"data-[state=unchecked]:bg-primary\",\n \"disabled:data-[state=checked]:bg-[hsl(var(--button-primary-bg-disabled))]\",\n \"disabled:data-[state=unchecked]:bg-[hsl(var(--button-primary-bg-disabled))]\",\n ].join(\" \"),\n {\n variants: {\n size: {\n sm: \"h-5 w-9\",\n md: \"h-[22px] w-10\",\n },\n },\n defaultVariants: {\n size: \"sm\",\n },\n }\n)\n\nconst thumbVariants = cva(\n [\n \"pointer-events-none block rounded-full bg-background shadow-[0px_2px_4px_0px_rgba(39,39,39,0.1)]\",\n \"ring-0 transition-transform\",\n \"data-[state=unchecked]:translate-x-0.5\",\n ].join(\" \"),\n {\n variants: {\n size: {\n sm: \"h-4 w-4 data-[state=checked]:translate-x-[18px]\",\n md: \"h-[18px] w-[18px] data-[state=checked]:translate-x-5\",\n },\n },\n defaultVariants: {\n size: \"sm\",\n },\n }\n)\n\ntype SwitchProps = React.ComponentProps<typeof SwitchPrimitive.Root> &\n VariantProps<typeof switchVariants>\n\nfunction Switch({ className, size, ...props }: SwitchProps) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n className={cn(switchVariants({ size, className }))}\n {...props}\n >\n <SwitchPrimitive.Thumb className={cn(thumbVariants({ size }))} />\n </SwitchPrimitive.Root>\n )\n}\n\nexport { Switch, switchVariants, thumbVariants }\nexport type { SwitchProps }\n","// src/primitive.tsx\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nfunction getOwnerWindow(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access window outside of the DOM\");\n }\n return element?.ownerDocument?.defaultView ?? window;\n}\nfunction getOwnerDocument(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access document outside of the DOM\");\n }\n return element?.ownerDocument ?? document;\n}\nfunction getActiveElement(node, activeDescendant = false) {\n const { activeElement } = getOwnerDocument(node);\n if (!activeElement?.nodeName) {\n return null;\n }\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(activeElement.contentDocument.body, activeDescendant);\n }\n if (activeDescendant) {\n const id = activeElement.getAttribute(\"aria-activedescendant\");\n if (id) {\n const element = getOwnerDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n return activeElement;\n}\nfunction isFrame(element) {\n return element.tagName === \"IFRAME\";\n}\nexport {\n canUseDOM,\n composeEventHandlers,\n getActiveElement,\n getOwnerDocument,\n getOwnerWindow,\n isFrame\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/context/src/create-context.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/collection-legacy.tsx\nimport React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createCollection(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }\n );\n const CollectionProvider = (props) => {\n const { scope, children } = props;\n const ref = React.useRef(null);\n const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;\n return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n React.useEffect(() => {\n context.itemMap.set(ref, { ref, ...itemData });\n return () => void context.itemMap.delete(ref);\n });\n return /* @__PURE__ */ jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useCollection(scope) {\n const context = useCollectionContext(name + \"CollectionConsumer\", scope);\n const getItems = React.useCallback(() => {\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n const items = Array.from(context.itemMap.values());\n const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)\n );\n return orderedItems;\n }, [context.collectionRef, context.itemMap]);\n return getItems;\n }\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n useCollection,\n createCollectionScope\n ];\n}\n\n// src/collection.tsx\nimport React2 from \"react\";\nimport { createContextScope as createContextScope2 } from \"@radix-ui/react-context\";\nimport { useComposedRefs as useComposedRefs2 } from \"@radix-ui/react-compose-refs\";\nimport { createSlot as createSlot2 } from \"@radix-ui/react-slot\";\n\n// src/ordered-dictionary.ts\nvar __instanciated = /* @__PURE__ */ new WeakMap();\nvar OrderedDict = class _OrderedDict extends Map {\n #keys;\n constructor(entries) {\n super(entries);\n this.#keys = [...super.keys()];\n __instanciated.set(this, true);\n }\n set(key, value) {\n if (__instanciated.get(this)) {\n if (this.has(key)) {\n this.#keys[this.#keys.indexOf(key)] = key;\n } else {\n this.#keys.push(key);\n }\n }\n super.set(key, value);\n return this;\n }\n insert(index, key, value) {\n const has = this.has(key);\n const length = this.#keys.length;\n const relativeIndex = toSafeInteger(index);\n let actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n const safeIndex = actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n if (safeIndex === this.size || has && safeIndex === this.size - 1 || safeIndex === -1) {\n this.set(key, value);\n return this;\n }\n const size = this.size + (has ? 0 : 1);\n if (relativeIndex < 0) {\n actualIndex++;\n }\n const keys = [...this.#keys];\n let nextValue;\n let shouldSkip = false;\n for (let i = actualIndex; i < size; i++) {\n if (actualIndex === i) {\n let nextKey = keys[i];\n if (keys[i] === key) {\n nextKey = keys[i + 1];\n }\n if (has) {\n this.delete(key);\n }\n nextValue = this.get(nextKey);\n this.set(key, value);\n } else {\n if (!shouldSkip && keys[i - 1] === key) {\n shouldSkip = true;\n }\n const currentKey = keys[shouldSkip ? i : i - 1];\n const currentValue = nextValue;\n nextValue = this.get(currentKey);\n this.delete(currentKey);\n this.set(currentKey, currentValue);\n }\n }\n return this;\n }\n with(index, key, value) {\n const copy = new _OrderedDict(this);\n copy.insert(index, key, value);\n return copy;\n }\n before(key) {\n const index = this.#keys.indexOf(key) - 1;\n if (index < 0) {\n return void 0;\n }\n return this.entryAt(index);\n }\n /**\n * Sets a new key-value pair at the position before the given key.\n */\n setBefore(key, newKey, value) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index, newKey, value);\n }\n after(key) {\n let index = this.#keys.indexOf(key);\n index = index === -1 || index === this.size - 1 ? -1 : index + 1;\n if (index === -1) {\n return void 0;\n }\n return this.entryAt(index);\n }\n /**\n * Sets a new key-value pair at the position after the given key.\n */\n setAfter(key, newKey, value) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index + 1, newKey, value);\n }\n first() {\n return this.entryAt(0);\n }\n last() {\n return this.entryAt(-1);\n }\n clear() {\n this.#keys = [];\n return super.clear();\n }\n delete(key) {\n const deleted = super.delete(key);\n if (deleted) {\n this.#keys.splice(this.#keys.indexOf(key), 1);\n }\n return deleted;\n }\n deleteAt(index) {\n const key = this.keyAt(index);\n if (key !== void 0) {\n return this.delete(key);\n }\n return false;\n }\n at(index) {\n const key = at(this.#keys, index);\n if (key !== void 0) {\n return this.get(key);\n }\n }\n entryAt(index) {\n const key = at(this.#keys, index);\n if (key !== void 0) {\n return [key, this.get(key)];\n }\n }\n indexOf(key) {\n return this.#keys.indexOf(key);\n }\n keyAt(index) {\n return at(this.#keys, index);\n }\n from(key, offset) {\n const index = this.indexOf(key);\n if (index === -1) {\n return void 0;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.at(dest);\n }\n keyFrom(key, offset) {\n const index = this.indexOf(key);\n if (index === -1) {\n return void 0;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.keyAt(dest);\n }\n find(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return entry;\n }\n index++;\n }\n return void 0;\n }\n findIndex(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return index;\n }\n index++;\n }\n return -1;\n }\n filter(predicate, thisArg) {\n const entries = [];\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n entries.push(entry);\n }\n index++;\n }\n return new _OrderedDict(entries);\n }\n map(callbackfn, thisArg) {\n const entries = [];\n let index = 0;\n for (const entry of this) {\n entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index, this])]);\n index++;\n }\n return new _OrderedDict(entries);\n }\n reduce(...args) {\n const [callbackfn, initialValue] = args;\n let index = 0;\n let accumulator = initialValue ?? this.at(0);\n for (const entry of this) {\n if (index === 0 && args.length === 1) {\n accumulator = entry;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n index++;\n }\n return accumulator;\n }\n reduceRight(...args) {\n const [callbackfn, initialValue] = args;\n let accumulator = initialValue ?? this.at(-1);\n for (let index = this.size - 1; index >= 0; index--) {\n const entry = this.at(index);\n if (index === this.size - 1 && args.length === 1) {\n accumulator = entry;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n }\n return accumulator;\n }\n toSorted(compareFn) {\n const entries = [...this.entries()].sort(compareFn);\n return new _OrderedDict(entries);\n }\n toReversed() {\n const reversed = new _OrderedDict();\n for (let index = this.size - 1; index >= 0; index--) {\n const key = this.keyAt(index);\n const element = this.get(key);\n reversed.set(key, element);\n }\n return reversed;\n }\n toSpliced(...args) {\n const entries = [...this.entries()];\n entries.splice(...args);\n return new _OrderedDict(entries);\n }\n slice(start, end) {\n const result = new _OrderedDict();\n let stop = this.size - 1;\n if (start === void 0) {\n return result;\n }\n if (start < 0) {\n start = start + this.size;\n }\n if (end !== void 0 && end > 0) {\n stop = end - 1;\n }\n for (let index = start; index <= stop; index++) {\n const key = this.keyAt(index);\n const element = this.get(key);\n result.set(key, element);\n }\n return result;\n }\n every(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (!Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return false;\n }\n index++;\n }\n return true;\n }\n some(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return true;\n }\n index++;\n }\n return false;\n }\n};\nfunction at(array, index) {\n if (\"at\" in Array.prototype) {\n return Array.prototype.at.call(array, index);\n }\n const actualIndex = toSafeIndex(array, index);\n return actualIndex === -1 ? void 0 : array[actualIndex];\n}\nfunction toSafeIndex(array, index) {\n const length = array.length;\n const relativeIndex = toSafeInteger(index);\n const actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n return actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n}\nfunction toSafeInteger(number) {\n return number !== number || number === 0 ? 0 : Math.trunc(number);\n}\n\n// src/collection.tsx\nimport { jsx as jsx2 } from \"react/jsx-runtime\";\nfunction createCollection2(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope2(PROVIDER_NAME);\n const [CollectionContextProvider, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n {\n collectionElement: null,\n collectionRef: { current: null },\n collectionRefObject: { current: null },\n itemMap: new OrderedDict(),\n setItemMap: () => void 0\n }\n );\n const CollectionProvider = ({ state, ...props }) => {\n return state ? /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state }) : /* @__PURE__ */ jsx2(CollectionInit, { ...props });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const CollectionInit = (props) => {\n const state = useInitCollection();\n return /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state });\n };\n CollectionInit.displayName = PROVIDER_NAME + \"Init\";\n const CollectionProviderImpl = (props) => {\n const { scope, children, state } = props;\n const ref = React2.useRef(null);\n const [collectionElement, setCollectionElement] = React2.useState(\n null\n );\n const composeRefs = useComposedRefs2(ref, setCollectionElement);\n const [itemMap, setItemMap] = state;\n React2.useEffect(() => {\n if (!collectionElement) return;\n const observer = getChildListObserver(() => {\n });\n observer.observe(collectionElement, {\n childList: true,\n subtree: true\n });\n return () => {\n observer.disconnect();\n };\n }, [collectionElement]);\n return /* @__PURE__ */ jsx2(\n CollectionContextProvider,\n {\n scope,\n itemMap,\n setItemMap,\n collectionRef: composeRefs,\n collectionRefObject: ref,\n collectionElement,\n children\n }\n );\n };\n CollectionProviderImpl.displayName = PROVIDER_NAME + \"Impl\";\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot2(COLLECTION_SLOT_NAME);\n const CollectionSlot = React2.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx2(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot2(ITEM_SLOT_NAME);\n const CollectionItemSlot = React2.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React2.useRef(null);\n const [element, setElement] = React2.useState(null);\n const composedRefs = useComposedRefs2(forwardedRef, ref, setElement);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n const { setItemMap } = context;\n const itemDataRef = React2.useRef(itemData);\n if (!shallowEqual(itemDataRef.current, itemData)) {\n itemDataRef.current = itemData;\n }\n const memoizedItemData = itemDataRef.current;\n React2.useEffect(() => {\n const itemData2 = memoizedItemData;\n setItemMap((map) => {\n if (!element) {\n return map;\n }\n if (!map.has(element)) {\n map.set(element, { ...itemData2, element });\n return map.toSorted(sortByDocumentPosition);\n }\n return map.set(element, { ...itemData2, element }).toSorted(sortByDocumentPosition);\n });\n return () => {\n setItemMap((map) => {\n if (!element || !map.has(element)) {\n return map;\n }\n map.delete(element);\n return new OrderedDict(map);\n });\n };\n }, [element, memoizedItemData, setItemMap]);\n return /* @__PURE__ */ jsx2(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useInitCollection() {\n return React2.useState(new OrderedDict());\n }\n function useCollection(scope) {\n const { itemMap } = useCollectionContext(name + \"CollectionConsumer\", scope);\n return itemMap;\n }\n const functions = {\n createCollectionScope,\n useCollection,\n useInitCollection\n };\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n functions\n ];\n}\nfunction shallowEqual(a, b) {\n if (a === b) return true;\n if (typeof a !== \"object\" || typeof b !== \"object\") return false;\n if (a == null || b == null) return false;\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n if (keysA.length !== keysB.length) return false;\n for (const key of keysA) {\n if (!Object.prototype.hasOwnProperty.call(b, key)) return false;\n if (a[key] !== b[key]) return false;\n }\n return true;\n}\nfunction isElementPreceding(a, b) {\n return !!(b.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING);\n}\nfunction sortByDocumentPosition(a, b) {\n return !a[1].element || !b[1].element ? 0 : isElementPreceding(a[1].element, b[1].element) ? -1 : 1;\n}\nfunction getChildListObserver(callback) {\n const observer = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === \"childList\") {\n callback();\n return;\n }\n }\n });\n return observer;\n}\nexport {\n createCollection,\n createCollection2 as unstable_createCollection\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-layout-effect/src/use-layout-effect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/id/src/id.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useReactId = React[\" useId \".trim().toString()] || (() => void 0);\nvar count = 0;\nfunction useId(deterministicId) {\n const [id, setId] = React.useState(useReactId());\n useLayoutEffect(() => {\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId]);\n return deterministicId || (id ? `radix-${id}` : \"\");\n}\nexport {\n useId\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-callback-ref/src/use-callback-ref.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n","// src/use-controllable-state.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useInsertionEffect = React[\" useInsertionEffect \".trim().toString()] || useLayoutEffect;\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n },\n caller\n}) {\n const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({\n defaultProp,\n onChange\n });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n if (true) {\n const isControlledRef = React.useRef(prop !== void 0);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;\n if (value2 !== prop) {\n onChangeRef.current?.(value2);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, onChangeRef]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const [value, setValue] = React.useState(defaultProp);\n const prevValueRef = React.useRef(value);\n const onChangeRef = React.useRef(onChange);\n useInsertionEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n onChangeRef.current?.(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef]);\n return [value, setValue, onChangeRef];\n}\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n\n// src/use-controllable-state-reducer.tsx\nimport * as React2 from \"react\";\nimport { useEffectEvent } from \"@radix-ui/react-use-effect-event\";\nvar SYNC_STATE = Symbol(\"RADIX:SYNC_STATE\");\nfunction useControllableStateReducer(reducer, userArgs, initialArg, init) {\n const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;\n const isControlled = controlledState !== void 0;\n const onChange = useEffectEvent(onChangeProp);\n if (true) {\n const isControlledRef = React2.useRef(controlledState !== void 0);\n React2.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const args = [{ ...initialArg, state: defaultProp }];\n if (init) {\n args.push(init);\n }\n const [internalState, dispatch] = React2.useReducer(\n (state2, action) => {\n if (action.type === SYNC_STATE) {\n return { ...state2, state: action.state };\n }\n const next = reducer(state2, action);\n if (isControlled && !Object.is(next.state, state2.state)) {\n onChange(next.state);\n }\n return next;\n },\n ...args\n );\n const uncontrolledState = internalState.state;\n const prevValueRef = React2.useRef(uncontrolledState);\n React2.useEffect(() => {\n if (prevValueRef.current !== uncontrolledState) {\n prevValueRef.current = uncontrolledState;\n if (!isControlled) {\n onChange(uncontrolledState);\n }\n }\n }, [onChange, uncontrolledState, prevValueRef, isControlled]);\n const state = React2.useMemo(() => {\n const isControlled2 = controlledState !== void 0;\n if (isControlled2) {\n return { ...internalState, state: controlledState };\n }\n return internalState;\n }, [internalState, controlledState]);\n React2.useEffect(() => {\n if (isControlled && !Object.is(controlledState, internalState.state)) {\n dispatch({ type: SYNC_STATE, state: controlledState });\n }\n }, [controlledState, internalState.state, isControlled]);\n return [state, dispatch];\n}\nexport {\n useControllableState,\n useControllableStateReducer\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/direction/src/direction.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DirectionContext = React.createContext(void 0);\nvar DirectionProvider = (props) => {\n const { dir, children } = props;\n return /* @__PURE__ */ jsx(DirectionContext.Provider, { value: dir, children });\n};\nfunction useDirection(localDir) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || \"ltr\";\n}\nvar Provider = DirectionProvider;\nexport {\n DirectionProvider,\n Provider,\n useDirection\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-size/src/use-size.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","// packages/react/use-previous/src/use-previous.tsx\nimport * as React from \"react\";\nfunction usePrevious(value) {\n const ref = React.useRef({ value, previous: value });\n return React.useMemo(() => {\n if (ref.current.value !== value) {\n ref.current.previous = ref.current.value;\n ref.current.value = value;\n }\n return ref.current.previous;\n }, [value]);\n}\nexport {\n usePrevious\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/radio-group.tsx\nimport * as React2 from \"react\";\nimport { composeEventHandlers as composeEventHandlers2 } from \"@radix-ui/primitive\";\nimport { useComposedRefs as useComposedRefs2 } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope as createContextScope2 } from \"@radix-ui/react-context\";\nimport { Primitive as Primitive2 } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\n\n// src/radio.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { usePrevious } from \"@radix-ui/react-use-previous\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar RADIO_NAME = \"Radio\";\nvar [createRadioContext, createRadioScope] = createContextScope(RADIO_NAME);\nvar [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME);\nvar Radio = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRadio,\n name,\n checked = false,\n required,\n disabled,\n value = \"on\",\n onCheck,\n form,\n ...radioProps\n } = props;\n const [button, setButton] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n const isFormControl = button ? form || !!button.closest(\"form\") : true;\n return /* @__PURE__ */ jsxs(RadioProvider, { scope: __scopeRadio, checked, disabled, children: [\n /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"radio\",\n \"aria-checked\": checked,\n \"data-state\": getState(checked),\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n value,\n ...radioProps,\n ref: composedRefs,\n onClick: composeEventHandlers(props.onClick, (event) => {\n if (!checked) onCheck?.();\n if (isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })\n }\n ),\n isFormControl && /* @__PURE__ */ jsx(\n RadioBubbleInput,\n {\n control: button,\n bubbles: !hasConsumerStoppedPropagationRef.current,\n name,\n value,\n checked,\n required,\n disabled,\n form,\n style: { transform: \"translateX(-100%)\" }\n }\n )\n ] });\n }\n);\nRadio.displayName = RADIO_NAME;\nvar INDICATOR_NAME = \"RadioIndicator\";\nvar RadioIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeRadio, forceMount, ...indicatorProps } = props;\n const context = useRadioContext(INDICATOR_NAME, __scopeRadio);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.checked, children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n \"data-state\": getState(context.checked),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n ...indicatorProps,\n ref: forwardedRef\n }\n ) });\n }\n);\nRadioIndicator.displayName = INDICATOR_NAME;\nvar BUBBLE_INPUT_NAME = \"RadioBubbleInput\";\nvar RadioBubbleInput = React.forwardRef(\n ({\n __scopeRadio,\n control,\n checked,\n bubbles = true,\n ...props\n }, forwardedRef) => {\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, forwardedRef);\n const prevChecked = usePrevious(checked);\n const controlSize = useSize(control);\n React.useEffect(() => {\n const input = ref.current;\n if (!input) return;\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n inputProto,\n \"checked\"\n );\n const setChecked = descriptor.set;\n if (prevChecked !== checked && setChecked) {\n const event = new Event(\"click\", { bubbles });\n setChecked.call(input, checked);\n input.dispatchEvent(event);\n }\n }, [prevChecked, checked, bubbles]);\n return /* @__PURE__ */ jsx(\n Primitive.input,\n {\n type: \"radio\",\n \"aria-hidden\": true,\n defaultChecked: checked,\n ...props,\n tabIndex: -1,\n ref: composedRefs,\n style: {\n ...props.style,\n ...controlSize,\n position: \"absolute\",\n pointerEvents: \"none\",\n opacity: 0,\n margin: 0\n }\n }\n );\n }\n);\nRadioBubbleInput.displayName = BUBBLE_INPUT_NAME;\nfunction getState(checked) {\n return checked ? \"checked\" : \"unchecked\";\n}\n\n// src/radio-group.tsx\nimport { jsx as jsx2 } from \"react/jsx-runtime\";\nvar ARROW_KEYS = [\"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\"];\nvar RADIO_GROUP_NAME = \"RadioGroup\";\nvar [createRadioGroupContext, createRadioGroupScope] = createContextScope2(RADIO_GROUP_NAME, [\n createRovingFocusGroupScope,\n createRadioScope\n]);\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar useRadioScope = createRadioScope();\nvar [RadioGroupProvider, useRadioGroupContext] = createRadioGroupContext(RADIO_GROUP_NAME);\nvar RadioGroup = React2.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRadioGroup,\n name,\n defaultValue,\n value: valueProp,\n required = false,\n disabled = false,\n orientation,\n dir,\n loop = true,\n onValueChange,\n ...groupProps\n } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);\n const direction = useDirection(dir);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? null,\n onChange: onValueChange,\n caller: RADIO_GROUP_NAME\n });\n return /* @__PURE__ */ jsx2(\n RadioGroupProvider,\n {\n scope: __scopeRadioGroup,\n name,\n required,\n disabled,\n value,\n onValueChange: setValue,\n children: /* @__PURE__ */ jsx2(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n orientation,\n dir: direction,\n loop,\n children: /* @__PURE__ */ jsx2(\n Primitive2.div,\n {\n role: \"radiogroup\",\n \"aria-required\": required,\n \"aria-orientation\": orientation,\n \"data-disabled\": disabled ? \"\" : void 0,\n dir: direction,\n ...groupProps,\n ref: forwardedRef\n }\n )\n }\n )\n }\n );\n }\n);\nRadioGroup.displayName = RADIO_GROUP_NAME;\nvar ITEM_NAME = \"RadioGroupItem\";\nvar RadioGroupItem = React2.forwardRef(\n (props, forwardedRef) => {\n const { __scopeRadioGroup, disabled, ...itemProps } = props;\n const context = useRadioGroupContext(ITEM_NAME, __scopeRadioGroup);\n const isDisabled = context.disabled || disabled;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);\n const radioScope = useRadioScope(__scopeRadioGroup);\n const ref = React2.useRef(null);\n const composedRefs = useComposedRefs2(forwardedRef, ref);\n const checked = context.value === itemProps.value;\n const isArrowKeyPressedRef = React2.useRef(false);\n React2.useEffect(() => {\n const handleKeyDown = (event) => {\n if (ARROW_KEYS.includes(event.key)) {\n isArrowKeyPressedRef.current = true;\n }\n };\n const handleKeyUp = () => isArrowKeyPressedRef.current = false;\n document.addEventListener(\"keydown\", handleKeyDown);\n document.addEventListener(\"keyup\", handleKeyUp);\n return () => {\n document.removeEventListener(\"keydown\", handleKeyDown);\n document.removeEventListener(\"keyup\", handleKeyUp);\n };\n }, []);\n return /* @__PURE__ */ jsx2(\n RovingFocusGroup.Item,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n focusable: !isDisabled,\n active: checked,\n children: /* @__PURE__ */ jsx2(\n Radio,\n {\n disabled: isDisabled,\n required: context.required,\n checked,\n ...radioScope,\n ...itemProps,\n name: context.name,\n ref: composedRefs,\n onCheck: () => context.onValueChange(itemProps.value),\n onKeyDown: composeEventHandlers2((event) => {\n if (event.key === \"Enter\") event.preventDefault();\n }),\n onFocus: composeEventHandlers2(itemProps.onFocus, () => {\n if (isArrowKeyPressedRef.current) ref.current?.click();\n })\n }\n )\n }\n );\n }\n);\nRadioGroupItem.displayName = ITEM_NAME;\nvar INDICATOR_NAME2 = \"RadioGroupIndicator\";\nvar RadioGroupIndicator = React2.forwardRef(\n (props, forwardedRef) => {\n const { __scopeRadioGroup, ...indicatorProps } = props;\n const radioScope = useRadioScope(__scopeRadioGroup);\n return /* @__PURE__ */ jsx2(RadioIndicator, { ...radioScope, ...indicatorProps, ref: forwardedRef });\n }\n);\nRadioGroupIndicator.displayName = INDICATOR_NAME2;\nvar Root2 = RadioGroup;\nvar Item2 = RadioGroupItem;\nvar Indicator = RadioGroupIndicator;\nexport {\n Indicator,\n Item2 as Item,\n RadioGroup,\n RadioGroupIndicator,\n RadioGroupItem,\n Root2 as Root,\n createRadioGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from \"react\"\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst radioGroupItemVariants = cva(\n [\n \"peer aspect-square shrink-0 rounded-full border-[1.5px] transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n \"border-border bg-background\",\n \"data-[state=checked]:border-foreground data-[state=checked]:bg-foreground\",\n ].join(\" \"),\n {\n variants: {\n size: {\n sm: \"h-5 w-5\",\n md: \"h-6 w-6\",\n },\n },\n defaultVariants: {\n size: \"sm\",\n },\n }\n)\n\nconst radioGroupIndicatorVariants = cva(\n \"block rounded-full bg-primary-foreground\",\n {\n variants: {\n size: {\n sm: \"h-2.5 w-2.5\",\n md: \"h-3 w-3\",\n },\n },\n defaultVariants: {\n size: \"sm\",\n },\n }\n)\n\nfunction RadioGroup({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n className={cn(\"grid gap-3\", className)}\n {...props}\n />\n )\n}\n\nfunction RadioGroupItem({\n className,\n size = \"sm\",\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item> &\n VariantProps<typeof radioGroupItemVariants>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(radioGroupItemVariants({ size, className }))}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <span className={cn(radioGroupIndicatorVariants({ size }))} />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n}\n\nexport { RadioGroup, RadioGroupItem, radioGroupItemVariants }\n","import * as SeparatorPrimitive from \"@radix-ui/react-separator\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SeparatorVariant = \"full\" | \"middle\" | \"inset\"\n\ntype SeparatorProps = React.ComponentProps<typeof SeparatorPrimitive.Root> & {\n variant?: SeparatorVariant\n label?: string\n}\n\nfunction Separator({\n className,\n orientation = \"horizontal\",\n variant = \"full\",\n label,\n decorative = true,\n ...props\n}: SeparatorProps) {\n const isHorizontal = orientation === \"horizontal\"\n\n return (\n <div\n className={cn(\n \"flex shrink-0\",\n isHorizontal ? \"flex-col items-stretch\" : \"flex-row items-stretch\",\n variant === \"middle\" && (isHorizontal ? \"px-4\" : \"py-4\"),\n variant === \"inset\" && (isHorizontal ? \"pl-4\" : \"pt-4\"),\n label && isHorizontal && \"gap-2.5\",\n !isHorizontal && \"h-full self-stretch\",\n className\n )}\n >\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border\",\n isHorizontal ? \"h-px w-full\" : \"h-full w-px\"\n )}\n {...props}\n />\n {label && isHorizontal && (\n <span className=\"text-lg leading-7 text-foreground\">{label}</span>\n )}\n </div>\n )\n}\n\nexport { Separator }\nexport type { SeparatorProps, SeparatorVariant }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Ellipsis } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst badgeVariants = cva(\n \"inline-flex items-center justify-center rounded-full text-[12px] leading-[16px] whitespace-nowrap text-white\",\n {\n variants: {\n variant: {\n default: \"bg-foreground\",\n success: \"bg-success\",\n warning: \"bg-warning\",\n error: \"bg-error\",\n info: \"bg-info\",\n },\n size: {\n sm: \"h-1.5 w-1.5\",\n md: \"h-4 min-w-4\",\n },\n content: {\n none: \"\",\n dot: \"p-1\",\n number: \"p-0\",\n \"multi-number\": \"p-1\",\n text: \"p-3\",\n },\n stroke: {\n true: \"border-[1.5px] border-background\",\n false: \"\",\n },\n },\n compoundVariants: [\n {\n size: \"sm\",\n content: \"none\",\n className: \"h-1.5 w-1.5 p-0\",\n },\n {\n size: \"md\",\n content: \"number\",\n className: \"h-4 w-4 p-0\",\n },\n ],\n defaultVariants: {\n variant: \"default\",\n size: \"sm\",\n content: \"none\",\n stroke: false,\n },\n }\n)\n\ntype BadgeContentType = \"dot\" | \"number\" | \"multi-number\" | \"text\" | \"none\"\n\ntype BadgeProps = React.ComponentProps<\"div\"> &\n VariantProps<typeof badgeVariants> & {\n content?: BadgeContentType\n stroke?: boolean\n }\n\nfunction Badge({\n className,\n variant = \"default\",\n size = \"sm\",\n content = \"none\",\n stroke = false,\n children,\n ...props\n}: BadgeProps) {\n const isDot = size === \"sm\" && content === \"none\"\n const isNumeric = content === \"number\" || content === \"multi-number\"\n\n return (\n <div\n data-slot=\"badge\"\n data-variant={variant}\n data-size={size}\n className={cn(badgeVariants({ variant, size, content, stroke, className }))}\n {...props}\n >\n {isDot ? null : (\n <span className={cn(\"text-center text-[12px] leading-[16px]\", isNumeric && \"font-medium\")}>\n {content === \"dot\" ? (\n <Ellipsis className=\"h-4 w-4\" aria-hidden=\"true\" />\n ) : (\n children\n )}\n </span>\n )}\n </div>\n )\n}\n\nexport { Badge, badgeVariants }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst tagVariants = cva(\n \"inline-flex items-center whitespace-nowrap rounded-full text-sm font-medium transition-colors [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n outline: \"border-[1.5px] border-border text-foreground\",\n filled: \"bg-background text-foreground\",\n primary: \"bg-primary/10 text-primary border border-primary/20\",\n destructive: \"bg-destructive/10 text-destructive border border-destructive/20\",\n success: \"bg-success/10 text-success border border-success/20\",\n warning: \"bg-warning/10 text-warning border border-warning/20\",\n info: \"bg-info/10 text-info border border-info/20\",\n },\n size: {\n sm: \"h-6 gap-1 px-2 text-xs\",\n default: \"h-8 gap-1 px-4 text-sm\",\n lg: \"h-9 gap-1.5 px-4 text-sm\",\n },\n },\n compoundVariants: [\n { variant: \"filled\", size: \"default\", className: \"pl-4 pr-3\" },\n { variant: \"filled\", size: \"lg\", className: \"pl-4 pr-3\" },\n ],\n defaultVariants: {\n variant: \"outline\",\n size: \"default\",\n },\n }\n)\n\ntype TagProps = React.ComponentProps<\"div\"> &\n VariantProps<typeof tagVariants> & {\n onDismiss?: () => void\n }\n\nfunction Tag({\n className,\n variant,\n size,\n onDismiss,\n children,\n ...props\n}: TagProps) {\n return (\n <div\n data-slot=\"tag\"\n className={cn(\n tagVariants({ variant, size }),\n onDismiss && \"pr-2\",\n className\n )}\n {...props}\n >\n {children}\n {onDismiss && (\n <button\n type=\"button\"\n aria-label=\"Dismiss\"\n onClick={onDismiss}\n className={cn(\n \"inline-flex items-center justify-center rounded-full transition-colors\",\n \"hover:bg-foreground/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n size === \"sm\" ? \"h-3.5 w-3.5\" : \"h-4 w-4\"\n )}\n >\n <X className={size === \"sm\" ? \"h-2.5 w-2.5\" : \"h-3 w-3\"} />\n </button>\n )}\n </div>\n )\n}\n\nexport { Tag, tagVariants }\nexport type { TagProps }\n","import * as AvatarPrimitive from \"@radix-ui/react-avatar\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst avatarVariants = cva(\n \"relative inline-flex shrink-0 items-center justify-center overflow-hidden bg-muted\",\n {\n variants: {\n size: {\n xs: \"h-6 w-6 text-xs\",\n sm: \"h-8 w-8 text-xs\",\n md: \"h-10 w-10 text-lg\",\n lg: \"h-12 w-12 text-lg\",\n },\n shape: {\n circle: \"rounded-full\",\n square: \"rounded-lg\",\n },\n },\n defaultVariants: {\n size: \"md\",\n shape: \"circle\",\n },\n }\n)\n\nconst statusDotVariants = cva(\n \"absolute bottom-0 right-0 block rounded-full border border-background shadow-sm\",\n {\n variants: {\n size: {\n xs: \"h-[4.5px] w-[4.5px]\",\n sm: \"h-1.5 w-1.5\",\n md: \"h-1.5 w-1.5\",\n lg: \"h-2 w-2\",\n },\n status: {\n online: \"bg-success\",\n busy: \"bg-destructive\",\n offline: \"bg-info\",\n away: \"bg-muted-foreground\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n }\n)\n\ntype AvatarStatus = \"online\" | \"busy\" | \"offline\" | \"away\" | \"none\"\n\nfunction Avatar({\n className,\n size = \"md\",\n shape = \"circle\",\n status = \"none\",\n children,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Root> &\n VariantProps<typeof avatarVariants> & {\n status?: AvatarStatus\n }) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n data-size={size}\n data-shape={shape}\n className={cn(avatarVariants({ size, shape, className }))}\n {...props}\n >\n {children}\n {status !== \"none\" && (\n <span\n data-slot=\"avatar-status\"\n className={cn(statusDotVariants({ size, status }))}\n aria-label={status}\n />\n )}\n </AvatarPrimitive.Root>\n )\n}\n\nfunction AvatarImage({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn(\"h-full w-full object-cover\", className)}\n {...props}\n />\n )\n}\n\nfunction AvatarFallback({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn(\n \"flex h-full w-full items-center justify-center bg-muted font-medium text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Avatar, AvatarImage, AvatarFallback, avatarVariants }\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Loader2 } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst iconButtonVariants = cva(\n \"inline-flex shrink-0 items-center justify-center transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground hover:bg-[hsl(var(--icon-button-hover))] disabled:bg-[hsl(var(--icon-button-disabled))] active:bg-primary active:ring-2 active:ring-primary active:ring-offset-2\",\n ghost:\n \"text-foreground hover:bg-accent hover:text-accent-foreground active:bg-accent\",\n danger:\n \"bg-[hsl(var(--icon-button-danger-bg))] text-destructive-foreground hover:bg-[hsl(var(--icon-button-danger-hover))] hover:text-destructive disabled:bg-[hsl(var(--icon-button-danger-disabled))] active:bg-destructive\",\n },\n size: {\n sm: \"h-8 w-8 rounded-[30px] [&_svg]:h-3.5 [&_svg]:w-3.5\",\n default: \"h-10 w-10 rounded-[30px] [&_svg]:h-5 [&_svg]:w-5\",\n lg: \"h-12 w-12 rounded-[30px] [&_svg]:h-6 [&_svg]:w-6\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction IconButton({\n className,\n variant = \"default\",\n size = \"default\",\n asChild = false,\n loading = false,\n disabled,\n children,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps<typeof iconButtonVariants> & {\n asChild?: boolean\n loading?: boolean\n }) {\n const Comp = asChild ? Slot : \"button\"\n const isDisabled = disabled || loading\n\n return (\n <Comp\n data-slot=\"icon-button\"\n data-variant={variant}\n data-size={size}\n className={cn(iconButtonVariants({ variant, size, className }))}\n disabled={isDisabled}\n aria-busy={loading || undefined}\n {...props}\n >\n {loading ? <Loader2 className=\"animate-spin\" /> : children}\n </Comp>\n )\n}\n\nexport { IconButton, iconButtonVariants }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst progressTrackVariants = cva(\n \"relative w-full overflow-hidden rounded-full bg-surface-inset\",\n {\n variants: {\n size: {\n sm: \"h-1\",\n md: \"h-2\",\n },\n },\n defaultVariants: {\n size: \"sm\",\n },\n }\n)\n\nconst indicatorVariants = cva(\n \"h-full rounded-full transition-all duration-300 ease-in-out\",\n {\n variants: {\n status: {\n default: \"bg-foreground\",\n success: \"bg-success\",\n warning: \"bg-warning\",\n error: \"bg-destructive\",\n },\n },\n defaultVariants: {\n status: \"default\",\n },\n }\n)\n\nconst labelColorVariants = cva(\"text-base font-medium leading-6\", {\n variants: {\n status: {\n default: \"text-muted-foreground\",\n success: \"text-success\",\n warning: \"text-warning\",\n error: \"text-destructive\",\n },\n },\n defaultVariants: {\n status: \"default\",\n },\n})\n\ntype ProgressProps = React.ComponentProps<\"div\"> &\n VariantProps<typeof progressTrackVariants> &\n VariantProps<typeof indicatorVariants> & {\n value?: number\n max?: number\n label?: string\n helperText?: string\n showLabel?: boolean\n indeterminate?: boolean\n statusText?: string\n }\n\nfunction Progress({\n className,\n value = 0,\n max = 100,\n size = \"sm\",\n status = \"default\",\n label,\n helperText,\n showLabel = false,\n indeterminate = false,\n statusText,\n ...props\n}: ProgressProps) {\n const clampedValue = Math.min(Math.max(value, 0), max)\n const percentage = max > 0 ? (clampedValue / max) * 100 : 0\n const resolvedStatus = status ?? \"default\"\n\n return (\n <div\n data-slot=\"progress\"\n className={cn(\"flex w-full flex-col gap-1\", className)}\n {...props}\n >\n {showLabel && (\n <div className=\"flex items-end justify-between\">\n <span className={cn(labelColorVariants({ status: resolvedStatus }))}>\n {indeterminate ? (label ?? \"Loading\") : (label ?? \"\")}\n </span>\n <div className=\"flex items-end gap-2\">\n <span className=\"text-lg font-bold leading-7 text-foreground\">\n {indeterminate ? \"Loading\" : `${Math.round(percentage)}%`}\n </span>\n {!indeterminate && statusText && (\n <span className=\"pb-0.5 text-[10px] font-medium leading-4 tracking-[0.5px] text-muted-foreground\">\n {statusText}\n </span>\n )}\n </div>\n </div>\n )}\n\n <div\n role=\"progressbar\"\n aria-valuenow={indeterminate ? undefined : clampedValue}\n aria-valuemin={0}\n aria-valuemax={max}\n className={cn(progressTrackVariants({ size }))}\n >\n <div\n data-slot=\"progress-indicator\"\n className={cn(\n indicatorVariants({ status }),\n indeterminate && \"animate-progress-indeterminate\"\n )}\n style={\n indeterminate\n ? { width: \"50%\" }\n : { width: `${percentage}%` }\n }\n />\n </div>\n\n {showLabel && helperText && (\n <span className=\"text-[10px] leading-4 text-muted-foreground\">\n {helperText}\n </span>\n )}\n </div>\n )\n}\n\nexport { Progress, progressTrackVariants, indicatorVariants }\n","import { useId } from \"react\"\nimport { CalendarIcon, ChevronDown, Search, X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Input } from \"./input\"\nimport { Label } from \"./label\"\n\ntype InputType = \"text\" | \"select\" | \"search\" | \"number\" | \"calendar\"\n\ntype InputFieldProps = Omit<React.ComponentProps<\"input\">, \"type\"> & {\n label?: string\n required?: boolean\n helpText?: string\n errorMessage?: string\n inputType?: InputType\n clearable?: boolean\n onClear?: () => void\n prefixLabel?: string\n}\n\nfunction InputField({\n className,\n label,\n required = false,\n helpText,\n errorMessage,\n inputType = \"text\",\n clearable = false,\n onClear,\n prefixLabel,\n disabled,\n value,\n id,\n ...props\n}: InputFieldProps) {\n const generatedId = useId()\n const fieldId = id ?? generatedId\n\n const isError = !!errorMessage\n const helpId = helpText ? `${fieldId}-help` : undefined\n const errorId = isError ? `${fieldId}-error` : undefined\n const describedBy =\n [helpId, errorId].filter(Boolean).join(\" \") || undefined\n\n const labelElement = label ? (\n <Label data-slot=\"input-field-label\" htmlFor={fieldId}>\n {label}\n {required && <span className=\"text-destructive\">*</span>}\n </Label>\n ) : null\n\n const helpElement =\n helpText && !isError ? (\n <p\n data-slot=\"input-field-help\"\n id={helpId}\n className=\"text-xs font-medium leading-4 text-muted-foreground\"\n >\n {helpText}\n </p>\n ) : null\n\n const errorElement = isError ? (\n <p\n data-slot=\"input-field-error\"\n id={errorId}\n role=\"alert\"\n className=\"text-xs font-medium leading-4 text-destructive\"\n >\n {errorMessage}\n </p>\n ) : null\n\n const leftIcon = inputType === \"search\" ? <Search /> : undefined\n const showChevron = inputType === \"select\"\n const showCalendar = inputType === \"calendar\"\n\n const nativeType =\n inputType === \"number\"\n ? \"tel\"\n : inputType === \"search\"\n ? \"search\"\n : \"text\"\n\n const inputWrapper =\n inputType === \"number\" && prefixLabel ? (\n <div\n data-slot=\"input-field-number-group\"\n className=\"flex items-start gap-2\"\n >\n <div\n data-slot=\"input-field-prefix\"\n data-disabled={disabled || undefined}\n className={cn(\n \"flex h-8 shrink-0 items-center rounded-lg border border-input bg-background px-2.5 text-sm shadow-sm transition-colors\",\n \"focus-within:border-ring\",\n isError && \"border-destructive\",\n disabled && \"cursor-not-allowed opacity-50\"\n )}\n >\n <span className=\"text-muted-foreground\">{prefixLabel}</span>\n </div>\n <div\n data-slot=\"input-wrapper\"\n data-disabled={disabled || undefined}\n className={cn(\n \"flex h-8 w-full items-center gap-1.5 rounded-lg border border-input bg-background px-2.5 shadow-sm transition-colors\",\n \"focus-within:border-ring\",\n isError && \"border-destructive\",\n disabled && \"cursor-not-allowed opacity-50\",\n className\n )}\n >\n <Input\n id={fieldId}\n type=\"tel\"\n disabled={disabled}\n value={value}\n aria-invalid={isError || undefined}\n aria-describedby={describedBy}\n data-slot=\"input-field-input\"\n className=\"h-full border-0 bg-transparent px-0 shadow-none ring-0 ring-offset-0 focus-visible:ring-0 focus-visible:ring-offset-0\"\n {...props}\n />\n </div>\n </div>\n ) : (\n <div\n data-slot=\"input-wrapper\"\n data-disabled={disabled || undefined}\n className={cn(\n \"flex h-8 w-full items-center gap-1.5 rounded-lg border border-input bg-background px-2.5 transition-colors\",\n \"focus-within:border-ring\",\n isError && \"border-destructive\",\n disabled && \"cursor-not-allowed opacity-50\",\n className\n )}\n >\n {leftIcon && (\n <span\n data-slot=\"input-field-icon\"\n className=\"inline-flex shrink-0 text-muted-foreground [&_svg]:h-4 [&_svg]:w-4\"\n >\n {leftIcon}\n </span>\n )}\n\n <Input\n id={fieldId}\n type={nativeType}\n disabled={disabled}\n value={value}\n aria-invalid={isError || undefined}\n aria-describedby={describedBy}\n data-slot=\"input-field-input\"\n className=\"h-full border-0 bg-transparent px-0 shadow-none ring-0 ring-offset-0 focus-visible:ring-0 focus-visible:ring-offset-0\"\n {...props}\n />\n\n {clearable && value && !disabled && (\n <button\n type=\"button\"\n onClick={onClear}\n data-slot=\"input-field-clear\"\n className=\"inline-flex shrink-0 text-muted-foreground hover:text-foreground [&_svg]:h-4 [&_svg]:w-4\"\n aria-label=\"Clear input\"\n >\n <X />\n </button>\n )}\n\n {showChevron && (\n <span\n data-slot=\"input-field-chevron\"\n className=\"inline-flex shrink-0 text-muted-foreground [&_svg]:h-4 [&_svg]:w-4\"\n >\n <ChevronDown />\n </span>\n )}\n\n {showCalendar && (\n <span\n data-slot=\"input-field-calendar\"\n className=\"inline-flex shrink-0 text-muted-foreground [&_svg]:h-4 [&_svg]:w-4\"\n >\n <CalendarIcon />\n </span>\n )}\n </div>\n )\n\n if (!label && !helpText && !errorMessage) {\n return inputWrapper\n }\n\n return (\n <div data-slot=\"input-field\" className=\"flex flex-col gap-1\">\n {labelElement}\n {inputWrapper}\n {helpElement}\n {errorElement}\n </div>\n )\n}\n\nexport { InputField }\nexport type { InputFieldProps, InputType }\n","import * as React from \"react\"\nimport { Search, X, Loader2 } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Input } from \"./input\"\n\nfunction SearchInput({\n className,\n inputSize = \"sm\",\n clearable = true,\n onClear,\n loading = false,\n disabled,\n value,\n defaultValue,\n onChange,\n placeholder = \"Type to Search...\",\n ...props\n}: Omit<React.ComponentProps<\"input\">, \"size\" | \"type\"> & {\n inputSize?: \"sm\" | \"default\"\n clearable?: boolean\n onClear?: () => void\n loading?: boolean\n}) {\n const [internalValue, setInternalValue] = React.useState(\n defaultValue ?? \"\"\n )\n\n const isControlled = value !== undefined\n const currentValue = isControlled ? value : internalValue\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (!isControlled) {\n setInternalValue(e.target.value)\n }\n onChange?.(e)\n }\n\n const handleClear = () => {\n if (!isControlled) {\n setInternalValue(\"\")\n }\n onClear?.()\n }\n\n const hasValue = String(currentValue).length > 0\n const showClear = clearable && hasValue && !disabled && !loading\n const showLoader = loading && !disabled\n\n return (\n <div\n data-slot=\"search-input\"\n className={cn(\n \"flex items-center gap-2 rounded-full border border-input bg-background px-3\",\n \"transition-colors\",\n inputSize === \"sm\" && \"h-8\",\n inputSize === \"default\" && \"h-10\",\n disabled && \"cursor-not-allowed bg-secondary opacity-60\",\n className\n )}\n >\n <span\n className={cn(\n \"inline-flex shrink-0 [&_svg]:h-[18px] [&_svg]:w-[18px]\",\n disabled ? \"text-muted-foreground/50\" : \"text-muted-foreground\"\n )}\n >\n <Search />\n </span>\n\n <Input\n type=\"search\"\n disabled={disabled}\n value={currentValue}\n onChange={handleChange}\n placeholder={placeholder}\n className={cn(\n \"h-full border-0 bg-transparent px-0 text-[18px] leading-7 shadow-none ring-0 ring-offset-0\",\n \"focus-visible:ring-0 focus-visible:ring-offset-0\",\n \"placeholder:text-muted-foreground\",\n \"text-foreground\",\n \"[&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden\"\n )}\n {...props}\n />\n\n {showLoader && (\n <span className=\"inline-flex shrink-0 animate-spin text-muted-foreground [&_svg]:h-4 [&_svg]:w-4\">\n <Loader2 />\n </span>\n )}\n\n {showClear && (\n <button\n type=\"button\"\n onClick={handleClear}\n disabled={disabled}\n className={cn(\n \"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full\",\n \"bg-foreground/5 text-muted-foreground transition-colors hover:bg-foreground/10 hover:text-foreground\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n )}\n aria-label=\"Clear search\"\n >\n <X className=\"h-3.5 w-3.5\" />\n </button>\n )}\n </div>\n )\n}\n\nexport { SearchInput }\n","import * as React from \"react\"\nimport { Check } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype StepStatus = \"completed\" | \"active\" | \"upcoming\" | \"inactive\"\n\ntype StepperContextValue = {\n activeStep: number\n orientation: \"horizontal\" | \"vertical\"\n totalSteps: number\n}\n\nconst StepperContext = React.createContext<StepperContextValue>({\n activeStep: 0,\n orientation: \"horizontal\",\n totalSteps: 0,\n})\n\nfunction useStepperContext() {\n return React.useContext(StepperContext)\n}\n\nfunction getStepStatus(index: number, activeStep: number): StepStatus {\n if (index < activeStep) return \"completed\"\n if (index === activeStep) return \"active\"\n return \"inactive\"\n}\n\nfunction StepIndicator({ status }: { status: StepStatus }) {\n return (\n <div\n data-slot=\"stepper-indicator\"\n className={cn(\n \"relative flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 transition-colors duration-300\",\n status === \"completed\" &&\n \"border-primary bg-primary text-primary-foreground\",\n status === \"active\" && \"border-primary bg-background\",\n status === \"inactive\" && \"border-muted bg-background\"\n )}\n >\n {status === \"completed\" && <Check className=\"h-4 w-4\" />}\n {status === \"active\" && (\n <div\n data-slot=\"stepper-dot\"\n className=\"h-2.5 w-2.5 rounded-full bg-primary\"\n />\n )}\n {status === \"inactive\" && (\n <div\n data-slot=\"stepper-dot\"\n className=\"h-2.5 w-2.5 rounded-full bg-muted\"\n />\n )}\n </div>\n )\n}\n\nfunction StepperSeparator({\n completed,\n orientation,\n}: {\n completed: boolean\n orientation: \"horizontal\" | \"vertical\"\n}) {\n return (\n <div\n data-slot=\"stepper-separator\"\n className={cn(\n \"transition-colors duration-300\",\n orientation === \"horizontal\"\n ? \"h-0.5 flex-1\"\n : \"h-20 w-0.5\",\n completed ? \"bg-primary\" : \"bg-surface-inset\"\n )}\n />\n )\n}\n\ntype StepperItemProps = {\n className?: string\n label?: string\n description?: string\n children?: React.ReactNode\n}\n\nfunction StepperItem({\n className,\n label,\n description,\n children,\n}: StepperItemProps) {\n return (\n <div data-slot=\"stepper-item\" className={className}>\n {children ?? (\n <>\n {label && (\n <span\n data-slot=\"stepper-item-label\"\n className=\"text-sm font-medium leading-5\"\n >\n {label}\n </span>\n )}\n {description && (\n <span\n data-slot=\"stepper-item-description\"\n className=\"text-xs text-muted-foreground\"\n >\n {description}\n </span>\n )}\n </>\n )}\n </div>\n )\n}\n\ntype StepperProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n activeStep?: number\n orientation?: \"horizontal\" | \"vertical\"\n children?: React.ReactNode\n steps?: Array<{ label: string; description?: string }>\n}\n\nfunction Stepper({\n className,\n activeStep = 0,\n orientation = \"horizontal\",\n steps,\n children,\n ...props\n}: StepperProps) {\n const items = steps\n ? steps.map((s, i) => (\n <StepperItem key={i} label={s.label} description={s.description} />\n ))\n : React.Children.toArray(children)\n\n const totalSteps = items.length\n\n const contextValue: StepperContextValue = {\n activeStep,\n orientation,\n totalSteps,\n }\n\n const hasLabels = items.some(\n (child) =>\n React.isValidElement<StepperItemProps>(child) && child.props.label\n )\n\n if (orientation === \"horizontal\") {\n return (\n <StepperContext.Provider value={contextValue}>\n <div\n data-slot=\"stepper\"\n className={cn(\"flex flex-col gap-2\", className)}\n {...props}\n >\n {/* Row 1: indicators + separators */}\n <div className=\"flex flex-row items-center\">\n {items.map((_, index) => {\n const status = getStepStatus(index, activeStep)\n const isLast = index === totalSteps - 1\n return (\n <React.Fragment key={index}>\n <StepIndicator status={status} />\n {!isLast && (\n <StepperSeparator\n completed={index < activeStep}\n orientation=\"horizontal\"\n />\n )}\n </React.Fragment>\n )\n })}\n </div>\n {/* Row 2: labels (only if any step has a label) */}\n {hasLabels && (\n <div className=\"flex flex-row\">\n {items.map((child, index) => {\n const status = getStepStatus(index, activeStep)\n const isLast = index === totalSteps - 1\n return (\n <React.Fragment key={index}>\n <div\n data-slot=\"stepper-step-content\"\n className=\"flex flex-col items-center text-center\"\n style={{ width: 32 }}\n >\n {React.isValidElement<StepperItemProps>(child) && (\n <>\n {child.props.label && (\n <span\n data-slot=\"stepper-label\"\n className={cn(\n \"whitespace-nowrap text-sm leading-5\",\n status === \"active\"\n ? \"font-semibold text-foreground\"\n : status === \"completed\"\n ? \"font-normal text-foreground\"\n : \"font-normal text-info\"\n )}\n >\n {child.props.label}\n </span>\n )}\n {child.props.description && (\n <span\n data-slot=\"stepper-description\"\n className=\"whitespace-nowrap text-xs text-muted-foreground\"\n >\n {child.props.description}\n </span>\n )}\n </>\n )}\n </div>\n {!isLast && <div className=\"flex-1\" />}\n </React.Fragment>\n )\n })}\n </div>\n )}\n </div>\n </StepperContext.Provider>\n )\n }\n\n return (\n <StepperContext.Provider value={contextValue}>\n <div\n data-slot=\"stepper\"\n className={cn(\"flex flex-col items-start\", className)}\n {...props}\n >\n {items.map((child, index) => {\n const status = getStepStatus(index, activeStep)\n const isLast = index === totalSteps - 1\n return (\n <React.Fragment key={index}>\n <div\n data-slot=\"stepper-step\"\n className=\"flex flex-row items-start gap-4\"\n >\n <div\n data-slot=\"stepper-step-indicator-group\"\n className=\"flex flex-col items-center\"\n >\n <StepIndicator status={status} />\n {!isLast && (\n <StepperSeparator\n completed={index < activeStep}\n orientation=\"vertical\"\n />\n )}\n </div>\n {React.isValidElement<StepperItemProps>(child) && (\n <div\n data-slot=\"stepper-step-content\"\n className=\"flex flex-col pb-8\"\n >\n {child.props.label && (\n <span\n data-slot=\"stepper-label\"\n className={cn(\n \"text-sm leading-8\",\n status === \"active\"\n ? \"font-semibold text-foreground\"\n : status === \"completed\"\n ? \"font-normal text-foreground\"\n : \"font-normal text-muted-foreground\"\n )}\n >\n {child.props.label}\n </span>\n )}\n {child.props.description && (\n <span\n data-slot=\"stepper-description\"\n className=\"text-xs text-muted-foreground\"\n >\n {child.props.description}\n </span>\n )}\n </div>\n )}\n </div>\n </React.Fragment>\n )\n })}\n </div>\n </StepperContext.Provider>\n )\n}\n\nexport { Stepper, StepperItem, useStepperContext }\nexport type { StepperProps, StepperItemProps, StepStatus }\n","import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Card({\n className,\n variant = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & {\n variant?: \"default\" | \"outlined\" | \"elevated\"\n}) {\n return (\n <div\n data-slot=\"card\"\n className={cn(\n \"flex flex-col gap-4 rounded-lg bg-card px-6 py-5 text-card-foreground\",\n variant === \"outlined\" && \"border border-border\",\n variant === \"elevated\" &&\n \"shadow-[0px_4px_12px_0px_rgba(0,0,0,0.08)]\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\"flex flex-col gap-4\", className)}\n {...props}\n />\n )\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn(\"text-h4\", className)}\n {...props}\n />\n )\n}\n\nfunction CardDescription({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"card-content\" className={cn(className)} {...props} />\n )\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\"flex items-center justify-end gap-3\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Card,\n CardHeader,\n CardTitle,\n CardDescription,\n CardContent,\n CardFooter,\n}\n","import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Table({ className, ...props }: React.ComponentProps<\"table\">) {\n return (\n <div data-slot=\"table-wrapper\" className=\"relative w-full overflow-auto\">\n <table\n data-slot=\"table\"\n className={cn(\n \"w-full caption-bottom border-collapse text-sm\",\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nfunction TableHeader({\n className,\n ...props\n}: React.ComponentProps<\"thead\">) {\n return (\n <thead\n data-slot=\"table-header\"\n className={cn(\"[&_tr]:border-b\", className)}\n {...props}\n />\n )\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<\"tbody\">) {\n return (\n <tbody\n data-slot=\"table-body\"\n className={cn(\"[&_tr:last-child]:border-0\", className)}\n {...props}\n />\n )\n}\n\nfunction TableFooter({\n className,\n ...props\n}: React.ComponentProps<\"tfoot\">) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn(\n \"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<\"tr\">) {\n return (\n <tr\n data-slot=\"table-row\"\n className={cn(\n \"border-b border-border transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<\"th\">) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n \"h-11 bg-muted px-2 text-left align-middle text-sm font-medium text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<\"td\">) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n \"h-11 px-2 align-middle text-sm text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableCaption({\n className,\n ...props\n}: React.ComponentProps<\"caption\">) {\n return (\n <caption\n data-slot=\"table-caption\"\n className={cn(\"mt-4 text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableRow,\n TableHead,\n TableCell,\n TableCaption,\n}\n","import * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return (\n <DialogPrimitive.Trigger\n data-slot=\"dialog-trigger\"\n className={className}\n {...props}\n />\n )\n}\n\nfunction DialogClose({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className={className}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content>) {\n return (\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"fixed inset-0 z-50 bg-black/80\",\n \"data-[state=open]:animate-in data-[state=open]:fade-in-0\",\n \"data-[state=closed]:animate-out data-[state=closed]:fade-out-0\"\n )}\n />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n \"fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-border bg-background p-6 shadow-lg duration-200\",\n \"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]\",\n \"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]\",\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close\n data-slot=\"dialog-close-button\"\n className=\"absolute top-4 right-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\"\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\n \"flex flex-col gap-2 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogTitle,\n DialogDescription,\n DialogFooter,\n DialogClose,\n}\n","// packages/react/use-escape-keydown/src/use-escape-keydown.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n const firstChar = placement[0];\n return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');\n}\nconst lrPlacement = ['left', 'right'];\nconst rlPlacement = ['right', 'left'];\nconst tbPlacement = ['top', 'bottom'];\nconst btPlacement = ['bottom', 'top'];\nfunction getSideList(side, isStart, rtl) {\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rlPlacement : lrPlacement;\n return isStart ? lrPlacement : rlPlacement;\n case 'left':\n case 'right':\n return isStart ? tbPlacement : btPlacement;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n const side = getSide(placement);\n return oppositeSideMap[side] + placement.slice(side.length);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n// Maximum number of resets that can occur before bailing to avoid infinite reset loops.\nconst MAX_RESET_COUNT = 50;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const platformWithDetectOverflow = platform.detectOverflow ? platform : {\n ...platform,\n detectOverflow\n };\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let resetCount = 0;\n const middlewareData = {};\n for (let i = 0; i < middleware.length; i++) {\n const currentMiddleware = middleware[i];\n if (!currentMiddleware) {\n continue;\n }\n const {\n name,\n fn\n } = currentMiddleware;\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform: platformWithDetectOverflow,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData[name] = {\n ...middlewareData[name],\n ...data\n };\n if (reset && resetCount < MAX_RESET_COUNT) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;\n if (!ignoreCrossAxisOverflow ||\n // We leave the current main axis only if every placement on that axis\n // overflows the main axis.\n overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects,\n platform\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await platform.detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await platform.detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\nconst originSides = /*#__PURE__*/new Set(['left', 'top']);\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = originSides.has(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n platform\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: {\n [mainAxis]: checkMainAxis,\n [crossAxis]: checkCrossAxis\n }\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = originSides.has(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n var _state$middlewareData, _state$middlewareData2;\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';\n}\nfunction isTableElement(element) {\n return /^(table|td|th)$/.test(getNodeName(element));\n}\nfunction isTopLayer(element) {\n try {\n if (element.matches(':popover-open')) {\n return true;\n }\n } catch (_e) {\n // no-op\n }\n try {\n return element.matches(':modal');\n } catch (_e) {\n return false;\n }\n}\nconst willChangeRe = /transform|translate|scale|rotate|perspective|filter/;\nconst containRe = /paint|layout|strict|content/;\nconst isNotNone = value => !!value && value !== 'none';\nlet isWebKitValue;\nfunction isContainingBlock(elementOrCss) {\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (isWebKitValue == null) {\n isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');\n }\n return isWebKitValue;\n}\nfunction isLastTraversableNode(node) {\n return /^(html|body|#document)$/.test(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n } else {\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n }\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle as getComputedStyle$1, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle$1(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle$1(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n const leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll) {\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x,\n y\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle$1(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Safety check: ensure the scrollbar space is reasonable in case this\n// calculation is affected by unusual styles.\n// Most scrollbars leave 15-18px of space.\nconst SCROLLBAR_MAX = 25;\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n const windowScrollbarX = getWindowScrollBarX(html);\n // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the\n // visual width of the <html> but this is not considered in the size\n // of `html.clientWidth`.\n if (windowScrollbarX <= 0) {\n const doc = html.ownerDocument;\n const body = doc.body;\n const bodyStyles = getComputedStyle(body);\n const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;\n const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);\n if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {\n width -= clippingStableScrollbarWidth;\n }\n } else if (windowScrollbarX <= SCROLLBAR_MAX) {\n // If the <body> scrollbar is on the left, the width needs to be extended\n // by the scrollbar amount so there isn't extra space on the right.\n width += windowScrollbarX;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle$1(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle$1(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === 'absolute' || currentContainingBlockComputedStyle.position === 'fixed') || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);\n let top = firstRect.top;\n let right = firstRect.right;\n let bottom = firstRect.bottom;\n let left = firstRect.left;\n for (let i = 1; i < clippingAncestors.length; i++) {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);\n top = max(rect.top, top);\n right = min(rect.right, right);\n bottom = min(rect.bottom, bottom);\n left = max(rect.left, left);\n }\n return {\n width: right - left,\n height: bottom - top,\n x: left,\n y: top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n\n // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n function setLeftRTLScrollbarOffset() {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n setLeftRTLScrollbarOffset();\n }\n }\n if (isFixed && !isOffsetParentAnElement && documentElement) {\n setLeftRTLScrollbarOffset();\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle$1(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n let rawOffsetParent = element.offsetParent;\n\n // Firefox returns the <html> element as the offsetParent if it's non-static,\n // while Chrome and Safari return the <body> element. The <body> element must\n // be used to perform the correct calculations even if the <html> element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle$1(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\nfunction rectsAreEqual(a, b) {\n return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const elementRectForRootMargin = element.getBoundingClientRect();\n const {\n left,\n top,\n width,\n height\n } = elementRectForRootMargin;\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped, the ratio is 0. Throttle the refresh\n // to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n // It's possible that even though the ratio is reported as 1, the\n // element is not actually fully within the IntersectionObserver's root\n // area anymore. This can happen under performance constraints. This may\n // be a bug in the browser's IntersectionObserver implementation. To\n // work around this, we compare the element's bounding rect now with\n // what it was at the time we created the IntersectionObserver. If they\n // are not equal then the element moved, so we refresh.\n refresh();\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (_e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n if (floating) {\n resizeObserver.observe(floating);\n }\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n","import { computePosition, arrow as arrow$2, autoPlacement as autoPlacement$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1 } from '@floating-ui/dom';\nexport { autoUpdate, computePosition, detectOverflow, getOverflowAncestors, platform } from '@floating-ui/dom';\nimport * as React from 'react';\nimport { useLayoutEffect } from 'react';\nimport * as ReactDOM from 'react-dom';\n\nvar isClient = typeof document !== 'undefined';\n\nvar noop = function noop() {};\nvar index = isClient ? useLayoutEffect : noop;\n\n// Fork of `fast-deep-equal` that only does the comparisons we need and compares\n// functions\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (typeof a === 'function' && a.toString() === b.toString()) {\n return true;\n }\n let length;\n let i;\n let keys;\n if (a && b && typeof a === 'object') {\n if (Array.isArray(a)) {\n length = a.length;\n if (length !== b.length) return false;\n for (i = length; i-- !== 0;) {\n if (!deepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) {\n return false;\n }\n for (i = length; i-- !== 0;) {\n if (!{}.hasOwnProperty.call(b, keys[i])) {\n return false;\n }\n }\n for (i = length; i-- !== 0;) {\n const key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n continue;\n }\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n return a !== a && b !== b;\n}\n\nfunction getDPR(element) {\n if (typeof window === 'undefined') {\n return 1;\n }\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\n\nfunction useLatestRef(value) {\n const ref = React.useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/**\n * Provides data to position a floating element.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform,\n elements: {\n reference: externalReference,\n floating: externalFloating\n } = {},\n transform = true,\n whileElementsMounted,\n open\n } = options;\n const [data, setData] = React.useState({\n x: 0,\n y: 0,\n strategy,\n placement,\n middlewareData: {},\n isPositioned: false\n });\n const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);\n if (!deepEqual(latestMiddleware, middleware)) {\n setLatestMiddleware(middleware);\n }\n const [_reference, _setReference] = React.useState(null);\n const [_floating, _setFloating] = React.useState(null);\n const setReference = React.useCallback(node => {\n if (node !== referenceRef.current) {\n referenceRef.current = node;\n _setReference(node);\n }\n }, []);\n const setFloating = React.useCallback(node => {\n if (node !== floatingRef.current) {\n floatingRef.current = node;\n _setFloating(node);\n }\n }, []);\n const referenceEl = externalReference || _reference;\n const floatingEl = externalFloating || _floating;\n const referenceRef = React.useRef(null);\n const floatingRef = React.useRef(null);\n const dataRef = React.useRef(data);\n const hasWhileElementsMounted = whileElementsMounted != null;\n const whileElementsMountedRef = useLatestRef(whileElementsMounted);\n const platformRef = useLatestRef(platform);\n const openRef = useLatestRef(open);\n const update = React.useCallback(() => {\n if (!referenceRef.current || !floatingRef.current) {\n return;\n }\n const config = {\n placement,\n strategy,\n middleware: latestMiddleware\n };\n if (platformRef.current) {\n config.platform = platformRef.current;\n }\n computePosition(referenceRef.current, floatingRef.current, config).then(data => {\n const fullData = {\n ...data,\n // The floating element's position may be recomputed while it's closed\n // but still mounted (such as when transitioning out). To ensure\n // `isPositioned` will be `false` initially on the next open, avoid\n // setting it to `true` when `open === false` (must be specified).\n isPositioned: openRef.current !== false\n };\n if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {\n dataRef.current = fullData;\n ReactDOM.flushSync(() => {\n setData(fullData);\n });\n }\n });\n }, [latestMiddleware, placement, strategy, platformRef, openRef]);\n index(() => {\n if (open === false && dataRef.current.isPositioned) {\n dataRef.current.isPositioned = false;\n setData(data => ({\n ...data,\n isPositioned: false\n }));\n }\n }, [open]);\n const isMountedRef = React.useRef(false);\n index(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n index(() => {\n if (referenceEl) referenceRef.current = referenceEl;\n if (floatingEl) floatingRef.current = floatingEl;\n if (referenceEl && floatingEl) {\n if (whileElementsMountedRef.current) {\n return whileElementsMountedRef.current(referenceEl, floatingEl, update);\n }\n update();\n }\n }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);\n const refs = React.useMemo(() => ({\n reference: referenceRef,\n floating: floatingRef,\n setReference,\n setFloating\n }), [setReference, setFloating]);\n const elements = React.useMemo(() => ({\n reference: referenceEl,\n floating: floatingEl\n }), [referenceEl, floatingEl]);\n const floatingStyles = React.useMemo(() => {\n const initialStyles = {\n position: strategy,\n left: 0,\n top: 0\n };\n if (!elements.floating) {\n return initialStyles;\n }\n const x = roundByDPR(elements.floating, data.x);\n const y = roundByDPR(elements.floating, data.y);\n if (transform) {\n return {\n ...initialStyles,\n transform: \"translate(\" + x + \"px, \" + y + \"px)\",\n ...(getDPR(elements.floating) >= 1.5 && {\n willChange: 'transform'\n })\n };\n }\n return {\n position: strategy,\n left: x,\n top: y\n };\n }, [strategy, transform, elements.floating, data.x, data.y]);\n return React.useMemo(() => ({\n ...data,\n update,\n refs,\n elements,\n floatingStyles\n }), [data, update, refs, elements, floatingStyles]);\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow$1 = options => {\n function isRef(value) {\n return {}.hasOwnProperty.call(value, 'current');\n }\n return {\n name: 'arrow',\n options,\n fn(state) {\n const {\n element,\n padding\n } = typeof options === 'function' ? options(state) : options;\n if (element && isRef(element)) {\n if (element.current != null) {\n return arrow$2({\n element: element.current,\n padding\n }).fn(state);\n }\n return {};\n }\n if (element) {\n return arrow$2({\n element,\n padding\n }).fn(state);\n }\n return {};\n }\n };\n};\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = (options, deps) => {\n const result = offset$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = (options, deps) => {\n const result = shift$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = (options, deps) => {\n const result = limitShift$1(options);\n return {\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = (options, deps) => {\n const result = flip$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = (options, deps) => {\n const result = size$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = (options, deps) => {\n const result = autoPlacement$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = (options, deps) => {\n const result = hide$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = (options, deps) => {\n const result = inline$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = (options, deps) => {\n const result = arrow$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\nexport { arrow, autoPlacement, flip, hide, inline, limitShift, offset, shift, size, useFloating };\n","// src/arrow.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Arrow\";\nvar Arrow = React.forwardRef((props, forwardedRef) => {\n const { children, width = 10, height = 5, ...arrowProps } = props;\n return /* @__PURE__ */ jsx(\n Primitive.svg,\n {\n ...arrowProps,\n ref: forwardedRef,\n width,\n height,\n viewBox: \"0 0 30 10\",\n preserveAspectRatio: \"none\",\n children: props.asChild ? children : /* @__PURE__ */ jsx(\"polygon\", { points: \"0,0 30,0 15,10\" })\n }\n );\n});\nArrow.displayName = NAME;\nvar Root = Arrow;\nexport {\n Arrow,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/popper.tsx\nimport * as React from \"react\";\nimport {\n useFloating,\n autoUpdate,\n offset,\n shift,\n limitShift,\n hide,\n arrow as floatingUIarrow,\n flip,\n size\n} from \"@floating-ui/react-dom\";\nimport * as ArrowPrimitive from \"@radix-ui/react-arrow\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SIDE_OPTIONS = [\"top\", \"right\", \"bottom\", \"left\"];\nvar ALIGN_OPTIONS = [\"start\", \"center\", \"end\"];\nvar POPPER_NAME = \"Popper\";\nvar [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);\nvar [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);\nvar Popper = (props) => {\n const { __scopePopper, children } = props;\n const [anchor, setAnchor] = React.useState(null);\n return /* @__PURE__ */ jsx(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });\n};\nPopper.displayName = POPPER_NAME;\nvar ANCHOR_NAME = \"PopperAnchor\";\nvar PopperAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopper, virtualRef, ...anchorProps } = props;\n const context = usePopperContext(ANCHOR_NAME, __scopePopper);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const anchorRef = React.useRef(null);\n React.useEffect(() => {\n const previousAnchor = anchorRef.current;\n anchorRef.current = virtualRef?.current || ref.current;\n if (previousAnchor !== anchorRef.current) {\n context.onAnchorChange(anchorRef.current);\n }\n });\n return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });\n }\n);\nPopperAnchor.displayName = ANCHOR_NAME;\nvar CONTENT_NAME = \"PopperContent\";\nvar [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);\nvar PopperContent = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopper,\n side = \"bottom\",\n sideOffset = 0,\n align = \"center\",\n alignOffset = 0,\n arrowPadding = 0,\n avoidCollisions = true,\n collisionBoundary = [],\n collisionPadding: collisionPaddingProp = 0,\n sticky = \"partial\",\n hideWhenDetached = false,\n updatePositionStrategy = \"optimized\",\n onPlaced,\n ...contentProps\n } = props;\n const context = usePopperContext(CONTENT_NAME, __scopePopper);\n const [content, setContent] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n const [arrow, setArrow] = React.useState(null);\n const arrowSize = useSize(arrow);\n const arrowWidth = arrowSize?.width ?? 0;\n const arrowHeight = arrowSize?.height ?? 0;\n const desiredPlacement = side + (align !== \"center\" ? \"-\" + align : \"\");\n const collisionPadding = typeof collisionPaddingProp === \"number\" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };\n const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];\n const hasExplicitBoundaries = boundary.length > 0;\n const detectOverflowOptions = {\n padding: collisionPadding,\n boundary: boundary.filter(isNotNull),\n // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n altBoundary: hasExplicitBoundaries\n };\n const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({\n // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues\n strategy: \"fixed\",\n placement: desiredPlacement,\n whileElementsMounted: (...args) => {\n const cleanup = autoUpdate(...args, {\n animationFrame: updatePositionStrategy === \"always\"\n });\n return cleanup;\n },\n elements: {\n reference: context.anchor\n },\n middleware: [\n offset({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),\n avoidCollisions && shift({\n mainAxis: true,\n crossAxis: false,\n limiter: sticky === \"partial\" ? limitShift() : void 0,\n ...detectOverflowOptions\n }),\n avoidCollisions && flip({ ...detectOverflowOptions }),\n size({\n ...detectOverflowOptions,\n apply: ({ elements, rects, availableWidth, availableHeight }) => {\n const { width: anchorWidth, height: anchorHeight } = rects.reference;\n const contentStyle = elements.floating.style;\n contentStyle.setProperty(\"--radix-popper-available-width\", `${availableWidth}px`);\n contentStyle.setProperty(\"--radix-popper-available-height\", `${availableHeight}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-width\", `${anchorWidth}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-height\", `${anchorHeight}px`);\n }\n }),\n arrow && floatingUIarrow({ element: arrow, padding: arrowPadding }),\n transformOrigin({ arrowWidth, arrowHeight }),\n hideWhenDetached && hide({ strategy: \"referenceHidden\", ...detectOverflowOptions })\n ]\n });\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const handlePlaced = useCallbackRef(onPlaced);\n useLayoutEffect(() => {\n if (isPositioned) {\n handlePlaced?.();\n }\n }, [isPositioned, handlePlaced]);\n const arrowX = middlewareData.arrow?.x;\n const arrowY = middlewareData.arrow?.y;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const [contentZIndex, setContentZIndex] = React.useState();\n useLayoutEffect(() => {\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [content]);\n return /* @__PURE__ */ jsx(\n \"div\",\n {\n ref: refs.setFloating,\n \"data-radix-popper-content-wrapper\": \"\",\n style: {\n ...floatingStyles,\n transform: isPositioned ? floatingStyles.transform : \"translate(0, -200%)\",\n // keep off the page when measuring\n minWidth: \"max-content\",\n zIndex: contentZIndex,\n [\"--radix-popper-transform-origin\"]: [\n middlewareData.transformOrigin?.x,\n middlewareData.transformOrigin?.y\n ].join(\" \"),\n // hide the content if using the hide middleware and should be hidden\n // set visibility to hidden and disable pointer events so the UI behaves\n // as if the PopperContent isn't there at all\n ...middlewareData.hide?.referenceHidden && {\n visibility: \"hidden\",\n pointerEvents: \"none\"\n }\n },\n dir: props.dir,\n children: /* @__PURE__ */ jsx(\n PopperContentProvider,\n {\n scope: __scopePopper,\n placedSide,\n onArrowChange: setArrow,\n arrowX,\n arrowY,\n shouldHideArrow: cannotCenterArrow,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-side\": placedSide,\n \"data-align\": placedAlign,\n ...contentProps,\n ref: composedRefs,\n style: {\n ...contentProps.style,\n // if the PopperContent hasn't been placed yet (not all measurements done)\n // we prevent animations so that users's animation don't kick in too early referring wrong sides\n animation: !isPositioned ? \"none\" : void 0\n }\n }\n )\n }\n )\n }\n );\n }\n);\nPopperContent.displayName = CONTENT_NAME;\nvar ARROW_NAME = \"PopperArrow\";\nvar OPPOSITE_SIDE = {\n top: \"bottom\",\n right: \"left\",\n bottom: \"top\",\n left: \"right\"\n};\nvar PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {\n const { __scopePopper, ...arrowProps } = props;\n const contentContext = useContentContext(ARROW_NAME, __scopePopper);\n const baseSide = OPPOSITE_SIDE[contentContext.placedSide];\n return (\n // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)\n // doesn't report size as we'd expect on SVG elements.\n // it reports their bounding box which is effectively the largest path inside the SVG.\n /* @__PURE__ */ jsx(\n \"span\",\n {\n ref: contentContext.onArrowChange,\n style: {\n position: \"absolute\",\n left: contentContext.arrowX,\n top: contentContext.arrowY,\n [baseSide]: 0,\n transformOrigin: {\n top: \"\",\n right: \"0 0\",\n bottom: \"center 0\",\n left: \"100% 0\"\n }[contentContext.placedSide],\n transform: {\n top: \"translateY(100%)\",\n right: \"translateY(50%) rotate(90deg) translateX(-50%)\",\n bottom: `rotate(180deg)`,\n left: \"translateY(50%) rotate(-90deg) translateX(50%)\"\n }[contentContext.placedSide],\n visibility: contentContext.shouldHideArrow ? \"hidden\" : void 0\n },\n children: /* @__PURE__ */ jsx(\n ArrowPrimitive.Root,\n {\n ...arrowProps,\n ref: forwardedRef,\n style: {\n ...arrowProps.style,\n // ensures the element can be measured correctly (mostly for if SVG)\n display: \"block\"\n }\n }\n )\n }\n )\n );\n});\nPopperArrow.displayName = ARROW_NAME;\nfunction isNotNull(value) {\n return value !== null;\n}\nvar transformOrigin = (options) => ({\n name: \"transformOrigin\",\n options,\n fn(data) {\n const { placement, rects, middlewareData } = data;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const isArrowHidden = cannotCenterArrow;\n const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const noArrowAlign = { start: \"0%\", center: \"50%\", end: \"100%\" }[placedAlign];\n const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;\n const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;\n let x = \"\";\n let y = \"\";\n if (placedSide === \"bottom\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${-arrowHeight}px`;\n } else if (placedSide === \"top\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${rects.floating.height + arrowHeight}px`;\n } else if (placedSide === \"right\") {\n x = `${-arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n } else if (placedSide === \"left\") {\n x = `${rects.floating.width + arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n return { data: { x, y } };\n }\n});\nfunction getSideAndAlignFromPlacement(placement) {\n const [side, align = \"center\"] = placement.split(\"-\");\n return [side, align];\n}\nvar Root2 = Popper;\nvar Anchor = PopperAnchor;\nvar Content = PopperContent;\nvar Arrow = PopperArrow;\nexport {\n ALIGN_OPTIONS,\n Anchor,\n Arrow,\n Content,\n Popper,\n PopperAnchor,\n PopperArrow,\n PopperContent,\n Root2 as Root,\n SIDE_OPTIONS,\n createPopperScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","// src/visually-hidden.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar VISUALLY_HIDDEN_STYLES = Object.freeze({\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: \"absolute\",\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n whiteSpace: \"nowrap\",\n wordWrap: \"normal\"\n});\nvar NAME = \"VisuallyHidden\";\nvar VisuallyHidden = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...props,\n ref: forwardedRef,\n style: { ...VISUALLY_HIDDEN_STYLES, ...props.style }\n }\n );\n }\n);\nVisuallyHidden.displayName = NAME;\nvar Root = VisuallyHidden;\nexport {\n Root,\n VISUALLY_HIDDEN_STYLES,\n VisuallyHidden\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/tooltip.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlottable } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport * as VisuallyHiddenPrimitive from \"@radix-ui/react-visually-hidden\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar [createTooltipContext, createTooltipScope] = createContextScope(\"Tooltip\", [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar PROVIDER_NAME = \"TooltipProvider\";\nvar DEFAULT_DELAY_DURATION = 700;\nvar TOOLTIP_OPEN = \"tooltip.open\";\nvar [TooltipProviderContextProvider, useTooltipProviderContext] = createTooltipContext(PROVIDER_NAME);\nvar TooltipProvider = (props) => {\n const {\n __scopeTooltip,\n delayDuration = DEFAULT_DELAY_DURATION,\n skipDelayDuration = 300,\n disableHoverableContent = false,\n children\n } = props;\n const isOpenDelayedRef = React.useRef(true);\n const isPointerInTransitRef = React.useRef(false);\n const skipDelayTimerRef = React.useRef(0);\n React.useEffect(() => {\n const skipDelayTimer = skipDelayTimerRef.current;\n return () => window.clearTimeout(skipDelayTimer);\n }, []);\n return /* @__PURE__ */ jsx(\n TooltipProviderContextProvider,\n {\n scope: __scopeTooltip,\n isOpenDelayedRef,\n delayDuration,\n onOpen: React.useCallback(() => {\n window.clearTimeout(skipDelayTimerRef.current);\n isOpenDelayedRef.current = false;\n }, []),\n onClose: React.useCallback(() => {\n window.clearTimeout(skipDelayTimerRef.current);\n skipDelayTimerRef.current = window.setTimeout(\n () => isOpenDelayedRef.current = true,\n skipDelayDuration\n );\n }, [skipDelayDuration]),\n isPointerInTransitRef,\n onPointerInTransitChange: React.useCallback((inTransit) => {\n isPointerInTransitRef.current = inTransit;\n }, []),\n disableHoverableContent,\n children\n }\n );\n};\nTooltipProvider.displayName = PROVIDER_NAME;\nvar TOOLTIP_NAME = \"Tooltip\";\nvar [TooltipContextProvider, useTooltipContext] = createTooltipContext(TOOLTIP_NAME);\nvar Tooltip = (props) => {\n const {\n __scopeTooltip,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n disableHoverableContent: disableHoverableContentProp,\n delayDuration: delayDurationProp\n } = props;\n const providerContext = useTooltipProviderContext(TOOLTIP_NAME, props.__scopeTooltip);\n const popperScope = usePopperScope(__scopeTooltip);\n const [trigger, setTrigger] = React.useState(null);\n const contentId = useId();\n const openTimerRef = React.useRef(0);\n const disableHoverableContent = disableHoverableContentProp ?? providerContext.disableHoverableContent;\n const delayDuration = delayDurationProp ?? providerContext.delayDuration;\n const wasOpenDelayedRef = React.useRef(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: (open2) => {\n if (open2) {\n providerContext.onOpen();\n document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN));\n } else {\n providerContext.onClose();\n }\n onOpenChange?.(open2);\n },\n caller: TOOLTIP_NAME\n });\n const stateAttribute = React.useMemo(() => {\n return open ? wasOpenDelayedRef.current ? \"delayed-open\" : \"instant-open\" : \"closed\";\n }, [open]);\n const handleOpen = React.useCallback(() => {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n wasOpenDelayedRef.current = false;\n setOpen(true);\n }, [setOpen]);\n const handleClose = React.useCallback(() => {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n setOpen(false);\n }, [setOpen]);\n const handleDelayedOpen = React.useCallback(() => {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = window.setTimeout(() => {\n wasOpenDelayedRef.current = true;\n setOpen(true);\n openTimerRef.current = 0;\n }, delayDuration);\n }, [delayDuration, setOpen]);\n React.useEffect(() => {\n return () => {\n if (openTimerRef.current) {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n }\n };\n }, []);\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n TooltipContextProvider,\n {\n scope: __scopeTooltip,\n contentId,\n open,\n stateAttribute,\n trigger,\n onTriggerChange: setTrigger,\n onTriggerEnter: React.useCallback(() => {\n if (providerContext.isOpenDelayedRef.current) handleDelayedOpen();\n else handleOpen();\n }, [providerContext.isOpenDelayedRef, handleDelayedOpen, handleOpen]),\n onTriggerLeave: React.useCallback(() => {\n if (disableHoverableContent) {\n handleClose();\n } else {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n }\n }, [handleClose, disableHoverableContent]),\n onOpen: handleOpen,\n onClose: handleClose,\n disableHoverableContent,\n children\n }\n ) });\n};\nTooltip.displayName = TOOLTIP_NAME;\nvar TRIGGER_NAME = \"TooltipTrigger\";\nvar TooltipTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTooltip, ...triggerProps } = props;\n const context = useTooltipContext(TRIGGER_NAME, __scopeTooltip);\n const providerContext = useTooltipProviderContext(TRIGGER_NAME, __scopeTooltip);\n const popperScope = usePopperScope(__scopeTooltip);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, context.onTriggerChange);\n const isPointerDownRef = React.useRef(false);\n const hasPointerMoveOpenedRef = React.useRef(false);\n const handlePointerUp = React.useCallback(() => isPointerDownRef.current = false, []);\n React.useEffect(() => {\n return () => document.removeEventListener(\"pointerup\", handlePointerUp);\n }, [handlePointerUp]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n \"aria-describedby\": context.open ? context.contentId : void 0,\n \"data-state\": context.stateAttribute,\n ...triggerProps,\n ref: composedRefs,\n onPointerMove: composeEventHandlers(props.onPointerMove, (event) => {\n if (event.pointerType === \"touch\") return;\n if (!hasPointerMoveOpenedRef.current && !providerContext.isPointerInTransitRef.current) {\n context.onTriggerEnter();\n hasPointerMoveOpenedRef.current = true;\n }\n }),\n onPointerLeave: composeEventHandlers(props.onPointerLeave, () => {\n context.onTriggerLeave();\n hasPointerMoveOpenedRef.current = false;\n }),\n onPointerDown: composeEventHandlers(props.onPointerDown, () => {\n if (context.open) {\n context.onClose();\n }\n isPointerDownRef.current = true;\n document.addEventListener(\"pointerup\", handlePointerUp, { once: true });\n }),\n onFocus: composeEventHandlers(props.onFocus, () => {\n if (!isPointerDownRef.current) context.onOpen();\n }),\n onBlur: composeEventHandlers(props.onBlur, context.onClose),\n onClick: composeEventHandlers(props.onClick, context.onClose)\n }\n ) });\n }\n);\nTooltipTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"TooltipPortal\";\nvar [PortalProvider, usePortalContext] = createTooltipContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar TooltipPortal = (props) => {\n const { __scopeTooltip, forceMount, children, container } = props;\n const context = useTooltipContext(PORTAL_NAME, __scopeTooltip);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nTooltipPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"TooltipContent\";\nvar TooltipContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeTooltip);\n const { forceMount = portalContext.forceMount, side = \"top\", ...contentProps } = props;\n const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.disableHoverableContent ? /* @__PURE__ */ jsx(TooltipContentImpl, { side, ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(TooltipContentHoverable, { side, ...contentProps, ref: forwardedRef }) });\n }\n);\nvar TooltipContentHoverable = React.forwardRef((props, forwardedRef) => {\n const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip);\n const providerContext = useTooltipProviderContext(CONTENT_NAME, props.__scopeTooltip);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [pointerGraceArea, setPointerGraceArea] = React.useState(null);\n const { trigger, onClose } = context;\n const content = ref.current;\n const { onPointerInTransitChange } = providerContext;\n const handleRemoveGraceArea = React.useCallback(() => {\n setPointerGraceArea(null);\n onPointerInTransitChange(false);\n }, [onPointerInTransitChange]);\n const handleCreateGraceArea = React.useCallback(\n (event, hoverTarget) => {\n const currentTarget = event.currentTarget;\n const exitPoint = { x: event.clientX, y: event.clientY };\n const exitSide = getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect());\n const paddedExitPoints = getPaddedExitPoints(exitPoint, exitSide);\n const hoverTargetPoints = getPointsFromRect(hoverTarget.getBoundingClientRect());\n const graceArea = getHull([...paddedExitPoints, ...hoverTargetPoints]);\n setPointerGraceArea(graceArea);\n onPointerInTransitChange(true);\n },\n [onPointerInTransitChange]\n );\n React.useEffect(() => {\n return () => handleRemoveGraceArea();\n }, [handleRemoveGraceArea]);\n React.useEffect(() => {\n if (trigger && content) {\n const handleTriggerLeave = (event) => handleCreateGraceArea(event, content);\n const handleContentLeave = (event) => handleCreateGraceArea(event, trigger);\n trigger.addEventListener(\"pointerleave\", handleTriggerLeave);\n content.addEventListener(\"pointerleave\", handleContentLeave);\n return () => {\n trigger.removeEventListener(\"pointerleave\", handleTriggerLeave);\n content.removeEventListener(\"pointerleave\", handleContentLeave);\n };\n }\n }, [trigger, content, handleCreateGraceArea, handleRemoveGraceArea]);\n React.useEffect(() => {\n if (pointerGraceArea) {\n const handleTrackPointerGrace = (event) => {\n const target = event.target;\n const pointerPosition = { x: event.clientX, y: event.clientY };\n const hasEnteredTarget = trigger?.contains(target) || content?.contains(target);\n const isPointerOutsideGraceArea = !isPointInPolygon(pointerPosition, pointerGraceArea);\n if (hasEnteredTarget) {\n handleRemoveGraceArea();\n } else if (isPointerOutsideGraceArea) {\n handleRemoveGraceArea();\n onClose();\n }\n };\n document.addEventListener(\"pointermove\", handleTrackPointerGrace);\n return () => document.removeEventListener(\"pointermove\", handleTrackPointerGrace);\n }\n }, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);\n return /* @__PURE__ */ jsx(TooltipContentImpl, { ...props, ref: composedRefs });\n});\nvar [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });\nvar Slottable = createSlottable(\"TooltipContent\");\nvar TooltipContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeTooltip,\n children,\n \"aria-label\": ariaLabel,\n onEscapeKeyDown,\n onPointerDownOutside,\n ...contentProps\n } = props;\n const context = useTooltipContext(CONTENT_NAME, __scopeTooltip);\n const popperScope = usePopperScope(__scopeTooltip);\n const { onClose } = context;\n React.useEffect(() => {\n document.addEventListener(TOOLTIP_OPEN, onClose);\n return () => document.removeEventListener(TOOLTIP_OPEN, onClose);\n }, [onClose]);\n React.useEffect(() => {\n if (context.trigger) {\n const handleScroll = (event) => {\n const target = event.target;\n if (target?.contains(context.trigger)) onClose();\n };\n window.addEventListener(\"scroll\", handleScroll, { capture: true });\n return () => window.removeEventListener(\"scroll\", handleScroll, { capture: true });\n }\n }, [context.trigger, onClose]);\n return /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents: false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside: (event) => event.preventDefault(),\n onDismiss: onClose,\n children: /* @__PURE__ */ jsxs(\n PopperPrimitive.Content,\n {\n \"data-state\": context.stateAttribute,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-tooltip-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-tooltip-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-tooltip-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-tooltip-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-tooltip-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n },\n children: [\n /* @__PURE__ */ jsx(Slottable, { children }),\n /* @__PURE__ */ jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsx(VisuallyHiddenPrimitive.Root, { id: context.contentId, role: \"tooltip\", children: ariaLabel || children }) })\n ]\n }\n )\n }\n );\n }\n);\nTooltipContent.displayName = CONTENT_NAME;\nvar ARROW_NAME = \"TooltipArrow\";\nvar TooltipArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTooltip, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeTooltip);\n const visuallyHiddenContentContext = useVisuallyHiddenContentContext(\n ARROW_NAME,\n __scopeTooltip\n );\n return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nTooltipArrow.displayName = ARROW_NAME;\nfunction getExitSideFromRect(point, rect) {\n const top = Math.abs(rect.top - point.y);\n const bottom = Math.abs(rect.bottom - point.y);\n const right = Math.abs(rect.right - point.x);\n const left = Math.abs(rect.left - point.x);\n switch (Math.min(top, bottom, right, left)) {\n case left:\n return \"left\";\n case right:\n return \"right\";\n case top:\n return \"top\";\n case bottom:\n return \"bottom\";\n default:\n throw new Error(\"unreachable\");\n }\n}\nfunction getPaddedExitPoints(exitPoint, exitSide, padding = 5) {\n const paddedExitPoints = [];\n switch (exitSide) {\n case \"top\":\n paddedExitPoints.push(\n { x: exitPoint.x - padding, y: exitPoint.y + padding },\n { x: exitPoint.x + padding, y: exitPoint.y + padding }\n );\n break;\n case \"bottom\":\n paddedExitPoints.push(\n { x: exitPoint.x - padding, y: exitPoint.y - padding },\n { x: exitPoint.x + padding, y: exitPoint.y - padding }\n );\n break;\n case \"left\":\n paddedExitPoints.push(\n { x: exitPoint.x + padding, y: exitPoint.y - padding },\n { x: exitPoint.x + padding, y: exitPoint.y + padding }\n );\n break;\n case \"right\":\n paddedExitPoints.push(\n { x: exitPoint.x - padding, y: exitPoint.y - padding },\n { x: exitPoint.x - padding, y: exitPoint.y + padding }\n );\n break;\n }\n return paddedExitPoints;\n}\nfunction getPointsFromRect(rect) {\n const { top, right, bottom, left } = rect;\n return [\n { x: left, y: top },\n { x: right, y: top },\n { x: right, y: bottom },\n { x: left, y: bottom }\n ];\n}\nfunction isPointInPolygon(point, polygon) {\n const { x, y } = point;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const ii = polygon[i];\n const jj = polygon[j];\n const xi = ii.x;\n const yi = ii.y;\n const xj = jj.x;\n const yj = jj.y;\n const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) inside = !inside;\n }\n return inside;\n}\nfunction getHull(points) {\n const newPoints = points.slice();\n newPoints.sort((a, b) => {\n if (a.x < b.x) return -1;\n else if (a.x > b.x) return 1;\n else if (a.y < b.y) return -1;\n else if (a.y > b.y) return 1;\n else return 0;\n });\n return getHullPresorted(newPoints);\n}\nfunction getHullPresorted(points) {\n if (points.length <= 1) return points.slice();\n const upperHull = [];\n for (let i = 0; i < points.length; i++) {\n const p = points[i];\n while (upperHull.length >= 2) {\n const q = upperHull[upperHull.length - 1];\n const r = upperHull[upperHull.length - 2];\n if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) upperHull.pop();\n else break;\n }\n upperHull.push(p);\n }\n upperHull.pop();\n const lowerHull = [];\n for (let i = points.length - 1; i >= 0; i--) {\n const p = points[i];\n while (lowerHull.length >= 2) {\n const q = lowerHull[lowerHull.length - 1];\n const r = lowerHull[lowerHull.length - 2];\n if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) lowerHull.pop();\n else break;\n }\n lowerHull.push(p);\n }\n lowerHull.pop();\n if (upperHull.length === 1 && lowerHull.length === 1 && upperHull[0].x === lowerHull[0].x && upperHull[0].y === lowerHull[0].y) {\n return upperHull;\n } else {\n return upperHull.concat(lowerHull);\n }\n}\nvar Provider = TooltipProvider;\nvar Root3 = Tooltip;\nvar Trigger = TooltipTrigger;\nvar Portal = TooltipPortal;\nvar Content2 = TooltipContent;\nvar Arrow2 = TooltipArrow;\nexport {\n Arrow2 as Arrow,\n Content2 as Content,\n Portal,\n Provider,\n Root3 as Root,\n Tooltip,\n TooltipArrow,\n TooltipContent,\n TooltipPortal,\n TooltipProvider,\n TooltipTrigger,\n Trigger,\n createTooltipScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from \"react\"\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction TooltipProvider({\n delayDuration = 200,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return (\n <TooltipPrimitive.Provider delayDuration={delayDuration} {...props} />\n )\n}\n\nfunction Tooltip({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return <TooltipPrimitive.Root {...props} />\n}\n\nfunction TooltipTrigger({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger {...props} />\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 8,\n variant = \"dark\",\n showArrow = true,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content> & {\n variant?: \"dark\" | \"light\"\n showArrow?: boolean\n}) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot=\"tooltip\"\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-lg p-3 text-xs leading-4 text-center\",\n \"animate-in fade-in-0 zoom-in-95\",\n \"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95\",\n \"data-[side=bottom]:slide-in-from-top-2\",\n \"data-[side=left]:slide-in-from-right-2\",\n \"data-[side=right]:slide-in-from-left-2\",\n \"data-[side=top]:slide-in-from-bottom-2\",\n variant === \"dark\"\n ? \"bg-primary text-primary-foreground\"\n : \"bg-popover text-popover-foreground shadow-md\",\n className\n )}\n {...props}\n >\n {children}\n {showArrow && (\n <TooltipPrimitive.Arrow\n className={cn(\n variant === \"dark\" ? \"fill-primary\" : \"fill-popover\"\n )}\n />\n )}\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n )\n}\n\nexport { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst alertVariants = cva(\n \"relative flex w-full items-start gap-5 rounded-lg p-5 text-base leading-6 [&>svg]:h-6 [&>svg]:w-6 [&>svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"\",\n destructive: \"\",\n success: \"\",\n warning: \"\",\n },\n filled: {\n true: \"\",\n false: \"border bg-background\",\n },\n },\n compoundVariants: [\n {\n variant: \"default\",\n filled: false,\n className:\n \"border-border text-foreground [&>svg]:text-foreground\",\n },\n {\n variant: \"destructive\",\n filled: false,\n className:\n \"border-destructive text-destructive [&>svg]:text-destructive\",\n },\n {\n variant: \"success\",\n filled: false,\n className:\n \"border-success text-success [&>svg]:text-success\",\n },\n {\n variant: \"warning\",\n filled: false,\n className:\n \"border-warning text-warning [&>svg]:text-warning\",\n },\n {\n variant: \"default\",\n filled: true,\n className:\n \"bg-primary text-primary-foreground [&>svg]:text-primary-foreground\",\n },\n {\n variant: \"destructive\",\n filled: true,\n className:\n \"bg-destructive text-destructive-foreground [&>svg]:text-destructive-foreground\",\n },\n {\n variant: \"success\",\n filled: true,\n className:\n \"bg-success text-success-foreground [&>svg]:text-success-foreground\",\n },\n {\n variant: \"warning\",\n filled: true,\n className:\n \"bg-warning text-warning-foreground [&>svg]:text-warning-foreground\",\n },\n ],\n defaultVariants: {\n variant: \"default\",\n filled: false,\n },\n }\n)\n\nfunction Alert({\n className,\n variant = \"default\",\n filled = false,\n onDismiss,\n children,\n ...props\n}: React.ComponentProps<\"div\"> &\n VariantProps<typeof alertVariants> & {\n onDismiss?: () => void\n }) {\n return (\n <div\n data-slot=\"alert\"\n data-variant={variant}\n data-filled={filled || undefined}\n role=\"alert\"\n className={cn(alertVariants({ variant, filled, className }))}\n {...props}\n >\n <div\n data-slot=\"alert-content\"\n className=\"flex min-w-0 flex-1 items-center gap-2.5\"\n >\n {children}\n </div>\n {onDismiss ? (\n <button\n data-slot=\"alert-dismiss\"\n type=\"button\"\n onClick={onDismiss}\n className=\"shrink-0 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\"\n aria-label=\"Dismiss\"\n >\n <X className=\"h-6 w-6\" />\n </button>\n ) : null}\n </div>\n )\n}\n\nfunction AlertTitle({\n className,\n children,\n ...props\n}: React.ComponentProps<\"h5\">) {\n return (\n <h5\n data-slot=\"alert-title\"\n className={cn(\"text-h4\", className)}\n {...props}\n >\n {children}\n </h5>\n )\n}\n\nfunction AlertDescription({\n className,\n children,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\"text-base leading-6 [&_p]:leading-6\", className)}\n {...props}\n >\n {children}\n </div>\n )\n}\n\nexport { Alert, AlertTitle, AlertDescription, alertVariants }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { X, CircleCheck, CircleAlert, TriangleAlert, Info } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst toastVariants = cva(\n \"relative flex w-full flex-col gap-4 rounded-lg border px-3 py-5\",\n {\n variants: {\n variant: {\n default: \"border-border bg-background text-foreground\",\n success: \"border-border bg-background text-foreground\",\n destructive: \"border-destructive bg-background text-destructive\",\n warning: \"border-border bg-background text-foreground\",\n info: \"border-border bg-background text-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nconst toastIconMap = {\n default: CircleCheck,\n success: CircleCheck,\n destructive: CircleAlert,\n warning: TriangleAlert,\n info: Info,\n} as const\n\nconst toastIconColorMap = {\n default: \"text-foreground\",\n success: \"text-success\",\n destructive: \"text-destructive\",\n warning: \"text-warning\",\n info: \"text-info\",\n} as const\n\ntype ToastVariant = NonNullable<VariantProps<typeof toastVariants>[\"variant\"]>\n\ntype ToastProps = React.ComponentProps<\"div\"> &\n VariantProps<typeof toastVariants> & {\n onClose?: () => void\n }\n\nfunction Toast({\n className,\n variant = \"default\",\n onClose,\n children,\n ...props\n}: ToastProps) {\n return (\n <div\n data-slot=\"toast\"\n data-variant={variant}\n role=\"alert\"\n className={cn(toastVariants({ variant, className }))}\n {...props}\n >\n {children}\n {onClose && (\n <button\n data-slot=\"toast-close\"\n type=\"button\"\n onClick={onClose}\n className={cn(\n \"absolute right-3 top-5 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\",\n variant === \"destructive\" && \"text-destructive\"\n )}\n aria-label=\"Close\"\n >\n <X className=\"h-6 w-6\" />\n </button>\n )}\n </div>\n )\n}\n\nfunction ToastHeader({\n className,\n variant = \"default\",\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n variant?: ToastVariant\n}) {\n const IconComponent = toastIconMap[variant]\n const iconColor = toastIconColorMap[variant]\n\n return (\n <div\n data-slot=\"toast-header\"\n className={cn(\"flex items-center gap-4\", className)}\n {...props}\n >\n <IconComponent\n data-slot=\"toast-icon\"\n className={cn(\"h-6 w-6 shrink-0\", iconColor)}\n aria-hidden=\"true\"\n />\n <div\n data-slot=\"toast-header-content\"\n className=\"flex flex-1 flex-col\"\n >\n {children}\n </div>\n </div>\n )\n}\n\nfunction ToastTitle({\n className,\n ...props\n}: React.ComponentProps<\"p\">) {\n return (\n <p\n data-slot=\"toast-title\"\n className={cn(\"text-h4\", className)}\n {...props}\n />\n )\n}\n\nfunction ToastDescription({\n className,\n ...props\n}: React.ComponentProps<\"p\">) {\n return (\n <p\n data-slot=\"toast-description\"\n className={cn(\n \"pl-8 text-sm leading-5 text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ToastAction({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"toast-action\"\n className={cn(\"flex items-start justify-end gap-3 pl-8\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Toast,\n ToastHeader,\n ToastTitle,\n ToastDescription,\n ToastAction,\n toastVariants,\n}\nexport type { ToastProps, ToastVariant }\n"],"x_google_ignoreList":[8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,36,37,38,39,40,41,42,43,44,45,46,47],"mappings":";;;;;;;;;;;;;;;;;AAGA,SAAgB,EAAG,GAAG,GAAsB;AAC1C,QAAO,EAAQ,EAAK,EAAO,CAAC;;;;ACD9B,IAAM,IAAe,EAAI,wBAAwB;CAC/C,UAAU,EACR,MAAM;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;EACL,EACF;CACD,iBAAiB,EACf,MAAM,MACP;CACF,CAAC;AAGF,SAAS,EAAY,GAAoC;AACvD,QACE,kBAAC,OAAD;EAAK,SAAQ;EAAa,MAAK;EAAO,OAAM;EAA6B,GAAI;YAA7E;GACE,kBAAC,QAAD;IACE,GAAE;IACF,MAAK;IACL,CAAA;GACF,kBAAC,QAAD;IACE,GAAE;IACF,MAAK;IACL,CAAA;GACF,kBAAC,QAAD;IACE,GAAE;IACF,MAAK;IACL,CAAA;GACF,kBAAC,QAAD;IACE,GAAE;IACF,MAAK;IACL,CAAA;GACF,kBAAC,QAAD;IACE,GAAE;IACF,MAAK;IACL,CAAA;GACF,kBAAC,QAAD;IACE,GAAE;IACF,MAAK;IACL,CAAA;GACF,kBAAC,QAAD;IACE,GAAE;IACF,MAAK;IACL,CAAA;GACE;;;AAKV,SAAS,EAAc,GAAoC;AACzD,QACE,kBAAC,OAAD;EAAK,SAAQ;EAAgB,MAAK;EAAO,OAAM;EAA6B,GAAI;YAAhF,CAEE,kBAAC,QAAD;GACE,GAAE;GACF,MAAK;GACL,WAAU;GACV,CAAA,EAEF,kBAAC,KAAD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D,SAAS,GAAM,EACb,cACA,aAAU,WACV,YACA,aACA,GAAG,KACU;AACb,QACE,kBAAC,OAAD;EACE,aAAU;EACV,gBAAc;EACd,MAAK;EACL,WAAW,EAAG,GAAc;GAAE;GAAS;GAAW,CAAC,CAAC;EACpD,GAAI;YALN,CAOG,GACA,KACC,kBAAC,UAAD;GACE,aAAU;GACV,MAAK;GACL,SAAS;GACT,WAAW,EACT,yJACA,MAAY,iBAAiB,mBAC9B;GACD,cAAW;aAEX,kBAAC,GAAD,EAAG,WAAU,WAAY,CAAA;GAClB,CAAA,CAEP;;;AAIV,SAAS,GAAY,EACnB,cACA,aAAU,WACV,aACA,GAAG,KAGF;CACD,IAAM,IAAgB,GAAa,IAC7B,IAAY,GAAkB;AAEpC,QACE,kBAAC,OAAD;EACE,aAAU;EACV,WAAW,EAAG,2BAA2B,EAAU;EACnD,GAAI;YAHN,CAKE,kBAAC,GAAD;GACE,aAAU;GACV,WAAW,EAAG,oBAAoB,EAAU;GAC5C,eAAY;GACZ,CAAA,EACF,kBAAC,OAAD;GACE,aAAU;GACV,WAAU;GAET;GACG,CAAA,CACF;;;AAIV,SAAS,GAAW,EAClB,cACA,GAAG,KACyB;AAC5B,QACE,kBAAC,KAAD;EACE,aAAU;EACV,WAAW,EAAG,WAAW,EAAU;EACnC,GAAI;EACJ,CAAA;;AAIN,SAAS,GAAiB,EACxB,cACA,GAAG,KACyB;AAC5B,QACE,kBAAC,KAAD;EACE,aAAU;EACV,WAAW,EACT,gDACA,EACD;EACD,GAAI;EACJ,CAAA;;AAIN,SAAS,GAAY,EACnB,cACA,GAAG,KAC2B;AAC9B,QACE,kBAAC,OAAD;EACE,aAAU;EACV,WAAW,EAAG,2CAA2C,EAAU;EACnE,GAAI;EACJ,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","React","React","React","React","useId","React","React","useLayoutEffect","React","React","ITEM_NAME","useId","Root","React","React","React","React2","React","createContextScope2","RadioGroup","React2","RovingFocusGroup.Root","Primitive2","RadioGroupItem","useComposedRefs2","RovingFocusGroup.Item","composeEventHandlers2","Root2","React","computePosition","arrow","flip","hide","offset","shift","limitShift","size","getComputedStyle","offset","offset$1","shift","shift$1","flip","flip$1","size","size$1","hide","hide$1","arrow","arrow$1","limitShift","limitShift$1","React","NAME","Arrow","React","Root","React","CONTENT_NAME","arrow","floatingUIarrow","ARROW_NAME","ArrowPrimitive.Root","PORTAL_NAME","Portal","React","React","TooltipProvider","React","Tooltip","useId","PopperPrimitive.Root","TooltipTrigger","PopperPrimitive.Anchor","PortalPrimitive","TooltipContent","PopperPrimitive.Content","VisuallyHiddenPrimitive.Root","PopperPrimitive.Arrow"],"sources":["../src/lib/utils.ts","../src/components/ui/novie-logo.tsx","../src/components/ui/novie-symbol.tsx","../src/components/ui/button.tsx","../src/components/ui/input.tsx","../src/components/ui/label.tsx","../src/components/ui/checkbox.tsx","../src/components/ui/switch.tsx","../node_modules/@radix-ui/primitive/dist/index.mjs","../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../node_modules/@radix-ui/react-context/dist/index.mjs","../node_modules/@radix-ui/react-primitive/dist/index.mjs","../node_modules/@radix-ui/react-collection/dist/index.mjs","../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs","../node_modules/@radix-ui/react-id/dist/index.mjs","../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs","../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs","../node_modules/@radix-ui/react-direction/dist/index.mjs","../node_modules/@radix-ui/react-roving-focus/dist/index.mjs","../node_modules/@radix-ui/react-use-size/dist/index.mjs","../node_modules/@radix-ui/react-use-previous/dist/index.mjs","../node_modules/@radix-ui/react-presence/dist/index.mjs","../node_modules/@radix-ui/react-radio-group/dist/index.mjs","../src/components/ui/radio-group.tsx","../src/components/ui/separator.tsx","../src/components/ui/badge.tsx","../src/components/ui/tag.tsx","../src/components/ui/avatar.tsx","../src/components/ui/icon-button.tsx","../src/components/ui/progress.tsx","../src/components/ui/input-field.tsx","../src/components/ui/search-input.tsx","../src/components/ui/stepper.tsx","../src/components/ui/card.tsx","../src/components/ui/table.tsx","../src/components/ui/dialog.tsx","../node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs","../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs","../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs","../node_modules/@radix-ui/react-arrow/dist/index.mjs","../node_modules/@radix-ui/react-popper/dist/index.mjs","../node_modules/@radix-ui/react-portal/dist/index.mjs","../node_modules/@radix-ui/react-visually-hidden/dist/index.mjs","../node_modules/@radix-ui/react-tooltip/dist/index.mjs","../src/components/ui/tooltip.tsx","../src/components/ui/alert.tsx","../src/components/ui/toast.tsx"],"sourcesContent":["import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import { cn } from \"@/lib/utils\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nconst logoVariants = cva(\"inline-flex shrink-0\", {\n variants: {\n size: {\n sm: \"h-4\",\n md: \"h-6\",\n lg: \"h-8\",\n xl: \"h-12\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n})\n\n/** Merged single-SVG logo (flower is smaller, embedded top-left of text) */\nfunction PrimaryLogo(props: React.ComponentProps<\"svg\">) {\n return (\n <svg viewBox=\"0 0 152 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <path\n d=\"M29.6559 10.4545C29.4679 9.91519 29.1836 9.41218 28.8213 8.96808C27.8997 7.84424 26.5241 7.17809 25.0568 7.15543C24.1443 7.15543 22.92 7.57234 20.8795 8.26568L19.8891 8.60102V7.48624C19.8891 5.35638 19.8891 4.07846 19.5911 3.22198C19.0913 1.8625 18.0045 0.793034 16.6289 0.294556C16.0879 0.0996957 15.5147 0 14.9369 0C14.3592 0 13.786 0.0996957 13.245 0.294556C11.8694 0.788503 10.7872 1.8625 10.2828 3.22198C9.98478 4.07393 9.98478 5.35185 9.98478 7.48624V8.59649L8.97142 8.27021C6.92178 7.61313 5.68832 7.21888 4.77584 7.23247C3.31312 7.28232 1.94669 7.97113 1.04338 9.1131C0.685726 9.56173 0.415191 10.0693 0.236363 10.6131C0.0667062 11.1523 -0.0158298 11.7233 0.00251152 12.2943C0.0529502 13.7399 0.749921 15.0903 1.90542 15.983C2.63449 16.5268 3.86336 16.9211 5.91301 17.5827L6.88051 17.8909L6.28442 18.702C5.01887 20.424 4.2577 21.4618 3.99175 22.3228C3.58824 23.714 3.82668 25.2094 4.64745 26.4103C4.96843 26.8816 5.37652 27.2985 5.84422 27.6338C6.31193 27.9692 6.83466 28.223 7.38948 28.3816C8.79718 28.7803 10.3103 28.5447 11.5255 27.7335C12.2729 27.2169 13.034 26.1837 14.3042 24.4572L15.0057 23.5055L15.7073 24.4572C16.9728 26.1792 17.734 27.2169 18.486 27.7335C19.7011 28.5447 21.2143 28.7803 22.622 28.3816C23.1768 28.223 23.6995 27.9737 24.1672 27.6338C24.6349 27.2985 25.0384 26.8861 25.364 26.4103C26.1848 25.2094 26.4232 23.714 26.0197 22.3228C25.7537 21.4618 24.9926 20.424 23.727 18.702L23.1126 17.8637L24.1259 17.5193C26.1664 16.8259 27.3861 16.409 28.106 15.8516C29.2432 14.9408 29.9172 13.5813 29.9401 12.1312C29.9493 11.5602 29.8576 10.9937 29.6696 10.4545H29.6559Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M33.4573 46.6382L33.6526 17.2696L40.3887 17.3147L51.8805 35.603H52.0258L51.9123 30.6173L51.9986 17.3868L58.3032 17.4274L58.1079 46.796L52.1757 46.7554L39.9027 27.7233H39.7392L39.8709 32.6864L39.7755 46.6743L33.4527 46.6337L33.4573 46.6382Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M73.1744 47.621C69.7723 47.5984 66.9833 46.521 64.8031 44.3888C62.6274 42.2566 61.5509 39.5564 61.569 36.2882C61.5917 32.993 62.7091 30.3018 64.9212 28.2101C67.1332 26.1185 69.9312 25.0862 73.3243 25.1087C76.7128 25.1313 79.5017 26.2041 81.682 28.3319C83.8668 30.4596 84.9478 33.1643 84.9251 36.446C84.9024 39.7142 83.7941 42.4009 81.5956 44.506C79.3972 46.6112 76.5901 47.6525 73.1744 47.63V47.621Z M73.2062 42.2476C74.7369 42.2566 76.0178 41.7112 77.0489 40.6112C78.0845 39.5113 78.6069 38.1049 78.616 36.3964C78.6296 34.6609 78.1209 33.2409 77.0943 32.141C76.0678 31.0411 74.7959 30.4866 73.2834 30.4731C71.7527 30.4641 70.4672 31.0005 69.4271 32.0869C68.3869 33.1733 67.86 34.5842 67.8464 36.3243C67.8373 38.0328 68.3369 39.4437 69.3589 40.5617C70.3764 41.6751 71.6573 42.2386 73.2016 42.2476H73.2062Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M93.637 47.0349L85.2839 25.8931L91.8974 25.9382L96.3987 38.6458L96.9847 40.5797H97.13L97.7841 38.6368L102.417 26.0103L108.908 26.0509L100.064 47.08L93.637 47.0394V47.0349Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M113.968 22.7827C112.946 22.7782 112.088 22.4266 111.393 21.7324C110.693 21.0381 110.348 20.1862 110.357 19.1719C110.366 18.1441 110.72 17.3011 111.429 16.634C112.137 15.9668 113 15.6377 114.018 15.6468C115.063 15.6558 115.93 15.9939 116.616 16.67C117.302 17.3462 117.638 18.1937 117.634 19.2215C117.629 20.2357 117.275 21.0832 116.584 21.7684C115.889 22.4536 115.022 22.7962 113.973 22.7872L113.968 22.7827Z M110.561 47.1476L110.702 26.0644L117.17 26.105L117.029 47.1882L110.561 47.1476Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M131.242 47.9996C127.854 47.9771 125.142 46.8997 123.111 44.7675C121.081 42.6353 120.073 39.9351 120.095 36.6669C120.118 33.4122 121.167 30.73 123.248 28.6158C125.328 26.5017 128.017 25.4604 131.31 25.4784C134.394 25.4964 136.933 26.4746 138.927 28.4085C140.921 30.3424 141.907 32.8127 141.884 35.8239L141.871 38.0373L123.189 37.9155L123.211 34.715L135.943 34.8006C135.857 33.5159 135.398 32.4701 134.567 31.6632C133.74 30.8562 132.636 30.4505 131.26 30.4415C129.743 30.4325 128.53 30.9599 127.622 32.0283C126.713 33.0967 126.25 34.5797 126.237 36.482C126.223 38.5466 126.741 40.183 127.794 41.3866C128.848 42.5902 130.256 43.1987 132.019 43.2078C132.805 43.2123 133.504 43.1086 134.117 42.8922C134.73 42.6758 135.285 42.3918 135.775 42.0402C136.266 41.6886 136.838 41.1161 137.492 40.3272L141.253 43.2664C140.254 44.5601 139.286 45.5158 138.36 46.1379C137.433 46.76 136.42 47.2288 135.321 47.5443C134.222 47.8599 132.864 48.0086 131.237 47.9996H131.242Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M147.985 47.7427C146.867 47.7336 145.927 47.3505 145.159 46.5841C144.392 45.8178 144.015 44.8847 144.019 43.7758C144.028 42.6803 144.419 41.7607 145.196 41.0169C145.972 40.2686 146.917 39.899 148.035 39.908C149.152 39.917 150.092 40.3002 150.86 41.053C151.628 41.8103 152.005 42.7344 152 43.8298C151.991 44.9388 151.6 45.8674 150.824 46.6202C150.047 47.373 149.102 47.7472 147.985 47.7382V47.7427Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\n/** Symbol + wordmark side-by-side, bottom-aligned (flower is large, same height as text) */\nfunction SecondaryLogo(props: React.ComponentProps<\"svg\">) {\n return (\n <svg viewBox=\"0 0 202.46 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n {/* Flower symbol — 49.613 wide, 48 tall */}\n <path\n d=\"M29.6559 10.4545C29.4679 9.91519 29.1836 9.41218 28.8213 8.96808C27.8997 7.84424 26.5241 7.17809 25.0568 7.15543C24.1443 7.15543 22.92 7.57234 20.8795 8.26568L19.8891 8.60102V7.48624C19.8891 5.35638 19.8891 4.07846 19.5911 3.22198C19.0913 1.8625 18.0045 0.793034 16.6289 0.294556C16.0879 0.0996957 15.5147 0 14.9369 0C14.3592 0 13.786 0.0996957 13.245 0.294556C11.8694 0.788503 10.7872 1.8625 10.2828 3.22198C9.98478 4.07393 9.98478 5.35185 9.98478 7.48624V8.59649L8.97142 8.27021C6.92178 7.61313 5.68832 7.21888 4.77584 7.23247C3.31312 7.28232 1.94669 7.97113 1.04338 9.1131C0.685726 9.56173 0.415191 10.0693 0.236363 10.6131C0.0667062 11.1523 -0.0158298 11.7233 0.00251152 12.2943C0.0529502 13.7399 0.749921 15.0903 1.90542 15.983C2.63449 16.5268 3.86336 16.9211 5.91301 17.5827L6.88051 17.8909L6.28442 18.702C5.01887 20.424 4.2577 21.4618 3.99175 22.3228C3.58824 23.714 3.82668 25.2094 4.64745 26.4103C4.96843 26.8816 5.37652 27.2985 5.84422 27.6338C6.31193 27.9692 6.83466 28.223 7.38948 28.3816C8.79718 28.7803 10.3103 28.5447 11.5255 27.7335C12.2729 27.2169 13.034 26.1837 14.3042 24.4572L15.0057 23.5055L15.7073 24.4572C16.9728 26.1792 17.734 27.2169 18.486 27.7335C19.7011 28.5447 21.2143 28.7803 22.622 28.3816C23.1768 28.223 23.6995 27.9737 24.1672 27.6338C24.6349 27.2985 25.0384 26.8861 25.364 26.4103C26.1848 25.2094 26.4232 23.714 26.0197 22.3228C25.7537 21.4618 24.9926 20.424 23.727 18.702L23.1126 17.8637L24.1259 17.5193C26.1664 16.8259 27.3861 16.409 28.106 15.8516C29.2432 14.9408 29.9172 13.5813 29.9401 12.1312C29.9493 11.5602 29.8576 10.9937 29.6696 10.4545H29.6559Z\"\n fill=\"currentColor\"\n transform=\"translate(0, 0.58) scale(1.658)\"\n />\n {/* \"Novie.\" wordmark — offset right by 59 (49.613 symbol + 9.386 gap), bottom-aligned */}\n <g transform=\"translate(59, 9.114)\">\n <path\n d=\"M3.46758e-08 38.0536V1.90886H8.27733L22.4116 24.0932H22.5621L22.4116 18.4903V1.90886H30.2611V38.0536H22.9666L7.84942 14.96H7.67224L7.84942 20.5362V38.0536H3.46758e-08Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M48.4571 38.8861C44.3352 38.8861 40.9353 37.5723 38.2609 34.948C35.5865 32.3237 34.2493 29.0175 34.2493 25.0292C34.2493 21.041 35.5865 17.6946 38.2609 15.0837C40.9353 12.4762 44.3352 11.1724 48.4571 11.1724C52.5791 11.1724 55.9823 12.4795 58.6667 15.0971C61.3512 17.7147 62.6917 21.0243 62.6917 25.0292C62.6917 29.0342 61.3579 32.3237 58.6901 34.948C56.0224 37.5723 52.6125 38.8861 48.4538 38.8861H48.4571Z M48.4839 32.1465C50.3359 32.1465 51.8871 31.4779 53.1407 30.1407C54.3944 28.8035 55.0195 27.0986 55.0195 25.0292C55.0195 22.9599 54.3877 21.2148 53.1273 19.8943C51.8637 18.5738 50.3159 17.9119 48.4839 17.9119C46.6519 17.9119 45.0539 18.5772 43.8003 19.9044C42.5467 21.2349 41.9215 22.9432 41.9215 25.0292C41.9215 27.1153 42.5433 28.8035 43.7903 30.1407C45.0339 31.4779 46.6018 32.1465 48.4839 32.1465Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M72.2829 38.0536L62.0098 12.0048L70.1366 12.0048L75.6627 27.5265L76.3446 29.9234H76.4951L77.254 27.5265L82.7566 12.0048L90.7564 12.0048L80.2058 38.0536H72.2795H72.2829Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M96.8173 8.8891C95.5704 8.8891 94.5173 8.45785 93.6481 7.58867C92.7823 6.72282 92.3477 5.66643 92.3477 4.41948C92.3477 3.17253 92.7823 2.10611 93.6481 1.26366C94.514 0.421221 95.5704 0 96.8173 0C98.0643 0 99.1808 0.421221 100.023 1.26366C100.866 2.10611 101.287 3.15582 101.287 4.41948C101.287 5.68314 100.866 6.71948 100.023 7.58867C99.1808 8.45451 98.1144 8.8891 96.8173 8.8891Z M92.8558 38.0537L92.8558 12.0048L100.806 12.0048L100.806 38.0537L92.8558 38.0537Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M118.169 38.8861C114.047 38.8861 110.718 37.5823 108.187 34.9747C105.653 32.3672 104.389 29.0509 104.389 25.0292C104.389 21.0076 105.663 17.7347 108.214 15.1105C110.764 12.4862 114.041 11.1724 118.046 11.1724C122.05 11.1724 125.002 12.3625 127.459 14.7427C129.917 17.123 131.144 20.1752 131.144 23.8926V26.6172H108.2V22.6289H123.872C123.755 21.0644 123.177 19.7907 122.144 18.8045C121.108 17.8183 119.74 17.3269 118.042 17.3269C116.19 17.3269 114.692 17.9922 113.549 19.3193C112.406 20.6499 111.834 22.4818 111.834 24.822C111.834 27.3292 112.493 29.3116 113.817 30.7659C115.137 32.2201 116.859 32.9488 118.978 32.9488C119.938 32.9488 120.797 32.8151 121.552 32.5443C122.308 32.2769 122.99 31.9125 123.598 31.4579C124.203 31.0032 124.895 30.2711 125.668 29.2615L130.438 32.7182C129.241 34.3663 128.081 35.5965 126.955 36.4022C125.828 37.2079 124.581 37.823 123.221 38.2442C121.857 38.6654 120.175 38.876 118.173 38.876L118.169 38.8861Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M138.562 38.4582C137.181 38.4582 136.021 37.9901 135.078 37.0574C134.136 36.1247 133.664 34.9747 133.664 33.6108C133.664 32.2468 134.136 31.1002 135.078 30.1641C136.021 29.2314 137.181 28.7634 138.562 28.7634C139.942 28.7634 141.102 29.2314 142.045 30.1641C142.988 31.0968 143.459 32.2468 143.459 33.6108C143.459 34.9747 142.988 36.1214 142.045 37.0574C141.102 37.9901 139.942 38.4582 138.562 38.4582Z\"\n fill=\"currentColor\"\n />\n </g>\n </svg>\n )\n}\n\nfunction NovieLogo({\n className,\n size,\n variant = \"primary\",\n ...props\n}: React.ComponentProps<\"svg\"> &\n VariantProps<typeof logoVariants> & {\n variant?: \"primary\" | \"secondary\"\n }) {\n const Comp = variant === \"secondary\" ? SecondaryLogo : PrimaryLogo\n return (\n <Comp\n data-slot=\"novie-logo\"\n className={cn(logoVariants({ size }), \"w-auto\", className)}\n {...props}\n />\n )\n}\n\nexport { NovieLogo, logoVariants }\n","import { cn } from \"@/lib/utils\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nconst symbolVariants = cva(\"inline-block shrink-0 w-auto\", {\n variants: {\n size: {\n sm: \"h-3\",\n md: \"h-6\",\n lg: \"h-12\",\n xl: \"h-[72px]\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n})\n\nfunction NovieSymbol({\n className,\n size,\n ...props\n}: React.ComponentProps<\"svg\"> & VariantProps<typeof symbolVariants>) {\n return (\n <svg\n data-slot=\"novie-symbol\"\n viewBox=\"0 0 30 29\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={cn(symbolVariants({ size }), className)}\n {...props}\n >\n <path\n d=\"M29.6559 10.4545C29.4679 9.91519 29.1836 9.41218 28.8213 8.96808C27.8997 7.84424 26.5241 7.17809 25.0568 7.15543C24.1443 7.15543 22.92 7.57234 20.8795 8.26568L19.8891 8.60102V7.48624C19.8891 5.35638 19.8891 4.07846 19.5911 3.22198C19.0913 1.8625 18.0045 0.793034 16.6289 0.294556C16.0879 0.0996957 15.5147 0 14.9369 0C14.3592 0 13.786 0.0996957 13.245 0.294556C11.8694 0.788503 10.7872 1.8625 10.2828 3.22198C9.98478 4.07393 9.98478 5.35185 9.98478 7.48624V8.59649L8.97142 8.27021C6.92178 7.61313 5.68832 7.21888 4.77584 7.23247C3.31312 7.28232 1.94669 7.97113 1.04338 9.1131C0.685726 9.56173 0.415191 10.0693 0.236363 10.6131C0.0667062 11.1523 -0.0158298 11.7233 0.00251152 12.2943C0.0529502 13.7399 0.749921 15.0903 1.90542 15.983C2.63449 16.5268 3.86336 16.9211 5.91301 17.5827L6.88051 17.8909L6.28442 18.702C5.01887 20.424 4.2577 21.4618 3.99175 22.3228C3.58824 23.714 3.82668 25.2094 4.64745 26.4103C4.96843 26.8816 5.37652 27.2985 5.84422 27.6338C6.31193 27.9692 6.83466 28.223 7.38948 28.3816C8.79718 28.7803 10.3103 28.5447 11.5255 27.7335C12.2729 27.2169 13.034 26.1837 14.3042 24.4572L15.0057 23.5055L15.7073 24.4572C16.9728 26.1792 17.734 27.2169 18.486 27.7335C19.7011 28.5447 21.2143 28.7803 22.622 28.3816C23.1768 28.223 23.6995 27.9737 24.1672 27.6338C24.6349 27.2985 25.0384 26.8861 25.364 26.4103C26.1848 25.2094 26.4232 23.714 26.0197 22.3228C25.7537 21.4618 24.9926 20.424 23.727 18.702L23.1126 17.8637L24.1259 17.5193C26.1664 16.8259 27.3861 16.409 28.106 15.8516C29.2432 14.9408 29.9172 13.5813 29.9401 12.1312C29.9493 11.5602 29.8576 10.9937 29.6696 10.4545H29.6559Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nexport { NovieSymbol, symbolVariants }\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Loader2 } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst buttonVariants = cva(\n \"inline-flex shrink-0 items-center justify-center whitespace-nowrap font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:h-4 [&_svg]:w-4\",\n {\n variants: {\n variant: {\n default:\n \"bg-[hsl(var(--button-brand-default))] text-white hover:bg-[hsl(var(--button-brand-hover))] active:bg-[hsl(var(--button-brand-pressed))] disabled:bg-[hsl(var(--button-primary-bg-disabled))] disabled:text-[hsl(var(--button-primary-text-disabled))]\",\n secondary:\n \"bg-primary text-primary-foreground hover:bg-[hsl(var(--button-secondary-filled-hover))] disabled:bg-[hsl(var(--button-primary-bg-disabled))] disabled:text-[hsl(var(--button-text-disabled))]\",\n outline:\n \"border-[1.5px] border-primary bg-transparent text-primary hover:bg-accent disabled:border-[hsl(var(--button-primary-bg-disabled))] disabled:text-[hsl(var(--button-text-disabled))]\",\n danger:\n \"bg-destructive text-destructive-foreground hover:bg-[hsl(var(--button-danger-hover))] disabled:bg-[hsl(var(--button-danger-bg-disabled))] disabled:text-[hsl(var(--button-danger-text-disabled))]\",\n ghost:\n \"text-muted-foreground hover:bg-page-secondary disabled:text-[hsl(var(--button-ghost-text-disabled))]\",\n link:\n \"text-foreground underline underline-offset-4 hover:text-muted-foreground disabled:text-[hsl(var(--button-text-disabled))] h-auto p-0\",\n \"link-primary\":\n \"text-[hsl(var(--button-brand-default))] underline underline-offset-4 disabled:text-[hsl(var(--button-text-disabled))] h-auto p-0\",\n },\n size: {\n sm: \"h-8 gap-1.5 rounded-[20px] px-4 text-xs\",\n default: \"h-10 gap-2 rounded-[20px] px-5 text-sm\",\n lg: \"h-12 gap-2 rounded-[30px] px-6 text-sm\",\n xl: \"h-[58px] gap-2 rounded-[30px] px-8 text-base\",\n icon: \"h-10 w-10 rounded-[20px]\",\n \"icon-sm\": \"h-8 w-8 rounded-[20px]\",\n \"icon-lg\": \"h-12 w-12 rounded-[30px]\",\n \"icon-xl\": \"h-[58px] w-[58px] rounded-[30px]\",\n },\n },\n compoundVariants: [\n { variant: \"secondary\", size: \"sm\", className: \"rounded-[30px]\" },\n { variant: \"secondary\", size: \"default\", className: \"rounded-[30px]\" },\n { variant: \"outline\", size: \"sm\", className: \"rounded-[30px]\" },\n { variant: \"outline\", size: \"default\", className: \"rounded-[30px]\" },\n { variant: \"ghost\", size: \"sm\", className: \"rounded-[30px]\" },\n { variant: \"ghost\", size: \"default\", className: \"rounded-[30px]\" },\n ],\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Button({\n className,\n variant = \"default\",\n size = \"default\",\n asChild = false,\n loading = false,\n disabled,\n children,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean\n loading?: boolean\n }) {\n const Comp = asChild ? Slot : \"button\"\n const isDisabled = disabled || loading\n\n return (\n <Comp\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n className={cn(buttonVariants({ variant, size, className }))}\n disabled={isDisabled}\n aria-busy={loading || undefined}\n {...props}\n >\n {loading && <Loader2 className=\"animate-spin\" />}\n {children}\n </Comp>\n )\n}\n\nexport { Button, buttonVariants }\n","import { cn } from \"@/lib/utils\"\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n \"flex h-8 w-full rounded-lg border border-input bg-background px-2.5 py-2 text-sm ring-offset-background transition-colors\",\n \"file:border-0 file:bg-transparent file:text-sm file:font-medium\",\n \"placeholder:text-primary-secondary\",\n \"focus-visible:outline-none focus-visible:shadow-[0_1px_2px_0_hsl(var(--shadow-sm))]\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n \"aria-invalid:border-destructive aria-invalid:ring-destructive/20\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n","import { cn } from \"@/lib/utils\"\n\nfunction Label({\n className,\n ...props\n}: React.ComponentProps<\"label\">) {\n return (\n <label\n data-slot=\"label\"\n className={cn(\n \"text-xs font-medium leading-4 text-foreground\",\n \"peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n \"group-data-[disabled=true]:cursor-not-allowed group-data-[disabled=true]:opacity-50\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Label }\n","import * as React from \"react\"\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\"\nimport { Check, Minus } from \"lucide-react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst checkboxVariants = cva(\n [\n \"peer shrink-0 rounded border-[1.5px] border-border bg-background transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n \"data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-foreground\",\n \"data-[state=indeterminate]:border-border data-[state=indeterminate]:text-foreground\",\n ].join(\" \"),\n {\n variants: {\n size: {\n sm: \"h-5 w-5\",\n md: \"h-6 w-6\",\n },\n },\n defaultVariants: {\n size: \"sm\",\n },\n }\n)\n\nconst iconVariants = cva(\"\", {\n variants: {\n size: {\n sm: \"h-4 w-4\",\n md: \"h-[18px] w-[18px]\",\n },\n },\n defaultVariants: {\n size: \"sm\",\n },\n})\n\nfunction Checkbox({\n className,\n size = \"sm\",\n ...props\n}: React.ComponentProps<typeof CheckboxPrimitive.Root> &\n VariantProps<typeof checkboxVariants>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\"group\", checkboxVariants({ size, className }))}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"flex items-center justify-center text-current\"\n >\n <Check className={cn(iconVariants({ size }), \"group-data-[state=indeterminate]:hidden\")} />\n <Minus className={cn(iconVariants({ size }), \"hidden group-data-[state=indeterminate]:block\")} />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n}\n\nexport { Checkbox, checkboxVariants }\n","import * as React from \"react\"\nimport * as SwitchPrimitive from \"@radix-ui/react-switch\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst switchVariants = cva(\n [\n \"peer inline-flex shrink-0 cursor-pointer items-center rounded-full\",\n \"transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n \"disabled:cursor-not-allowed\",\n \"data-[state=checked]:bg-[hsl(var(--button-brand-default))]\",\n \"data-[state=unchecked]:bg-[hsl(var(--icon-secondary))]\",\n \"disabled:data-[state=checked]:bg-[hsl(var(--button-brand-secondary))]\",\n \"disabled:data-[state=unchecked]:bg-[hsl(var(--button-primary-bg-disabled))]\",\n ].join(\" \"),\n {\n variants: {\n size: {\n sm: \"h-5 w-9\",\n md: \"h-[22px] w-10\",\n },\n },\n defaultVariants: {\n size: \"sm\",\n },\n }\n)\n\nconst thumbVariants = cva(\n [\n \"pointer-events-none block rounded-full bg-background shadow-[0px_2px_4px_0px_rgba(39,39,39,0.1)]\",\n \"ring-0 transition-transform\",\n \"data-[state=unchecked]:translate-x-0.5\",\n ].join(\" \"),\n {\n variants: {\n size: {\n sm: \"h-4 w-4 data-[state=checked]:translate-x-[18px]\",\n md: \"h-[18px] w-[18px] data-[state=checked]:translate-x-5\",\n },\n },\n defaultVariants: {\n size: \"sm\",\n },\n }\n)\n\ntype SwitchProps = React.ComponentProps<typeof SwitchPrimitive.Root> &\n VariantProps<typeof switchVariants>\n\nfunction Switch({ className, size, ...props }: SwitchProps) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n className={cn(switchVariants({ size, className }))}\n {...props}\n >\n <SwitchPrimitive.Thumb className={cn(thumbVariants({ size }))} />\n </SwitchPrimitive.Root>\n )\n}\n\nexport { Switch, switchVariants, thumbVariants }\nexport type { SwitchProps }\n","// src/primitive.tsx\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nfunction getOwnerWindow(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access window outside of the DOM\");\n }\n return element?.ownerDocument?.defaultView ?? window;\n}\nfunction getOwnerDocument(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access document outside of the DOM\");\n }\n return element?.ownerDocument ?? document;\n}\nfunction getActiveElement(node, activeDescendant = false) {\n const { activeElement } = getOwnerDocument(node);\n if (!activeElement?.nodeName) {\n return null;\n }\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(activeElement.contentDocument.body, activeDescendant);\n }\n if (activeDescendant) {\n const id = activeElement.getAttribute(\"aria-activedescendant\");\n if (id) {\n const element = getOwnerDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n return activeElement;\n}\nfunction isFrame(element) {\n return element.tagName === \"IFRAME\";\n}\nexport {\n canUseDOM,\n composeEventHandlers,\n getActiveElement,\n getOwnerDocument,\n getOwnerWindow,\n isFrame\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/context/src/create-context.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/collection-legacy.tsx\nimport React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createCollection(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }\n );\n const CollectionProvider = (props) => {\n const { scope, children } = props;\n const ref = React.useRef(null);\n const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;\n return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n React.useEffect(() => {\n context.itemMap.set(ref, { ref, ...itemData });\n return () => void context.itemMap.delete(ref);\n });\n return /* @__PURE__ */ jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useCollection(scope) {\n const context = useCollectionContext(name + \"CollectionConsumer\", scope);\n const getItems = React.useCallback(() => {\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n const items = Array.from(context.itemMap.values());\n const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)\n );\n return orderedItems;\n }, [context.collectionRef, context.itemMap]);\n return getItems;\n }\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n useCollection,\n createCollectionScope\n ];\n}\n\n// src/collection.tsx\nimport React2 from \"react\";\nimport { createContextScope as createContextScope2 } from \"@radix-ui/react-context\";\nimport { useComposedRefs as useComposedRefs2 } from \"@radix-ui/react-compose-refs\";\nimport { createSlot as createSlot2 } from \"@radix-ui/react-slot\";\n\n// src/ordered-dictionary.ts\nvar __instanciated = /* @__PURE__ */ new WeakMap();\nvar OrderedDict = class _OrderedDict extends Map {\n #keys;\n constructor(entries) {\n super(entries);\n this.#keys = [...super.keys()];\n __instanciated.set(this, true);\n }\n set(key, value) {\n if (__instanciated.get(this)) {\n if (this.has(key)) {\n this.#keys[this.#keys.indexOf(key)] = key;\n } else {\n this.#keys.push(key);\n }\n }\n super.set(key, value);\n return this;\n }\n insert(index, key, value) {\n const has = this.has(key);\n const length = this.#keys.length;\n const relativeIndex = toSafeInteger(index);\n let actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n const safeIndex = actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n if (safeIndex === this.size || has && safeIndex === this.size - 1 || safeIndex === -1) {\n this.set(key, value);\n return this;\n }\n const size = this.size + (has ? 0 : 1);\n if (relativeIndex < 0) {\n actualIndex++;\n }\n const keys = [...this.#keys];\n let nextValue;\n let shouldSkip = false;\n for (let i = actualIndex; i < size; i++) {\n if (actualIndex === i) {\n let nextKey = keys[i];\n if (keys[i] === key) {\n nextKey = keys[i + 1];\n }\n if (has) {\n this.delete(key);\n }\n nextValue = this.get(nextKey);\n this.set(key, value);\n } else {\n if (!shouldSkip && keys[i - 1] === key) {\n shouldSkip = true;\n }\n const currentKey = keys[shouldSkip ? i : i - 1];\n const currentValue = nextValue;\n nextValue = this.get(currentKey);\n this.delete(currentKey);\n this.set(currentKey, currentValue);\n }\n }\n return this;\n }\n with(index, key, value) {\n const copy = new _OrderedDict(this);\n copy.insert(index, key, value);\n return copy;\n }\n before(key) {\n const index = this.#keys.indexOf(key) - 1;\n if (index < 0) {\n return void 0;\n }\n return this.entryAt(index);\n }\n /**\n * Sets a new key-value pair at the position before the given key.\n */\n setBefore(key, newKey, value) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index, newKey, value);\n }\n after(key) {\n let index = this.#keys.indexOf(key);\n index = index === -1 || index === this.size - 1 ? -1 : index + 1;\n if (index === -1) {\n return void 0;\n }\n return this.entryAt(index);\n }\n /**\n * Sets a new key-value pair at the position after the given key.\n */\n setAfter(key, newKey, value) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index + 1, newKey, value);\n }\n first() {\n return this.entryAt(0);\n }\n last() {\n return this.entryAt(-1);\n }\n clear() {\n this.#keys = [];\n return super.clear();\n }\n delete(key) {\n const deleted = super.delete(key);\n if (deleted) {\n this.#keys.splice(this.#keys.indexOf(key), 1);\n }\n return deleted;\n }\n deleteAt(index) {\n const key = this.keyAt(index);\n if (key !== void 0) {\n return this.delete(key);\n }\n return false;\n }\n at(index) {\n const key = at(this.#keys, index);\n if (key !== void 0) {\n return this.get(key);\n }\n }\n entryAt(index) {\n const key = at(this.#keys, index);\n if (key !== void 0) {\n return [key, this.get(key)];\n }\n }\n indexOf(key) {\n return this.#keys.indexOf(key);\n }\n keyAt(index) {\n return at(this.#keys, index);\n }\n from(key, offset) {\n const index = this.indexOf(key);\n if (index === -1) {\n return void 0;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.at(dest);\n }\n keyFrom(key, offset) {\n const index = this.indexOf(key);\n if (index === -1) {\n return void 0;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.keyAt(dest);\n }\n find(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return entry;\n }\n index++;\n }\n return void 0;\n }\n findIndex(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return index;\n }\n index++;\n }\n return -1;\n }\n filter(predicate, thisArg) {\n const entries = [];\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n entries.push(entry);\n }\n index++;\n }\n return new _OrderedDict(entries);\n }\n map(callbackfn, thisArg) {\n const entries = [];\n let index = 0;\n for (const entry of this) {\n entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index, this])]);\n index++;\n }\n return new _OrderedDict(entries);\n }\n reduce(...args) {\n const [callbackfn, initialValue] = args;\n let index = 0;\n let accumulator = initialValue ?? this.at(0);\n for (const entry of this) {\n if (index === 0 && args.length === 1) {\n accumulator = entry;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n index++;\n }\n return accumulator;\n }\n reduceRight(...args) {\n const [callbackfn, initialValue] = args;\n let accumulator = initialValue ?? this.at(-1);\n for (let index = this.size - 1; index >= 0; index--) {\n const entry = this.at(index);\n if (index === this.size - 1 && args.length === 1) {\n accumulator = entry;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n }\n return accumulator;\n }\n toSorted(compareFn) {\n const entries = [...this.entries()].sort(compareFn);\n return new _OrderedDict(entries);\n }\n toReversed() {\n const reversed = new _OrderedDict();\n for (let index = this.size - 1; index >= 0; index--) {\n const key = this.keyAt(index);\n const element = this.get(key);\n reversed.set(key, element);\n }\n return reversed;\n }\n toSpliced(...args) {\n const entries = [...this.entries()];\n entries.splice(...args);\n return new _OrderedDict(entries);\n }\n slice(start, end) {\n const result = new _OrderedDict();\n let stop = this.size - 1;\n if (start === void 0) {\n return result;\n }\n if (start < 0) {\n start = start + this.size;\n }\n if (end !== void 0 && end > 0) {\n stop = end - 1;\n }\n for (let index = start; index <= stop; index++) {\n const key = this.keyAt(index);\n const element = this.get(key);\n result.set(key, element);\n }\n return result;\n }\n every(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (!Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return false;\n }\n index++;\n }\n return true;\n }\n some(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return true;\n }\n index++;\n }\n return false;\n }\n};\nfunction at(array, index) {\n if (\"at\" in Array.prototype) {\n return Array.prototype.at.call(array, index);\n }\n const actualIndex = toSafeIndex(array, index);\n return actualIndex === -1 ? void 0 : array[actualIndex];\n}\nfunction toSafeIndex(array, index) {\n const length = array.length;\n const relativeIndex = toSafeInteger(index);\n const actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n return actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n}\nfunction toSafeInteger(number) {\n return number !== number || number === 0 ? 0 : Math.trunc(number);\n}\n\n// src/collection.tsx\nimport { jsx as jsx2 } from \"react/jsx-runtime\";\nfunction createCollection2(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope2(PROVIDER_NAME);\n const [CollectionContextProvider, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n {\n collectionElement: null,\n collectionRef: { current: null },\n collectionRefObject: { current: null },\n itemMap: new OrderedDict(),\n setItemMap: () => void 0\n }\n );\n const CollectionProvider = ({ state, ...props }) => {\n return state ? /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state }) : /* @__PURE__ */ jsx2(CollectionInit, { ...props });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const CollectionInit = (props) => {\n const state = useInitCollection();\n return /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state });\n };\n CollectionInit.displayName = PROVIDER_NAME + \"Init\";\n const CollectionProviderImpl = (props) => {\n const { scope, children, state } = props;\n const ref = React2.useRef(null);\n const [collectionElement, setCollectionElement] = React2.useState(\n null\n );\n const composeRefs = useComposedRefs2(ref, setCollectionElement);\n const [itemMap, setItemMap] = state;\n React2.useEffect(() => {\n if (!collectionElement) return;\n const observer = getChildListObserver(() => {\n });\n observer.observe(collectionElement, {\n childList: true,\n subtree: true\n });\n return () => {\n observer.disconnect();\n };\n }, [collectionElement]);\n return /* @__PURE__ */ jsx2(\n CollectionContextProvider,\n {\n scope,\n itemMap,\n setItemMap,\n collectionRef: composeRefs,\n collectionRefObject: ref,\n collectionElement,\n children\n }\n );\n };\n CollectionProviderImpl.displayName = PROVIDER_NAME + \"Impl\";\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot2(COLLECTION_SLOT_NAME);\n const CollectionSlot = React2.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx2(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot2(ITEM_SLOT_NAME);\n const CollectionItemSlot = React2.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React2.useRef(null);\n const [element, setElement] = React2.useState(null);\n const composedRefs = useComposedRefs2(forwardedRef, ref, setElement);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n const { setItemMap } = context;\n const itemDataRef = React2.useRef(itemData);\n if (!shallowEqual(itemDataRef.current, itemData)) {\n itemDataRef.current = itemData;\n }\n const memoizedItemData = itemDataRef.current;\n React2.useEffect(() => {\n const itemData2 = memoizedItemData;\n setItemMap((map) => {\n if (!element) {\n return map;\n }\n if (!map.has(element)) {\n map.set(element, { ...itemData2, element });\n return map.toSorted(sortByDocumentPosition);\n }\n return map.set(element, { ...itemData2, element }).toSorted(sortByDocumentPosition);\n });\n return () => {\n setItemMap((map) => {\n if (!element || !map.has(element)) {\n return map;\n }\n map.delete(element);\n return new OrderedDict(map);\n });\n };\n }, [element, memoizedItemData, setItemMap]);\n return /* @__PURE__ */ jsx2(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useInitCollection() {\n return React2.useState(new OrderedDict());\n }\n function useCollection(scope) {\n const { itemMap } = useCollectionContext(name + \"CollectionConsumer\", scope);\n return itemMap;\n }\n const functions = {\n createCollectionScope,\n useCollection,\n useInitCollection\n };\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n functions\n ];\n}\nfunction shallowEqual(a, b) {\n if (a === b) return true;\n if (typeof a !== \"object\" || typeof b !== \"object\") return false;\n if (a == null || b == null) return false;\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n if (keysA.length !== keysB.length) return false;\n for (const key of keysA) {\n if (!Object.prototype.hasOwnProperty.call(b, key)) return false;\n if (a[key] !== b[key]) return false;\n }\n return true;\n}\nfunction isElementPreceding(a, b) {\n return !!(b.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING);\n}\nfunction sortByDocumentPosition(a, b) {\n return !a[1].element || !b[1].element ? 0 : isElementPreceding(a[1].element, b[1].element) ? -1 : 1;\n}\nfunction getChildListObserver(callback) {\n const observer = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === \"childList\") {\n callback();\n return;\n }\n }\n });\n return observer;\n}\nexport {\n createCollection,\n createCollection2 as unstable_createCollection\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-layout-effect/src/use-layout-effect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/id/src/id.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useReactId = React[\" useId \".trim().toString()] || (() => void 0);\nvar count = 0;\nfunction useId(deterministicId) {\n const [id, setId] = React.useState(useReactId());\n useLayoutEffect(() => {\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId]);\n return deterministicId || (id ? `radix-${id}` : \"\");\n}\nexport {\n useId\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-callback-ref/src/use-callback-ref.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n","// src/use-controllable-state.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useInsertionEffect = React[\" useInsertionEffect \".trim().toString()] || useLayoutEffect;\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n },\n caller\n}) {\n const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({\n defaultProp,\n onChange\n });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n if (true) {\n const isControlledRef = React.useRef(prop !== void 0);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;\n if (value2 !== prop) {\n onChangeRef.current?.(value2);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, onChangeRef]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const [value, setValue] = React.useState(defaultProp);\n const prevValueRef = React.useRef(value);\n const onChangeRef = React.useRef(onChange);\n useInsertionEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n onChangeRef.current?.(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef]);\n return [value, setValue, onChangeRef];\n}\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n\n// src/use-controllable-state-reducer.tsx\nimport * as React2 from \"react\";\nimport { useEffectEvent } from \"@radix-ui/react-use-effect-event\";\nvar SYNC_STATE = Symbol(\"RADIX:SYNC_STATE\");\nfunction useControllableStateReducer(reducer, userArgs, initialArg, init) {\n const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;\n const isControlled = controlledState !== void 0;\n const onChange = useEffectEvent(onChangeProp);\n if (true) {\n const isControlledRef = React2.useRef(controlledState !== void 0);\n React2.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const args = [{ ...initialArg, state: defaultProp }];\n if (init) {\n args.push(init);\n }\n const [internalState, dispatch] = React2.useReducer(\n (state2, action) => {\n if (action.type === SYNC_STATE) {\n return { ...state2, state: action.state };\n }\n const next = reducer(state2, action);\n if (isControlled && !Object.is(next.state, state2.state)) {\n onChange(next.state);\n }\n return next;\n },\n ...args\n );\n const uncontrolledState = internalState.state;\n const prevValueRef = React2.useRef(uncontrolledState);\n React2.useEffect(() => {\n if (prevValueRef.current !== uncontrolledState) {\n prevValueRef.current = uncontrolledState;\n if (!isControlled) {\n onChange(uncontrolledState);\n }\n }\n }, [onChange, uncontrolledState, prevValueRef, isControlled]);\n const state = React2.useMemo(() => {\n const isControlled2 = controlledState !== void 0;\n if (isControlled2) {\n return { ...internalState, state: controlledState };\n }\n return internalState;\n }, [internalState, controlledState]);\n React2.useEffect(() => {\n if (isControlled && !Object.is(controlledState, internalState.state)) {\n dispatch({ type: SYNC_STATE, state: controlledState });\n }\n }, [controlledState, internalState.state, isControlled]);\n return [state, dispatch];\n}\nexport {\n useControllableState,\n useControllableStateReducer\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/direction/src/direction.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DirectionContext = React.createContext(void 0);\nvar DirectionProvider = (props) => {\n const { dir, children } = props;\n return /* @__PURE__ */ jsx(DirectionContext.Provider, { value: dir, children });\n};\nfunction useDirection(localDir) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || \"ltr\";\n}\nvar Provider = DirectionProvider;\nexport {\n DirectionProvider,\n Provider,\n useDirection\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-size/src/use-size.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","// packages/react/use-previous/src/use-previous.tsx\nimport * as React from \"react\";\nfunction usePrevious(value) {\n const ref = React.useRef({ value, previous: value });\n return React.useMemo(() => {\n if (ref.current.value !== value) {\n ref.current.previous = ref.current.value;\n ref.current.value = value;\n }\n return ref.current.previous;\n }, [value]);\n}\nexport {\n usePrevious\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/radio-group.tsx\nimport * as React2 from \"react\";\nimport { composeEventHandlers as composeEventHandlers2 } from \"@radix-ui/primitive\";\nimport { useComposedRefs as useComposedRefs2 } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope as createContextScope2 } from \"@radix-ui/react-context\";\nimport { Primitive as Primitive2 } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\n\n// src/radio.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { usePrevious } from \"@radix-ui/react-use-previous\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar RADIO_NAME = \"Radio\";\nvar [createRadioContext, createRadioScope] = createContextScope(RADIO_NAME);\nvar [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME);\nvar Radio = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRadio,\n name,\n checked = false,\n required,\n disabled,\n value = \"on\",\n onCheck,\n form,\n ...radioProps\n } = props;\n const [button, setButton] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n const isFormControl = button ? form || !!button.closest(\"form\") : true;\n return /* @__PURE__ */ jsxs(RadioProvider, { scope: __scopeRadio, checked, disabled, children: [\n /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"radio\",\n \"aria-checked\": checked,\n \"data-state\": getState(checked),\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n value,\n ...radioProps,\n ref: composedRefs,\n onClick: composeEventHandlers(props.onClick, (event) => {\n if (!checked) onCheck?.();\n if (isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })\n }\n ),\n isFormControl && /* @__PURE__ */ jsx(\n RadioBubbleInput,\n {\n control: button,\n bubbles: !hasConsumerStoppedPropagationRef.current,\n name,\n value,\n checked,\n required,\n disabled,\n form,\n style: { transform: \"translateX(-100%)\" }\n }\n )\n ] });\n }\n);\nRadio.displayName = RADIO_NAME;\nvar INDICATOR_NAME = \"RadioIndicator\";\nvar RadioIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeRadio, forceMount, ...indicatorProps } = props;\n const context = useRadioContext(INDICATOR_NAME, __scopeRadio);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.checked, children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n \"data-state\": getState(context.checked),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n ...indicatorProps,\n ref: forwardedRef\n }\n ) });\n }\n);\nRadioIndicator.displayName = INDICATOR_NAME;\nvar BUBBLE_INPUT_NAME = \"RadioBubbleInput\";\nvar RadioBubbleInput = React.forwardRef(\n ({\n __scopeRadio,\n control,\n checked,\n bubbles = true,\n ...props\n }, forwardedRef) => {\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, forwardedRef);\n const prevChecked = usePrevious(checked);\n const controlSize = useSize(control);\n React.useEffect(() => {\n const input = ref.current;\n if (!input) return;\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n inputProto,\n \"checked\"\n );\n const setChecked = descriptor.set;\n if (prevChecked !== checked && setChecked) {\n const event = new Event(\"click\", { bubbles });\n setChecked.call(input, checked);\n input.dispatchEvent(event);\n }\n }, [prevChecked, checked, bubbles]);\n return /* @__PURE__ */ jsx(\n Primitive.input,\n {\n type: \"radio\",\n \"aria-hidden\": true,\n defaultChecked: checked,\n ...props,\n tabIndex: -1,\n ref: composedRefs,\n style: {\n ...props.style,\n ...controlSize,\n position: \"absolute\",\n pointerEvents: \"none\",\n opacity: 0,\n margin: 0\n }\n }\n );\n }\n);\nRadioBubbleInput.displayName = BUBBLE_INPUT_NAME;\nfunction getState(checked) {\n return checked ? \"checked\" : \"unchecked\";\n}\n\n// src/radio-group.tsx\nimport { jsx as jsx2 } from \"react/jsx-runtime\";\nvar ARROW_KEYS = [\"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\"];\nvar RADIO_GROUP_NAME = \"RadioGroup\";\nvar [createRadioGroupContext, createRadioGroupScope] = createContextScope2(RADIO_GROUP_NAME, [\n createRovingFocusGroupScope,\n createRadioScope\n]);\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar useRadioScope = createRadioScope();\nvar [RadioGroupProvider, useRadioGroupContext] = createRadioGroupContext(RADIO_GROUP_NAME);\nvar RadioGroup = React2.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRadioGroup,\n name,\n defaultValue,\n value: valueProp,\n required = false,\n disabled = false,\n orientation,\n dir,\n loop = true,\n onValueChange,\n ...groupProps\n } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);\n const direction = useDirection(dir);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? null,\n onChange: onValueChange,\n caller: RADIO_GROUP_NAME\n });\n return /* @__PURE__ */ jsx2(\n RadioGroupProvider,\n {\n scope: __scopeRadioGroup,\n name,\n required,\n disabled,\n value,\n onValueChange: setValue,\n children: /* @__PURE__ */ jsx2(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n orientation,\n dir: direction,\n loop,\n children: /* @__PURE__ */ jsx2(\n Primitive2.div,\n {\n role: \"radiogroup\",\n \"aria-required\": required,\n \"aria-orientation\": orientation,\n \"data-disabled\": disabled ? \"\" : void 0,\n dir: direction,\n ...groupProps,\n ref: forwardedRef\n }\n )\n }\n )\n }\n );\n }\n);\nRadioGroup.displayName = RADIO_GROUP_NAME;\nvar ITEM_NAME = \"RadioGroupItem\";\nvar RadioGroupItem = React2.forwardRef(\n (props, forwardedRef) => {\n const { __scopeRadioGroup, disabled, ...itemProps } = props;\n const context = useRadioGroupContext(ITEM_NAME, __scopeRadioGroup);\n const isDisabled = context.disabled || disabled;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);\n const radioScope = useRadioScope(__scopeRadioGroup);\n const ref = React2.useRef(null);\n const composedRefs = useComposedRefs2(forwardedRef, ref);\n const checked = context.value === itemProps.value;\n const isArrowKeyPressedRef = React2.useRef(false);\n React2.useEffect(() => {\n const handleKeyDown = (event) => {\n if (ARROW_KEYS.includes(event.key)) {\n isArrowKeyPressedRef.current = true;\n }\n };\n const handleKeyUp = () => isArrowKeyPressedRef.current = false;\n document.addEventListener(\"keydown\", handleKeyDown);\n document.addEventListener(\"keyup\", handleKeyUp);\n return () => {\n document.removeEventListener(\"keydown\", handleKeyDown);\n document.removeEventListener(\"keyup\", handleKeyUp);\n };\n }, []);\n return /* @__PURE__ */ jsx2(\n RovingFocusGroup.Item,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n focusable: !isDisabled,\n active: checked,\n children: /* @__PURE__ */ jsx2(\n Radio,\n {\n disabled: isDisabled,\n required: context.required,\n checked,\n ...radioScope,\n ...itemProps,\n name: context.name,\n ref: composedRefs,\n onCheck: () => context.onValueChange(itemProps.value),\n onKeyDown: composeEventHandlers2((event) => {\n if (event.key === \"Enter\") event.preventDefault();\n }),\n onFocus: composeEventHandlers2(itemProps.onFocus, () => {\n if (isArrowKeyPressedRef.current) ref.current?.click();\n })\n }\n )\n }\n );\n }\n);\nRadioGroupItem.displayName = ITEM_NAME;\nvar INDICATOR_NAME2 = \"RadioGroupIndicator\";\nvar RadioGroupIndicator = React2.forwardRef(\n (props, forwardedRef) => {\n const { __scopeRadioGroup, ...indicatorProps } = props;\n const radioScope = useRadioScope(__scopeRadioGroup);\n return /* @__PURE__ */ jsx2(RadioIndicator, { ...radioScope, ...indicatorProps, ref: forwardedRef });\n }\n);\nRadioGroupIndicator.displayName = INDICATOR_NAME2;\nvar Root2 = RadioGroup;\nvar Item2 = RadioGroupItem;\nvar Indicator = RadioGroupIndicator;\nexport {\n Indicator,\n Item2 as Item,\n RadioGroup,\n RadioGroupIndicator,\n RadioGroupItem,\n Root2 as Root,\n createRadioGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from \"react\"\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst radioGroupItemVariants = cva(\n [\n \"peer aspect-square shrink-0 rounded-full border-[1.5px] transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n \"border-border bg-background\",\n \"data-[state=checked]:border-foreground data-[state=checked]:bg-foreground\",\n ].join(\" \"),\n {\n variants: {\n size: {\n sm: \"h-5 w-5\",\n md: \"h-6 w-6\",\n },\n },\n defaultVariants: {\n size: \"sm\",\n },\n }\n)\n\nconst radioGroupIndicatorVariants = cva(\n \"block rounded-full bg-primary-foreground\",\n {\n variants: {\n size: {\n sm: \"h-2.5 w-2.5\",\n md: \"h-3 w-3\",\n },\n },\n defaultVariants: {\n size: \"sm\",\n },\n }\n)\n\nfunction RadioGroup({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n className={cn(\"grid gap-3\", className)}\n {...props}\n />\n )\n}\n\nfunction RadioGroupItem({\n className,\n size = \"sm\",\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item> &\n VariantProps<typeof radioGroupItemVariants>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(radioGroupItemVariants({ size, className }))}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <span className={cn(radioGroupIndicatorVariants({ size }))} />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n}\n\nexport { RadioGroup, RadioGroupItem, radioGroupItemVariants }\n","import * as SeparatorPrimitive from \"@radix-ui/react-separator\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SeparatorVariant = \"full\" | \"middle\" | \"inset\"\n\ntype SeparatorProps = React.ComponentProps<typeof SeparatorPrimitive.Root> & {\n variant?: SeparatorVariant\n label?: string\n}\n\nfunction Separator({\n className,\n orientation = \"horizontal\",\n variant = \"full\",\n label,\n decorative = true,\n ...props\n}: SeparatorProps) {\n const isHorizontal = orientation === \"horizontal\"\n\n return (\n <div\n className={cn(\n \"flex shrink-0\",\n isHorizontal ? \"flex-col items-stretch\" : \"flex-row items-stretch\",\n variant === \"middle\" && (isHorizontal ? \"px-4\" : \"py-4\"),\n variant === \"inset\" && (isHorizontal ? \"pl-4\" : \"pt-4\"),\n label && isHorizontal && \"gap-2.5\",\n !isHorizontal && \"h-full self-stretch\",\n className\n )}\n >\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border\",\n isHorizontal ? \"h-px w-full\" : \"h-full w-px\"\n )}\n {...props}\n />\n {label && isHorizontal && (\n <span className=\"text-lg leading-7 text-foreground\">{label}</span>\n )}\n </div>\n )\n}\n\nexport { Separator }\nexport type { SeparatorProps, SeparatorVariant }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Ellipsis } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst badgeVariants = cva(\n \"inline-flex items-center justify-center rounded-full text-[12px] leading-[16px] whitespace-nowrap text-white\",\n {\n variants: {\n variant: {\n default: \"bg-foreground\",\n success: \"bg-success\",\n warning: \"bg-warning\",\n error: \"bg-error\",\n info: \"bg-info\",\n },\n size: {\n sm: \"h-1.5 w-1.5\",\n md: \"h-4 min-w-4\",\n },\n content: {\n none: \"\",\n dot: \"p-1\",\n number: \"p-0\",\n \"multi-number\": \"p-1\",\n text: \"p-3\",\n },\n stroke: {\n true: \"border-[1.5px] border-background\",\n false: \"\",\n },\n },\n compoundVariants: [\n {\n size: \"sm\",\n content: \"none\",\n className: \"h-1.5 w-1.5 p-0\",\n },\n {\n size: \"md\",\n content: \"number\",\n className: \"h-4 w-4 p-0\",\n },\n ],\n defaultVariants: {\n variant: \"default\",\n size: \"sm\",\n content: \"none\",\n stroke: false,\n },\n }\n)\n\ntype BadgeContentType = \"dot\" | \"number\" | \"multi-number\" | \"text\" | \"none\"\n\ntype BadgeProps = React.ComponentProps<\"div\"> &\n VariantProps<typeof badgeVariants> & {\n content?: BadgeContentType\n stroke?: boolean\n }\n\nfunction Badge({\n className,\n variant = \"default\",\n size = \"sm\",\n content = \"none\",\n stroke = false,\n children,\n ...props\n}: BadgeProps) {\n const isDot = size === \"sm\" && content === \"none\"\n const isNumeric = content === \"number\" || content === \"multi-number\"\n\n return (\n <div\n data-slot=\"badge\"\n data-variant={variant}\n data-size={size}\n className={cn(badgeVariants({ variant, size, content, stroke, className }))}\n {...props}\n >\n {isDot ? null : (\n <span className={cn(\"text-center text-[12px] leading-[16px]\", isNumeric && \"font-medium\")}>\n {content === \"dot\" ? (\n <Ellipsis className=\"h-4 w-4\" aria-hidden=\"true\" />\n ) : (\n children\n )}\n </span>\n )}\n </div>\n )\n}\n\nexport { Badge, badgeVariants }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst tagVariants = cva(\n \"inline-flex items-center whitespace-nowrap rounded-full text-sm font-medium transition-colors [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n outline: \"border-[1.5px] border-border text-foreground\",\n filled: \"bg-background text-foreground\",\n primary: \"bg-primary/10 text-primary border border-primary/20\",\n destructive: \"bg-destructive/10 text-destructive border border-destructive/20\",\n success: \"bg-success/10 text-success border border-success/20\",\n warning: \"bg-warning/10 text-warning border border-warning/20\",\n info: \"bg-info/10 text-info border border-info/20\",\n },\n size: {\n sm: \"h-6 gap-1 px-2 text-xs\",\n default: \"h-8 gap-1 px-4 text-sm\",\n lg: \"h-9 gap-1.5 px-4 text-sm\",\n },\n },\n compoundVariants: [\n { variant: \"filled\", size: \"default\", className: \"pl-4 pr-3\" },\n { variant: \"filled\", size: \"lg\", className: \"pl-4 pr-3\" },\n ],\n defaultVariants: {\n variant: \"outline\",\n size: \"default\",\n },\n }\n)\n\ntype TagProps = React.ComponentProps<\"div\"> &\n VariantProps<typeof tagVariants> & {\n onDismiss?: () => void\n }\n\nfunction Tag({\n className,\n variant,\n size,\n onDismiss,\n children,\n ...props\n}: TagProps) {\n return (\n <div\n data-slot=\"tag\"\n className={cn(\n tagVariants({ variant, size }),\n onDismiss && \"pr-2\",\n className\n )}\n {...props}\n >\n {children}\n {onDismiss && (\n <button\n type=\"button\"\n aria-label=\"Dismiss\"\n onClick={onDismiss}\n className={cn(\n \"inline-flex items-center justify-center rounded-full transition-colors\",\n \"hover:bg-foreground/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n size === \"sm\" ? \"h-3.5 w-3.5\" : \"h-4 w-4\"\n )}\n >\n <X className={size === \"sm\" ? \"h-2.5 w-2.5\" : \"h-3 w-3\"} />\n </button>\n )}\n </div>\n )\n}\n\nexport { Tag, tagVariants }\nexport type { TagProps }\n","import * as AvatarPrimitive from \"@radix-ui/react-avatar\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst avatarVariants = cva(\n \"relative inline-flex shrink-0 items-center justify-center overflow-hidden bg-muted\",\n {\n variants: {\n size: {\n xs: \"h-6 w-6 text-xs\",\n sm: \"h-8 w-8 text-xs\",\n md: \"h-10 w-10 text-lg\",\n lg: \"h-12 w-12 text-lg\",\n },\n shape: {\n circle: \"rounded-full\",\n square: \"rounded-lg\",\n },\n },\n defaultVariants: {\n size: \"md\",\n shape: \"circle\",\n },\n }\n)\n\nconst statusDotVariants = cva(\n \"absolute bottom-0 right-0 block rounded-full border border-background shadow-sm\",\n {\n variants: {\n size: {\n xs: \"h-[4.5px] w-[4.5px]\",\n sm: \"h-1.5 w-1.5\",\n md: \"h-1.5 w-1.5\",\n lg: \"h-2 w-2\",\n },\n status: {\n online: \"bg-success\",\n busy: \"bg-destructive\",\n offline: \"bg-info\",\n away: \"bg-muted-foreground\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n }\n)\n\ntype AvatarStatus = \"online\" | \"busy\" | \"offline\" | \"away\" | \"none\"\n\nfunction Avatar({\n className,\n size = \"md\",\n shape = \"circle\",\n status = \"none\",\n children,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Root> &\n VariantProps<typeof avatarVariants> & {\n status?: AvatarStatus\n }) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n data-size={size}\n data-shape={shape}\n className={cn(avatarVariants({ size, shape, className }))}\n {...props}\n >\n {children}\n {status !== \"none\" && (\n <span\n data-slot=\"avatar-status\"\n className={cn(statusDotVariants({ size, status }))}\n aria-label={status}\n />\n )}\n </AvatarPrimitive.Root>\n )\n}\n\nfunction AvatarImage({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn(\"h-full w-full object-cover\", className)}\n {...props}\n />\n )\n}\n\nfunction AvatarFallback({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn(\n \"flex h-full w-full items-center justify-center bg-muted font-medium text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Avatar, AvatarImage, AvatarFallback, avatarVariants }\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Loader2 } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst iconButtonVariants = cva(\n \"inline-flex shrink-0 items-center justify-center transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground hover:bg-[hsl(var(--icon-button-hover))] disabled:bg-[hsl(var(--icon-button-disabled))] active:bg-primary active:ring-2 active:ring-primary active:ring-offset-2\",\n ghost:\n \"text-foreground hover:bg-accent hover:text-accent-foreground active:bg-accent\",\n danger:\n \"bg-[hsl(var(--icon-button-danger-bg))] text-destructive-foreground hover:bg-[hsl(var(--icon-button-danger-hover))] hover:text-destructive disabled:bg-[hsl(var(--icon-button-danger-disabled))] active:bg-destructive\",\n },\n size: {\n sm: \"h-8 w-8 rounded-[30px] [&_svg]:h-3.5 [&_svg]:w-3.5\",\n default: \"h-10 w-10 rounded-[30px] [&_svg]:h-5 [&_svg]:w-5\",\n lg: \"h-12 w-12 rounded-[30px] [&_svg]:h-6 [&_svg]:w-6\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction IconButton({\n className,\n variant = \"default\",\n size = \"default\",\n asChild = false,\n loading = false,\n disabled,\n children,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps<typeof iconButtonVariants> & {\n asChild?: boolean\n loading?: boolean\n }) {\n const Comp = asChild ? Slot : \"button\"\n const isDisabled = disabled || loading\n\n return (\n <Comp\n data-slot=\"icon-button\"\n data-variant={variant}\n data-size={size}\n className={cn(iconButtonVariants({ variant, size, className }))}\n disabled={isDisabled}\n aria-busy={loading || undefined}\n {...props}\n >\n {loading ? <Loader2 className=\"animate-spin\" /> : children}\n </Comp>\n )\n}\n\nexport { IconButton, iconButtonVariants }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst progressTrackVariants = cva(\n \"relative w-full overflow-hidden rounded-full bg-surface-inset\",\n {\n variants: {\n size: {\n sm: \"h-1\",\n md: \"h-2\",\n },\n },\n defaultVariants: {\n size: \"sm\",\n },\n }\n)\n\nconst indicatorVariants = cva(\n \"h-full rounded-full transition-all duration-300 ease-in-out\",\n {\n variants: {\n status: {\n default: \"bg-foreground\",\n success: \"bg-success\",\n warning: \"bg-warning\",\n error: \"bg-destructive\",\n },\n },\n defaultVariants: {\n status: \"default\",\n },\n }\n)\n\nconst labelColorVariants = cva(\"text-base font-medium leading-6\", {\n variants: {\n status: {\n default: \"text-muted-foreground\",\n success: \"text-success\",\n warning: \"text-warning\",\n error: \"text-destructive\",\n },\n },\n defaultVariants: {\n status: \"default\",\n },\n})\n\ntype ProgressProps = React.ComponentProps<\"div\"> &\n VariantProps<typeof progressTrackVariants> &\n VariantProps<typeof indicatorVariants> & {\n value?: number\n max?: number\n label?: string\n helperText?: string\n showLabel?: boolean\n indeterminate?: boolean\n statusText?: string\n }\n\nfunction Progress({\n className,\n value = 0,\n max = 100,\n size = \"sm\",\n status = \"default\",\n label,\n helperText,\n showLabel = false,\n indeterminate = false,\n statusText,\n ...props\n}: ProgressProps) {\n const clampedValue = Math.min(Math.max(value, 0), max)\n const percentage = max > 0 ? (clampedValue / max) * 100 : 0\n const resolvedStatus = status ?? \"default\"\n\n return (\n <div\n data-slot=\"progress\"\n className={cn(\"flex w-full flex-col gap-1\", className)}\n {...props}\n >\n {showLabel && (\n <div className=\"flex items-end justify-between\">\n <span className={cn(labelColorVariants({ status: resolvedStatus }))}>\n {indeterminate ? (label ?? \"Loading\") : (label ?? \"\")}\n </span>\n <div className=\"flex items-end gap-2\">\n <span className=\"text-lg font-bold leading-7 text-foreground\">\n {indeterminate ? \"Loading\" : `${Math.round(percentage)}%`}\n </span>\n {!indeterminate && statusText && (\n <span className=\"pb-0.5 text-[10px] font-medium leading-4 tracking-[0.5px] text-muted-foreground\">\n {statusText}\n </span>\n )}\n </div>\n </div>\n )}\n\n <div\n role=\"progressbar\"\n aria-valuenow={indeterminate ? undefined : clampedValue}\n aria-valuemin={0}\n aria-valuemax={max}\n className={cn(progressTrackVariants({ size }))}\n >\n <div\n data-slot=\"progress-indicator\"\n className={cn(\n indicatorVariants({ status }),\n indeterminate && \"animate-progress-indeterminate\"\n )}\n style={\n indeterminate\n ? { width: \"50%\" }\n : { width: `${percentage}%` }\n }\n />\n </div>\n\n {showLabel && helperText && (\n <span className=\"text-[10px] leading-4 text-muted-foreground\">\n {helperText}\n </span>\n )}\n </div>\n )\n}\n\nexport { Progress, progressTrackVariants, indicatorVariants }\n","import { useId } from \"react\"\nimport { CalendarIcon, ChevronDown, Search, X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Input } from \"./input\"\nimport { Label } from \"./label\"\n\ntype InputType = \"text\" | \"select\" | \"search\" | \"number\" | \"calendar\"\n\ntype InputFieldProps = Omit<React.ComponentProps<\"input\">, \"type\"> & {\n label?: string\n required?: boolean\n helpText?: string\n errorMessage?: string\n inputType?: InputType\n clearable?: boolean\n onClear?: () => void\n prefixLabel?: string\n}\n\nfunction InputField({\n className,\n label,\n required = false,\n helpText,\n errorMessage,\n inputType = \"text\",\n clearable = false,\n onClear,\n prefixLabel,\n disabled,\n value,\n id,\n ...props\n}: InputFieldProps) {\n const generatedId = useId()\n const fieldId = id ?? generatedId\n\n const isError = !!errorMessage\n const helpId = helpText ? `${fieldId}-help` : undefined\n const errorId = isError ? `${fieldId}-error` : undefined\n const describedBy =\n [helpId, errorId].filter(Boolean).join(\" \") || undefined\n\n const labelElement = label ? (\n <Label data-slot=\"input-field-label\" htmlFor={fieldId}>\n {label}\n {required && <span className=\"text-destructive\">*</span>}\n </Label>\n ) : null\n\n const helpElement =\n helpText && !isError ? (\n <p\n data-slot=\"input-field-help\"\n id={helpId}\n className=\"text-xs font-medium leading-4 text-muted-foreground\"\n >\n {helpText}\n </p>\n ) : null\n\n const errorElement = isError ? (\n <p\n data-slot=\"input-field-error\"\n id={errorId}\n role=\"alert\"\n className=\"text-xs font-medium leading-4 text-destructive\"\n >\n {errorMessage}\n </p>\n ) : null\n\n const leftIcon = inputType === \"search\" ? <Search /> : undefined\n const showChevron = inputType === \"select\"\n const showCalendar = inputType === \"calendar\"\n\n const nativeType =\n inputType === \"number\"\n ? \"tel\"\n : inputType === \"search\"\n ? \"search\"\n : \"text\"\n\n const inputWrapper =\n inputType === \"number\" && prefixLabel ? (\n <div\n data-slot=\"input-field-number-group\"\n className=\"flex items-start gap-2\"\n >\n <div\n data-slot=\"input-field-prefix\"\n data-disabled={disabled || undefined}\n className={cn(\n \"flex h-8 shrink-0 items-center rounded-lg border border-input bg-background px-2.5 text-sm shadow-sm transition-colors\",\n \"focus-within:border-ring\",\n isError && \"border-destructive\",\n disabled && \"cursor-not-allowed opacity-50\"\n )}\n >\n <span className=\"text-muted-foreground\">{prefixLabel}</span>\n </div>\n <div\n data-slot=\"input-wrapper\"\n data-disabled={disabled || undefined}\n className={cn(\n \"flex h-8 w-full items-center gap-1.5 rounded-lg border border-input bg-background px-2.5 shadow-sm transition-colors\",\n \"focus-within:border-ring\",\n isError && \"border-destructive\",\n disabled && \"cursor-not-allowed opacity-50\",\n className\n )}\n >\n <Input\n id={fieldId}\n type=\"tel\"\n disabled={disabled}\n value={value}\n aria-invalid={isError || undefined}\n aria-describedby={describedBy}\n data-slot=\"input-field-input\"\n className=\"h-full border-0 bg-transparent px-0 shadow-none ring-0 ring-offset-0 focus-visible:ring-0 focus-visible:ring-offset-0\"\n {...props}\n />\n </div>\n </div>\n ) : (\n <div\n data-slot=\"input-wrapper\"\n data-disabled={disabled || undefined}\n className={cn(\n \"flex h-8 w-full items-center gap-1.5 rounded-lg border border-input bg-background px-2.5 transition-colors\",\n \"focus-within:border-ring\",\n isError && \"border-destructive\",\n disabled && \"cursor-not-allowed opacity-50\",\n className\n )}\n >\n {leftIcon && (\n <span\n data-slot=\"input-field-icon\"\n className=\"inline-flex shrink-0 text-muted-foreground [&_svg]:h-4 [&_svg]:w-4\"\n >\n {leftIcon}\n </span>\n )}\n\n <Input\n id={fieldId}\n type={nativeType}\n disabled={disabled}\n value={value}\n aria-invalid={isError || undefined}\n aria-describedby={describedBy}\n data-slot=\"input-field-input\"\n className=\"h-full border-0 bg-transparent px-0 shadow-none ring-0 ring-offset-0 focus-visible:ring-0 focus-visible:ring-offset-0\"\n {...props}\n />\n\n {clearable && value && !disabled && (\n <button\n type=\"button\"\n onClick={onClear}\n data-slot=\"input-field-clear\"\n className=\"inline-flex shrink-0 text-muted-foreground hover:text-foreground [&_svg]:h-4 [&_svg]:w-4\"\n aria-label=\"Clear input\"\n >\n <X />\n </button>\n )}\n\n {showChevron && (\n <span\n data-slot=\"input-field-chevron\"\n className=\"inline-flex shrink-0 text-muted-foreground [&_svg]:h-4 [&_svg]:w-4\"\n >\n <ChevronDown />\n </span>\n )}\n\n {showCalendar && (\n <span\n data-slot=\"input-field-calendar\"\n className=\"inline-flex shrink-0 text-muted-foreground [&_svg]:h-4 [&_svg]:w-4\"\n >\n <CalendarIcon />\n </span>\n )}\n </div>\n )\n\n if (!label && !helpText && !errorMessage) {\n return inputWrapper\n }\n\n return (\n <div data-slot=\"input-field\" className=\"flex flex-col gap-1\">\n {labelElement}\n {inputWrapper}\n {helpElement}\n {errorElement}\n </div>\n )\n}\n\nexport { InputField }\nexport type { InputFieldProps, InputType }\n","import * as React from \"react\"\nimport { Search, X, Loader2 } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Input } from \"./input\"\n\nfunction SearchInput({\n className,\n inputSize = \"sm\",\n clearable = true,\n onClear,\n loading = false,\n disabled,\n value,\n defaultValue,\n onChange,\n placeholder = \"Type to Search...\",\n ...props\n}: Omit<React.ComponentProps<\"input\">, \"size\" | \"type\"> & {\n inputSize?: \"sm\" | \"default\"\n clearable?: boolean\n onClear?: () => void\n loading?: boolean\n}) {\n const [internalValue, setInternalValue] = React.useState(\n defaultValue ?? \"\"\n )\n\n const isControlled = value !== undefined\n const currentValue = isControlled ? value : internalValue\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (!isControlled) {\n setInternalValue(e.target.value)\n }\n onChange?.(e)\n }\n\n const handleClear = () => {\n if (!isControlled) {\n setInternalValue(\"\")\n }\n onClear?.()\n }\n\n const hasValue = String(currentValue).length > 0\n const showClear = clearable && hasValue && !disabled && !loading\n const showLoader = loading && !disabled\n\n return (\n <div\n data-slot=\"search-input\"\n className={cn(\n \"flex items-center gap-2 rounded-full border border-input bg-background px-3\",\n \"transition-colors\",\n inputSize === \"sm\" && \"h-8\",\n inputSize === \"default\" && \"h-10\",\n disabled && \"cursor-not-allowed bg-secondary opacity-60\",\n className\n )}\n >\n <span\n className={cn(\n \"inline-flex shrink-0 [&_svg]:h-[18px] [&_svg]:w-[18px]\",\n disabled ? \"text-muted-foreground/50\" : \"text-muted-foreground\"\n )}\n >\n <Search />\n </span>\n\n <Input\n type=\"search\"\n disabled={disabled}\n value={currentValue}\n onChange={handleChange}\n placeholder={placeholder}\n className={cn(\n \"h-full border-0 bg-transparent px-0 text-[18px] leading-7 shadow-none ring-0 ring-offset-0\",\n \"focus-visible:ring-0 focus-visible:ring-offset-0\",\n \"placeholder:text-muted-foreground\",\n \"text-foreground\",\n \"[&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden\"\n )}\n {...props}\n />\n\n {showLoader && (\n <span className=\"inline-flex shrink-0 animate-spin text-muted-foreground [&_svg]:h-4 [&_svg]:w-4\">\n <Loader2 />\n </span>\n )}\n\n {showClear && (\n <button\n type=\"button\"\n onClick={handleClear}\n disabled={disabled}\n className={cn(\n \"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full\",\n \"bg-foreground/5 text-muted-foreground transition-colors hover:bg-foreground/10 hover:text-foreground\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n )}\n aria-label=\"Clear search\"\n >\n <X className=\"h-3.5 w-3.5\" />\n </button>\n )}\n </div>\n )\n}\n\nexport { SearchInput }\n","import * as React from \"react\"\nimport { Check } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype StepStatus = \"completed\" | \"active\" | \"upcoming\" | \"inactive\"\n\ntype StepperContextValue = {\n activeStep: number\n orientation: \"horizontal\" | \"vertical\"\n totalSteps: number\n}\n\nconst StepperContext = React.createContext<StepperContextValue>({\n activeStep: 0,\n orientation: \"horizontal\",\n totalSteps: 0,\n})\n\nfunction useStepperContext() {\n return React.useContext(StepperContext)\n}\n\nfunction getStepStatus(index: number, activeStep: number): StepStatus {\n if (index < activeStep) return \"completed\"\n if (index === activeStep) return \"active\"\n return \"inactive\"\n}\n\nfunction StepIndicator({ status }: { status: StepStatus }) {\n return (\n <div\n data-slot=\"stepper-indicator\"\n className={cn(\n \"relative flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 transition-colors duration-300\",\n status === \"completed\" &&\n \"border-primary bg-primary text-primary-foreground\",\n status === \"active\" && \"border-primary bg-background\",\n status === \"inactive\" && \"border-muted bg-background\"\n )}\n >\n {status === \"completed\" && <Check className=\"h-4 w-4\" />}\n {status === \"active\" && (\n <div\n data-slot=\"stepper-dot\"\n className=\"h-2.5 w-2.5 rounded-full bg-primary\"\n />\n )}\n {status === \"inactive\" && (\n <div\n data-slot=\"stepper-dot\"\n className=\"h-2.5 w-2.5 rounded-full bg-muted\"\n />\n )}\n </div>\n )\n}\n\nfunction StepperSeparator({\n completed,\n orientation,\n}: {\n completed: boolean\n orientation: \"horizontal\" | \"vertical\"\n}) {\n return (\n <div\n data-slot=\"stepper-separator\"\n className={cn(\n \"transition-colors duration-300\",\n orientation === \"horizontal\"\n ? \"h-0.5 flex-1\"\n : \"h-20 w-0.5\",\n completed ? \"bg-primary\" : \"bg-surface-inset\"\n )}\n />\n )\n}\n\ntype StepperItemProps = {\n className?: string\n label?: string\n description?: string\n children?: React.ReactNode\n}\n\nfunction StepperItem({\n className,\n label,\n description,\n children,\n}: StepperItemProps) {\n return (\n <div data-slot=\"stepper-item\" className={className}>\n {children ?? (\n <>\n {label && (\n <span\n data-slot=\"stepper-item-label\"\n className=\"text-sm font-medium leading-5\"\n >\n {label}\n </span>\n )}\n {description && (\n <span\n data-slot=\"stepper-item-description\"\n className=\"text-xs text-muted-foreground\"\n >\n {description}\n </span>\n )}\n </>\n )}\n </div>\n )\n}\n\ntype StepperProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n activeStep?: number\n orientation?: \"horizontal\" | \"vertical\"\n children?: React.ReactNode\n steps?: Array<{ label: string; description?: string }>\n}\n\nfunction Stepper({\n className,\n activeStep = 0,\n orientation = \"horizontal\",\n steps,\n children,\n ...props\n}: StepperProps) {\n const items = steps\n ? steps.map((s, i) => (\n <StepperItem key={i} label={s.label} description={s.description} />\n ))\n : React.Children.toArray(children)\n\n const totalSteps = items.length\n\n const contextValue: StepperContextValue = {\n activeStep,\n orientation,\n totalSteps,\n }\n\n const hasLabels = items.some(\n (child) =>\n React.isValidElement<StepperItemProps>(child) && child.props.label\n )\n\n if (orientation === \"horizontal\") {\n return (\n <StepperContext.Provider value={contextValue}>\n <div\n data-slot=\"stepper\"\n className={cn(\"flex flex-col gap-2\", className)}\n {...props}\n >\n {/* Row 1: indicators + separators */}\n <div className=\"flex flex-row items-center\">\n {items.map((_, index) => {\n const status = getStepStatus(index, activeStep)\n const isLast = index === totalSteps - 1\n return (\n <React.Fragment key={index}>\n <StepIndicator status={status} />\n {!isLast && (\n <StepperSeparator\n completed={index < activeStep}\n orientation=\"horizontal\"\n />\n )}\n </React.Fragment>\n )\n })}\n </div>\n {/* Row 2: labels (only if any step has a label) */}\n {hasLabels && (\n <div className=\"flex flex-row\">\n {items.map((child, index) => {\n const status = getStepStatus(index, activeStep)\n const isLast = index === totalSteps - 1\n return (\n <React.Fragment key={index}>\n <div\n data-slot=\"stepper-step-content\"\n className=\"flex flex-col items-center text-center\"\n style={{ width: 32 }}\n >\n {React.isValidElement<StepperItemProps>(child) && (\n <>\n {child.props.label && (\n <span\n data-slot=\"stepper-label\"\n className={cn(\n \"whitespace-nowrap text-sm leading-5\",\n status === \"active\"\n ? \"font-semibold text-foreground\"\n : status === \"completed\"\n ? \"font-normal text-foreground\"\n : \"font-normal text-info\"\n )}\n >\n {child.props.label}\n </span>\n )}\n {child.props.description && (\n <span\n data-slot=\"stepper-description\"\n className=\"whitespace-nowrap text-xs text-muted-foreground\"\n >\n {child.props.description}\n </span>\n )}\n </>\n )}\n </div>\n {!isLast && <div className=\"flex-1\" />}\n </React.Fragment>\n )\n })}\n </div>\n )}\n </div>\n </StepperContext.Provider>\n )\n }\n\n return (\n <StepperContext.Provider value={contextValue}>\n <div\n data-slot=\"stepper\"\n className={cn(\"flex flex-col items-start\", className)}\n {...props}\n >\n {items.map((child, index) => {\n const status = getStepStatus(index, activeStep)\n const isLast = index === totalSteps - 1\n return (\n <React.Fragment key={index}>\n <div\n data-slot=\"stepper-step\"\n className=\"flex flex-row items-start gap-4\"\n >\n <div\n data-slot=\"stepper-step-indicator-group\"\n className=\"flex flex-col items-center\"\n >\n <StepIndicator status={status} />\n {!isLast && (\n <StepperSeparator\n completed={index < activeStep}\n orientation=\"vertical\"\n />\n )}\n </div>\n {React.isValidElement<StepperItemProps>(child) && (\n <div\n data-slot=\"stepper-step-content\"\n className=\"flex flex-col pb-8\"\n >\n {child.props.label && (\n <span\n data-slot=\"stepper-label\"\n className={cn(\n \"text-sm leading-8\",\n status === \"active\"\n ? \"font-semibold text-foreground\"\n : status === \"completed\"\n ? \"font-normal text-foreground\"\n : \"font-normal text-muted-foreground\"\n )}\n >\n {child.props.label}\n </span>\n )}\n {child.props.description && (\n <span\n data-slot=\"stepper-description\"\n className=\"text-xs text-muted-foreground\"\n >\n {child.props.description}\n </span>\n )}\n </div>\n )}\n </div>\n </React.Fragment>\n )\n })}\n </div>\n </StepperContext.Provider>\n )\n}\n\nexport { Stepper, StepperItem, useStepperContext }\nexport type { StepperProps, StepperItemProps, StepStatus }\n","import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Card({\n className,\n variant = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & {\n variant?: \"default\" | \"outlined\" | \"elevated\"\n}) {\n return (\n <div\n data-slot=\"card\"\n className={cn(\n \"flex flex-col gap-4 rounded-lg bg-card px-6 py-5 text-card-foreground\",\n variant === \"outlined\" && \"border border-border\",\n variant === \"elevated\" &&\n \"shadow-[0px_4px_12px_0px_rgba(0,0,0,0.08)]\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\"flex flex-col gap-4\", className)}\n {...props}\n />\n )\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn(\"text-h4\", className)}\n {...props}\n />\n )\n}\n\nfunction CardDescription({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"card-content\" className={cn(className)} {...props} />\n )\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\"flex items-center justify-end gap-3\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Card,\n CardHeader,\n CardTitle,\n CardDescription,\n CardContent,\n CardFooter,\n}\n","import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Table({ className, ...props }: React.ComponentProps<\"table\">) {\n return (\n <div data-slot=\"table-wrapper\" className=\"relative w-full overflow-auto\">\n <table\n data-slot=\"table\"\n className={cn(\n \"w-full caption-bottom border-collapse text-sm\",\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nfunction TableHeader({\n className,\n ...props\n}: React.ComponentProps<\"thead\">) {\n return (\n <thead\n data-slot=\"table-header\"\n className={cn(\"[&_tr]:border-b\", className)}\n {...props}\n />\n )\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<\"tbody\">) {\n return (\n <tbody\n data-slot=\"table-body\"\n className={cn(\"[&_tr:last-child]:border-0\", className)}\n {...props}\n />\n )\n}\n\nfunction TableFooter({\n className,\n ...props\n}: React.ComponentProps<\"tfoot\">) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn(\n \"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<\"tr\">) {\n return (\n <tr\n data-slot=\"table-row\"\n className={cn(\n \"border-b border-border transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<\"th\">) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n \"h-11 bg-muted px-2 text-left align-middle text-sm font-medium text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<\"td\">) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n \"h-11 px-2 align-middle text-sm text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableCaption({\n className,\n ...props\n}: React.ComponentProps<\"caption\">) {\n return (\n <caption\n data-slot=\"table-caption\"\n className={cn(\"mt-4 text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableRow,\n TableHead,\n TableCell,\n TableCaption,\n}\n","import * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return (\n <DialogPrimitive.Trigger\n data-slot=\"dialog-trigger\"\n className={className}\n {...props}\n />\n )\n}\n\nfunction DialogClose({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className={className}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content>) {\n return (\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"fixed inset-0 z-50 bg-black/80\",\n \"data-[state=open]:animate-in data-[state=open]:fade-in-0\",\n \"data-[state=closed]:animate-out data-[state=closed]:fade-out-0\"\n )}\n />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n \"fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-border bg-background p-6 shadow-lg duration-200\",\n \"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]\",\n \"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]\",\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close\n data-slot=\"dialog-close-button\"\n className=\"absolute top-4 right-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\"\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\n \"flex flex-col gap-2 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogTitle,\n DialogDescription,\n DialogFooter,\n DialogClose,\n}\n","// packages/react/use-escape-keydown/src/use-escape-keydown.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n const firstChar = placement[0];\n return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');\n}\nconst lrPlacement = ['left', 'right'];\nconst rlPlacement = ['right', 'left'];\nconst tbPlacement = ['top', 'bottom'];\nconst btPlacement = ['bottom', 'top'];\nfunction getSideList(side, isStart, rtl) {\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rlPlacement : lrPlacement;\n return isStart ? lrPlacement : rlPlacement;\n case 'left':\n case 'right':\n return isStart ? tbPlacement : btPlacement;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n const side = getSide(placement);\n return oppositeSideMap[side] + placement.slice(side.length);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n// Maximum number of resets that can occur before bailing to avoid infinite reset loops.\nconst MAX_RESET_COUNT = 50;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const platformWithDetectOverflow = platform.detectOverflow ? platform : {\n ...platform,\n detectOverflow\n };\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let resetCount = 0;\n const middlewareData = {};\n for (let i = 0; i < middleware.length; i++) {\n const currentMiddleware = middleware[i];\n if (!currentMiddleware) {\n continue;\n }\n const {\n name,\n fn\n } = currentMiddleware;\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform: platformWithDetectOverflow,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData[name] = {\n ...middlewareData[name],\n ...data\n };\n if (reset && resetCount < MAX_RESET_COUNT) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;\n if (!ignoreCrossAxisOverflow ||\n // We leave the current main axis only if every placement on that axis\n // overflows the main axis.\n overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects,\n platform\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await platform.detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await platform.detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\nconst originSides = /*#__PURE__*/new Set(['left', 'top']);\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = originSides.has(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n platform\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: {\n [mainAxis]: checkMainAxis,\n [crossAxis]: checkCrossAxis\n }\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = originSides.has(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n var _state$middlewareData, _state$middlewareData2;\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';\n}\nfunction isTableElement(element) {\n return /^(table|td|th)$/.test(getNodeName(element));\n}\nfunction isTopLayer(element) {\n try {\n if (element.matches(':popover-open')) {\n return true;\n }\n } catch (_e) {\n // no-op\n }\n try {\n return element.matches(':modal');\n } catch (_e) {\n return false;\n }\n}\nconst willChangeRe = /transform|translate|scale|rotate|perspective|filter/;\nconst containRe = /paint|layout|strict|content/;\nconst isNotNone = value => !!value && value !== 'none';\nlet isWebKitValue;\nfunction isContainingBlock(elementOrCss) {\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (isWebKitValue == null) {\n isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');\n }\n return isWebKitValue;\n}\nfunction isLastTraversableNode(node) {\n return /^(html|body|#document)$/.test(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n } else {\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n }\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle as getComputedStyle$1, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle$1(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle$1(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n const leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll) {\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x,\n y\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle$1(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Safety check: ensure the scrollbar space is reasonable in case this\n// calculation is affected by unusual styles.\n// Most scrollbars leave 15-18px of space.\nconst SCROLLBAR_MAX = 25;\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n const windowScrollbarX = getWindowScrollBarX(html);\n // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the\n // visual width of the <html> but this is not considered in the size\n // of `html.clientWidth`.\n if (windowScrollbarX <= 0) {\n const doc = html.ownerDocument;\n const body = doc.body;\n const bodyStyles = getComputedStyle(body);\n const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;\n const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);\n if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {\n width -= clippingStableScrollbarWidth;\n }\n } else if (windowScrollbarX <= SCROLLBAR_MAX) {\n // If the <body> scrollbar is on the left, the width needs to be extended\n // by the scrollbar amount so there isn't extra space on the right.\n width += windowScrollbarX;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle$1(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle$1(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === 'absolute' || currentContainingBlockComputedStyle.position === 'fixed') || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);\n let top = firstRect.top;\n let right = firstRect.right;\n let bottom = firstRect.bottom;\n let left = firstRect.left;\n for (let i = 1; i < clippingAncestors.length; i++) {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);\n top = max(rect.top, top);\n right = min(rect.right, right);\n bottom = min(rect.bottom, bottom);\n left = max(rect.left, left);\n }\n return {\n width: right - left,\n height: bottom - top,\n x: left,\n y: top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n\n // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n function setLeftRTLScrollbarOffset() {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n setLeftRTLScrollbarOffset();\n }\n }\n if (isFixed && !isOffsetParentAnElement && documentElement) {\n setLeftRTLScrollbarOffset();\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle$1(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n let rawOffsetParent = element.offsetParent;\n\n // Firefox returns the <html> element as the offsetParent if it's non-static,\n // while Chrome and Safari return the <body> element. The <body> element must\n // be used to perform the correct calculations even if the <html> element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle$1(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\nfunction rectsAreEqual(a, b) {\n return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const elementRectForRootMargin = element.getBoundingClientRect();\n const {\n left,\n top,\n width,\n height\n } = elementRectForRootMargin;\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped, the ratio is 0. Throttle the refresh\n // to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n // It's possible that even though the ratio is reported as 1, the\n // element is not actually fully within the IntersectionObserver's root\n // area anymore. This can happen under performance constraints. This may\n // be a bug in the browser's IntersectionObserver implementation. To\n // work around this, we compare the element's bounding rect now with\n // what it was at the time we created the IntersectionObserver. If they\n // are not equal then the element moved, so we refresh.\n refresh();\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (_e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n if (floating) {\n resizeObserver.observe(floating);\n }\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n","import { computePosition, arrow as arrow$2, autoPlacement as autoPlacement$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1 } from '@floating-ui/dom';\nexport { autoUpdate, computePosition, detectOverflow, getOverflowAncestors, platform } from '@floating-ui/dom';\nimport * as React from 'react';\nimport { useLayoutEffect } from 'react';\nimport * as ReactDOM from 'react-dom';\n\nvar isClient = typeof document !== 'undefined';\n\nvar noop = function noop() {};\nvar index = isClient ? useLayoutEffect : noop;\n\n// Fork of `fast-deep-equal` that only does the comparisons we need and compares\n// functions\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (typeof a === 'function' && a.toString() === b.toString()) {\n return true;\n }\n let length;\n let i;\n let keys;\n if (a && b && typeof a === 'object') {\n if (Array.isArray(a)) {\n length = a.length;\n if (length !== b.length) return false;\n for (i = length; i-- !== 0;) {\n if (!deepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) {\n return false;\n }\n for (i = length; i-- !== 0;) {\n if (!{}.hasOwnProperty.call(b, keys[i])) {\n return false;\n }\n }\n for (i = length; i-- !== 0;) {\n const key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n continue;\n }\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n return a !== a && b !== b;\n}\n\nfunction getDPR(element) {\n if (typeof window === 'undefined') {\n return 1;\n }\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\n\nfunction useLatestRef(value) {\n const ref = React.useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/**\n * Provides data to position a floating element.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform,\n elements: {\n reference: externalReference,\n floating: externalFloating\n } = {},\n transform = true,\n whileElementsMounted,\n open\n } = options;\n const [data, setData] = React.useState({\n x: 0,\n y: 0,\n strategy,\n placement,\n middlewareData: {},\n isPositioned: false\n });\n const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);\n if (!deepEqual(latestMiddleware, middleware)) {\n setLatestMiddleware(middleware);\n }\n const [_reference, _setReference] = React.useState(null);\n const [_floating, _setFloating] = React.useState(null);\n const setReference = React.useCallback(node => {\n if (node !== referenceRef.current) {\n referenceRef.current = node;\n _setReference(node);\n }\n }, []);\n const setFloating = React.useCallback(node => {\n if (node !== floatingRef.current) {\n floatingRef.current = node;\n _setFloating(node);\n }\n }, []);\n const referenceEl = externalReference || _reference;\n const floatingEl = externalFloating || _floating;\n const referenceRef = React.useRef(null);\n const floatingRef = React.useRef(null);\n const dataRef = React.useRef(data);\n const hasWhileElementsMounted = whileElementsMounted != null;\n const whileElementsMountedRef = useLatestRef(whileElementsMounted);\n const platformRef = useLatestRef(platform);\n const openRef = useLatestRef(open);\n const update = React.useCallback(() => {\n if (!referenceRef.current || !floatingRef.current) {\n return;\n }\n const config = {\n placement,\n strategy,\n middleware: latestMiddleware\n };\n if (platformRef.current) {\n config.platform = platformRef.current;\n }\n computePosition(referenceRef.current, floatingRef.current, config).then(data => {\n const fullData = {\n ...data,\n // The floating element's position may be recomputed while it's closed\n // but still mounted (such as when transitioning out). To ensure\n // `isPositioned` will be `false` initially on the next open, avoid\n // setting it to `true` when `open === false` (must be specified).\n isPositioned: openRef.current !== false\n };\n if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {\n dataRef.current = fullData;\n ReactDOM.flushSync(() => {\n setData(fullData);\n });\n }\n });\n }, [latestMiddleware, placement, strategy, platformRef, openRef]);\n index(() => {\n if (open === false && dataRef.current.isPositioned) {\n dataRef.current.isPositioned = false;\n setData(data => ({\n ...data,\n isPositioned: false\n }));\n }\n }, [open]);\n const isMountedRef = React.useRef(false);\n index(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n index(() => {\n if (referenceEl) referenceRef.current = referenceEl;\n if (floatingEl) floatingRef.current = floatingEl;\n if (referenceEl && floatingEl) {\n if (whileElementsMountedRef.current) {\n return whileElementsMountedRef.current(referenceEl, floatingEl, update);\n }\n update();\n }\n }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);\n const refs = React.useMemo(() => ({\n reference: referenceRef,\n floating: floatingRef,\n setReference,\n setFloating\n }), [setReference, setFloating]);\n const elements = React.useMemo(() => ({\n reference: referenceEl,\n floating: floatingEl\n }), [referenceEl, floatingEl]);\n const floatingStyles = React.useMemo(() => {\n const initialStyles = {\n position: strategy,\n left: 0,\n top: 0\n };\n if (!elements.floating) {\n return initialStyles;\n }\n const x = roundByDPR(elements.floating, data.x);\n const y = roundByDPR(elements.floating, data.y);\n if (transform) {\n return {\n ...initialStyles,\n transform: \"translate(\" + x + \"px, \" + y + \"px)\",\n ...(getDPR(elements.floating) >= 1.5 && {\n willChange: 'transform'\n })\n };\n }\n return {\n position: strategy,\n left: x,\n top: y\n };\n }, [strategy, transform, elements.floating, data.x, data.y]);\n return React.useMemo(() => ({\n ...data,\n update,\n refs,\n elements,\n floatingStyles\n }), [data, update, refs, elements, floatingStyles]);\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow$1 = options => {\n function isRef(value) {\n return {}.hasOwnProperty.call(value, 'current');\n }\n return {\n name: 'arrow',\n options,\n fn(state) {\n const {\n element,\n padding\n } = typeof options === 'function' ? options(state) : options;\n if (element && isRef(element)) {\n if (element.current != null) {\n return arrow$2({\n element: element.current,\n padding\n }).fn(state);\n }\n return {};\n }\n if (element) {\n return arrow$2({\n element,\n padding\n }).fn(state);\n }\n return {};\n }\n };\n};\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = (options, deps) => {\n const result = offset$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = (options, deps) => {\n const result = shift$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = (options, deps) => {\n const result = limitShift$1(options);\n return {\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = (options, deps) => {\n const result = flip$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = (options, deps) => {\n const result = size$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = (options, deps) => {\n const result = autoPlacement$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = (options, deps) => {\n const result = hide$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = (options, deps) => {\n const result = inline$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = (options, deps) => {\n const result = arrow$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\nexport { arrow, autoPlacement, flip, hide, inline, limitShift, offset, shift, size, useFloating };\n","// src/arrow.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Arrow\";\nvar Arrow = React.forwardRef((props, forwardedRef) => {\n const { children, width = 10, height = 5, ...arrowProps } = props;\n return /* @__PURE__ */ jsx(\n Primitive.svg,\n {\n ...arrowProps,\n ref: forwardedRef,\n width,\n height,\n viewBox: \"0 0 30 10\",\n preserveAspectRatio: \"none\",\n children: props.asChild ? children : /* @__PURE__ */ jsx(\"polygon\", { points: \"0,0 30,0 15,10\" })\n }\n );\n});\nArrow.displayName = NAME;\nvar Root = Arrow;\nexport {\n Arrow,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/popper.tsx\nimport * as React from \"react\";\nimport {\n useFloating,\n autoUpdate,\n offset,\n shift,\n limitShift,\n hide,\n arrow as floatingUIarrow,\n flip,\n size\n} from \"@floating-ui/react-dom\";\nimport * as ArrowPrimitive from \"@radix-ui/react-arrow\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SIDE_OPTIONS = [\"top\", \"right\", \"bottom\", \"left\"];\nvar ALIGN_OPTIONS = [\"start\", \"center\", \"end\"];\nvar POPPER_NAME = \"Popper\";\nvar [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);\nvar [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);\nvar Popper = (props) => {\n const { __scopePopper, children } = props;\n const [anchor, setAnchor] = React.useState(null);\n return /* @__PURE__ */ jsx(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });\n};\nPopper.displayName = POPPER_NAME;\nvar ANCHOR_NAME = \"PopperAnchor\";\nvar PopperAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopper, virtualRef, ...anchorProps } = props;\n const context = usePopperContext(ANCHOR_NAME, __scopePopper);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const anchorRef = React.useRef(null);\n React.useEffect(() => {\n const previousAnchor = anchorRef.current;\n anchorRef.current = virtualRef?.current || ref.current;\n if (previousAnchor !== anchorRef.current) {\n context.onAnchorChange(anchorRef.current);\n }\n });\n return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });\n }\n);\nPopperAnchor.displayName = ANCHOR_NAME;\nvar CONTENT_NAME = \"PopperContent\";\nvar [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);\nvar PopperContent = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopper,\n side = \"bottom\",\n sideOffset = 0,\n align = \"center\",\n alignOffset = 0,\n arrowPadding = 0,\n avoidCollisions = true,\n collisionBoundary = [],\n collisionPadding: collisionPaddingProp = 0,\n sticky = \"partial\",\n hideWhenDetached = false,\n updatePositionStrategy = \"optimized\",\n onPlaced,\n ...contentProps\n } = props;\n const context = usePopperContext(CONTENT_NAME, __scopePopper);\n const [content, setContent] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n const [arrow, setArrow] = React.useState(null);\n const arrowSize = useSize(arrow);\n const arrowWidth = arrowSize?.width ?? 0;\n const arrowHeight = arrowSize?.height ?? 0;\n const desiredPlacement = side + (align !== \"center\" ? \"-\" + align : \"\");\n const collisionPadding = typeof collisionPaddingProp === \"number\" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };\n const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];\n const hasExplicitBoundaries = boundary.length > 0;\n const detectOverflowOptions = {\n padding: collisionPadding,\n boundary: boundary.filter(isNotNull),\n // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n altBoundary: hasExplicitBoundaries\n };\n const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({\n // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues\n strategy: \"fixed\",\n placement: desiredPlacement,\n whileElementsMounted: (...args) => {\n const cleanup = autoUpdate(...args, {\n animationFrame: updatePositionStrategy === \"always\"\n });\n return cleanup;\n },\n elements: {\n reference: context.anchor\n },\n middleware: [\n offset({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),\n avoidCollisions && shift({\n mainAxis: true,\n crossAxis: false,\n limiter: sticky === \"partial\" ? limitShift() : void 0,\n ...detectOverflowOptions\n }),\n avoidCollisions && flip({ ...detectOverflowOptions }),\n size({\n ...detectOverflowOptions,\n apply: ({ elements, rects, availableWidth, availableHeight }) => {\n const { width: anchorWidth, height: anchorHeight } = rects.reference;\n const contentStyle = elements.floating.style;\n contentStyle.setProperty(\"--radix-popper-available-width\", `${availableWidth}px`);\n contentStyle.setProperty(\"--radix-popper-available-height\", `${availableHeight}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-width\", `${anchorWidth}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-height\", `${anchorHeight}px`);\n }\n }),\n arrow && floatingUIarrow({ element: arrow, padding: arrowPadding }),\n transformOrigin({ arrowWidth, arrowHeight }),\n hideWhenDetached && hide({ strategy: \"referenceHidden\", ...detectOverflowOptions })\n ]\n });\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const handlePlaced = useCallbackRef(onPlaced);\n useLayoutEffect(() => {\n if (isPositioned) {\n handlePlaced?.();\n }\n }, [isPositioned, handlePlaced]);\n const arrowX = middlewareData.arrow?.x;\n const arrowY = middlewareData.arrow?.y;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const [contentZIndex, setContentZIndex] = React.useState();\n useLayoutEffect(() => {\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [content]);\n return /* @__PURE__ */ jsx(\n \"div\",\n {\n ref: refs.setFloating,\n \"data-radix-popper-content-wrapper\": \"\",\n style: {\n ...floatingStyles,\n transform: isPositioned ? floatingStyles.transform : \"translate(0, -200%)\",\n // keep off the page when measuring\n minWidth: \"max-content\",\n zIndex: contentZIndex,\n [\"--radix-popper-transform-origin\"]: [\n middlewareData.transformOrigin?.x,\n middlewareData.transformOrigin?.y\n ].join(\" \"),\n // hide the content if using the hide middleware and should be hidden\n // set visibility to hidden and disable pointer events so the UI behaves\n // as if the PopperContent isn't there at all\n ...middlewareData.hide?.referenceHidden && {\n visibility: \"hidden\",\n pointerEvents: \"none\"\n }\n },\n dir: props.dir,\n children: /* @__PURE__ */ jsx(\n PopperContentProvider,\n {\n scope: __scopePopper,\n placedSide,\n onArrowChange: setArrow,\n arrowX,\n arrowY,\n shouldHideArrow: cannotCenterArrow,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-side\": placedSide,\n \"data-align\": placedAlign,\n ...contentProps,\n ref: composedRefs,\n style: {\n ...contentProps.style,\n // if the PopperContent hasn't been placed yet (not all measurements done)\n // we prevent animations so that users's animation don't kick in too early referring wrong sides\n animation: !isPositioned ? \"none\" : void 0\n }\n }\n )\n }\n )\n }\n );\n }\n);\nPopperContent.displayName = CONTENT_NAME;\nvar ARROW_NAME = \"PopperArrow\";\nvar OPPOSITE_SIDE = {\n top: \"bottom\",\n right: \"left\",\n bottom: \"top\",\n left: \"right\"\n};\nvar PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {\n const { __scopePopper, ...arrowProps } = props;\n const contentContext = useContentContext(ARROW_NAME, __scopePopper);\n const baseSide = OPPOSITE_SIDE[contentContext.placedSide];\n return (\n // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)\n // doesn't report size as we'd expect on SVG elements.\n // it reports their bounding box which is effectively the largest path inside the SVG.\n /* @__PURE__ */ jsx(\n \"span\",\n {\n ref: contentContext.onArrowChange,\n style: {\n position: \"absolute\",\n left: contentContext.arrowX,\n top: contentContext.arrowY,\n [baseSide]: 0,\n transformOrigin: {\n top: \"\",\n right: \"0 0\",\n bottom: \"center 0\",\n left: \"100% 0\"\n }[contentContext.placedSide],\n transform: {\n top: \"translateY(100%)\",\n right: \"translateY(50%) rotate(90deg) translateX(-50%)\",\n bottom: `rotate(180deg)`,\n left: \"translateY(50%) rotate(-90deg) translateX(50%)\"\n }[contentContext.placedSide],\n visibility: contentContext.shouldHideArrow ? \"hidden\" : void 0\n },\n children: /* @__PURE__ */ jsx(\n ArrowPrimitive.Root,\n {\n ...arrowProps,\n ref: forwardedRef,\n style: {\n ...arrowProps.style,\n // ensures the element can be measured correctly (mostly for if SVG)\n display: \"block\"\n }\n }\n )\n }\n )\n );\n});\nPopperArrow.displayName = ARROW_NAME;\nfunction isNotNull(value) {\n return value !== null;\n}\nvar transformOrigin = (options) => ({\n name: \"transformOrigin\",\n options,\n fn(data) {\n const { placement, rects, middlewareData } = data;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const isArrowHidden = cannotCenterArrow;\n const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const noArrowAlign = { start: \"0%\", center: \"50%\", end: \"100%\" }[placedAlign];\n const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;\n const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;\n let x = \"\";\n let y = \"\";\n if (placedSide === \"bottom\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${-arrowHeight}px`;\n } else if (placedSide === \"top\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${rects.floating.height + arrowHeight}px`;\n } else if (placedSide === \"right\") {\n x = `${-arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n } else if (placedSide === \"left\") {\n x = `${rects.floating.width + arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n return { data: { x, y } };\n }\n});\nfunction getSideAndAlignFromPlacement(placement) {\n const [side, align = \"center\"] = placement.split(\"-\");\n return [side, align];\n}\nvar Root2 = Popper;\nvar Anchor = PopperAnchor;\nvar Content = PopperContent;\nvar Arrow = PopperArrow;\nexport {\n ALIGN_OPTIONS,\n Anchor,\n Arrow,\n Content,\n Popper,\n PopperAnchor,\n PopperArrow,\n PopperContent,\n Root2 as Root,\n SIDE_OPTIONS,\n createPopperScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","// src/visually-hidden.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar VISUALLY_HIDDEN_STYLES = Object.freeze({\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: \"absolute\",\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n whiteSpace: \"nowrap\",\n wordWrap: \"normal\"\n});\nvar NAME = \"VisuallyHidden\";\nvar VisuallyHidden = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...props,\n ref: forwardedRef,\n style: { ...VISUALLY_HIDDEN_STYLES, ...props.style }\n }\n );\n }\n);\nVisuallyHidden.displayName = NAME;\nvar Root = VisuallyHidden;\nexport {\n Root,\n VISUALLY_HIDDEN_STYLES,\n VisuallyHidden\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/tooltip.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlottable } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport * as VisuallyHiddenPrimitive from \"@radix-ui/react-visually-hidden\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar [createTooltipContext, createTooltipScope] = createContextScope(\"Tooltip\", [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar PROVIDER_NAME = \"TooltipProvider\";\nvar DEFAULT_DELAY_DURATION = 700;\nvar TOOLTIP_OPEN = \"tooltip.open\";\nvar [TooltipProviderContextProvider, useTooltipProviderContext] = createTooltipContext(PROVIDER_NAME);\nvar TooltipProvider = (props) => {\n const {\n __scopeTooltip,\n delayDuration = DEFAULT_DELAY_DURATION,\n skipDelayDuration = 300,\n disableHoverableContent = false,\n children\n } = props;\n const isOpenDelayedRef = React.useRef(true);\n const isPointerInTransitRef = React.useRef(false);\n const skipDelayTimerRef = React.useRef(0);\n React.useEffect(() => {\n const skipDelayTimer = skipDelayTimerRef.current;\n return () => window.clearTimeout(skipDelayTimer);\n }, []);\n return /* @__PURE__ */ jsx(\n TooltipProviderContextProvider,\n {\n scope: __scopeTooltip,\n isOpenDelayedRef,\n delayDuration,\n onOpen: React.useCallback(() => {\n window.clearTimeout(skipDelayTimerRef.current);\n isOpenDelayedRef.current = false;\n }, []),\n onClose: React.useCallback(() => {\n window.clearTimeout(skipDelayTimerRef.current);\n skipDelayTimerRef.current = window.setTimeout(\n () => isOpenDelayedRef.current = true,\n skipDelayDuration\n );\n }, [skipDelayDuration]),\n isPointerInTransitRef,\n onPointerInTransitChange: React.useCallback((inTransit) => {\n isPointerInTransitRef.current = inTransit;\n }, []),\n disableHoverableContent,\n children\n }\n );\n};\nTooltipProvider.displayName = PROVIDER_NAME;\nvar TOOLTIP_NAME = \"Tooltip\";\nvar [TooltipContextProvider, useTooltipContext] = createTooltipContext(TOOLTIP_NAME);\nvar Tooltip = (props) => {\n const {\n __scopeTooltip,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n disableHoverableContent: disableHoverableContentProp,\n delayDuration: delayDurationProp\n } = props;\n const providerContext = useTooltipProviderContext(TOOLTIP_NAME, props.__scopeTooltip);\n const popperScope = usePopperScope(__scopeTooltip);\n const [trigger, setTrigger] = React.useState(null);\n const contentId = useId();\n const openTimerRef = React.useRef(0);\n const disableHoverableContent = disableHoverableContentProp ?? providerContext.disableHoverableContent;\n const delayDuration = delayDurationProp ?? providerContext.delayDuration;\n const wasOpenDelayedRef = React.useRef(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: (open2) => {\n if (open2) {\n providerContext.onOpen();\n document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN));\n } else {\n providerContext.onClose();\n }\n onOpenChange?.(open2);\n },\n caller: TOOLTIP_NAME\n });\n const stateAttribute = React.useMemo(() => {\n return open ? wasOpenDelayedRef.current ? \"delayed-open\" : \"instant-open\" : \"closed\";\n }, [open]);\n const handleOpen = React.useCallback(() => {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n wasOpenDelayedRef.current = false;\n setOpen(true);\n }, [setOpen]);\n const handleClose = React.useCallback(() => {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n setOpen(false);\n }, [setOpen]);\n const handleDelayedOpen = React.useCallback(() => {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = window.setTimeout(() => {\n wasOpenDelayedRef.current = true;\n setOpen(true);\n openTimerRef.current = 0;\n }, delayDuration);\n }, [delayDuration, setOpen]);\n React.useEffect(() => {\n return () => {\n if (openTimerRef.current) {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n }\n };\n }, []);\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n TooltipContextProvider,\n {\n scope: __scopeTooltip,\n contentId,\n open,\n stateAttribute,\n trigger,\n onTriggerChange: setTrigger,\n onTriggerEnter: React.useCallback(() => {\n if (providerContext.isOpenDelayedRef.current) handleDelayedOpen();\n else handleOpen();\n }, [providerContext.isOpenDelayedRef, handleDelayedOpen, handleOpen]),\n onTriggerLeave: React.useCallback(() => {\n if (disableHoverableContent) {\n handleClose();\n } else {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n }\n }, [handleClose, disableHoverableContent]),\n onOpen: handleOpen,\n onClose: handleClose,\n disableHoverableContent,\n children\n }\n ) });\n};\nTooltip.displayName = TOOLTIP_NAME;\nvar TRIGGER_NAME = \"TooltipTrigger\";\nvar TooltipTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTooltip, ...triggerProps } = props;\n const context = useTooltipContext(TRIGGER_NAME, __scopeTooltip);\n const providerContext = useTooltipProviderContext(TRIGGER_NAME, __scopeTooltip);\n const popperScope = usePopperScope(__scopeTooltip);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, context.onTriggerChange);\n const isPointerDownRef = React.useRef(false);\n const hasPointerMoveOpenedRef = React.useRef(false);\n const handlePointerUp = React.useCallback(() => isPointerDownRef.current = false, []);\n React.useEffect(() => {\n return () => document.removeEventListener(\"pointerup\", handlePointerUp);\n }, [handlePointerUp]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n \"aria-describedby\": context.open ? context.contentId : void 0,\n \"data-state\": context.stateAttribute,\n ...triggerProps,\n ref: composedRefs,\n onPointerMove: composeEventHandlers(props.onPointerMove, (event) => {\n if (event.pointerType === \"touch\") return;\n if (!hasPointerMoveOpenedRef.current && !providerContext.isPointerInTransitRef.current) {\n context.onTriggerEnter();\n hasPointerMoveOpenedRef.current = true;\n }\n }),\n onPointerLeave: composeEventHandlers(props.onPointerLeave, () => {\n context.onTriggerLeave();\n hasPointerMoveOpenedRef.current = false;\n }),\n onPointerDown: composeEventHandlers(props.onPointerDown, () => {\n if (context.open) {\n context.onClose();\n }\n isPointerDownRef.current = true;\n document.addEventListener(\"pointerup\", handlePointerUp, { once: true });\n }),\n onFocus: composeEventHandlers(props.onFocus, () => {\n if (!isPointerDownRef.current) context.onOpen();\n }),\n onBlur: composeEventHandlers(props.onBlur, context.onClose),\n onClick: composeEventHandlers(props.onClick, context.onClose)\n }\n ) });\n }\n);\nTooltipTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"TooltipPortal\";\nvar [PortalProvider, usePortalContext] = createTooltipContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar TooltipPortal = (props) => {\n const { __scopeTooltip, forceMount, children, container } = props;\n const context = useTooltipContext(PORTAL_NAME, __scopeTooltip);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nTooltipPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"TooltipContent\";\nvar TooltipContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeTooltip);\n const { forceMount = portalContext.forceMount, side = \"top\", ...contentProps } = props;\n const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.disableHoverableContent ? /* @__PURE__ */ jsx(TooltipContentImpl, { side, ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(TooltipContentHoverable, { side, ...contentProps, ref: forwardedRef }) });\n }\n);\nvar TooltipContentHoverable = React.forwardRef((props, forwardedRef) => {\n const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip);\n const providerContext = useTooltipProviderContext(CONTENT_NAME, props.__scopeTooltip);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [pointerGraceArea, setPointerGraceArea] = React.useState(null);\n const { trigger, onClose } = context;\n const content = ref.current;\n const { onPointerInTransitChange } = providerContext;\n const handleRemoveGraceArea = React.useCallback(() => {\n setPointerGraceArea(null);\n onPointerInTransitChange(false);\n }, [onPointerInTransitChange]);\n const handleCreateGraceArea = React.useCallback(\n (event, hoverTarget) => {\n const currentTarget = event.currentTarget;\n const exitPoint = { x: event.clientX, y: event.clientY };\n const exitSide = getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect());\n const paddedExitPoints = getPaddedExitPoints(exitPoint, exitSide);\n const hoverTargetPoints = getPointsFromRect(hoverTarget.getBoundingClientRect());\n const graceArea = getHull([...paddedExitPoints, ...hoverTargetPoints]);\n setPointerGraceArea(graceArea);\n onPointerInTransitChange(true);\n },\n [onPointerInTransitChange]\n );\n React.useEffect(() => {\n return () => handleRemoveGraceArea();\n }, [handleRemoveGraceArea]);\n React.useEffect(() => {\n if (trigger && content) {\n const handleTriggerLeave = (event) => handleCreateGraceArea(event, content);\n const handleContentLeave = (event) => handleCreateGraceArea(event, trigger);\n trigger.addEventListener(\"pointerleave\", handleTriggerLeave);\n content.addEventListener(\"pointerleave\", handleContentLeave);\n return () => {\n trigger.removeEventListener(\"pointerleave\", handleTriggerLeave);\n content.removeEventListener(\"pointerleave\", handleContentLeave);\n };\n }\n }, [trigger, content, handleCreateGraceArea, handleRemoveGraceArea]);\n React.useEffect(() => {\n if (pointerGraceArea) {\n const handleTrackPointerGrace = (event) => {\n const target = event.target;\n const pointerPosition = { x: event.clientX, y: event.clientY };\n const hasEnteredTarget = trigger?.contains(target) || content?.contains(target);\n const isPointerOutsideGraceArea = !isPointInPolygon(pointerPosition, pointerGraceArea);\n if (hasEnteredTarget) {\n handleRemoveGraceArea();\n } else if (isPointerOutsideGraceArea) {\n handleRemoveGraceArea();\n onClose();\n }\n };\n document.addEventListener(\"pointermove\", handleTrackPointerGrace);\n return () => document.removeEventListener(\"pointermove\", handleTrackPointerGrace);\n }\n }, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);\n return /* @__PURE__ */ jsx(TooltipContentImpl, { ...props, ref: composedRefs });\n});\nvar [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });\nvar Slottable = createSlottable(\"TooltipContent\");\nvar TooltipContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeTooltip,\n children,\n \"aria-label\": ariaLabel,\n onEscapeKeyDown,\n onPointerDownOutside,\n ...contentProps\n } = props;\n const context = useTooltipContext(CONTENT_NAME, __scopeTooltip);\n const popperScope = usePopperScope(__scopeTooltip);\n const { onClose } = context;\n React.useEffect(() => {\n document.addEventListener(TOOLTIP_OPEN, onClose);\n return () => document.removeEventListener(TOOLTIP_OPEN, onClose);\n }, [onClose]);\n React.useEffect(() => {\n if (context.trigger) {\n const handleScroll = (event) => {\n const target = event.target;\n if (target?.contains(context.trigger)) onClose();\n };\n window.addEventListener(\"scroll\", handleScroll, { capture: true });\n return () => window.removeEventListener(\"scroll\", handleScroll, { capture: true });\n }\n }, [context.trigger, onClose]);\n return /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents: false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside: (event) => event.preventDefault(),\n onDismiss: onClose,\n children: /* @__PURE__ */ jsxs(\n PopperPrimitive.Content,\n {\n \"data-state\": context.stateAttribute,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-tooltip-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-tooltip-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-tooltip-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-tooltip-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-tooltip-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n },\n children: [\n /* @__PURE__ */ jsx(Slottable, { children }),\n /* @__PURE__ */ jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsx(VisuallyHiddenPrimitive.Root, { id: context.contentId, role: \"tooltip\", children: ariaLabel || children }) })\n ]\n }\n )\n }\n );\n }\n);\nTooltipContent.displayName = CONTENT_NAME;\nvar ARROW_NAME = \"TooltipArrow\";\nvar TooltipArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTooltip, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeTooltip);\n const visuallyHiddenContentContext = useVisuallyHiddenContentContext(\n ARROW_NAME,\n __scopeTooltip\n );\n return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nTooltipArrow.displayName = ARROW_NAME;\nfunction getExitSideFromRect(point, rect) {\n const top = Math.abs(rect.top - point.y);\n const bottom = Math.abs(rect.bottom - point.y);\n const right = Math.abs(rect.right - point.x);\n const left = Math.abs(rect.left - point.x);\n switch (Math.min(top, bottom, right, left)) {\n case left:\n return \"left\";\n case right:\n return \"right\";\n case top:\n return \"top\";\n case bottom:\n return \"bottom\";\n default:\n throw new Error(\"unreachable\");\n }\n}\nfunction getPaddedExitPoints(exitPoint, exitSide, padding = 5) {\n const paddedExitPoints = [];\n switch (exitSide) {\n case \"top\":\n paddedExitPoints.push(\n { x: exitPoint.x - padding, y: exitPoint.y + padding },\n { x: exitPoint.x + padding, y: exitPoint.y + padding }\n );\n break;\n case \"bottom\":\n paddedExitPoints.push(\n { x: exitPoint.x - padding, y: exitPoint.y - padding },\n { x: exitPoint.x + padding, y: exitPoint.y - padding }\n );\n break;\n case \"left\":\n paddedExitPoints.push(\n { x: exitPoint.x + padding, y: exitPoint.y - padding },\n { x: exitPoint.x + padding, y: exitPoint.y + padding }\n );\n break;\n case \"right\":\n paddedExitPoints.push(\n { x: exitPoint.x - padding, y: exitPoint.y - padding },\n { x: exitPoint.x - padding, y: exitPoint.y + padding }\n );\n break;\n }\n return paddedExitPoints;\n}\nfunction getPointsFromRect(rect) {\n const { top, right, bottom, left } = rect;\n return [\n { x: left, y: top },\n { x: right, y: top },\n { x: right, y: bottom },\n { x: left, y: bottom }\n ];\n}\nfunction isPointInPolygon(point, polygon) {\n const { x, y } = point;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const ii = polygon[i];\n const jj = polygon[j];\n const xi = ii.x;\n const yi = ii.y;\n const xj = jj.x;\n const yj = jj.y;\n const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) inside = !inside;\n }\n return inside;\n}\nfunction getHull(points) {\n const newPoints = points.slice();\n newPoints.sort((a, b) => {\n if (a.x < b.x) return -1;\n else if (a.x > b.x) return 1;\n else if (a.y < b.y) return -1;\n else if (a.y > b.y) return 1;\n else return 0;\n });\n return getHullPresorted(newPoints);\n}\nfunction getHullPresorted(points) {\n if (points.length <= 1) return points.slice();\n const upperHull = [];\n for (let i = 0; i < points.length; i++) {\n const p = points[i];\n while (upperHull.length >= 2) {\n const q = upperHull[upperHull.length - 1];\n const r = upperHull[upperHull.length - 2];\n if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) upperHull.pop();\n else break;\n }\n upperHull.push(p);\n }\n upperHull.pop();\n const lowerHull = [];\n for (let i = points.length - 1; i >= 0; i--) {\n const p = points[i];\n while (lowerHull.length >= 2) {\n const q = lowerHull[lowerHull.length - 1];\n const r = lowerHull[lowerHull.length - 2];\n if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) lowerHull.pop();\n else break;\n }\n lowerHull.push(p);\n }\n lowerHull.pop();\n if (upperHull.length === 1 && lowerHull.length === 1 && upperHull[0].x === lowerHull[0].x && upperHull[0].y === lowerHull[0].y) {\n return upperHull;\n } else {\n return upperHull.concat(lowerHull);\n }\n}\nvar Provider = TooltipProvider;\nvar Root3 = Tooltip;\nvar Trigger = TooltipTrigger;\nvar Portal = TooltipPortal;\nvar Content2 = TooltipContent;\nvar Arrow2 = TooltipArrow;\nexport {\n Arrow2 as Arrow,\n Content2 as Content,\n Portal,\n Provider,\n Root3 as Root,\n Tooltip,\n TooltipArrow,\n TooltipContent,\n TooltipPortal,\n TooltipProvider,\n TooltipTrigger,\n Trigger,\n createTooltipScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from \"react\"\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction TooltipProvider({\n delayDuration = 200,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return (\n <TooltipPrimitive.Provider delayDuration={delayDuration} {...props} />\n )\n}\n\nfunction Tooltip({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return <TooltipPrimitive.Root {...props} />\n}\n\nfunction TooltipTrigger({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger {...props} />\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 8,\n variant = \"dark\",\n showArrow = true,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content> & {\n variant?: \"dark\" | \"light\"\n showArrow?: boolean\n}) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot=\"tooltip\"\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-lg p-3 text-xs leading-4 text-center\",\n \"animate-in fade-in-0 zoom-in-95\",\n \"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95\",\n \"data-[side=bottom]:slide-in-from-top-2\",\n \"data-[side=left]:slide-in-from-right-2\",\n \"data-[side=right]:slide-in-from-left-2\",\n \"data-[side=top]:slide-in-from-bottom-2\",\n variant === \"dark\"\n ? \"bg-primary text-primary-foreground\"\n : \"bg-popover text-popover-foreground shadow-md\",\n className\n )}\n {...props}\n >\n {children}\n {showArrow && (\n <TooltipPrimitive.Arrow\n className={cn(\n variant === \"dark\" ? \"fill-primary\" : \"fill-popover\"\n )}\n />\n )}\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n )\n}\n\nexport { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst alertVariants = cva(\n \"relative flex w-full items-start gap-5 rounded-lg p-5 text-base leading-6 [&>svg]:h-6 [&>svg]:w-6 [&>svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"\",\n destructive: \"\",\n success: \"\",\n warning: \"\",\n },\n filled: {\n true: \"\",\n false: \"border bg-background\",\n },\n },\n compoundVariants: [\n {\n variant: \"default\",\n filled: false,\n className:\n \"border-border text-foreground [&>svg]:text-foreground\",\n },\n {\n variant: \"destructive\",\n filled: false,\n className:\n \"border-destructive text-destructive [&>svg]:text-destructive\",\n },\n {\n variant: \"success\",\n filled: false,\n className:\n \"border-success text-success [&>svg]:text-success\",\n },\n {\n variant: \"warning\",\n filled: false,\n className:\n \"border-warning text-warning [&>svg]:text-warning\",\n },\n {\n variant: \"default\",\n filled: true,\n className:\n \"bg-primary text-primary-foreground [&>svg]:text-primary-foreground\",\n },\n {\n variant: \"destructive\",\n filled: true,\n className:\n \"bg-destructive text-destructive-foreground [&>svg]:text-destructive-foreground\",\n },\n {\n variant: \"success\",\n filled: true,\n className:\n \"bg-success text-success-foreground [&>svg]:text-success-foreground\",\n },\n {\n variant: \"warning\",\n filled: true,\n className:\n \"bg-warning text-warning-foreground [&>svg]:text-warning-foreground\",\n },\n ],\n defaultVariants: {\n variant: \"default\",\n filled: false,\n },\n }\n)\n\nfunction Alert({\n className,\n variant = \"default\",\n filled = false,\n onDismiss,\n children,\n ...props\n}: React.ComponentProps<\"div\"> &\n VariantProps<typeof alertVariants> & {\n onDismiss?: () => void\n }) {\n return (\n <div\n data-slot=\"alert\"\n data-variant={variant}\n data-filled={filled || undefined}\n role=\"alert\"\n className={cn(alertVariants({ variant, filled, className }))}\n {...props}\n >\n <div\n data-slot=\"alert-content\"\n className=\"flex min-w-0 flex-1 items-center gap-2.5\"\n >\n {children}\n </div>\n {onDismiss ? (\n <button\n data-slot=\"alert-dismiss\"\n type=\"button\"\n onClick={onDismiss}\n className=\"shrink-0 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\"\n aria-label=\"Dismiss\"\n >\n <X className=\"h-6 w-6\" />\n </button>\n ) : null}\n </div>\n )\n}\n\nfunction AlertTitle({\n className,\n children,\n ...props\n}: React.ComponentProps<\"h5\">) {\n return (\n <h5\n data-slot=\"alert-title\"\n className={cn(\"text-h4\", className)}\n {...props}\n >\n {children}\n </h5>\n )\n}\n\nfunction AlertDescription({\n className,\n children,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\"text-base leading-6 [&_p]:leading-6\", className)}\n {...props}\n >\n {children}\n </div>\n )\n}\n\nexport { Alert, AlertTitle, AlertDescription, alertVariants }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { X, CircleCheck, CircleAlert, TriangleAlert, Info } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst toastVariants = cva(\n \"relative flex w-full flex-col gap-4 rounded-lg border px-3 py-5\",\n {\n variants: {\n variant: {\n default: \"border-border bg-background text-foreground\",\n success: \"border-border bg-background text-foreground\",\n destructive: \"border-destructive bg-background text-destructive\",\n warning: \"border-border bg-background text-foreground\",\n info: \"border-border bg-background text-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nconst toastIconMap = {\n default: CircleCheck,\n success: CircleCheck,\n destructive: CircleAlert,\n warning: TriangleAlert,\n info: Info,\n} as const\n\nconst toastIconColorMap = {\n default: \"text-foreground\",\n success: \"text-success\",\n destructive: \"text-destructive\",\n warning: \"text-warning\",\n info: \"text-info\",\n} as const\n\ntype ToastVariant = NonNullable<VariantProps<typeof toastVariants>[\"variant\"]>\n\ntype ToastProps = React.ComponentProps<\"div\"> &\n VariantProps<typeof toastVariants> & {\n onClose?: () => void\n }\n\nfunction Toast({\n className,\n variant = \"default\",\n onClose,\n children,\n ...props\n}: ToastProps) {\n return (\n <div\n data-slot=\"toast\"\n data-variant={variant}\n role=\"alert\"\n className={cn(toastVariants({ variant, className }))}\n {...props}\n >\n {children}\n {onClose && (\n <button\n data-slot=\"toast-close\"\n type=\"button\"\n onClick={onClose}\n className={cn(\n \"absolute right-3 top-5 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\",\n variant === \"destructive\" && \"text-destructive\"\n )}\n aria-label=\"Close\"\n >\n <X className=\"h-6 w-6\" />\n </button>\n )}\n </div>\n )\n}\n\nfunction ToastHeader({\n className,\n variant = \"default\",\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n variant?: ToastVariant\n}) {\n const IconComponent = toastIconMap[variant]\n const iconColor = toastIconColorMap[variant]\n\n return (\n <div\n data-slot=\"toast-header\"\n className={cn(\"flex items-center gap-4\", className)}\n {...props}\n >\n <IconComponent\n data-slot=\"toast-icon\"\n className={cn(\"h-6 w-6 shrink-0\", iconColor)}\n aria-hidden=\"true\"\n />\n <div\n data-slot=\"toast-header-content\"\n className=\"flex flex-1 flex-col\"\n >\n {children}\n </div>\n </div>\n )\n}\n\nfunction ToastTitle({\n className,\n ...props\n}: React.ComponentProps<\"p\">) {\n return (\n <p\n data-slot=\"toast-title\"\n className={cn(\"text-h4\", className)}\n {...props}\n />\n )\n}\n\nfunction ToastDescription({\n className,\n ...props\n}: React.ComponentProps<\"p\">) {\n return (\n <p\n data-slot=\"toast-description\"\n className={cn(\n \"pl-8 text-sm leading-5 text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ToastAction({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"toast-action\"\n className={cn(\"flex items-start justify-end gap-3 pl-8\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Toast,\n ToastHeader,\n ToastTitle,\n ToastDescription,\n ToastAction,\n toastVariants,\n}\nexport type { ToastProps, ToastVariant }\n"],"x_google_ignoreList":[8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,36,37,38,39,40,41,42,43,44,45,46,47],"mappings":";;;;;;;;;;;;;;;;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,CAAA;;AAI1E,SAAS,GAAQ,EACf,GAAG,KACkD;AACrD,QAAO,kBAAC,IAAD,EAAuB,GAAI,GAAS,CAAA;;AAG7C,SAAS,GAAe,EACtB,GAAG,KACqD;AACxD,QAAO,kBAAC,IAAD,EAA0B,GAAI,GAAS,CAAA;;AAGhD,SAAS,GAAe,EACtB,cACA,gBAAa,GACb,aAAU,QACV,eAAY,IACZ,aACA,GAAG,KAIF;AACD,QACE,kBAAC,IAAD,EAAA,UACE,kBAAC,IAAD;EACE,aAAU;EACE;EACZ,WAAW,EACT,qEACA,mCACA,kGACA,0CACA,0CACA,0CACA,0CACA,MAAY,SACR,uCACA,gDACJ,EACD;EACD,GAAI;YAhBN,CAkBG,GACA,KACC,kBAAC,IAAD,EACE,WAAW,EACT,MAAY,SAAS,iBAAiB,eACvC,EACD,CAAA,CAEqB;KACH,CAAA;;;;AC5D9B,IAAM,KAAgB,EACpB,sHACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,aAAa;GACb,SAAS;GACT,SAAS;GACV;EACD,QAAQ;GACN,MAAM;GACN,OAAO;GACR;EACF;CACD,kBAAkB;EAChB;GACE,SAAS;GACT,QAAQ;GACR,WACE;GACH;EACD;GACE,SAAS;GACT,QAAQ;GACR,WACE;GACH;EACD;GACE,SAAS;GACT,QAAQ;GACR,WACE;GACH;EACD;GACE,SAAS;GACT,QAAQ;GACR,WACE;GACH;EACD;GACE,SAAS;GACT,QAAQ;GACR,WACE;GACH;EACD;GACE,SAAS;GACT,QAAQ;GACR,WACE;GACH;EACD;GACE,SAAS;GACT,QAAQ;GACR,WACE;GACH;EACD;GACE,SAAS;GACT,QAAQ;GACR,WACE;GACH;EACF;CACD,iBAAiB;EACf,SAAS;EACT,QAAQ;EACT;CACF,CACF;AAED,SAAS,GAAM,EACb,cACA,aAAU,WACV,YAAS,IACT,cACA,aACA,GAAG,KAIA;AACH,QACE,kBAAC,OAAD;EACE,aAAU;EACV,gBAAc;EACd,eAAa,KAAU,KAAA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