@moondreamsdev/dreamer-ui 1.7.9 → 1.7.10-test.1

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.
Files changed (42) hide show
  1. package/dist/{Toast-B83cGTb3.js → Toast-C0wOVeh0.js} +93 -89
  2. package/dist/Toast-C0wOVeh0.js.map +1 -0
  3. package/dist/Toast-DLFVFkWv.cjs +2 -0
  4. package/dist/Toast-DLFVFkWv.cjs.map +1 -0
  5. package/dist/{QuestionMarkCircled-CY81euqP.js → Window-CT479Oxr.js} +98 -6
  6. package/dist/Window-CT479Oxr.js.map +1 -0
  7. package/dist/Window-oF6fyFBX.cjs +2 -0
  8. package/dist/Window-oF6fyFBX.cjs.map +1 -0
  9. package/dist/components.cjs.js +2 -1
  10. package/dist/components.cjs.js.map +1 -1
  11. package/dist/components.esm.js +1753 -1410
  12. package/dist/components.esm.js.map +1 -1
  13. package/dist/hooks.cjs.js +1 -1
  14. package/dist/hooks.esm.js +6 -3
  15. package/dist/hooks.esm.js.map +1 -1
  16. package/dist/providers.cjs.js +1 -1
  17. package/dist/providers.esm.js +1 -1
  18. package/dist/src/components/code-block/CodeBlock.d.ts +35 -0
  19. package/dist/src/components/code-block/hooks.d.ts +65 -0
  20. package/dist/src/components/code-block/index.d.ts +2 -0
  21. package/dist/src/components/index.d.ts +1 -0
  22. package/dist/src/hooks/index.d.ts +2 -0
  23. package/dist/src/hooks/useCopyToClipboard.d.ts +9 -0
  24. package/dist/src/hooks/useDownloadFile.d.ts +6 -0
  25. package/dist/src/symbols/Copy.d.ts +2 -0
  26. package/dist/src/symbols/Dash.d.ts +2 -0
  27. package/dist/src/symbols/Download.d.ts +2 -0
  28. package/dist/src/symbols/Window.d.ts +2 -0
  29. package/dist/src/symbols/index.d.ts +4 -0
  30. package/dist/symbols.cjs.js +1 -1
  31. package/dist/symbols.esm.js +15 -11
  32. package/dist/useDownloadFile-D7aXoP4p.cjs +2 -0
  33. package/dist/useDownloadFile-D7aXoP4p.cjs.map +1 -0
  34. package/dist/useDownloadFile-fw_TsfK6.js +22 -0
  35. package/dist/useDownloadFile-fw_TsfK6.js.map +1 -0
  36. package/package.json +1 -1
  37. package/dist/QuestionMarkCircled-CY81euqP.js.map +0 -1
  38. package/dist/QuestionMarkCircled-D3gPieJ7.cjs +0 -2
  39. package/dist/QuestionMarkCircled-D3gPieJ7.cjs.map +0 -1
  40. package/dist/Toast-B83cGTb3.js.map +0 -1
  41. package/dist/Toast-BDQ9mOuz.cjs +0 -2
  42. package/dist/Toast-BDQ9mOuz.cjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Window-oF6fyFBX.cjs","sources":["../src/symbols/Check.tsx","../src/symbols/CheckCircled.tsx","../src/symbols/ChevronDoubleLeft.tsx","../src/symbols/ChevronDoubleRight.tsx","../src/symbols/ChevronDown.tsx","../src/symbols/ChevronLeft.tsx","../src/symbols/ChevronRight.tsx","../src/symbols/Copy.tsx","../src/symbols/Dash.tsx","../src/symbols/Download.tsx","../src/symbols/EyeClosed.tsx","../src/symbols/EyeOpened.tsx","../src/symbols/QuestionMarkCircled.tsx","../src/symbols/Window.tsx"],"sourcesContent":["import { SymbolProps } from './props';\n\nexport function Check({ size = 15, color = 'currentColor', className = 'inline', ...props }: SymbolProps) {\n return (\n <svg\n {...props}\n width={size}\n height={size}\n className={className}\n viewBox='0 0 15 15'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n d='M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z'\n fill={color}\n fillRule='evenodd'\n clipRule='evenodd'\n />\n </svg>\n );\n}\n","import { SymbolProps } from './props';\n\nexport function CheckCircled({\n size = 15,\n color = 'currentColor',\n className = 'inline',\n ...props\n}: SymbolProps) {\n return (\n <svg\n {...props}\n width={size}\n height={size}\n className={className}\n viewBox='0 0 15 15'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n d='M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 11.1575 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1576 0.877045 7.49991 0.877045ZM1.82708 7.49988C1.82708 4.36686 4.36689 1.82704 7.49991 1.82704C10.6329 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49988ZM10.1589 5.53774C10.3178 5.31191 10.2636 5.00001 10.0378 4.84109C9.81194 4.68217 9.50004 4.73642 9.34112 4.96225L6.51977 8.97154L5.35681 7.78706C5.16334 7.59002 4.84677 7.58711 4.64973 7.78058C4.45268 7.97404 4.44978 8.29061 4.64325 8.48765L6.22658 10.1003C6.33054 10.2062 6.47617 10.2604 6.62407 10.2483C6.77197 10.2363 6.90686 10.1591 6.99226 10.0377L10.1589 5.53774Z'\n fill={color}\n fillRule='evenodd'\n clipRule='evenodd'\n />\n </svg>\n );\n}\n","import { SymbolProps } from './props';\n\nexport function ChevronDoubleLeft({\n size = 15,\n color = 'currentColor',\n className = 'inline',\n ...props\n}: SymbolProps) {\n return (\n <svg\n {...props}\n width={size}\n height={size}\n className={className}\n viewBox='0 0 15 15'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n d='M6.85355 3.14645C7.04882 3.34171 7.04882 3.65829 6.85355 3.85355L3.20711 7.5L6.85355 11.1464C7.04882 11.3417 7.04882 11.6583 6.85355 11.8536C6.65829 12.0488 6.34171 12.0488 6.14645 11.8536L2.14645 7.85355C1.95118 7.65829 1.95118 7.34171 2.14645 7.14645L6.14645 3.14645C6.34171 2.95118 6.65829 2.95118 6.85355 3.14645ZM12.8536 3.14645C13.0488 3.34171 13.0488 3.65829 12.8536 3.85355L9.20711 7.5L12.8536 11.1464C13.0488 11.3417 13.0488 11.6583 12.8536 11.8536C12.6583 12.0488 12.3417 12.0488 12.1464 11.8536L8.14645 7.85355C7.95118 7.65829 7.95118 7.34171 8.14645 7.14645L12.1464 3.14645C12.3417 2.95118 12.6583 2.95118 12.8536 3.14645Z'\n fill={color}\n fillRule='evenodd'\n clipRule='evenodd'\n />\n </svg>\n );\n}\n","import { SymbolProps } from './props';\n\nexport function ChevronDoubleRight({\n size = 15,\n color = 'currentColor',\n className = 'inline',\n ...props\n}: SymbolProps) {\n return (\n <svg\n {...props}\n width={size}\n height={size}\n className={className}\n viewBox='0 0 15 15'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n d='M2.14645 11.8536C1.95118 11.6583 1.95118 11.3417 2.14645 11.1464L5.79289 7.5L2.14645 3.85355C1.95118 3.65829 1.95118 3.34171 2.14645 3.14645C2.34171 2.95118 2.65829 2.95118 2.85355 3.14645L6.85355 7.14645C7.04882 7.34171 7.04882 7.65829 6.85355 7.85355L2.85355 11.8536C2.65829 12.0488 2.34171 12.0488 2.14645 11.8536ZM8.14645 11.8536C7.95118 11.6583 7.95118 11.3417 8.14645 11.1464L11.7929 7.5L8.14645 3.85355C7.95118 3.65829 7.95118 3.34171 8.14645 3.14645C8.34171 2.95118 8.65829 2.95118 8.85355 3.14645L12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L8.85355 11.8536C8.65829 12.0488 8.34171 12.0488 8.14645 11.8536Z'\n fill={color}\n fillRule='evenodd'\n clipRule='evenodd'\n />\n </svg>\n );\n}\n","import { SymbolProps } from './props';\n\nexport function ChevronDown({\n size = 15,\n color = 'currentColor',\n className = 'inline',\n ...props\n}: SymbolProps) {\n return (\n <svg\n {...props}\n width={size}\n height={size}\n className={className}\n viewBox='0 0 15 15'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n d='M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z'\n fill={color}\n fillRule='evenodd'\n clipRule='evenodd'\n />\n </svg>\n );\n}\n","import { SymbolProps } from './props';\n\nexport function ChevronLeft({\n size = 15,\n color = 'currentColor',\n className = 'inline',\n ...props\n}: SymbolProps) {\n return (\n <svg\n {...props}\n width={size}\n height={size}\n className={className}\n viewBox='0 0 15 15'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n d='M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z'\n fill={color}\n fillRule='evenodd'\n clipRule='evenodd'\n />\n </svg>\n );\n}\n","import { SymbolProps } from './props';\n\nexport function ChevronRight({\n size = 15,\n color = 'currentColor',\n className = 'inline',\n ...props\n}: SymbolProps) {\n return (\n <svg\n {...props}\n width={size}\n height={size}\n className={className}\n viewBox='0 0 15 15'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n d='M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0331 6.1584 11.8442C5.95694 11.6554 5.96715 11.3389 6.15601 11.1375L9.58543 7.4999L6.15601 3.86234C5.96715 3.66089 5.95694 3.34447 6.1584 3.13508Z'\n fill={color}\n fillRule='evenodd'\n clipRule='evenodd'\n />\n </svg>\n );\n}\n","import { SymbolProps } from './props';\n\nexport function Copy({ size = 15, color = 'currentColor', className = 'inline', ...props }: SymbolProps) {\n return (\n <svg\n {...props}\n width={size}\n height={size}\n className={className}\n viewBox='0 0 15 15'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n d='M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002L11 4.00002V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5.5 4.00006C4.67157 4.00006 4 4.67163 4 5.50006V12.5001C4 13.3285 4.67157 14.0001 5.5 14.0001H12.5C13.3284 14.0001 14 13.3285 14 12.5001V5.50006C14 4.67163 13.3284 4.00006 12.5 4.00006H5.5ZM5 5.50006C5 5.22392 5.22386 5.00006 5.5 5.00006H12.5C12.7761 5.00006 13 5.22392 13 5.50006V12.5001C13 12.7762 12.7761 13.0001 12.5 13.0001H5.5C5.22386 13.0001 5 12.7762 5 12.5001V5.50006Z'\n fill={color}\n fillRule='evenodd'\n clipRule='evenodd'\n />\n </svg>\n );\n}\n","import { SymbolProps } from './props';\n\nexport function Dash({ size = 15, color = 'currentColor', className = 'inline', ...props }: SymbolProps) {\n return (\n <svg\n {...props}\n width={size}\n height={size}\n className={className}\n viewBox='0 0 15 15'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n d='M2.25 7.5C2.25 7.08579 2.58579 6.75 3 6.75H12C12.4142 6.75 12.75 7.08579 12.75 7.5C12.75 7.91421 12.4142 8.25 12 8.25H3C2.58579 8.25 2.25 7.91421 2.25 7.5Z'\n fill={color}\n fillRule='evenodd'\n clipRule='evenodd'\n />\n </svg>\n );\n}\n","import { SymbolProps } from './props';\n\nexport function Download({ size = 15, color = 'currentColor', className = 'inline', ...props }: SymbolProps) {\n return (\n <svg\n {...props}\n width={size}\n height={size}\n className={className}\n viewBox='0 0 15 15'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n d='M7.50005 1.04999C7.74858 1.04999 7.95005 1.25146 7.95005 1.49999V8.41359L10.1819 6.18179C10.3576 6.00605 10.6425 6.00605 10.8182 6.18179C10.994 6.35753 10.994 6.64245 10.8182 6.81819L7.81825 9.81819C7.64251 9.99392 7.35759 9.99392 7.18185 9.81819L4.18185 6.81819C4.00611 6.64245 4.00611 6.35753 4.18185 6.18179C4.35759 6.00605 4.64251 6.00605 4.81825 6.18179L7.05005 8.41359V1.49999C7.05005 1.25146 7.25152 1.04999 7.50005 1.04999ZM2.5 10C2.77614 10 3 10.2239 3 10.5V12C3 12.5539 3.44565 13 3.99635 13H11.0012C11.5529 13 12 12.5528 12 12V10.5C12 10.2239 12.2239 10 12.5 10C12.7761 10 13 10.2239 13 10.5V12C13 13.1046 12.1062 14 11.0012 14H3.99635C2.89019 14 2 13.103 2 12V10.5C2 10.2239 2.22386 10 2.5 10Z'\n fill={color}\n fillRule='evenodd'\n clipRule='evenodd'\n />\n </svg>\n );\n}\n","import { SymbolProps } from './props';\n\nexport function EyeClosed({ size = 15, color = 'currentColor', className = 'inline', ...props }: SymbolProps) {\n return (\n <svg\n {...props}\n width={size}\n height={size}\n className={className}\n viewBox='0 0 15 15'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n d='M14.7649 6.07596C14.9991 6.22231 15.0703 6.53079 14.9239 6.76495C14.4849 7.46743 13.9632 8.10645 13.3702 8.66305L14.5712 9.86406C14.7664 10.0593 14.7664 10.3759 14.5712 10.5712C14.3759 10.7664 14.0593 10.7664 13.8641 10.5712L12.6011 9.30817C11.805 9.90283 10.9089 10.3621 9.93375 10.651L10.383 12.3277C10.4544 12.5944 10.2961 12.8685 10.0294 12.94C9.76267 13.0115 9.4885 12.8532 9.41704 12.5865L8.95917 10.8775C8.48743 10.958 8.00036 10.9999 7.50001 10.9999C6.99965 10.9999 6.51257 10.958 6.04082 10.8775L5.58299 12.5864C5.51153 12.8532 5.23737 13.0115 4.97064 12.94C4.7039 12.8686 4.5456 12.5944 4.61706 12.3277L5.06625 10.651C4.09111 10.3621 3.19503 9.90282 2.3989 9.30815L1.1359 10.5712C0.940638 10.7664 0.624058 10.7664 0.428798 10.5712C0.233537 10.3759 0.233537 10.0593 0.428798 9.86405L1.62982 8.66303C1.03682 8.10643 0.515113 7.46742 0.0760677 6.76495C-0.0702867 6.53079 0.000898544 6.22231 0.235065 6.07596C0.469231 5.9296 0.777703 6.00079 0.924058 6.23496C1.40354 7.00213 1.989 7.68057 2.66233 8.2427C2.67315 8.25096 2.6837 8.25972 2.69397 8.26898C4.00897 9.35527 5.65537 9.99991 7.50001 9.99991C10.3078 9.99991 12.6564 8.5063 14.076 6.23495C14.2223 6.00079 14.5308 5.9296 14.7649 6.07596Z'\n fill={color}\n fillRule='evenodd'\n clipRule='evenodd'\n />\n </svg>\n );\n}\n","import { SymbolProps } from './props';\n\nexport function EyeOpened({ size = 15, color = 'currentColor', className = 'inline', ...props }: SymbolProps) {\n return (\n <svg\n {...props}\n width={size}\n height={size}\n className={className}\n viewBox='0 0 15 15'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n d='M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z'\n fill={color}\n fillRule='evenodd'\n clipRule='evenodd'\n />\n </svg>\n );\n}\n","import { SymbolProps } from './props';\n\nexport function QuestionMarkCircled({\n size = 15,\n color = 'currentColor',\n className = 'inline',\n ...props\n}: SymbolProps) {\n return (\n <svg\n {...props}\n width={size}\n height={size}\n className={className}\n viewBox='0 0 15 15'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n d='M0.877075 7.49972C0.877075 3.84204 3.84222 0.876892 7.49991 0.876892C11.1576 0.876892 14.1227 3.84204 14.1227 7.49972C14.1227 11.1574 11.1576 14.1226 7.49991 14.1226C3.84222 14.1226 0.877075 11.1574 0.877075 7.49972ZM7.49991 1.82689C4.36689 1.82689 1.82708 4.36671 1.82708 7.49972C1.82708 10.6327 4.36689 13.1726 7.49991 13.1726C10.6329 13.1726 13.1727 10.6327 13.1727 7.49972C13.1727 4.36671 10.6329 1.82689 7.49991 1.82689ZM8.24993 10.5C8.24993 10.9142 7.91414 11.25 7.49993 11.25C7.08571 11.25 6.74993 10.9142 6.74993 10.5C6.74993 10.0858 7.08571 9.75 7.49993 9.75C7.91414 9.75 8.24993 10.0858 8.24993 10.5ZM6.05003 6.25C6.05003 5.57211 6.63511 4.925 7.50003 4.925C8.36496 4.925 8.95003 5.57211 8.95003 6.25C8.95003 6.74118 8.68002 6.99212 8.21447 7.27494C8.16251 7.30651 8.10258 7.34131 8.03847 7.37854L8.03841 7.37858C7.85521 7.48497 7.63788 7.61119 7.47449 7.73849C7.23214 7.92732 6.95003 8.23198 6.95003 8.7C6.95004 9.00376 7.19628 9.25 7.50004 9.25C7.8024 9.25 8.04778 9.00601 8.05002 8.70417L8.05056 8.7033C8.05924 8.6896 8.08493 8.65735 8.15058 8.6062C8.25207 8.52712 8.36508 8.46163 8.51567 8.37436L8.51571 8.37433C8.59422 8.32883 8.68296 8.27741 8.78559 8.21506C9.32004 7.89038 10.05 7.35382 10.05 6.25C10.05 4.92789 8.93511 3.825 7.50003 3.825C6.06496 3.825 4.95003 4.92789 4.95003 6.25C4.95003 6.55376 5.19628 6.8 5.50003 6.8C5.80379 6.8 6.05003 6.55376 6.05003 6.25Z'\n fill={color}\n fillRule='evenodd'\n clipRule='evenodd'\n />\n </svg>\n );\n}\n","import { SymbolProps } from './props';\n\nexport function Window({ size = 15, color = 'currentColor', className = 'inline', ...props }: SymbolProps) {\n return (\n <svg\n {...props}\n width={size}\n height={size}\n className={className}\n viewBox='0 0 15 15'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n d='M2.5 1C1.67157 1 1 1.67157 1 2.5V12.5C1 13.3284 1.67157 14 2.5 14H12.5C13.3284 14 14 13.3284 14 12.5V2.5C14 1.67157 13.3284 1 12.5 1H2.5ZM2 2.5C2 2.22386 2.22386 2 2.5 2H12.5C12.7761 2 13 2.22386 13 2.5V4H2V2.5ZM2 5H13V12.5C13 12.7761 12.7761 13 12.5 13H2.5C2.22386 13 2 12.7761 2 12.5V5Z'\n fill={color}\n fillRule='evenodd'\n clipRule='evenodd'\n />\n </svg>\n );\n}\n"],"names":["Check","size","color","className","props","jsx","CheckCircled","ChevronDoubleLeft","ChevronDoubleRight","ChevronDown","ChevronLeft","ChevronRight","Copy","Dash","Download","EyeClosed","EyeOpened","QuestionMarkCircled","Window"],"mappings":"kDAEgB,SAAAA,EAAM,CAAE,KAAAC,EAAO,GAAI,MAAAC,EAAQ,eAAgB,UAAAC,EAAY,SAAU,GAAGC,GAAsB,CAEtG,OAAAC,EAAA,IAAC,MAAA,CACE,GAAGD,EACJ,MAAOH,EACP,OAAQA,EACR,UAAAE,EACA,QAAQ,YACR,MAAM,6BAEN,SAAAE,EAAA,IAAC,OAAA,CACC,EAAE,gXACF,KAAMH,EACN,SAAS,UACT,SAAS,SAAA,CAAA,CACX,CACF,CAEJ,CClBO,SAASI,EAAa,CAC3B,KAAAL,EAAO,GACP,MAAAC,EAAQ,eACR,UAAAC,EAAY,SACZ,GAAGC,CACL,EAAgB,CAEZ,OAAAC,EAAA,IAAC,MAAA,CACE,GAAGD,EACJ,MAAOH,EACP,OAAQA,EACR,UAAAE,EACA,QAAQ,YACR,MAAM,6BAEN,SAAAE,EAAA,IAAC,OAAA,CACC,EAAE,6xBACF,KAAMH,EACN,SAAS,UACT,SAAS,SAAA,CAAA,CACX,CACF,CAEJ,CCvBO,SAASK,EAAkB,CAChC,KAAAN,EAAO,GACP,MAAAC,EAAQ,eACR,UAAAC,EAAY,SACZ,GAAGC,CACL,EAAgB,CAEZ,OAAAC,EAAA,IAAC,MAAA,CACE,GAAGD,EACJ,MAAOH,EACP,OAAQA,EACR,UAAAE,EACA,QAAQ,YACR,MAAM,6BAEN,SAAAE,EAAA,IAAC,OAAA,CACC,EAAE,6nBACF,KAAMH,EACN,SAAS,UACT,SAAS,SAAA,CAAA,CACX,CACF,CAEJ,CCvBO,SAASM,EAAmB,CACjC,KAAAP,EAAO,GACP,MAAAC,EAAQ,eACR,UAAAC,EAAY,SACZ,GAAGC,CACL,EAAgB,CAEZ,OAAAC,EAAA,IAAC,MAAA,CACE,GAAGD,EACJ,MAAOH,EACP,OAAQA,EACR,UAAAE,EACA,QAAQ,YACR,MAAM,6BAEN,SAAAE,EAAA,IAAC,OAAA,CACC,EAAE,6nBACF,KAAMH,EACN,SAAS,UACT,SAAS,SAAA,CAAA,CACX,CACF,CAEJ,CCvBO,SAASO,EAAY,CAC1B,KAAAR,EAAO,GACP,MAAAC,EAAQ,eACR,UAAAC,EAAY,SACZ,GAAGC,CACL,EAAgB,CAEZ,OAAAC,EAAA,IAAC,MAAA,CACE,GAAGD,EACJ,MAAOH,EACP,OAAQA,EACR,UAAAE,EACA,QAAQ,YACR,MAAM,6BAEN,SAAAE,EAAA,IAAC,OAAA,CACC,EAAE,6TACF,KAAMH,EACN,SAAS,UACT,SAAS,SAAA,CAAA,CACX,CACF,CAEJ,CCvBO,SAASQ,EAAY,CAC1B,KAAAT,EAAO,GACP,MAAAC,EAAQ,eACR,UAAAC,EAAY,SACZ,GAAGC,CACL,EAAgB,CAEZ,OAAAC,EAAA,IAAC,MAAA,CACE,GAAGD,EACJ,MAAOH,EACP,OAAQA,EACR,UAAAE,EACA,QAAQ,YACR,MAAM,6BAEN,SAAAE,EAAA,IAAC,OAAA,CACC,EAAE,oUACF,KAAMH,EACN,SAAS,UACT,SAAS,SAAA,CAAA,CACX,CACF,CAEJ,CCvBO,SAASS,EAAa,CAC3B,KAAAV,EAAO,GACP,MAAAC,EAAQ,eACR,UAAAC,EAAY,SACZ,GAAGC,CACL,EAAgB,CAEZ,OAAAC,EAAA,IAAC,MAAA,CACE,GAAGD,EACJ,MAAOH,EACP,OAAQA,EACR,UAAAE,EACA,QAAQ,YACR,MAAM,6BAEN,SAAAE,EAAA,IAAC,OAAA,CACC,EAAE,+TACF,KAAMH,EACN,SAAS,UACT,SAAS,SAAA,CAAA,CACX,CACF,CAEJ,CCvBgB,SAAAU,EAAK,CAAE,KAAAX,EAAO,GAAI,MAAAC,EAAQ,eAAgB,UAAAC,EAAY,SAAU,GAAGC,GAAsB,CAErG,OAAAC,EAAA,IAAC,MAAA,CACE,GAAGD,EACJ,MAAOH,EACP,OAAQA,EACR,UAAAE,EACA,QAAQ,YACR,MAAM,6BAEN,SAAAE,EAAA,IAAC,OAAA,CACC,EAAE,qrBACF,KAAMH,EACN,SAAS,UACT,SAAS,SAAA,CAAA,CACX,CACF,CAEJ,CClBgB,SAAAW,EAAK,CAAE,KAAAZ,EAAO,GAAI,MAAAC,EAAQ,eAAgB,UAAAC,EAAY,SAAU,GAAGC,GAAsB,CAErG,OAAAC,EAAA,IAAC,MAAA,CACE,GAAGD,EACJ,MAAOH,EACP,OAAQA,EACR,UAAAE,EACA,QAAQ,YACR,MAAM,6BAEN,SAAAE,EAAA,IAAC,OAAA,CACC,EAAE,8JACF,KAAMH,EACN,SAAS,UACT,SAAS,SAAA,CAAA,CACX,CACF,CAEJ,CClBgB,SAAAY,EAAS,CAAE,KAAAb,EAAO,GAAI,MAAAC,EAAQ,eAAgB,UAAAC,EAAY,SAAU,GAAGC,GAAsB,CAEzG,OAAAC,EAAA,IAAC,MAAA,CACE,GAAGD,EACJ,MAAOH,EACP,OAAQA,EACR,UAAAE,EACA,QAAQ,YACR,MAAM,6BAEN,SAAAE,EAAA,IAAC,OAAA,CACC,EAAE,osBACF,KAAMH,EACN,SAAS,UACT,SAAS,SAAA,CAAA,CACX,CACF,CAEJ,CClBgB,SAAAa,EAAU,CAAE,KAAAd,EAAO,GAAI,MAAAC,EAAQ,eAAgB,UAAAC,EAAY,SAAU,GAAGC,GAAsB,CAE1G,OAAAC,EAAA,IAAC,MAAA,CACE,GAAGD,EACJ,MAAOH,EACP,OAAQA,EACR,UAAAE,EACA,QAAQ,YACR,MAAM,6BAEN,SAAAE,EAAA,IAAC,OAAA,CACC,EAAE,irCACF,KAAMH,EACN,SAAS,UACT,SAAS,SAAA,CAAA,CACX,CACF,CAEJ,CClBgB,SAAAc,EAAU,CAAE,KAAAf,EAAO,GAAI,MAAAC,EAAQ,eAAgB,UAAAC,EAAY,SAAU,GAAGC,GAAsB,CAE1G,OAAAC,EAAA,IAAC,MAAA,CACE,GAAGD,EACJ,MAAOH,EACP,OAAQA,EACR,UAAAE,EACA,QAAQ,YACR,MAAM,6BAEN,SAAAE,EAAA,IAAC,OAAA,CACC,EAAE,ijBACF,KAAMH,EACN,SAAS,UACT,SAAS,SAAA,CAAA,CACX,CACF,CAEJ,CClBO,SAASe,EAAoB,CAClC,KAAAhB,EAAO,GACP,MAAAC,EAAQ,eACR,UAAAC,EAAY,SACZ,GAAGC,CACL,EAAgB,CAEZ,OAAAC,EAAA,IAAC,MAAA,CACE,GAAGD,EACJ,MAAOH,EACP,OAAQA,EACR,UAAAE,EACA,QAAQ,YACR,MAAM,6BAEN,SAAAE,EAAA,IAAC,OAAA,CACC,EAAE,w2CACF,KAAMH,EACN,SAAS,UACT,SAAS,SAAA,CAAA,CACX,CACF,CAEJ,CCvBgB,SAAAgB,EAAO,CAAE,KAAAjB,EAAO,GAAI,MAAAC,EAAQ,eAAgB,UAAAC,EAAY,SAAU,GAAGC,GAAsB,CAEvG,OAAAC,EAAA,IAAC,MAAA,CACE,GAAGD,EACJ,MAAOH,EACP,OAAQA,EACR,UAAAE,EACA,QAAQ,YACR,MAAM,6BAEN,SAAAE,EAAA,IAAC,OAAA,CACC,EAAE,mSACF,KAAMH,EACN,SAAS,UACT,SAAS,SAAA,CAAA,CACX,CACF,CAEJ"}
@@ -1,2 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),i=require("react"),j=require("./utils.cjs.js"),W=require("./QuestionMarkCircled-D3gPieJ7.cjs"),S=require("./Toast-BDQ9mOuz.cjs"),ae=require("./X-CgjeP2OI.cjs"),ce=require("react-dom");function te({id:r,title:s,content:t,children:n,className:e="",disabled:a=!1,isOpen:l=!1,onToggle:c,triggerClassName:d="",bodyClassName:m=""}){const b=i.useId(),u=r||`accordion-item-${b}`,h=`${u}-header`,f=`${u}-panel`,x=()=>{!a&&c&&c()},v=g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),x())};return o.jsxs("div",{className:j.join("border-b border-gray-200",a&&"opacity-60 cursor-not-allowed",e),children:[o.jsxs("button",{id:h,type:"button",className:j.join("w-full text-left py-3 px-4 flex justify-between items-center focus:outline focus:outline-secondary",a?"cursor-not-allowed":"hover:bg-gray-50/10 cursor-pointer",d),"aria-expanded":l,"aria-controls":f,disabled:a,onClick:x,onKeyDown:v,children:[o.jsx("span",{children:s}),o.jsx("span",{className:j.join("transform transition-transform duration-300 ease-linear",l?"rotate-180":"rotate-0"),"aria-hidden":"true",children:o.jsx(W.ChevronDown,{size:18})})]}),o.jsx("div",{id:f,role:"region","aria-labelledby":h,className:j.join("transition-all duration-300 ease-linear px-4",l?"max-h-96 opacity-100 overflow-auto py-3":"max-h-0 opacity-0 overflow-hidden",m),children:l&&(n||t)})]})}function we({id:r,items:s=[],children:t,className:n="",itemClassName:e="",allowMultiple:a=!1,defaultOpenItems:l=[],triggersClassName:c="",bodiesClassName:d=""}){const m=i.useId(),b=r||`accordion-group-${m}`,[u,h]=i.useState(new Set(l)),f=g=>{h(w=>{const p=new Set(w);return p.has(g)?p.delete(g):(a||p.clear(),p.add(g)),p})},x=g=>`${m}-item-${g}`,v=g=>u.has(g);return o.jsxs("div",{id:b,className:n,children:[s.length>0&&s.map((g,w)=>{const p=g.id||x(w);return o.jsx(te,{id:p,title:g.title,content:g.content,disabled:g.disabled,isOpen:v(p),onToggle:()=>f(p),className:e,triggerClassName:c,bodyClassName:d},p)}),s.length===0&&t&&i.Children.map(t,(g,w)=>{if(i.isValidElement(g)&&g.type===te){const p=g.props.id||x(w);return i.createElement(te,{...g.props,key:p,id:p,className:j.join(e,g.props.className),isOpen:v(p),onToggle:()=>f(p),triggerClassName:j.join(c,g.props.triggerClassName),bodyClassName:j.join(d,g.props.bodyClassName)})}return null})]})}function ve(){const[r,s]=i.useState(0);return i.useEffect(()=>{const t=setInterval(()=>{s(n=>(n+1)%3)},500);return()=>clearInterval(t)},[]),o.jsx("div",{className:"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle",children:[0,1,2].map(t=>o.jsx("div",{className:j.join("rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current",r===t&&"transform -translate-y-1")},t))})}const je={base:"",primary:"bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",tertiary:"text-primary hover:text-primary-foreground disabled:text-muted",outline:"border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",link:"underline-offset-4 hover:underline disabled:underline disabled:text-muted",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"},Ne={stripped:"",fitted:"size-fit",sm:"px-2 py-1 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg",icon:"p-1 w-fit aspect-square",full:"p-2 w-full"},Ee={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},le={variant:"primary",size:"md",rounded:"md"};function ge({variant:r=le.variant,size:s,rounded:t=le.rounded,loading:n,linkTo:e,linkProps:a,type:l="button",className:c,...d}){let m;r==="link"&&!s?m="fitted":m=s||le.size;const u=j.join("appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",je[r],Ne[m],Ee[t],n&&"relative pointer-events-none",e&&"relative",c);return o.jsxs("button",{...d,role:e?"link":d.role,"aria-label":d["aria-label"]||(a==null?void 0:a["aria-label"]),"aria-description":d["aria-description"]||(a==null?void 0:a["aria-description"]),"aria-disabled":d.disabled||n,"aria-busy":n,type:l,className:u,children:[n&&o.jsx(ve,{}),o.jsx("span",{className:j.join(n&&"invisible"),children:d.children}),e&&!d.disabled&&o.jsx("a",{...a,"aria-hidden":!0,href:e,rel:(a==null?void 0:a.rel)||"noreferrer",className:"absolute inset-0"})]})}function ke({totalItems:r,itemsToShow:s,infinite:t,autoScroll:n,scrollInterval:e,pauseScrollOnHover:a,currentIndex:l,onIndexChange:c}){const[d,m]=i.useState(l||0),[b,u]=i.useState(!1),h=i.useRef(null),f=Math.ceil(r/s),x=t||d>0,v=t||d<f-1,g=i.useCallback(y=>{const N=Math.max(0,Math.min(y,f-1));m(N),c==null||c(N)},[f,c]),w=i.useCallback(()=>{if(x){const y=d===0&&t?f-1:d-1;g(y)}},[d,x,t,f,g]),p=i.useCallback(()=>{if(v){const y=d===f-1&&t?0:d+1;g(y)}},[d,v,t,f,g]);return i.useEffect(()=>{l!==void 0&&l!==d&&m(l)},[l,d]),i.useEffect(()=>{if(!n)return;const y=()=>{h.current=setInterval(()=>{a&&b||p()},e)},N=()=>{h.current&&(clearInterval(h.current),h.current=null)};return!b||!a?y():N(),N},[n,e,a,b,p]),i.useEffect(()=>{m(0)},[s]),{currentSlide:d,canGoPrev:x,canGoNext:v,goToPrev:w,goToNext:p,goToSlide:g,isHovered:b,setIsHovered:u}}const _={xs:0,sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function Ce(){const[r,s]=i.useState(),[t,n]=i.useState(0),e=a=>_[a];return i.useEffect(()=>{const a=c=>c>=_["2xl"]?"2xl":c>=_.xl?"xl":c>=_.lg?"lg":c>=_.md?"md":c>=_.sm?"sm":"xs";s(a(window.innerWidth)),n(window.innerWidth);const l=()=>{s(a(window.innerWidth)),n(window.innerWidth)};return window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[]),{screenSize:r,screenWidth:t,getBreakpoint:e}}const J={sm:{button:"h-6 w-6 text-xs",icon:"size-3"},md:{button:"h-8 w-8 text-sm",icon:"size-4"},lg:{button:"h-10 w-10 text-lg",icon:"size-5"}},ue={default:"bg-accent text-accent-foreground hover:bg-accent-foreground hover:text-accent",outline:"border border-border bg-background hover:bg-accent hover:text-accent-foreground hover:border-accent",ghost:"hover:text-accent"},Y={aligned:{prev:"absolute top-1/2 -translate-x-1/2 -translate-y-1/2 z-10",next:"absolute right-0 top-1/2 translate-x-1/2 -translate-y-1/2 z-10"},exterior:{prev:"absolute -left-10 top-1/2 -translate-y-1/2 z-10",next:"absolute -right-10 top-1/2 -translate-y-1/2 z-10"},interior:{prev:"absolute left-2 top-1/2 -translate-y-1/2 z-10",next:"absolute right-2 top-1/2 -translate-y-1/2 z-10"}};function Se({children:r,id:s,ref:t,className:n,autoScroll:e=!1,scrollInterval:a=3e3,pauseScrollOnHover:l=!0,currentIndex:c,onIndexChange:d,hidePrevNext:m=!1,hideDots:b=!1,itemsToShow:u=1,buttonSize:h="md",buttonVariant:f="default",buttonPosition:x="exterior",infinite:v=!0,prevButton:g,nextButton:w,itemsClassName:p,containerClassName:y,dotsClassName:N,gap:E=8}){var $,Q;const A=i.useRef(null),C=i.Children.toArray(r).filter(i.isValidElement),I=C.length,{screenSize:M}=Ce(),z=i.useMemo(()=>{if(typeof u=="number")return u;if(typeof u=="object"&&u&&M){const K=["2xl","xl","lg","md","sm","xs"],V=K.indexOf(M);for(let U=V;U<K.length;U++){const Z=K[U];if(u[Z]!==void 0)return u[Z]}}return 1},[u,M]),{currentSlide:H,canGoPrev:L,canGoNext:T,goToPrev:R,goToNext:D,goToSlide:B,setIsHovered:P}=ke({totalItems:I,itemsToShow:z,infinite:v,autoScroll:e,scrollInterval:a,pauseScrollOnHover:l,currentIndex:c,onIndexChange:d}),q=i.useCallback(K=>{if(z===1)return{leftWidth:0,rightWidth:0,widthReduction:0};const V=E*(z-1)/z;return K%z===0?{leftWidth:0,rightWidth:E/2,widthReduction:V}:K%z===z-1?{leftWidth:E/2,rightWidth:0,widthReduction:V}:{leftWidth:E/2,rightWidth:E/2,widthReduction:V}},[z,E]),F=()=>{R()},X=()=>{D()},se=()=>{l&&P(!0)},oe=()=>{l&&P(!1)},ie=-(H*(100/I)*z),k=j.join("inline-flex items-center justify-center rounded-md font-medium transition-all focus-visible:outline-none focus-visible:ring focus-visible:ring-ring disabled:pointer-events-none",x==="aligned"?"disabled:opacity-90":"disabled:opacity-50");return o.jsxs("div",{className:j.join("relative",n),"data-carousel-wrapper":"true",children:[!m&&o.jsx(o.Fragment,{children:g?i.cloneElement(g,{onClick:F,disabled:!L,className:j.join((($=g.props)==null?void 0:$.className)||"",Y[x].prev),role:"button","aria-disabled":!L,"aria-label":"Previous slide","data-carousel-prev":"true"}):o.jsx("button",{type:"button",onClick:F,disabled:!L,className:j.join(k,J[h].button,ue[f],Y[x].prev),"aria-disabled":!L,"aria-label":"Previous slide","data-carousel-prev":"true",children:o.jsx(W.ChevronLeft,{className:J[h].icon})})}),o.jsxs("div",{id:s,ref:t,className:j.join("relative overflow-hidden",y),onMouseEnter:se,onMouseLeave:oe,"data-carousel":"true","data-current-index":H,"data-items-to-show":z,"data-auto-scroll":e,"data-button-position":x,children:[o.jsx("div",{ref:A,className:"flex transition-transform duration-300 ease-in-out",style:{transform:`translateX(${ie}%)`,width:`${I/z*100}%`},children:C.map((K,V)=>{const{leftWidth:U,rightWidth:Z,widthReduction:ye}=q(V);return o.jsx("div",{className:j.join("flex-shrink-0",p),style:{width:`calc(${100/I}% - ${ye}px)`,marginRight:Z>0?`${Z}px`:void 0,marginLeft:U>0?`${U}px`:void 0},"data-slide-index":V,children:K},V)})}),!b&&o.jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 flex space-x-2",children:Array.from({length:Math.ceil(I/z)}).map((K,V)=>o.jsx("button",{type:"button",onClick:()=>B(V),className:j.join("w-2 h-2 rounded-full transition-colors duration-200",V===H?"bg-accent":"bg-muted hover:bg-muted-foreground/50",N),"aria-label":`Go to slide ${V+1}`,"data-carousel-dot":V},V))})]}),!m&&o.jsx(o.Fragment,{children:w?i.cloneElement(w,{onClick:X,disabled:!T,className:j.join(((Q=w.props)==null?void 0:Q.className)||"",Y[x].next),role:"button","aria-disabled":!T,"aria-label":"Next slide","data-carousel-next":"true"}):o.jsx("button",{type:"button",onClick:X,disabled:!T,className:j.join(k,J[h].button,ue[f],Y[x].next),"aria-disabled":!T,"aria-label":"Next slide","data-carousel-next":"true",children:o.jsx(W.ChevronRight,{className:J[h].icon})})})]})}function Ie(r){const[s,t]=i.useState(""),n=i.useCallback(e=>{let a=e,l="";for(;a&&!l;){const c=window.getComputedStyle(a).backgroundColor;c&&c!=="transparent"&&c!=="rgba(0, 0, 0, 0)"&&(l=c),a=a.parentElement}return l||"transparent"},[]);return i.useEffect(()=>{const e=document.getElementById(r);if(e){const a=n(e.parentElement);t(a)}},[r,n]),s}function Te({ref:r,id:s,size:t=20,color:n,filled:e=!1,rounded:a=!0,checked:l=!1,onCheckedChange:c,disabled:d,className:m="",...b}){const u=i.useId(),h=i.useMemo(()=>s||`checkbox-${u}`,[s,u]),f=Ie(h),[x,v]=i.useState(l);i.useEffect(()=>{v(l)},[l]);const g=()=>{d||(v(!x),c==null||c(!x))},w=y=>{y.key===" "&&(y.preventDefault(),g())},p=j.join("flex items-center justify-center border outline outline-transparent focus:outline-current focus:outline-offset-2",a&&"rounded",d&&"opacity-40 cursor-not-allowed",!d&&"cursor-pointer",m);return o.jsx("button",{id:h,type:"button",ref:r,tabIndex:0,role:"checkbox",onClick:g,"aria-checked":x,"aria-disabled":d,onKeyDownCapture:w,style:{width:t,height:t,color:n,backgroundColor:x&&e?"currentcolor":"transparent"},className:p,...b,children:x&&o.jsx(W.Check,{size:t,color:e?f:void 0})})}function Re({children:r,className:s,linkTo:t,linkProps:n,onButtonClick:e,buttonProps:a,...l}){return t&&e&&console.warn('Clickable: Both "linkTo" and "onButtonClick" props are provided. Only "linkTo" will be used.'),o.jsxs("div",{className:j.join("relative w-fit",s),...l,children:[r,t&&o.jsx("a",{...n,rel:(n==null?void 0:n.rel)||"noreferrer",href:t,className:j.join("absolute inset-0",n==null?void 0:n.className)}),!t&&e&&o.jsx("button",{...a,type:"button",onClick:e,className:j.join("absolute inset-0 cursor-pointer",a==null?void 0:a.className)})]})}function ne({elementId:r,type:s,message:t}){return i.useEffect(()=>{const n=document.getElementById(r);if(n){if(!t&&s==="error"){n.removeAttribute("data-error");return}if(!t&&s==="success"){n.removeAttribute("data-success");return}return n.setAttribute("aria-describedby",`${r}-${s}-message`),n.setAttribute("aria-invalid",s==="error"?"true":"false"),s==="error"&&n.setAttribute("data-error","true"),s==="success"&&n.setAttribute("data-success","true"),()=>{n.removeAttribute("aria-describedby"),n.removeAttribute("aria-invalid"),n.removeAttribute("data-error"),n.removeAttribute("data-success")}}},[r,s,t]),t?o.jsxs("small",{className:j.join("mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-start",s==="error"&&"text-destructive",s==="success"&&"text-success"),role:"status",children:[s==="error"?o.jsx(ae.ExclamationTriangle,{}):o.jsx(W.CheckCircled,{}),o.jsx("span",{id:`${r}-${s}-message`,children:t})]}):null}const Ae={base:"",default:"ring ring-transparent focus:ring-primary-foreground not-disabled:data-error:ring-destructive not-disabled:data-success:ring-success",underline:"border-b border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success",outline:"border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success"},ze={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"px-3 rounded-full"},de={variant:"default",rounded:"none"};function $e({variant:r=de.variant,rounded:s,displayOnlyMode:t=!1,errorMessage:n,successMessage:e,type:a="text",className:l,...c}){const d=i.useId(),[m,b]=i.useState(!1);let u=s;r==="outline"&&!s&&(u="md"),u=u||de.rounded;const x=j.join("appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all","file:mr-2 file:border-0 file:rounded-md file:px-1.5 file:py-1 file:bg-primary hover:file:bg-primary/85 file:text-sm file:font-medium file:text-foreground file:transition-colors",!t&&Ae[r],!t&&ze[u],a==="password"&&"pr-10",!t&&"px-2 py-1",t&&"pointer-events-none",l);return o.jsxs("div",{className:j.join(t&&"cursor-text"),style:{height:c.height,width:c.width},children:[o.jsxs("div",{className:j.join(a==="password"&&"relative"),children:[o.jsx("input",{...c,id:d,type:a==="password"&&m?"text":a,"aria-disabled":c.disabled,readOnly:t,"aria-readonly":t||c["aria-readonly"],"data-error":n?!0:void 0,"data-success":e?!0:void 0,className:x}),a==="password"&&o.jsx("button",{onClick:()=>b(!m),className:"absolute inset-y-0 right-0 px-2 hover:cursor-pointer","aria-label":"Toggle password visibility","data-state":m?"visible":"hidden",children:m?o.jsx(W.EyeOpened,{size:20}):o.jsx(W.EyeClosed,{size:20})})]}),!t&&o.jsx(ne,{elementId:d,type:"error",message:n}),!t&&o.jsx(ne,{elementId:d,type:"success",message:e})]})}function De({display:r="inline",width:s="fit-content",className:t="",required:n,helpMessage:e,suffix:a,htmlFor:l,children:c,description:d,...m}){var v,g;const b=i.useId(),u=(((v=e==null?void 0:e.trim())==null?void 0:v.length)||0)>0,h=(((g=d==null?void 0:d.trim())==null?void 0:g.length)||0)>0,f=u?`${l??b}-help`:void 0,x=h?`${l??b}-description`:void 0;return o.jsxs("div",{style:{display:r==="inline"?"inline-block":"block",width:s},className:j.join("mb-0.5",t),children:[o.jsxs("div",{className:"relative flex",children:[o.jsxs("label",{className:"font-medium",htmlFor:l,...m,children:[c,n&&o.jsx("span",{className:"text-red-500 font-medium ml-1","aria-label":"required",children:"*"})]}),u&&o.jsx("span",{className:"text-gray-500 ml-1 size-fit -translate-y-1/3","aria-describedby":f,"aria-label":"Help information",title:e,children:o.jsx(W.QuestionMarkCircled,{})}),u&&o.jsx("div",{id:f,className:"sr-only",children:e}),a&&o.jsx("span",{className:"ml-1",children:a})]}),h&&o.jsx("small",{id:x,className:"block opacity-80 mt-0.5",role:"note",children:d})]})}function Le(r){const[s,t]=i.useState(!1),[n,e]=i.useState(!1);return i.useEffect(()=>{r?(e(!0),setTimeout(()=>t(!0),10)):(t(!1),setTimeout(()=>e(!1),150))},[r]),{show:s,shouldRender:n}}function Ve(r,s){i.useEffect(()=>{const t=n=>{n.key==="Escape"&&r&&s()};return document.addEventListener("keydown",t),r&&(document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",t),document.body.style.overflow="auto"}},[r,s])}function Me(r,s){const t=i.useRef(null),n=i.useCallback(()=>{const e=document.getElementById(r);if(!e)return;const a=e.querySelectorAll('[data-modal-action="true"]');if(a.length>0){a[0].focus();return}const l=e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(l.length>0){const c=Array.from(l).filter(d=>!(d instanceof HTMLButtonElement&&d.getAttribute("data-modal-close-button")==="true"));if(c.length>0){c[0].focus();return}l[0].focus();return}e.focus()},[r]);i.useEffect(()=>(s&&(t.current=document.activeElement,n()),()=>{document.body.style.overflow="auto",t.current instanceof HTMLElement&&t.current.focus()}),[s,n])}function We({id:r,isOpen:s,onClose:t,title:n,children:e,contentOnly:a=!1,className:l,overlayClassName:c,hideCloseButton:d=!1,actions:m=[],disableCloseOnOverlayClick:b=!1,ariaLabelledBy:u,ariaDescribedBy:h}){const f=i.useId(),x=r||`modal-${f}`,v=r?`${r}-title`:`modal-title-${f}`,{show:g,shouldRender:w}=Le(s);if(Me(x,w),Ve(w,t),!w)return null;const p=()=>n?i.isValidElement(n)?o.jsx("div",{className:"mb-4",children:n}):o.jsx("h2",{className:"mb-4 text-xl font-semibold",id:v,children:n}):null,y=()=>m.length===0?null:o.jsx("div",{className:"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3",children:m.map((N,E)=>{const{label:A,className:C,...I}=N;return o.jsx(ge,{className:C,type:"button",...I,"data-modal-action":"true",children:A},E)})});return o.jsx(o.Fragment,{children:ce.createPortal(o.jsx("div",{"aria-labelledby":u??n?v:void 0,"aria-describedby":h,role:"dialog","aria-modal":"true",className:"fixed inset-0 z-[100] overflow-y-auto",children:o.jsxs("div",{className:"flex min-h-screen items-center justify-center p-4",children:[o.jsx("div",{className:S.n("fixed inset-0 bg-black/20 transition-all",c),onClick:()=>{b||t()}}),a&&o.jsx("div",{className:S.n("relative w-fit",l),children:e}),!a&&o.jsxs("div",{id:x,tabIndex:-1,className:S.n("relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75",g?"opacity-100 scale-100":"opacity-0 scale-90",l),children:[!d&&o.jsx("button",{type:"button",onClick:t,"data-modal-close-button":"true",className:"rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0",children:o.jsx(ae.X,{size:18})}),p(),e,y()]})]})}),document.body)})}const Be={link:"text-primary hover:text-primary-foreground hover:bg-primary/10 aria-current:text-primary-foreground aria-current:bg-primary",outline:"border border-primary text-primary hover:bg-primary hover:text-primary-foreground aria-current:bg-primary aria-current:text-primary-foreground aria-current:border-primary",filled:"bg-secondary text-secondary-foreground hover:bg-primary hover:text-primary-foreground aria-current:bg-primary aria-current:text-primary-foreground"},Fe={sm:"px-2 py-1 text-sm min-w-[32px] min-h-8",md:"px-2 py-1 text-base min-w-[40px] min-h-10"};function He({page:r,pageCount:s=5,maxVisiblePages:t=5,showFirstLast:n=!0,onPageChange:e,size:a="md",variant:l="link",className:c,ref:d,buttonsClassName:m,...b}){const u=s===1/0,f=i.useCallback(()=>{if(u)return[];const N=s,E=Math.min(t,N);if(N<=E)return Array.from({length:N},(M,z)=>z+1);const A=Math.floor(E/2);let C=Math.max(1,r-A),I=Math.min(N,C+E-1);return I-C+1<E&&(C=Math.max(1,I-E+1),I=Math.min(N,C+E-1)),Array.from({length:I-C+1},(M,z)=>C+z)},[u,t,r,s])(),x=r>1,v=u||r<s,g=n&&!u,w=n&&!u,p=N=>{N>=1&&(u||N<=s)&&e(N)},y=i.useCallback(()=>{const N=S.n("flex items-center justify-center min-w-fit","disabled:opacity-50 disabled:cursor-not-allowed",Fe[a],"rounded-md");return S.n(N,Be[l],m)},[l,a,m]);return o.jsxs("nav",{ref:d,className:S.n("flex items-center justify-center gap-1",c),role:"navigation","aria-label":"Pagination","data-page":r,"data-page-count":u?"infinite":s,...b,children:[g&&o.jsxs("button",{onClick:()=>p(1),className:y(),disabled:r===1,"aria-label":"Go to first page",children:[o.jsx(W.ChevronDoubleLeft,{size:a==="sm"?12:15}),o.jsx("span",{className:"ml-1",children:"First"})]}),o.jsxs("button",{onClick:()=>p(r-1),className:y(),disabled:!x,"aria-label":"Go to previous page",children:[o.jsx(W.ChevronLeft,{size:a==="sm"?12:15}),o.jsx("span",{className:"ml-1",children:"Previous"})]}),!u&&f.map(N=>o.jsx("button",{onClick:()=>p(N),className:S.n(y(),"aspect-square"),"aria-label":`Go to page ${N}`,"aria-current":N===r?!0:void 0,children:N},N)),o.jsxs("button",{onClick:()=>p(r+1),className:y(),disabled:!v,"aria-label":"Go to next page",children:[o.jsx("span",{className:"mr-1",children:"Next"}),o.jsx(W.ChevronRight,{size:a==="sm"?12:15})]}),w&&o.jsxs("button",{onClick:()=>p(s),className:y(),disabled:r===s,"aria-label":"Go to last page",children:[o.jsx("span",{className:"mr-1",children:"Last"}),o.jsx(W.ChevronDoubleRight,{size:a==="sm"?12:15})]})]})}function Pe(r){const[s,t]=i.useState(!1),[n,e]=i.useState(!1);return i.useEffect(()=>{r?(e(!0),setTimeout(()=>t(!0),10)):(t(!1),setTimeout(()=>e(!1),300))},[r]),{show:s,shouldRender:n}}function Ge(r,s){i.useEffect(()=>{const t=n=>{n.key==="Escape"&&r&&s()};return document.addEventListener("keydown",t),r&&(document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",t),document.body.style.overflow="auto"}},[r,s])}function qe(r,s){const t=i.useRef(null),n=i.useCallback(()=>{const e=document.getElementById(r);if(!e)return;const a=e.querySelectorAll('[data-panel-action="true"]');if(a.length>0){a[0].focus();return}const l=e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(l.length>0){const c=Array.from(l).filter(d=>!(d instanceof HTMLButtonElement&&d.getAttribute("data-panel-close-button")==="true"));if(c.length>0){c[0].focus();return}l[0].focus();return}e.focus()},[r]);i.useEffect(()=>(s&&(t.current=document.activeElement,n()),()=>{document.body.style.overflow="auto",t.current instanceof HTMLElement&&t.current.focus()}),[s,n])}const Ke={size:{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl",full:"w-full",screen:"w-screen"}};function Xe({ref:r,id:s,isOpen:t,onClose:n,title:e,children:a,footer:l,size:c="md",className:d,overlayClassName:m,hideCloseButton:b=!1,disableCloseOnOverlayClick:u=!1,ariaLabelledBy:h,ariaDescribedBy:f}){const x=i.useId(),v=s||`panel-${x}`,g=s?`${s}-title`:`panel-title-${x}`,{show:w,shouldRender:p}=Pe(t);if(qe(v,p),Ge(p,n),!p)return null;const y=()=>e?i.isValidElement(e)?o.jsx("div",{children:e}):o.jsx("h2",{className:"text-2xl font-semibold",id:g,children:e}):null,N=()=>{if(!l)return null;if(i.isValidElement(l)){const E=l,A=E.props.className||"";return i.cloneElement(E,{className:S.n("px-6 py-4",A)})}return o.jsx("div",{className:"px-6 py-4",children:l})};return o.jsx(o.Fragment,{children:ce.createPortal(o.jsxs("div",{"aria-labelledby":h??e?g:void 0,"aria-describedby":f,role:"dialog","aria-modal":"true",className:"fixed inset-0 z-[100] overflow-hidden","data-panel-open":t,children:[o.jsx("div",{className:S.n("fixed inset-0 bg-black/40 transition-opacity duration-300",w?"opacity-100":"opacity-0",m),onClick:()=>{u||n()}}),o.jsx("div",{className:"fixed inset-y-0 right-0 flex max-w-full",children:o.jsx("div",{id:v,ref:r,tabIndex:-1,className:S.n("relative h-full transform shadow-xl bg-popover transition-transform duration-300 ease-in-out",c!=="screen"&&"border-l border-border",Ke.size[c],w?"translate-x-0":"translate-x-full",d),"data-panel-size":c,children:o.jsxs("div",{className:"flex h-full flex-col",children:[e&&o.jsx("div",{className:"px-6 pt-6",children:y()}),!b&&o.jsx("button",{type:"button",onClick:n,"data-panel-close-button":"true","aria-label":"Close panel",className:"rounded-md p-0.5 top-3 right-3 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0",children:o.jsx(ae.X,{size:18})}),o.jsx("div",{className:S.n("flex-1 overflow-y-auto px-6 pb-6",e?"pt-6":"pt-10"),children:a}),N()]})})})]}),document.body)})}function pe({itemId:r,checked:s,onChange:t,name:n,disabled:e=!1,className:a=""}){const l="relative inline-flex items-center justify-center rounded-full",c=()=>{e||t()},d=j.join(l,!s&&"hover:border-current/60",!e&&"border-current cursor-pointer",e&&"border-muted/60 cursor-not-allowed",a);return o.jsx("div",{id:r,role:"radio",tabIndex:-1,"aria-checked":s,"aria-disabled":e,"aria-description":`Radio button for ${n}`,"aria-labelledby":`${r}-label`,onClick:c,className:d,style:{width:"1em",height:"1em",padding:"0.1em",borderWidth:"0.06em"},children:s&&o.jsx("div",{className:j.join("size-full aspect-square rounded-full",e&&"bg-muted/60",!e&&"bg-current")})})}function re({value:r,children:s,className:t="",isSelected:n=!1,onChange:e,disabled:a=!1,hideInput:l=!1,description:c,name:d}){const b=`radio-${i.useId()}-${r}`,u=()=>{a||e==null||e(r)};return o.jsxs("div",{title:c,className:j.join("relative flex items-center",t,l&&`p-2 border-2 focus-within:border-dashed focus-within:${a?"border-current/50":"border-current/80"}`,l&&!n&&`border-transparent ${a?"":"not-focus-within:hover:border-border/60"}`,l&&n&&"border-border",a&&"opacity-60 cursor-not-allowed"),style:{gap:"0.5em"},children:[!l&&o.jsx(pe,{itemId:b,name:d||"",checked:n,onChange:u,disabled:a,className:j.join(l&&"")}),o.jsx("div",{id:l?b:void 0,tabIndex:l?-1:void 0,role:l?"radio":void 0,onClick:l?u:void 0,"aria-checked":l?n?"true":"false":void 0,"aria-disabled":l?a:void 0,"aria-description":l?c||`Radio button for ${d}`:void 0,"aria-labelledby":l?`${b}-label`:void 0,className:j.join(l&&"size-full",typeof s=="object"&&"grow focus:outline-none"),children:o.jsx("label",{id:`${b}-label`,onClick:l?void 0:u,className:j.join(a&&"cursor-not-allowed",!a&&"cursor-pointer"),children:s})})]})}function Ue(r,s){const[t,n]=i.useState(s),[e,a]=i.useState(-1),[l,c]=i.useState(!1),d=i.useCallback((f,x)=>{var w;const v=f[x];v.hasAttribute("disabled")||v.getAttribute("aria-disabled")==="true"||((w=f[x])==null||w.click(),a(x))},[]),m=i.useCallback((f,x)=>{var g;if(f.preventDefault(),l||!x.length)return;const v=s!==-1?s:0;(g=x[v])==null||g.focus(),n(v),s!==-1&&d(x,v)},[s,l,d]),b=i.useCallback(f=>{var w;if(!f.shiftKey)return;f.preventDefault();const x=Array.from(document.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')).filter(p=>!p.hasAttribute("disabled")&&p.tabIndex>=0),v=x.findIndex(p=>p.id===r),g=v>0?v-1:x.length-1;(w=x[g])==null||w.focus()},[r]),u=i.useCallback((f,x)=>{var y;if(!x.length)return;const v=f.target;if(!x.some(N=>N.id===v.id))return;const w=t!==-1?t:0;let p=w;switch(f.key){case"ArrowUp":case"ArrowLeft":f.preventDefault(),p=w>0?w-1:x.length-1;break;case"ArrowDown":case"ArrowRight":f.preventDefault(),p=(w+1)%x.length;break;case" ":f.preventDefault(),d(x,w);return;case"Tab":b(f);return;default:return}(y=x[p])==null||y.focus(),n(p),e!==-1&&d(x,p)},[t,e,b,d]),h=i.useCallback(()=>{const f=document.querySelector(`[id="${r}"][role="radiogroup"]`);return f?Array.from(f.querySelectorAll('[role="radio"]')):[]},[r]);i.useEffect(()=>{const f=document.querySelector(`[id="${r}"][role="radiogroup"]`);if(!f)return;const x=h(),v=y=>m(y,x),g=y=>u(y,x),w=()=>c(!0),p=()=>c(!1);return document.addEventListener("keydown",g),f.addEventListener("focus",v),f.addEventListener("mousedown",w),document.addEventListener("mouseup",p),()=>{document.removeEventListener("keydown",g),f.removeEventListener("focus",v),f.removeEventListener("mousedown",w),document.removeEventListener("mouseup",p)}},[r,h,m,u])}function _e({options:r=[],value:s,onChange:t,id:n,children:e,className:a="",childrenClassName:l="",hideInputs:c=!1}){const d=i.useId(),m=n||`radio-group-${d}`;Ue(m,r.findIndex(u=>u===s));const b=i.useMemo(()=>r.reduce((u,h)=>(typeof h=="string"?u.some(f=>f.value===h)||u.push({label:h,value:h}):u.push(h),u),[]),[r]);return o.jsxs("div",{id:m,role:"radiogroup",tabIndex:0,className:j.join(a,"focus:outline-none"),children:[b.length>0&&b.map((u,h)=>o.jsx(re,{value:u.value,isSelected:s===u.value,onChange:t,name:m,disabled:u.disabled,description:u.description,hideInput:c,className:l,children:u.label},`${u.value}-${h}`)),b.length===0&&e&&i.Children.map(e,u=>i.isValidElement(u)&&u.type===re?o.jsx(re,{...u.props,className:j.join(l,u.props.className),hideInput:u.props.hideInput||c,isSelected:s===u.props.value,onChange:t,name:m,children:u.props.children}):null)]})}function Qe(r){const s=i.useRef(null),t=i.useRef(null),n=i.useRef(null),[e,a]=i.useState(!1),[l,c]=i.useState(!1),[d,m]=i.useState({vertical:!1,horizontal:!1}),b=i.useRef(null),u=i.useRef(null),h=i.useCallback(()=>{const v=s.current;if(!v)return;const g=v.scrollHeight>v.clientHeight,w=v.scrollWidth>v.clientWidth;m({vertical:g,horizontal:w})},[]),f=i.useCallback(()=>{const v=s.current,g=t.current,w=n.current;if(v){if(g&&d.vertical){const y=(d.horizontal?v.clientHeight-r:v.clientHeight)/v.scrollHeight,N=Math.max(y*100,10),E=v.scrollHeight-v.clientHeight,A=E>0?v.scrollTop/E:0,C=100-N,I=A*C;g.style.height=`${N}%`,g.style.top=`${I}%`,g.style.transform="none"}if(w&&d.horizontal){const y=(d.vertical?v.clientWidth-r:v.clientWidth)/v.scrollWidth,N=Math.max(y*100,10),E=v.scrollWidth-v.clientWidth,A=E>0?v.scrollLeft/E:0,C=100-N,I=A*C;w.style.width=`${N}%`,w.style.left=`${I}%`,w.style.transform="none"}}},[d,r]),x=i.useCallback(()=>{b.current&&clearTimeout(b.current),u.current&&clearTimeout(u.current),a(!0),c(!1),f(),b.current=setTimeout(()=>{c(!0),u.current=setTimeout(()=>{a(!1),c(!1)},300)},1e3)},[f]);return i.useEffect(()=>{const v=s.current;if(!v)return;h();const g=new ResizeObserver(h);g.observe(v);const w=new MutationObserver(h);return w.observe(v,{childList:!0,subtree:!0,attributes:!0}),()=>{g.disconnect(),w.disconnect()}},[h]),i.useEffect(()=>{f()},[d,f]),i.useEffect(()=>()=>{b.current&&clearTimeout(b.current),u.current&&clearTimeout(u.current)},[]),{viewportRef:s,verticalThumbRef:t,horizontalThumbRef:n,isScrolling:e,isFadingOut:l,scrollbarVisible:d,handleScroll:x}}function Ze({className:r,thumbClassName:s,viewportClassName:t,scrollbarClassName:n,scrollbarThickness:e=10,children:a,id:l,ref:c,...d}){const{viewportRef:m,verticalThumbRef:b,horizontalThumbRef:u,isScrolling:h,isFadingOut:f,scrollbarVisible:x,handleScroll:v}=Qe(e),g=S.n("relative flex-1 rounded-full bg-slate-400/60 hover:bg-slate-400/80 active:bg-slate-400",s);return o.jsxs("div",{ref:c,id:l,className:S.n("relative overflow-hidden",r),"data-scroll-area-root":"",...d,children:[o.jsx("div",{ref:m,className:S.n("h-full w-full overflow-auto rounded-[inherit] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",t),onScroll:v,"data-scroll-area-viewport":"",children:a}),x.vertical&&(h||f)&&o.jsx("div",{className:S.n("touch-none select-none transition-all duration-300","p-[1px]","absolute right-0 top-0",f?"opacity-0":"opacity-100",n),"data-scroll-area-scrollbar":"vertical","data-state":h?"visible":"hidden",style:{width:`${e}px`,height:x.horizontal?`calc(100% - ${e}px)`:"100%"},children:o.jsx("div",{ref:b,className:S.n("absolute rounded-full",g),"data-scroll-area-thumb":"",style:{height:"20%",top:"0%",width:"100%"}})}),x.horizontal&&(h||f)&&o.jsx("div",{className:S.n("touch-none select-none transition-all duration-300","p-[1px]","absolute bottom-0 left-0",f?"opacity-0":"opacity-100",n),"data-scroll-area-scrollbar":"horizontal","data-state":h?"visible":"hidden",style:{height:`${e}px`,width:x.vertical?`calc(100% - ${e}px)`:"100%"},children:o.jsx("div",{ref:u,className:S.n("absolute rounded-full",g),"data-scroll-area-thumb":"",style:{width:"20%",left:"0%",height:"100%"}})}),x.vertical&&x.horizontal&&o.jsx("div",{className:S.n("bg-transparent","absolute bottom-0 right-0"),"data-scroll-area-corner":"",style:{height:`${e}px`,width:`${e}px`}})]})}function Je(r){const[s,t]=i.useState(!1),[n,e]=i.useState(!1);return i.useEffect(()=>{r?(e(!0),setTimeout(()=>t(!0),10)):(t(!1),setTimeout(()=>e(!1),150))},[r]),{show:s,shouldRender:n}}function Ye({isOpen:r,setIsOpen:s,filteredOptions:t,highlightedIndex:n,setHighlightedIndex:e,onSelect:a,triggerRef:l}){return{handleKeyDown:i.useCallback(d=>{var m;switch(d.key){case"ArrowDown":if(d.preventDefault(),!r)s(!0);else{const b=n<t.length-1?n+1:0;let u=b;for(let h=0;h<t.length;h++){const f=(b+h)%t.length;if(!t[f].disabled){u=f;break}}e(u)}break;case"ArrowUp":if(d.preventDefault(),!r)s(!0);else{const b=n>0?n-1:t.length-1;let u=b;for(let h=0;h<t.length;h++){const f=(b-h+t.length)%t.length;if(!t[f].disabled){u=f;break}}e(u)}break;case"Enter":case" ":if(d.preventDefault(),!r)s(!0);else if(n>=0&&n<t.length){const b=t[n];b.disabled||a(b)}break;case"Escape":d.preventDefault(),r&&(s(!1),(m=l.current)==null||m.focus());break;case"Tab":r&&s(!1);break}},[r,s,t,n,e,a,l])}}function Oe({isOpen:r,filteredOptions:s,selectedOption:t,shouldRender:n,optionsContainerRef:e}){const[a,l]=i.useState(-1),c=i.useMemo(()=>t?s.findIndex(d=>d.value===t.value):-1,[s,t]);return i.useEffect(()=>{r&&s.length>0?l(t&&c>=0?c:0):l(-1)},[s,r,t,c]),i.useEffect(()=>{if(a>=0&&e.current&&n){const d=()=>{const m=e.current,b=m==null?void 0:m.querySelector(`[data-option-index="${a}"]`);if(b){const u=r&&t&&a===c?"auto":"smooth";b.scrollIntoView({behavior:u,block:"nearest"})}};r&&n&&t?setTimeout(d,10):d()}},[a,n,r,t,s,e,c]),{highlightedIndex:a,setHighlightedIndex:l}}const fe={sm:{trigger:"px-2 py-1 text-sm",options:"px-2 py-2 text-xs"},md:{trigger:"px-3 py-2 text-base",options:"px-3 py-2.5 text-sm"},lg:{trigger:"px-4 py-3 text-lg",options:"px-4 py-3 text-base"}};function et({options:r,value:s,placeholder:t="Select an option...",searchable:n=!1,disabled:e=!1,clearable:a=!1,size:l="md",className:c,triggerClassName:d,dropdownClassName:m,id:b,ref:u,onChange:h,onSearch:f,searchPlaceholder:x="Search options..."}){const v=i.useId(),w=`${b??v}-listbox`,p=k=>`${w}-option-${k}`,[y,N]=i.useState(!1),[E,A]=i.useState(""),C=i.useRef(null),I=i.useRef(null),M=i.useRef(null),z=i.useRef(null),{show:H,shouldRender:L}=Je(y),T=i.useMemo(()=>!n||!E?r:r.filter(k=>{var $;return k.text.toLowerCase().includes(E.toLowerCase())||(($=k.description)==null?void 0:$.toLowerCase().includes(E.toLowerCase()))}),[r,n,E]),R=i.useMemo(()=>r.find(k=>k.value===s),[r,s]),{highlightedIndex:D,setHighlightedIndex:B}=Oe({isOpen:y,filteredOptions:T,selectedOption:R,shouldRender:L,optionsContainerRef:z}),P=D>=0?p(D):void 0;i.useEffect(()=>{y&&L&&n&&I.current&&I.current.focus()},[y,n,L]);const q=i.useCallback(k=>{var $;k.disabled||(h==null||h(k.value),N(!1),A(""),($=C.current)==null||$.focus())},[h]),{handleKeyDown:F}=Ye({isOpen:y,setIsOpen:N,filteredOptions:T,highlightedIndex:D,setHighlightedIndex:B,onSelect:q,triggerRef:C});i.useEffect(()=>{if(!y)return;const k=$=>{var Q;M.current&&!M.current.contains($.target)&&!((Q=C.current)!=null&&Q.contains($.target))&&(N(!1),A(""))};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[y]);const X=()=>{e||(N(!y),y||(A(""),B(-1)))},se=k=>{k.disabled||(h==null||h(k.value),N(!1),A(""))},oe=k=>{const $=k.target.value;A($),f==null||f($),B(-1)},ie=k=>{k.preventDefault(),k.stopPropagation(),h==null||h("")};return o.jsxs("div",{className:j.join("relative",c),id:b,ref:u,"data-select":"true","data-value":s,"data-searchable":n,"data-disabled":e,"data-clearable":a,children:[o.jsxs("div",{className:"relative",children:[o.jsxs("button",{ref:C,type:"button",className:j.join("flex items-center justify-between w-full text-left bg-inherit border border-border rounded-md transition-colors","hover:border-primary focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",e&&"opacity-50 cursor-not-allowed hover:border-border",y&&"border-primary ring-1 ring-primary",fe[l].trigger,d),onClick:X,onKeyDown:F,disabled:e,"aria-disabled":e,"aria-haspopup":"listbox","aria-expanded":y,"aria-controls":y?w:void 0,"aria-activedescendant":y&&!n?P:void 0,"aria-label":R?R.text:t,"data-select-trigger":"true",children:[o.jsx("span",{className:j.join("block truncate",!R&&"opacity-70"),children:R?R.text:t}),o.jsx("div",{className:"flex items-center ml-2",children:o.jsx(W.ChevronDown,{size:16,className:j.join("transition-transform duration-200",y&&"rotate-180")})})]}),a&&R&&o.jsx("button",{type:"button",onClick:ie,className:"absolute right-8 top-1/2 -translate-y-1/2 p-0.5 rounded hover:bg-accent/20 transition-colors group z-10","aria-label":"Clear selection","data-select-clear":"true",children:o.jsx(ae.X,{size:14,className:"opacity-70 group-hover:opacity-100 transition-opacity"})})]}),L&&o.jsxs("div",{ref:M,className:j.join("absolute z-50 w-full mt-1 bg-popover border border-border rounded-md shadow-lg transition-all duration-150",H?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",m),id:w,role:"listbox","data-select-content":"true",children:[n&&o.jsx("div",{className:"border-b border-border",children:o.jsx("input",{ref:I,type:"text",value:E,onChange:oe,onKeyDown:F,placeholder:x,className:"w-full px-2 py-2 text-inherit focus:outline-none","aria-autocomplete":"list","aria-controls":w,"aria-activedescendant":P,"data-select-search":"true"})}),o.jsx("div",{ref:z,className:"max-h-60 overflow-auto",children:T.length>0?T.map((k,$)=>o.jsxs("div",{id:p($),className:j.join("flex items-center cursor-pointer transition-colors","hover:bg-accent/10 focus:bg-accent/10",fe[l].options,k.disabled&&"opacity-50 cursor-not-allowed",$===D&&"bg-accent/20",s===k.value&&"bg-accent/30"),onClick:()=>se(k),role:"option","aria-selected":s===k.value,"aria-disabled":k.disabled,"data-select-option":"true","data-value":k.value,"data-highlighted":$===D,"data-option-index":$,children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"font-medium",children:k.text}),k.description&&o.jsx("div",{className:"text-xs opacity-70 mt-0.5",children:k.description})]}),s===k.value&&o.jsx(W.Check,{size:16,className:"ml-2 text-primary flex-shrink-0"})]},k.value)):o.jsx("div",{className:"px-3 py-2 text-sm opacity-70 text-center",children:n&&E?"No results found":"No options available"})})]})]})}const tt={thin:{horizontal:"h-px",vertical:"w-px"},medium:{horizontal:"h-0.5",vertical:"w-0.5"},thick:{horizontal:"h-1",vertical:"w-1"},"extra-thick":{horizontal:"h-2",vertical:"w-2"}},rt={horizontal:"w-full",vertical:"min-h-4 h-full"};function nt({orientation:r="horizontal",decorative:s=!1,thickness:t="thin",className:n,...e}){const a=j.join("shrink-0 bg-border",rt[r],tt[t][r],n);return o.jsx("div",{...e,className:a,role:s?"presentation":"separator","aria-orientation":s?void 0:r,"aria-hidden":s,"data-orientation":r,"data-thickness":t})}const me={shape:{rectangle:"rounded-md min-h-1",circle:"rounded-full aspect-square min-h-1",text:"rounded-sm min-h-1 h-4"},lineSpacing:{xs:"space-y-1",sm:"space-y-2",md:"space-y-3",lg:"space-y-4",xl:"space-y-6"}};function at({shape:r="rectangle",lineSpacing:s="sm",className:t,lines:n=1,animate:e=!0,ref:a,...l}){const c=j.join("bg-muted/70",e&&"animate-pulse",me.shape[r],t);return n>1?o.jsx("div",{ref:a,className:me.lineSpacing[s],role:"presentation","aria-hidden":"true","data-testid":"skeleton-container","data-lines":n,"data-shape":r,"data-animate":e,...l,children:Array.from({length:n},(d,m)=>o.jsx("div",{className:j.join(c,m===n-1&&"w-3/4"),role:"presentation","aria-hidden":"true","data-testid":"skeleton-line","data-line-index":m},m))}):o.jsx("div",{ref:a,className:c,role:"presentation","aria-hidden":"true","data-testid":"skeleton","data-shape":r,"data-animate":e,...l})}function st({id:r,value:s,defaultValue:t=0,onValueChange:n,min:e=0,max:a=100,step:l=1,disabled:c=!1,trackClassName:d,rangeClassName:m,thumbClassName:b,className:u,ref:h,ariaLabel:f,ariaLabelledBy:x,...v}){const[g,w]=i.useState(t),p=s!==void 0,y=p?s:g,N=i.useRef(null),E=i.useRef(!1),A=i.useRef(0),C=i.useCallback(T=>{const R=Math.max(e,Math.min(a,T)),D=Math.round(R/l)*l;p||w(D),n==null||n(D)},[e,a,l,p,n]),I=i.useCallback((T,R=!1)=>{var q;const D=(q=N.current)==null?void 0:q.getBoundingClientRect();if(!D)return y;let B=T.clientX;R&&(B=B-A.current);const P=Math.max(0,Math.min(1,(B-D.left)/D.width));return e+(a-e)*P},[e,a,y]),M=i.useCallback(T=>{if(c||T.target!==T.currentTarget)return;const R=I(T);C(R)},[c,I,C]),z=i.useCallback(T=>{var q;if(c)return;T.stopPropagation(),E.current=!0;const R=(q=N.current)==null?void 0:q.getBoundingClientRect(),D=T.currentTarget.getBoundingClientRect();if(R&&D){const F=D.left+D.width/2;A.current=T.clientX-F}T.currentTarget.setPointerCapture(T.pointerId);const B=F=>{if(!E.current)return;const X=I(F,!0);C(X)},P=F=>{if(F.pointerId===T.pointerId){E.current=!1,A.current=0;try{T.currentTarget.releasePointerCapture(F.pointerId)}catch{}document.removeEventListener("pointermove",B),document.removeEventListener("pointerup",P)}};document.addEventListener("pointermove",B),document.addEventListener("pointerup",P)},[c,I,C]),H=i.useCallback(T=>{if(c)return;let R=y;switch(T.key){case"ArrowRight":case"ArrowUp":R=y+l;break;case"ArrowLeft":case"ArrowDown":R=y-l;break;case"Home":R=e;break;case"End":R=a;break;case"PageUp":R=y+l*10;break;case"PageDown":R=y-l*10;break;default:return}T.preventDefault(),C(R)},[c,y,l,e,a,C]),L=a===e?0:(y-e)/(a-e)*100;return o.jsx("div",{id:r,ref:h,className:S.n("relative flex items-center w-full touch-none select-none",c&&"opacity-50 cursor-not-allowed",u),"data-disabled":c,"data-value":y,"data-min":e,"data-max":a,"data-step":l,...v,children:o.jsxs("div",{ref:N,className:S.n("relative h-1.5 w-full rounded-full bg-muted cursor-pointer",c&&"cursor-not-allowed",d),onPointerDown:M,children:[o.jsx("div",{className:S.n("absolute h-full rounded-full pointer-events-none",!E.current&&"transition-all",m),style:{width:`${L}%`}}),o.jsx("div",{className:S.n("absolute size-5 -top-2 rounded-full shadow-md cursor-grab",c&&"cursor-not-allowed",!c&&"cursor-grab focus:outline-none focus:ring-2",E.current?"cursor-grabbing scale-110":"transition-all",b),style:{left:`calc(${L}% - 10px)`},tabIndex:c?-1:0,role:"slider","aria-valuemin":e,"aria-valuemax":a,"aria-valuenow":y,"aria-label":f,"aria-labelledby":x,"aria-disabled":c,onKeyDown:H,onPointerDown:z})]})})}function ot({children:r,ref:s,...t}){if(i.isValidElement(r)){let n={...t};return r.props&&(n={...n,...r.props}),i.cloneElement(r,{...n,ref:e=>{typeof s=="function"?s(e):s&&(s.current=e)}})}return i.createElement("div",{...t,ref:s},r)}const it=({defaultValue:r,value:s,onValueChange:t}={})=>{const[n,e]=i.useState(r||""),a=s!==void 0,l=a?s:n,c=i.useCallback(d=>{a||e(d),t==null||t(d)},[a,t]);return{value:l,onValueChange:c}};function lt({defaultValue:r,value:s,onValueChange:t,tabsWidth:n="fit",variant:e="underline",className:a,children:l,ref:c,id:d,triggersClassName:m,contentClassName:b}){const{value:u,onValueChange:h}=it({defaultValue:r,value:s,onValueChange:t}),f={selectedValue:u,onValueChange:h,tabsWidth:n,variant:e,triggersClassName:m,contentClassName:b};return o.jsx(S.TabsContext.Provider,{value:f,children:o.jsx("div",{id:d,ref:c,className:a,"data-tabs-width":n,"data-variant":e,children:l})})}function ct({value:r,className:s,children:t,ref:n}){const{selectedValue:e,contentClassName:a}=S.useTabsContext(),l=e===r;return l?o.jsx("div",{ref:n,role:"tabpanel",id:`tabs-content-${r}`,"aria-labelledby":`tabs-trigger-${r}`,"data-state":l?"active":"inactive","data-value":r,className:j.join("mt-4 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2",a,s),tabIndex:0,children:t}):null}const be={width:{fit:"w-fit",full:"w-full *:flex-1"},variant:{underline:"border-b border-border",pills:"",bordered:"border border-border rounded-lg p-1"}},ut={underline:"border-b-2 border-transparent data-[state=active]:border-accent data-[state=active]:text-accent hover:text-accent-foreground",pills:"rounded-md data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30",bordered:"rounded data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30"};function dt({children:r,className:s,id:t,ref:n}){const{tabsWidth:e,variant:a}=S.useTabsContext();return o.jsx("div",{id:t,ref:n,role:"tablist",className:j.join("flex",be.width[e],be.variant[a],s),"data-tabs-width":e,"data-variant":a,children:r})}function ft({value:r,disabled:s=!1,className:t,children:n,onClick:e,id:a,ref:l}){const{selectedValue:c,onValueChange:d,variant:m,triggersClassName:b}=S.useTabsContext(),u=c===r,h=x=>{s||d(r),e==null||e(x)};return o.jsx("button",{id:a,ref:l,role:"tab",type:"button","aria-selected":u,"aria-controls":`tabs-content-${r}`,"data-state":u?"active":"inactive","data-value":r,disabled:s,className:j.join("inline-flex items-center justify-center whitespace-nowrap px-3 py-2 text-sm ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",u?"font-medium":"font-light",ut[m],b,t),onClick:h,children:n})}function mt({elementId:r,maxLength:s}){const[t,n]=i.useState(0);return i.useEffect(()=>{const e=document.getElementById(r);if(!e)return;const a=()=>{const l=e.value.length;n(l);const c=l>=s;e.setAttribute("aria-describedby",`${r}-character-count`),e.setAttribute("aria-invalid",c?"true":"false"),c?e.setAttribute("data-error","true"):e.removeAttribute("data-error")};return a(),e.addEventListener("input",a),e.setAttribute("maxlength",String(s)),()=>{e.removeEventListener("input",a),e.removeAttribute("maxlength"),e.removeAttribute("aria-describedby"),e.removeAttribute("aria-invalid"),e.removeAttribute("data-error")}},[r,s]),o.jsx("small",{className:j.join("mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-end",t>=s&&"text-destructive",t<s&&"text-current"),role:"status",children:o.jsxs("span",{id:`${r}-character-count`,children:[t," / ",s," characters"]})})}function bt(r,s){i.useEffect(()=>{const t=document.getElementById(r);if(!t)return;if(!s){t.style.height="auto";return}const n=()=>{t.style.height="auto",t.style.height=`${t.scrollHeight}px`};return n(),t.addEventListener("input",n),t.addEventListener("resize",n),window.addEventListener("resize",n),()=>{t.removeEventListener("input",n),t.removeEventListener("resize",n),window.removeEventListener("resize",n)}},[r,s])}const ht={base:"","left-line":"border-l border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success",outline:"border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success"},xt={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"px-3 rounded-full"},he={variant:"outline",rounded:"none"};function vt({variant:r=he.variant,rounded:s,displayOnlyMode:t=!1,errorMessage:n,successMessage:e,hideResizeHandle:a=!1,autoExpand:l=!1,characterLimit:c=0,className:d,...m}){const b=i.useId();bt(b,l||t);let u=s;r==="outline"&&!s&&(u="md"),u=u||he.rounded;let h=a;(t||r==="left-line"&&!a)&&(h=!0);const x=j.join("appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all",!t&&ht[r],!t&&xt[u],!t&&"px-2 py-1",t&&"pointer-events-none",h&&"no-resize-handle",d);return o.jsxs("div",{className:j.join("-space-y-1.5",t&&"cursor-text"),children:[o.jsx("textarea",{...m,id:b,"aria-disabled":m.disabled,readOnly:t,"aria-readonly":t||m["aria-readonly"],style:{resize:l?"none":void 0},className:x}),c>0&&o.jsx(mt,{elementId:b,maxLength:c}),!t&&o.jsx(ne,{elementId:b,type:"error",message:n}),!t&&o.jsx(ne,{elementId:b,type:"success",message:e})]})}const gt={sm:{container:"h-5 min-w-9 w-9",thumb:"h-4 w-4",translate:"translate-x-4"},md:{container:"h-6 min-w-11 w-11",thumb:"h-5 w-5",translate:"translate-x-5"},lg:{container:"h-7 min-w-13 w-13",thumb:"h-6 w-6",translate:"translate-x-6"}},pt={default:{unchecked:"bg-muted",checked:"bg-primary"},success:{unchecked:"bg-muted",checked:"bg-success"},destructive:{unchecked:"bg-muted",checked:"bg-destructive"}},xe={variant:"default",size:"md"};function yt({ref:r,id:s,size:t=xe.size,variant:n=xe.variant,checked:e,onCheckedChange:a,disabled:l=!1,className:c,thumbClassName:d,backgroundClassNames:m,...b}){const u=i.useId(),h=i.useMemo(()=>s||`toggle-${u}`,[s,u]),[f,x]=i.useState(e);i.useEffect(()=>{x(e)},[e]);const v=()=>{if(!l){const E=!f;e===void 0&&x(E),a==null||a(E)}},g=E=>{(E.key===" "||E.key==="Enter")&&(E.preventDefault(),v())},w=gt[t],p=pt[n],y=j.join("relative inline-flex items-center rounded-full transition-all duration-200 ease-in-out","focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",w.container,f?(m==null?void 0:m.checked)||p.checked:(m==null?void 0:m.unchecked)||p.unchecked,l&&"opacity-50 cursor-not-allowed",!l&&"cursor-pointer",c),N=j.join("absolute left-0.5 top-1/2 -translate-y-1/2 rounded-full bg-white shadow-sm transition-transform duration-200 ease-in-out",w.thumb,f&&w.translate,d);return o.jsxs("button",{ref:r,id:h,type:"button",role:"switch",tabIndex:0,"aria-checked":f,"aria-disabled":l,disabled:l,onClick:v,onKeyDown:g,className:y,...b,children:[o.jsx("span",{className:N}),o.jsx("span",{className:"sr-only",children:f?"Enabled":"Disabled"})]})}const O=8,ee=4,G=6;function wt(r){return{calculatePosition:i.useCallback((t,n)=>{const e=t.getBoundingClientRect(),a=n.getBoundingClientRect(),l={width:window.innerWidth,height:window.innerHeight},c=(h,f,x,v)=>h<0||f<0||h+x>l.width||f+v>l.height,d={top:{x:e.left+e.width/2-a.width/2,y:e.top-a.height-ee,arrow:{x:a.width/2-G,y:a.height}},bottom:{x:e.left+e.width/2-a.width/2,y:e.bottom+ee,arrow:{x:a.width/2-G,y:-6}},left:{x:e.left-a.width-ee,y:e.top+e.height/2-a.height/2,arrow:{x:a.width,y:a.height/2-G}},right:{x:e.right+ee,y:e.top+e.height/2-a.height/2,arrow:{x:-6,y:a.height/2-G}}};let m=r,b=d[r];if(c(b.x,b.y,a.width,a.height)){const h={top:"bottom",bottom:"top",left:"right",right:"left"},f=d[h[r]];if(!c(f.x,f.y,a.width,a.height))m=h[r],b=f;else{const x=["top","bottom","left","right"].filter(v=>v!==r&&v!==h[r]);for(const v of x){const g=d[v];if(!c(g.x,g.y,a.width,a.height)){m=v,b=g;break}}}}b.x=Math.max(O,Math.min(b.x,l.width-a.width-O)),b.y=Math.max(O,Math.min(b.y,l.height-a.height-O));const u={x:e.left+e.width/2,y:e.top+e.height/2};return m==="top"||m==="bottom"?b.arrow.x=Math.max(G,Math.min(u.x-b.x-G,a.width-G*2)):b.arrow.y=Math.max(G,Math.min(u.y-b.y-G,a.height-G*2)),{...b,placement:m}},[r])}}function jt(r,s,t){const n=i.useRef(null),e=i.useRef(null),a=i.useCallback(()=>{if(!n.current||!e.current)return;const l=r(n.current,e.current);t(l)},[r,t]);return i.useEffect(()=>{if(!s)return;const l=()=>a();return window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[s,a]),{triggerRef:n,tooltipRef:e,updatePosition:a}}function Nt(r,s,t,n,e,a,l,c,d){const m=i.useRef(null),b=i.useCallback(()=>{r||(m.current&&clearTimeout(m.current),m.current=window.setTimeout(()=>{t(!0),requestAnimationFrame(()=>{e(),n(!0)})},s))},[r,s,t,e,n]),u=i.useCallback((h=!1)=>{if(m.current&&clearTimeout(m.current),h){n(!1),setTimeout(()=>t(!1),150);return}m.current=window.setTimeout(()=>{n(!1),setTimeout(()=>t(!1),150)},100)},[n,t]);return i.useEffect(()=>{!a&&!l&&!c&&d&&u()},[a,l,c,d,u]),i.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]),{showTooltip:b,hideTooltip:u,timeoutRef:m}}function Et({id:r,children:s,message:t,placement:n="top",disabled:e=!1,delay:a=200,className:l}){const[c,d]=i.useState(!1),[m,b]=i.useState(!1),[u,h]=i.useState(null),[f,x]=i.useState(!1),[v,g]=i.useState(!1),[w,p]=i.useState(!1),{calculatePosition:y}=wt(n),{triggerRef:N,tooltipRef:E,updatePosition:A}=jt(y,m,h),{showTooltip:C,hideTooltip:I,timeoutRef:M}=Nt(e,a,b,d,A,f,v,w,c),z=i.useId(),H=r??z;return o.jsxs(o.Fragment,{children:[i.cloneElement(s,{ref:L=>{N.current=L},onMouseEnter:()=>{x(!0),C()},onMouseLeave:()=>{x(!1)},onFocus:()=>{p(!0),C()},onBlur:()=>{p(!1),I(!0)},onKeyDown:L=>{L.key==="Escape"&&I(!0)},"aria-describedby":e?void 0:H}),m&&ce.createPortal(o.jsx("div",{ref:E,id:H,role:"tooltip",className:j.join("fixed z-50 px-2 py-1 text-sm rounded shadow-lg bg-popover pointer-events-auto transition-all duration-150 ease-out",c?"opacity-100":"opacity-0",l),style:u?{left:u.x,top:u.y}:{opacity:0},onMouseEnter:()=>{g(!0),M.current&&clearTimeout(M.current)},onMouseLeave:()=>{g(!1)},children:t}),document.body)]})}exports.ActionModal=S.ActionModal;exports.Toast=S.Toast;exports.Accordion=we;exports.AccordionItem=te;exports.Button=ge;exports.Carousel=Se;exports.Checkbox=Te;exports.Clickable=Re;exports.Input=$e;exports.Label=De;exports.LoadingDots=ve;exports.Modal=We;exports.Pagination=He;exports.Panel=Xe;exports.RadioGroup=_e;exports.RadioGroupItem=re;exports.RadioInput=pe;exports.ScrollArea=Ze;exports.Select=et;exports.Separator=nt;exports.Skeleton=at;exports.Slider=st;exports.Slot=ot;exports.Tabs=lt;exports.TabsContent=ct;exports.TabsList=dt;exports.TabsTrigger=ft;exports.Textarea=vt;exports.Toggle=yt;exports.Tooltip=Et;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),N=require("./utils.cjs.js"),W=require("./Window-oF6fyFBX.cjs"),A=require("./Toast-DLFVFkWv.cjs"),ie=require("react-dom");require("./useToast-CraVIawn.cjs");const ue=require("./useDownloadFile-D7aXoP4p.cjs"),le=require("./X-CgjeP2OI.cjs");function se({id:n,title:a,content:r,children:o,className:t="",disabled:e=!1,isOpen:l=!1,onToggle:c,triggerClassName:d="",bodyClassName:b=""}){const h=i.useId(),u=n||`accordion-item-${h}`,x=`${u}-header`,f=`${u}-panel`,p=()=>{!e&&c&&c()},v=m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),p())};return s.jsxs("div",{className:N.join("border-b border-gray-200",e&&"opacity-60 cursor-not-allowed",t),children:[s.jsxs("button",{id:x,type:"button",className:N.join("w-full text-left py-3 px-4 flex justify-between items-center focus:outline focus:outline-secondary",e?"cursor-not-allowed":"hover:bg-gray-50/10 cursor-pointer",d),"aria-expanded":l,"aria-controls":f,disabled:e,onClick:p,onKeyDown:v,children:[s.jsx("span",{children:a}),s.jsx("span",{className:N.join("transform transition-transform duration-300 ease-linear",l?"rotate-180":"rotate-0"),"aria-hidden":"true",children:s.jsx(W.ChevronDown,{size:18})})]}),s.jsx("div",{id:f,role:"region","aria-labelledby":x,className:N.join("transition-all duration-300 ease-linear px-4",l?"max-h-96 opacity-100 overflow-auto py-3":"max-h-0 opacity-0 overflow-hidden",b),children:l&&(o||r)})]})}function je({id:n,items:a=[],children:r,className:o="",itemClassName:t="",allowMultiple:e=!1,defaultOpenItems:l=[],triggersClassName:c="",bodiesClassName:d=""}){const b=i.useId(),h=n||`accordion-group-${b}`,[u,x]=i.useState(new Set(l)),f=m=>{x(w=>{const y=new Set(w);return y.has(m)?y.delete(m):(e||y.clear(),y.add(m)),y})},p=m=>`${b}-item-${m}`,v=m=>u.has(m);return s.jsxs("div",{id:h,className:o,children:[a.length>0&&a.map((m,w)=>{const y=m.id||p(w);return s.jsx(se,{id:y,title:m.title,content:m.content,disabled:m.disabled,isOpen:v(y),onToggle:()=>f(y),className:t,triggerClassName:c,bodyClassName:d},y)}),a.length===0&&r&&i.Children.map(r,(m,w)=>{if(i.isValidElement(m)&&m.type===se){const y=m.props.id||p(w);return i.createElement(se,{...m.props,key:y,id:y,className:N.join(t,m.props.className),isOpen:v(y),onToggle:()=>f(y),triggerClassName:N.join(c,m.props.triggerClassName),bodyClassName:N.join(d,m.props.bodyClassName)})}return null})]})}function ve(){const[n,a]=i.useState(0);return i.useEffect(()=>{const r=setInterval(()=>{a(o=>(o+1)%3)},500);return()=>clearInterval(r)},[]),s.jsx("div",{className:"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle",children:[0,1,2].map(r=>s.jsx("div",{className:N.join("rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current",n===r&&"transform -translate-y-1")},r))})}const Ne={base:"",primary:"bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",tertiary:"text-primary hover:text-primary-foreground disabled:text-muted",outline:"border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",link:"underline-offset-4 hover:underline disabled:underline disabled:text-muted",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"},ke={stripped:"",fitted:"size-fit",sm:"px-2 py-1 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg",icon:"p-1 w-fit aspect-square",full:"p-2 w-full"},Ce={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},ce={variant:"primary",size:"md",rounded:"md"};function ge({variant:n=ce.variant,size:a,rounded:r=ce.rounded,loading:o,linkTo:t,linkProps:e,type:l="button",className:c,...d}){let b;n==="link"&&!a?b="fitted":b=a||ce.size;const u=N.join("appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",Ne[n],ke[b],Ce[r],o&&"relative pointer-events-none",t&&"relative",c);return s.jsxs("button",{...d,role:t?"link":d.role,"aria-label":d["aria-label"]||(e==null?void 0:e["aria-label"]),"aria-description":d["aria-description"]||(e==null?void 0:e["aria-description"]),"aria-disabled":d.disabled||o,"aria-busy":o,type:l,className:u,children:[o&&s.jsx(ve,{}),s.jsx("span",{className:N.join(o&&"invisible"),children:d.children}),t&&!d.disabled&&s.jsx("a",{...e,"aria-hidden":!0,href:t,rel:(e==null?void 0:e.rel)||"noreferrer",className:"absolute inset-0"})]})}function Ee({totalItems:n,itemsToShow:a,infinite:r,autoScroll:o,scrollInterval:t,pauseScrollOnHover:e,currentIndex:l,onIndexChange:c}){const[d,b]=i.useState(l||0),[h,u]=i.useState(!1),x=i.useRef(null),f=Math.ceil(n/a),p=r||d>0,v=r||d<f-1,m=i.useCallback(g=>{const j=Math.max(0,Math.min(g,f-1));b(j),c==null||c(j)},[f,c]),w=i.useCallback(()=>{if(p){const g=d===0&&r?f-1:d-1;m(g)}},[d,p,r,f,m]),y=i.useCallback(()=>{if(v){const g=d===f-1&&r?0:d+1;m(g)}},[d,v,r,f,m]);return i.useEffect(()=>{l!==void 0&&l!==d&&b(l)},[l,d]),i.useEffect(()=>{if(!o)return;const g=()=>{x.current=setInterval(()=>{e&&h||y()},t)},j=()=>{x.current&&(clearInterval(x.current),x.current=null)};return!h||!e?g():j(),j},[o,t,e,h,y]),i.useEffect(()=>{b(0)},[a]),{currentSlide:d,canGoPrev:p,canGoNext:v,goToPrev:w,goToNext:y,goToSlide:m,isHovered:h,setIsHovered:u}}const _={xs:0,sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function Se(){const[n,a]=i.useState(),[r,o]=i.useState(0),t=e=>_[e];return i.useEffect(()=>{const e=c=>c>=_["2xl"]?"2xl":c>=_.xl?"xl":c>=_.lg?"lg":c>=_.md?"md":c>=_.sm?"sm":"xs";a(e(window.innerWidth)),o(window.innerWidth);const l=()=>{a(e(window.innerWidth)),o(window.innerWidth)};return window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[]),{screenSize:n,screenWidth:r,getBreakpoint:t}}const ee={sm:{button:"h-6 w-6 text-xs",icon:"size-3"},md:{button:"h-8 w-8 text-sm",icon:"size-4"},lg:{button:"h-10 w-10 text-lg",icon:"size-5"}},de={default:"bg-accent text-accent-foreground hover:bg-accent-foreground hover:text-accent",outline:"border border-border bg-background hover:bg-accent hover:text-accent-foreground hover:border-accent",ghost:"hover:text-accent"},te={aligned:{prev:"absolute top-1/2 -translate-x-1/2 -translate-y-1/2 z-10",next:"absolute right-0 top-1/2 translate-x-1/2 -translate-y-1/2 z-10"},exterior:{prev:"absolute -left-10 top-1/2 -translate-y-1/2 z-10",next:"absolute -right-10 top-1/2 -translate-y-1/2 z-10"},interior:{prev:"absolute left-2 top-1/2 -translate-y-1/2 z-10",next:"absolute right-2 top-1/2 -translate-y-1/2 z-10"}};function Te({children:n,id:a,ref:r,className:o,autoScroll:t=!1,scrollInterval:e=3e3,pauseScrollOnHover:l=!0,currentIndex:c,onIndexChange:d,hidePrevNext:b=!1,hideDots:h=!1,itemsToShow:u=1,buttonSize:x="md",buttonVariant:f="default",buttonPosition:p="exterior",infinite:v=!0,prevButton:m,nextButton:w,itemsClassName:y,containerClassName:g,dotsClassName:j,gap:k=8}){var L,Y;const T=i.useRef(null),C=i.Children.toArray(n).filter(i.isValidElement),S=C.length,{screenSize:F}=Se(),R=i.useMemo(()=>{if(typeof u=="number")return u;if(typeof u=="object"&&u&&F){const Z=["2xl","xl","lg","md","sm","xs"],K=Z.indexOf(F);for(let X=K;X<Z.length;X++){const O=Z[X];if(u[O]!==void 0)return u[O]}}return 1},[u,F]),{currentSlide:q,canGoPrev:M,canGoNext:z,goToPrev:I,goToNext:V,goToSlide:P,setIsHovered:$}=Ee({totalItems:S,itemsToShow:R,infinite:v,autoScroll:t,scrollInterval:e,pauseScrollOnHover:l,currentIndex:c,onIndexChange:d}),B=i.useCallback(Z=>{if(R===1)return{leftWidth:0,rightWidth:0,widthReduction:0};const K=k*(R-1)/R;return Z%R===0?{leftWidth:0,rightWidth:k/2,widthReduction:K}:Z%R===R-1?{leftWidth:k/2,rightWidth:0,widthReduction:K}:{leftWidth:k/2,rightWidth:k/2,widthReduction:K}},[R,k]),D=()=>{I()},H=()=>{V()},U=()=>{l&&$(!0)},J=()=>{l&&$(!1)},Q=-(q*(100/S)*R),E=N.join("inline-flex items-center justify-center rounded-md font-medium transition-all focus-visible:outline-none focus-visible:ring focus-visible:ring-ring disabled:pointer-events-none",p==="aligned"?"disabled:opacity-90":"disabled:opacity-50");return s.jsxs("div",{className:N.join("relative",o),"data-carousel-wrapper":"true",children:[!b&&s.jsx(s.Fragment,{children:m?i.cloneElement(m,{onClick:D,disabled:!M,className:N.join(((L=m.props)==null?void 0:L.className)||"",te[p].prev),role:"button","aria-disabled":!M,"aria-label":"Previous slide","data-carousel-prev":"true"}):s.jsx("button",{type:"button",onClick:D,disabled:!M,className:N.join(E,ee[x].button,de[f],te[p].prev),"aria-disabled":!M,"aria-label":"Previous slide","data-carousel-prev":"true",children:s.jsx(W.ChevronLeft,{className:ee[x].icon})})}),s.jsxs("div",{id:a,ref:r,className:N.join("relative overflow-hidden",g),onMouseEnter:U,onMouseLeave:J,"data-carousel":"true","data-current-index":q,"data-items-to-show":R,"data-auto-scroll":t,"data-button-position":p,children:[s.jsx("div",{ref:T,className:"flex transition-transform duration-300 ease-in-out",style:{transform:`translateX(${Q}%)`,width:`${S/R*100}%`},children:C.map((Z,K)=>{const{leftWidth:X,rightWidth:O,widthReduction:we}=B(K);return s.jsx("div",{className:N.join("flex-shrink-0",y),style:{width:`calc(${100/S}% - ${we}px)`,marginRight:O>0?`${O}px`:void 0,marginLeft:X>0?`${X}px`:void 0},"data-slide-index":K,children:Z},K)})}),!h&&s.jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 flex space-x-2",children:Array.from({length:Math.ceil(S/R)}).map((Z,K)=>s.jsx("button",{type:"button",onClick:()=>P(K),className:N.join("w-2 h-2 rounded-full transition-colors duration-200",K===q?"bg-accent":"bg-muted hover:bg-muted-foreground/50",j),"aria-label":`Go to slide ${K+1}`,"data-carousel-dot":K},K))})]}),!b&&s.jsx(s.Fragment,{children:w?i.cloneElement(w,{onClick:H,disabled:!z,className:N.join(((Y=w.props)==null?void 0:Y.className)||"",te[p].next),role:"button","aria-disabled":!z,"aria-label":"Next slide","data-carousel-next":"true"}):s.jsx("button",{type:"button",onClick:H,disabled:!z,className:N.join(E,ee[x].button,de[f],te[p].next),"aria-disabled":!z,"aria-label":"Next slide","data-carousel-next":"true",children:s.jsx(W.ChevronRight,{className:ee[x].icon})})})]})}function ze(n){const[a,r]=i.useState(""),o=i.useCallback(t=>{let e=t,l="";for(;e&&!l;){const c=window.getComputedStyle(e).backgroundColor;c&&c!=="transparent"&&c!=="rgba(0, 0, 0, 0)"&&(l=c),e=e.parentElement}return l||"transparent"},[]);return i.useEffect(()=>{const t=document.getElementById(n);if(t){const e=o(t.parentElement);r(e)}},[n,o]),a}function Ae({ref:n,id:a,size:r=20,color:o,filled:t=!1,rounded:e=!0,checked:l=!1,onCheckedChange:c,disabled:d,className:b="",...h}){const u=i.useId(),x=i.useMemo(()=>a||`checkbox-${u}`,[a,u]),f=ze(x),[p,v]=i.useState(l);i.useEffect(()=>{v(l)},[l]);const m=()=>{d||(v(!p),c==null||c(!p))},w=g=>{g.key===" "&&(g.preventDefault(),m())},y=N.join("flex items-center justify-center border outline outline-transparent focus:outline-current focus:outline-offset-2",e&&"rounded",d&&"opacity-40 cursor-not-allowed",!d&&"cursor-pointer",b);return s.jsx("button",{id:x,type:"button",ref:n,tabIndex:0,role:"checkbox",onClick:m,"aria-checked":p,"aria-disabled":d,onKeyDownCapture:w,style:{width:r,height:r,color:o,backgroundColor:p&&t?"currentcolor":"transparent"},className:y,...h,children:p&&s.jsx(W.Check,{size:r,color:t?f:void 0})})}function Ie({children:n,className:a,linkTo:r,linkProps:o,onButtonClick:t,buttonProps:e,...l}){return r&&t&&console.warn('Clickable: Both "linkTo" and "onButtonClick" props are provided. Only "linkTo" will be used.'),s.jsxs("div",{className:N.join("relative w-fit",a),...l,children:[n,r&&s.jsx("a",{...o,rel:(o==null?void 0:o.rel)||"noreferrer",href:r,className:N.join("absolute inset-0",o==null?void 0:o.className)}),!r&&t&&s.jsx("button",{...e,type:"button",onClick:t,className:N.join("absolute inset-0 cursor-pointer",e==null?void 0:e.className)})]})}function Re(n,a){const r=i.useRef(null),o=i.useRef(null);return i.useEffect(()=>{if(n){r.current=document.activeElement,document.body.style.overflow="hidden",setTimeout(()=>{var e;(e=o.current)==null||e.focus()},100);const t=e=>{e.key==="Escape"&&a(!1)};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t),document.body.style.overflow=""}}else r.current&&(r.current.focus(),r.current=null)},[n,a]),{containerRef:o}}function $e(n,a,r,o){return{handleKeyDown:i.useCallback(e=>{e.key==="c"&&(e.metaKey||e.ctrlKey)&&n?(e.preventDefault(),r()):e.key==="f"&&a&&(e.preventDefault(),o())},[n,a,r,o])}}function De(){return{tokenizeTypeScript:i.useCallback((a,r=!1,o=0)=>{const t=[];let e=a,l=r,c=o;for(;e.length>0;){const d=e.match(/^\/\*[\s\S]*?\*\//);if(d){t.push({text:d[0],type:"comment"}),e=e.slice(d[0].length);continue}const b=e.match(/^\/\/.*$/m);if(b){t.push({text:b[0],type:"comment"}),e=e.slice(b[0].length);continue}const h=e.match(/^(`[^`]*`|"[^"]*"|'[^']*')/);if(h){t.push({text:h[0],type:"string"}),e=e.slice(h[0].length);continue}const u=e.match(/^<([a-zA-Z][a-zA-Z0-9]*)/);if(u){t.push({text:"<",type:"jsx-bracket"}),t.push({text:u[1],type:"jsx-tag"}),e=e.slice(u[0].length),l=!0;continue}const x=e.match(/^<\/([a-zA-Z][a-zA-Z0-9]*)>/);if(x){t.push({text:"</",type:"jsx-bracket"}),t.push({text:x[1],type:"jsx-tag"}),t.push({text:">",type:"jsx-bracket"}),e=e.slice(x[0].length),l=!1;continue}if(e.match(/^\/?>/)){const C=e.match(/^(\/?>\s*)/);if(C){t.push({text:C[1].trim(),type:"jsx-bracket"}),e=e.slice(C[1].length),C[1].includes(">")&&(l=!1);continue}}const f=e.match(/^([a-zA-Z][a-zA-Z0-9]*)(\s*)(=)/);if(f&&l&&c===0){t.push({text:f[1],type:"jsx-attribute"}),f[2]&&t.push({text:f[2],type:"plain"}),t.push({text:"=",type:"plain"}),e=e.slice(f[0].length);continue}const p=e.match(/^[{}]/);if(p){t.push({text:p[0],type:"jsx-brace"}),p[0]==="{"?c++:p[0]==="}"&&c--,e=e.slice(1);continue}const v=e.match(/^\s+/);if(v){t.push({text:v[0],type:"plain"}),e=e.slice(v[0].length);continue}const m=e.match(/^(=>|===|!==|==|!=|<=|>=|&&|\|\||[+\-*/%=<>!&|^~?:;,()[\]{}.])/);if(m){t.push({text:m[0],type:"operator"}),e=e.slice(m[0].length);continue}const w=e.match(/^(const|let|var|function|if|else|for|while|return|import|export|class|extends|interface|type|enum|async|await|public|private|protected|static|from|as|default|new|this|super|try|catch|finally|throw|break|continue|switch|case|typeof|instanceof)\b/);if(w){t.push({text:w[0],type:"keyword"}),e=e.slice(w[0].length);continue}const y=e.match(/^(use[A-Z][a-zA-Z]*)\b/);if(y){t.push({text:y[0],type:"hook"}),e=e.slice(y[0].length);continue}const g=e.match(/^([a-zA-Z_$][a-zA-Z0-9_$]*)\s*(?=(\?\.)?\()/);if(g){t.push({text:g[1],type:"function"}),e=e.slice(g[1].length);continue}const j=e.match(/^(string|number|boolean|object|any|void|never|unknown|null|undefined|Promise|Array|React\.FC|FC|JSX\.Element|HTMLElement|Event|MouseEvent|KeyboardEvent|ChangeEvent)\b/);if(j){t.push({text:j[0],type:"type"}),e=e.slice(j[0].length);continue}const k=e.match(/^(\d+\.?\d*)/);if(k){t.push({text:k[0],type:"number"}),e=e.slice(k[0].length);continue}const T=e.match(/^([a-zA-Z_$][a-zA-Z0-9_$]*)\s*(?=:)/);if(T&&!l){t.push({text:T[1],type:"property"}),e=e.slice(T[1].length);continue}t.push({text:e[0],type:"plain"}),e=e.slice(1)}return t},[])}}function Le(n){return{mergedTokenClasses:i.useMemo(()=>({...{keyword:"text-purple-400 font-semibold",type:"text-cyan-400 font-medium",string:"text-green-400","jsx-bracket":"text-gray-400","jsx-tag":"text-blue-400 font-medium","jsx-attribute":"text-amber-400","jsx-brace":"text-yellow-400",jsx:"text-blue-400 font-medium",property:"text-amber-400",number:"text-orange-400 font-medium",comment:"text-gray-500 italic",function:"text-rose-400 font-semibold",hook:"text-rose-400 font-semibold",operator:"text-gray-300",plain:"text-gray-100"},...n}),[n])}}function Ve({code:n,language:a="typescript",allowCopy:r=!0,allowDownload:o=!1,allowFullscreen:t=!1,filename:e,showTrafficLights:l=!0,showLineNumbers:c=!1,hideHeader:d=!1,hideFiletype:b=!1,maxHeight:h,tokenClasses:u,className:x,id:f,ref:p,...v}){const[m,w]=i.useState(!1),{containerRef:y}=Re(m,w),{copied:g,handleCopy:j}=ue.useCopyToClipboard(n),{handleDownload:k}=ue.useDownloadFile(),{mergedTokenClasses:T}=Le(u),{tokenizeTypeScript:C}=De(),S=i.useMemo(()=>n.split(`
2
+ `),[n]),F=i.useCallback(()=>{const $=e||`code.${q(a)}`;k(n,$)},[n,e,a,k]),{handleKeyDown:R}=$e(r,t,j,()=>w(!m)),q=$=>({typescript:"ts",tsx:"tsx",ts:"ts"})[$]||"ts",M=i.useCallback(($=!0)=>s.jsxs("div",{className:N.join("flex items-center space-x-2",!$&&"absolute top-2 right-2 z-10"),children:[!b&&s.jsx("span",{className:"text-xs text-gray-400 uppercase tracking-wide font-medium","aria-label":`Code language: ${a}`,children:a}),t&&s.jsx("button",{onClick:()=>w(!m),className:"p-1.5 leading-0 text-gray-400 hover:text-white hover:bg-gray-700 rounded transition-colors motion-reduce:transition-none min-h-[44px] min-w-[44px] flex items-center justify-center md:min-h-auto md:min-w-auto md:p-1.5",title:m?"Exit fullscreen":"Fullscreen","aria-label":m?"Exit fullscreen mode":"Enter fullscreen mode","aria-pressed":m,type:"button",children:m?s.jsx(W.Dash,{size:14}):s.jsx(W.Window,{size:14})}),o&&s.jsx("button",{onClick:F,className:"p-1.5 leading-0 text-gray-400 hover:text-white hover:bg-gray-700 rounded transition-colors motion-reduce:transition-none min-h-[44px] min-w-[44px] flex items-center justify-center md:min-h-auto md:min-w-auto md:p-1.5",title:"Download code","aria-label":"Download code as file",type:"button",children:s.jsx(W.Download,{size:14})}),r&&s.jsx("button",{onClick:j,className:"p-1.5 leading-0 text-gray-400 hover:text-white hover:bg-gray-700 rounded transition-colors motion-reduce:transition-none min-h-[44px] min-w-[44px] flex items-center justify-center md:min-h-auto md:min-w-auto md:p-1.5",title:g?"Code copied!":"Copy code","aria-label":g?"Code copied to clipboard":"Copy code to clipboard","aria-live":"polite",type:"button",children:g?s.jsx(W.Check,{size:14,className:"text-green-400"}):s.jsx(W.Copy,{size:14})})]}),[b,a,t,m,o,F,r,j,g]),z=i.useMemo(()=>{let $=!1,B=0;return S.map((D,H)=>{if(D.trim()==="")return s.jsx("div",{className:"leading-6",children:" "},H);const U=C(D,$,B);D.includes("<")&&D.match(/<[a-zA-Z]/)&&($=!0),D.includes(">")&&!D.includes("<")&&($=!1,B=0);const J=(D.match(/\{/g)||[]).length,Q=(D.match(/\}/g)||[]).length;return B+=J-Q,B<0&&(B=0),s.jsx("div",{className:"leading-6",children:U.map((E,L)=>s.jsx("span",{className:T[E.type]||"text-gray-100",children:E.text},L))},H)})},[S,T,C]),I=i.useMemo(()=>c?S.map(($,B)=>s.jsx("div",{className:"text-gray-500 text-right pl-3 pr-1 select-none min-w-8 text-sm font-mono leading-6","aria-hidden":"true",role:"presentation",children:B+1},B)):null,[c,S]),V=i.useMemo(()=>({maxHeight:h&&!m?`${h}px`:m?"fit-content":void 0,overflow:h||m?"auto":"visible"}),[h,m]),P=s.jsxs("div",{id:f,ref:$=>{y.current=$,typeof p=="function"?p($):p&&(p.current=$)},className:N.join("bg-gray-900 rounded-lg border border-gray-700 overflow-hidden motion-reduce:transition-none",m&&"fixed inset-0 z-[9999] max-h-fit",x),"data-language":a,"data-filename":e,"data-fullscreen":m,role:"region","aria-label":`Code block${e?` for ${e}`:""} in ${a}`,"aria-describedby":c?`${f}-description`:void 0,tabIndex:0,onKeyDown:R,...v,children:[c&&s.jsxs("div",{id:`${f}-description`,className:"sr-only",children:["Code block with line numbers. Use Cmd+C or Ctrl+C to copy code.",t&&" Press F to toggle fullscreen."]}),s.jsx("div",{"aria-live":"polite","aria-atomic":"true",className:"sr-only",children:g&&"Code copied to clipboard"}),!d&&s.jsxs("div",{className:"flex items-center justify-between px-4 py-2 bg-gray-800 border-b border-gray-700",children:[s.jsxs("div",{className:"flex items-center space-x-3",children:[l&&s.jsxs("div",{className:"flex space-x-2",children:[s.jsx("div",{className:"w-3 h-3 bg-red-500 rounded-full"}),s.jsx("div",{className:"w-3 h-3 bg-yellow-500 rounded-full"}),s.jsx("div",{className:"w-3 h-3 bg-green-500 rounded-full"})]}),e&&s.jsx("span",{className:"text-sm text-gray-300 font-medium",children:e})]}),M(!0)]}),s.jsxs("div",{className:N.join("flex overflow-hidden",d&&"relative"),style:V,children:[d&&M(!1),s.jsx("div",{className:"flex-1 overflow-x-auto",children:s.jsxs("div",{className:"flex",children:[c&&s.jsx("div",{className:"bg-gray-800 py-4 border-r border-gray-700 flex flex-col flex-shrink-0","aria-hidden":"true",role:"presentation",children:I}),s.jsx("div",{className:"flex-1 p-4",children:s.jsx("pre",{className:"text-sm font-mono focus:outline-none",role:"code","aria-label":`${a} code content`,tabIndex:-1,children:s.jsx("code",{children:z})})})]})})]})]});return s.jsxs(s.Fragment,{children:[!m&&P,m&&ie.createPortal(s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 bg-black z-[9998] p-1",onClick:()=>w(!1),"aria-hidden":"true"}),P]}),document.body)]})}function oe({elementId:n,type:a,message:r}){return i.useEffect(()=>{const o=document.getElementById(n);if(o){if(!r&&a==="error"){o.removeAttribute("data-error");return}if(!r&&a==="success"){o.removeAttribute("data-success");return}return o.setAttribute("aria-describedby",`${n}-${a}-message`),o.setAttribute("aria-invalid",a==="error"?"true":"false"),a==="error"&&o.setAttribute("data-error","true"),a==="success"&&o.setAttribute("data-success","true"),()=>{o.removeAttribute("aria-describedby"),o.removeAttribute("aria-invalid"),o.removeAttribute("data-error"),o.removeAttribute("data-success")}}},[n,a,r]),r?s.jsxs("small",{className:N.join("mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-start",a==="error"&&"text-destructive",a==="success"&&"text-success"),role:"status",children:[a==="error"?s.jsx(le.ExclamationTriangle,{}):s.jsx(W.CheckCircled,{}),s.jsx("span",{id:`${n}-${a}-message`,children:r})]}):null}const Me={base:"",default:"ring ring-transparent focus:ring-primary-foreground not-disabled:data-error:ring-destructive not-disabled:data-success:ring-success",underline:"border-b border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success",outline:"border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success"},Be={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"px-3 rounded-full"},fe={variant:"default",rounded:"none"};function We({variant:n=fe.variant,rounded:a,displayOnlyMode:r=!1,errorMessage:o,successMessage:t,type:e="text",className:l,...c}){const d=i.useId(),[b,h]=i.useState(!1);let u=a;n==="outline"&&!a&&(u="md"),u=u||fe.rounded;const p=N.join("appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all","file:mr-2 file:border-0 file:rounded-md file:px-1.5 file:py-1 file:bg-primary hover:file:bg-primary/85 file:text-sm file:font-medium file:text-foreground file:transition-colors",!r&&Me[n],!r&&Be[u],e==="password"&&"pr-10",!r&&"px-2 py-1",r&&"pointer-events-none",l);return s.jsxs("div",{className:N.join(r&&"cursor-text"),style:{height:c.height,width:c.width},children:[s.jsxs("div",{className:N.join(e==="password"&&"relative"),children:[s.jsx("input",{...c,id:d,type:e==="password"&&b?"text":e,"aria-disabled":c.disabled,readOnly:r,"aria-readonly":r||c["aria-readonly"],"data-error":o?!0:void 0,"data-success":t?!0:void 0,className:p}),e==="password"&&s.jsx("button",{onClick:()=>h(!b),className:"absolute inset-y-0 right-0 px-2 hover:cursor-pointer","aria-label":"Toggle password visibility","data-state":b?"visible":"hidden",children:b?s.jsx(W.EyeOpened,{size:20}):s.jsx(W.EyeClosed,{size:20})})]}),!r&&s.jsx(oe,{elementId:d,type:"error",message:o}),!r&&s.jsx(oe,{elementId:d,type:"success",message:t})]})}function Fe({display:n="inline",width:a="fit-content",className:r="",required:o,helpMessage:t,suffix:e,htmlFor:l,children:c,description:d,...b}){var v,m;const h=i.useId(),u=(((v=t==null?void 0:t.trim())==null?void 0:v.length)||0)>0,x=(((m=d==null?void 0:d.trim())==null?void 0:m.length)||0)>0,f=u?`${l??h}-help`:void 0,p=x?`${l??h}-description`:void 0;return s.jsxs("div",{style:{display:n==="inline"?"inline-block":"block",width:a},className:N.join("mb-0.5",r),children:[s.jsxs("div",{className:"relative flex",children:[s.jsxs("label",{className:"font-medium",htmlFor:l,...b,children:[c,o&&s.jsx("span",{className:"text-red-500 font-medium ml-1","aria-label":"required",children:"*"})]}),u&&s.jsx("span",{className:"text-gray-500 ml-1 size-fit -translate-y-1/3","aria-describedby":f,"aria-label":"Help information",title:t,children:s.jsx(W.QuestionMarkCircled,{})}),u&&s.jsx("div",{id:f,className:"sr-only",children:t}),e&&s.jsx("span",{className:"ml-1",children:e})]}),x&&s.jsx("small",{id:p,className:"block opacity-80 mt-0.5",role:"note",children:d})]})}function Pe(n){const[a,r]=i.useState(!1),[o,t]=i.useState(!1);return i.useEffect(()=>{n?(t(!0),setTimeout(()=>r(!0),10)):(r(!1),setTimeout(()=>t(!1),150))},[n]),{show:a,shouldRender:o}}function Ke(n,a){i.useEffect(()=>{const r=o=>{o.key==="Escape"&&n&&a()};return document.addEventListener("keydown",r),n&&(document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",r),document.body.style.overflow="auto"}},[n,a])}function qe(n,a){const r=i.useRef(null),o=i.useCallback(()=>{const t=document.getElementById(n);if(!t)return;const e=t.querySelectorAll('[data-modal-action="true"]');if(e.length>0){e[0].focus();return}const l=t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(l.length>0){const c=Array.from(l).filter(d=>!(d instanceof HTMLButtonElement&&d.getAttribute("data-modal-close-button")==="true"));if(c.length>0){c[0].focus();return}l[0].focus();return}t.focus()},[n]);i.useEffect(()=>(a&&(r.current=document.activeElement,o()),()=>{document.body.style.overflow="auto",r.current instanceof HTMLElement&&r.current.focus()}),[a,o])}function Ge({id:n,isOpen:a,onClose:r,title:o,children:t,contentOnly:e=!1,className:l,overlayClassName:c,hideCloseButton:d=!1,actions:b=[],disableCloseOnOverlayClick:h=!1,ariaLabelledBy:u,ariaDescribedBy:x}){const f=i.useId(),p=n||`modal-${f}`,v=n?`${n}-title`:`modal-title-${f}`,{show:m,shouldRender:w}=Pe(a);if(qe(p,w),Ke(w,r),!w)return null;const y=()=>o?i.isValidElement(o)?s.jsx("div",{className:"mb-4",children:o}):s.jsx("h2",{className:"mb-4 text-xl font-semibold",id:v,children:o}):null,g=()=>b.length===0?null:s.jsx("div",{className:"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3",children:b.map((j,k)=>{const{label:T,className:C,...S}=j;return s.jsx(ge,{className:C,type:"button",...S,"data-modal-action":"true",children:T},k)})});return s.jsx(s.Fragment,{children:ie.createPortal(s.jsx("div",{"aria-labelledby":u??o?v:void 0,"aria-describedby":x,role:"dialog","aria-modal":"true",className:"fixed inset-0 z-[100] overflow-y-auto",children:s.jsxs("div",{className:"flex min-h-screen items-center justify-center p-4",children:[s.jsx("div",{className:A.n("fixed inset-0 bg-black/20 transition-all",c),onClick:()=>{h||r()}}),e&&s.jsx("div",{className:A.n("relative w-fit",l),children:t}),!e&&s.jsxs("div",{id:p,tabIndex:-1,className:A.n("relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75",m?"opacity-100 scale-100":"opacity-0 scale-90",l),children:[!d&&s.jsx("button",{type:"button",onClick:r,"data-modal-close-button":"true",className:"rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0",children:s.jsx(le.X,{size:18})}),y(),t,g()]})]})}),document.body)})}const He={link:"text-primary hover:text-primary-foreground hover:bg-primary/10 aria-current:text-primary-foreground aria-current:bg-primary",outline:"border border-primary text-primary hover:bg-primary hover:text-primary-foreground aria-current:bg-primary aria-current:text-primary-foreground aria-current:border-primary",filled:"bg-secondary text-secondary-foreground hover:bg-primary hover:text-primary-foreground aria-current:bg-primary aria-current:text-primary-foreground"},Ze={sm:"px-2 py-1 text-sm min-w-[32px] min-h-8",md:"px-2 py-1 text-base min-w-[40px] min-h-10"};function Xe({page:n,pageCount:a=5,maxVisiblePages:r=5,showFirstLast:o=!0,onPageChange:t,size:e="md",variant:l="link",className:c,ref:d,buttonsClassName:b,...h}){const u=a===1/0,f=i.useCallback(()=>{if(u)return[];const j=a,k=Math.min(r,j);if(j<=k)return Array.from({length:j},(F,R)=>R+1);const T=Math.floor(k/2);let C=Math.max(1,n-T),S=Math.min(j,C+k-1);return S-C+1<k&&(C=Math.max(1,S-k+1),S=Math.min(j,C+k-1)),Array.from({length:S-C+1},(F,R)=>C+R)},[u,r,n,a])(),p=n>1,v=u||n<a,m=o&&!u,w=o&&!u,y=j=>{j>=1&&(u||j<=a)&&t(j)},g=i.useCallback(()=>{const j=A.n("flex items-center justify-center min-w-fit","disabled:opacity-50 disabled:cursor-not-allowed",Ze[e],"rounded-md");return A.n(j,He[l],b)},[l,e,b]);return s.jsxs("nav",{ref:d,className:A.n("flex items-center justify-center gap-1",c),role:"navigation","aria-label":"Pagination","data-page":n,"data-page-count":u?"infinite":a,...h,children:[m&&s.jsxs("button",{onClick:()=>y(1),className:g(),disabled:n===1,"aria-label":"Go to first page",children:[s.jsx(W.ChevronDoubleLeft,{size:e==="sm"?12:15}),s.jsx("span",{className:"ml-1",children:"First"})]}),s.jsxs("button",{onClick:()=>y(n-1),className:g(),disabled:!p,"aria-label":"Go to previous page",children:[s.jsx(W.ChevronLeft,{size:e==="sm"?12:15}),s.jsx("span",{className:"ml-1",children:"Previous"})]}),!u&&f.map(j=>s.jsx("button",{onClick:()=>y(j),className:A.n(g(),"aspect-square"),"aria-label":`Go to page ${j}`,"aria-current":j===n?!0:void 0,children:j},j)),s.jsxs("button",{onClick:()=>y(n+1),className:g(),disabled:!v,"aria-label":"Go to next page",children:[s.jsx("span",{className:"mr-1",children:"Next"}),s.jsx(W.ChevronRight,{size:e==="sm"?12:15})]}),w&&s.jsxs("button",{onClick:()=>y(a),className:g(),disabled:n===a,"aria-label":"Go to last page",children:[s.jsx("span",{className:"mr-1",children:"Last"}),s.jsx(W.ChevronDoubleRight,{size:e==="sm"?12:15})]})]})}function _e(n){const[a,r]=i.useState(!1),[o,t]=i.useState(!1);return i.useEffect(()=>{n?(t(!0),setTimeout(()=>r(!0),10)):(r(!1),setTimeout(()=>t(!1),300))},[n]),{show:a,shouldRender:o}}function Ue(n,a){i.useEffect(()=>{const r=o=>{o.key==="Escape"&&n&&a()};return document.addEventListener("keydown",r),n&&(document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",r),document.body.style.overflow="auto"}},[n,a])}function Je(n,a){const r=i.useRef(null),o=i.useCallback(()=>{const t=document.getElementById(n);if(!t)return;const e=t.querySelectorAll('[data-panel-action="true"]');if(e.length>0){e[0].focus();return}const l=t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(l.length>0){const c=Array.from(l).filter(d=>!(d instanceof HTMLButtonElement&&d.getAttribute("data-panel-close-button")==="true"));if(c.length>0){c[0].focus();return}l[0].focus();return}t.focus()},[n]);i.useEffect(()=>(a&&(r.current=document.activeElement,o()),()=>{document.body.style.overflow="auto",r.current instanceof HTMLElement&&r.current.focus()}),[a,o])}const Qe={size:{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl",full:"w-full",screen:"w-screen"}};function Ye({ref:n,id:a,isOpen:r,onClose:o,title:t,children:e,footer:l,size:c="md",className:d,overlayClassName:b,hideCloseButton:h=!1,disableCloseOnOverlayClick:u=!1,ariaLabelledBy:x,ariaDescribedBy:f}){const p=i.useId(),v=a||`panel-${p}`,m=a?`${a}-title`:`panel-title-${p}`,{show:w,shouldRender:y}=_e(r);if(Je(v,y),Ue(y,o),!y)return null;const g=()=>t?i.isValidElement(t)?s.jsx("div",{children:t}):s.jsx("h2",{className:"text-2xl font-semibold",id:m,children:t}):null,j=()=>{if(!l)return null;if(i.isValidElement(l)){const k=l,T=k.props.className||"";return i.cloneElement(k,{className:A.n("px-6 py-4",T)})}return s.jsx("div",{className:"px-6 py-4",children:l})};return s.jsx(s.Fragment,{children:ie.createPortal(s.jsxs("div",{"aria-labelledby":x??t?m:void 0,"aria-describedby":f,role:"dialog","aria-modal":"true",className:"fixed inset-0 z-[100] overflow-hidden","data-panel-open":r,children:[s.jsx("div",{className:A.n("fixed inset-0 bg-black/40 transition-opacity duration-300",w?"opacity-100":"opacity-0",b),onClick:()=>{u||o()}}),s.jsx("div",{className:"fixed inset-y-0 right-0 flex max-w-full",children:s.jsx("div",{id:v,ref:n,tabIndex:-1,className:A.n("relative h-full transform shadow-xl bg-popover transition-transform duration-300 ease-in-out",c!=="screen"&&"border-l border-border",Qe.size[c],w?"translate-x-0":"translate-x-full",d),"data-panel-size":c,children:s.jsxs("div",{className:"flex h-full flex-col",children:[t&&s.jsx("div",{className:"px-6 pt-6",children:g()}),!h&&s.jsx("button",{type:"button",onClick:o,"data-panel-close-button":"true","aria-label":"Close panel",className:"rounded-md p-0.5 top-3 right-3 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0",children:s.jsx(le.X,{size:18})}),s.jsx("div",{className:A.n("flex-1 overflow-y-auto px-6 pb-6",t?"pt-6":"pt-10"),children:e}),j()]})})})]}),document.body)})}function ye({itemId:n,checked:a,onChange:r,name:o,disabled:t=!1,className:e=""}){const l="relative inline-flex items-center justify-center rounded-full",c=()=>{t||r()},d=N.join(l,!a&&"hover:border-current/60",!t&&"border-current cursor-pointer",t&&"border-muted/60 cursor-not-allowed",e);return s.jsx("div",{id:n,role:"radio",tabIndex:-1,"aria-checked":a,"aria-disabled":t,"aria-description":`Radio button for ${o}`,"aria-labelledby":`${n}-label`,onClick:c,className:d,style:{width:"1em",height:"1em",padding:"0.1em",borderWidth:"0.06em"},children:a&&s.jsx("div",{className:N.join("size-full aspect-square rounded-full",t&&"bg-muted/60",!t&&"bg-current")})})}function ae({value:n,children:a,className:r="",isSelected:o=!1,onChange:t,disabled:e=!1,hideInput:l=!1,description:c,name:d}){const h=`radio-${i.useId()}-${n}`,u=()=>{e||t==null||t(n)};return s.jsxs("div",{title:c,className:N.join("relative flex items-center",r,l&&`p-2 border-2 focus-within:border-dashed focus-within:${e?"border-current/50":"border-current/80"}`,l&&!o&&`border-transparent ${e?"":"not-focus-within:hover:border-border/60"}`,l&&o&&"border-border",e&&"opacity-60 cursor-not-allowed"),style:{gap:"0.5em"},children:[!l&&s.jsx(ye,{itemId:h,name:d||"",checked:o,onChange:u,disabled:e,className:N.join(l&&"")}),s.jsx("div",{id:l?h:void 0,tabIndex:l?-1:void 0,role:l?"radio":void 0,onClick:l?u:void 0,"aria-checked":l?o?"true":"false":void 0,"aria-disabled":l?e:void 0,"aria-description":l?c||`Radio button for ${d}`:void 0,"aria-labelledby":l?`${h}-label`:void 0,className:N.join(l&&"size-full",typeof a=="object"&&"grow focus:outline-none"),children:s.jsx("label",{id:`${h}-label`,onClick:l?void 0:u,className:N.join(e&&"cursor-not-allowed",!e&&"cursor-pointer"),children:a})})]})}function Oe(n,a){const[r,o]=i.useState(a),[t,e]=i.useState(-1),[l,c]=i.useState(!1),d=i.useCallback((f,p)=>{var w;const v=f[p];v.hasAttribute("disabled")||v.getAttribute("aria-disabled")==="true"||((w=f[p])==null||w.click(),e(p))},[]),b=i.useCallback((f,p)=>{var m;if(f.preventDefault(),l||!p.length)return;const v=a!==-1?a:0;(m=p[v])==null||m.focus(),o(v),a!==-1&&d(p,v)},[a,l,d]),h=i.useCallback(f=>{var w;if(!f.shiftKey)return;f.preventDefault();const p=Array.from(document.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')).filter(y=>!y.hasAttribute("disabled")&&y.tabIndex>=0),v=p.findIndex(y=>y.id===n),m=v>0?v-1:p.length-1;(w=p[m])==null||w.focus()},[n]),u=i.useCallback((f,p)=>{var g;if(!p.length)return;const v=f.target;if(!p.some(j=>j.id===v.id))return;const w=r!==-1?r:0;let y=w;switch(f.key){case"ArrowUp":case"ArrowLeft":f.preventDefault(),y=w>0?w-1:p.length-1;break;case"ArrowDown":case"ArrowRight":f.preventDefault(),y=(w+1)%p.length;break;case" ":f.preventDefault(),d(p,w);return;case"Tab":h(f);return;default:return}(g=p[y])==null||g.focus(),o(y),t!==-1&&d(p,y)},[r,t,h,d]),x=i.useCallback(()=>{const f=document.querySelector(`[id="${n}"][role="radiogroup"]`);return f?Array.from(f.querySelectorAll('[role="radio"]')):[]},[n]);i.useEffect(()=>{const f=document.querySelector(`[id="${n}"][role="radiogroup"]`);if(!f)return;const p=x(),v=g=>b(g,p),m=g=>u(g,p),w=()=>c(!0),y=()=>c(!1);return document.addEventListener("keydown",m),f.addEventListener("focus",v),f.addEventListener("mousedown",w),document.addEventListener("mouseup",y),()=>{document.removeEventListener("keydown",m),f.removeEventListener("focus",v),f.removeEventListener("mousedown",w),document.removeEventListener("mouseup",y)}},[n,x,b,u])}function et({options:n=[],value:a,onChange:r,id:o,children:t,className:e="",childrenClassName:l="",hideInputs:c=!1}){const d=i.useId(),b=o||`radio-group-${d}`;Oe(b,n.findIndex(u=>u===a));const h=i.useMemo(()=>n.reduce((u,x)=>(typeof x=="string"?u.some(f=>f.value===x)||u.push({label:x,value:x}):u.push(x),u),[]),[n]);return s.jsxs("div",{id:b,role:"radiogroup",tabIndex:0,className:N.join(e,"focus:outline-none"),children:[h.length>0&&h.map((u,x)=>s.jsx(ae,{value:u.value,isSelected:a===u.value,onChange:r,name:b,disabled:u.disabled,description:u.description,hideInput:c,className:l,children:u.label},`${u.value}-${x}`)),h.length===0&&t&&i.Children.map(t,u=>i.isValidElement(u)&&u.type===ae?s.jsx(ae,{...u.props,className:N.join(l,u.props.className),hideInput:u.props.hideInput||c,isSelected:a===u.props.value,onChange:r,name:b,children:u.props.children}):null)]})}function tt(n){const a=i.useRef(null),r=i.useRef(null),o=i.useRef(null),[t,e]=i.useState(!1),[l,c]=i.useState(!1),[d,b]=i.useState({vertical:!1,horizontal:!1}),h=i.useRef(null),u=i.useRef(null),x=i.useCallback(()=>{const v=a.current;if(!v)return;const m=v.scrollHeight>v.clientHeight,w=v.scrollWidth>v.clientWidth;b({vertical:m,horizontal:w})},[]),f=i.useCallback(()=>{const v=a.current,m=r.current,w=o.current;if(v){if(m&&d.vertical){const g=(d.horizontal?v.clientHeight-n:v.clientHeight)/v.scrollHeight,j=Math.max(g*100,10),k=v.scrollHeight-v.clientHeight,T=k>0?v.scrollTop/k:0,C=100-j,S=T*C;m.style.height=`${j}%`,m.style.top=`${S}%`,m.style.transform="none"}if(w&&d.horizontal){const g=(d.vertical?v.clientWidth-n:v.clientWidth)/v.scrollWidth,j=Math.max(g*100,10),k=v.scrollWidth-v.clientWidth,T=k>0?v.scrollLeft/k:0,C=100-j,S=T*C;w.style.width=`${j}%`,w.style.left=`${S}%`,w.style.transform="none"}}},[d,n]),p=i.useCallback(()=>{h.current&&clearTimeout(h.current),u.current&&clearTimeout(u.current),e(!0),c(!1),f(),h.current=setTimeout(()=>{c(!0),u.current=setTimeout(()=>{e(!1),c(!1)},300)},1e3)},[f]);return i.useEffect(()=>{const v=a.current;if(!v)return;x();const m=new ResizeObserver(x);m.observe(v);const w=new MutationObserver(x);return w.observe(v,{childList:!0,subtree:!0,attributes:!0}),()=>{m.disconnect(),w.disconnect()}},[x]),i.useEffect(()=>{f()},[d,f]),i.useEffect(()=>()=>{h.current&&clearTimeout(h.current),u.current&&clearTimeout(u.current)},[]),{viewportRef:a,verticalThumbRef:r,horizontalThumbRef:o,isScrolling:t,isFadingOut:l,scrollbarVisible:d,handleScroll:p}}function rt({className:n,thumbClassName:a,viewportClassName:r,scrollbarClassName:o,scrollbarThickness:t=10,children:e,id:l,ref:c,...d}){const{viewportRef:b,verticalThumbRef:h,horizontalThumbRef:u,isScrolling:x,isFadingOut:f,scrollbarVisible:p,handleScroll:v}=tt(t),m=A.n("relative flex-1 rounded-full bg-slate-400/60 hover:bg-slate-400/80 active:bg-slate-400",a);return s.jsxs("div",{ref:c,id:l,className:A.n("relative overflow-hidden",n),"data-scroll-area-root":"",...d,children:[s.jsx("div",{ref:b,className:A.n("h-full w-full overflow-auto rounded-[inherit] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",r),onScroll:v,"data-scroll-area-viewport":"",children:e}),p.vertical&&(x||f)&&s.jsx("div",{className:A.n("touch-none select-none transition-all duration-300","p-[1px]","absolute right-0 top-0",f?"opacity-0":"opacity-100",o),"data-scroll-area-scrollbar":"vertical","data-state":x?"visible":"hidden",style:{width:`${t}px`,height:p.horizontal?`calc(100% - ${t}px)`:"100%"},children:s.jsx("div",{ref:h,className:A.n("absolute rounded-full",m),"data-scroll-area-thumb":"",style:{height:"20%",top:"0%",width:"100%"}})}),p.horizontal&&(x||f)&&s.jsx("div",{className:A.n("touch-none select-none transition-all duration-300","p-[1px]","absolute bottom-0 left-0",f?"opacity-0":"opacity-100",o),"data-scroll-area-scrollbar":"horizontal","data-state":x?"visible":"hidden",style:{height:`${t}px`,width:p.vertical?`calc(100% - ${t}px)`:"100%"},children:s.jsx("div",{ref:u,className:A.n("absolute rounded-full",m),"data-scroll-area-thumb":"",style:{width:"20%",left:"0%",height:"100%"}})}),p.vertical&&p.horizontal&&s.jsx("div",{className:A.n("bg-transparent","absolute bottom-0 right-0"),"data-scroll-area-corner":"",style:{height:`${t}px`,width:`${t}px`}})]})}function nt(n){const[a,r]=i.useState(!1),[o,t]=i.useState(!1);return i.useEffect(()=>{n?(t(!0),setTimeout(()=>r(!0),10)):(r(!1),setTimeout(()=>t(!1),150))},[n]),{show:a,shouldRender:o}}function st({isOpen:n,setIsOpen:a,filteredOptions:r,highlightedIndex:o,setHighlightedIndex:t,onSelect:e,triggerRef:l}){return{handleKeyDown:i.useCallback(d=>{var b;switch(d.key){case"ArrowDown":if(d.preventDefault(),!n)a(!0);else{const h=o<r.length-1?o+1:0;let u=h;for(let x=0;x<r.length;x++){const f=(h+x)%r.length;if(!r[f].disabled){u=f;break}}t(u)}break;case"ArrowUp":if(d.preventDefault(),!n)a(!0);else{const h=o>0?o-1:r.length-1;let u=h;for(let x=0;x<r.length;x++){const f=(h-x+r.length)%r.length;if(!r[f].disabled){u=f;break}}t(u)}break;case"Enter":case" ":if(d.preventDefault(),!n)a(!0);else if(o>=0&&o<r.length){const h=r[o];h.disabled||e(h)}break;case"Escape":d.preventDefault(),n&&(a(!1),(b=l.current)==null||b.focus());break;case"Tab":n&&a(!1);break}},[n,a,r,o,t,e,l])}}function at({isOpen:n,filteredOptions:a,selectedOption:r,shouldRender:o,optionsContainerRef:t}){const[e,l]=i.useState(-1),c=i.useMemo(()=>r?a.findIndex(d=>d.value===r.value):-1,[a,r]);return i.useEffect(()=>{n&&a.length>0?l(r&&c>=0?c:0):l(-1)},[a,n,r,c]),i.useEffect(()=>{if(e>=0&&t.current&&o){const d=()=>{const b=t.current,h=b==null?void 0:b.querySelector(`[data-option-index="${e}"]`);if(h){const u=n&&r&&e===c?"auto":"smooth";h.scrollIntoView({behavior:u,block:"nearest"})}};n&&o&&r?setTimeout(d,10):d()}},[e,o,n,r,a,t,c]),{highlightedIndex:e,setHighlightedIndex:l}}const me={sm:{trigger:"px-2 py-1 text-sm",options:"px-2 py-2 text-xs"},md:{trigger:"px-3 py-2 text-base",options:"px-3 py-2.5 text-sm"},lg:{trigger:"px-4 py-3 text-lg",options:"px-4 py-3 text-base"}};function ot({options:n,value:a,placeholder:r="Select an option...",searchable:o=!1,disabled:t=!1,clearable:e=!1,size:l="md",className:c,triggerClassName:d,dropdownClassName:b,id:h,ref:u,onChange:x,onSearch:f,searchPlaceholder:p="Search options..."}){const v=i.useId(),w=`${h??v}-listbox`,y=E=>`${w}-option-${E}`,[g,j]=i.useState(!1),[k,T]=i.useState(""),C=i.useRef(null),S=i.useRef(null),F=i.useRef(null),R=i.useRef(null),{show:q,shouldRender:M}=nt(g),z=i.useMemo(()=>!o||!k?n:n.filter(E=>{var L;return E.text.toLowerCase().includes(k.toLowerCase())||((L=E.description)==null?void 0:L.toLowerCase().includes(k.toLowerCase()))}),[n,o,k]),I=i.useMemo(()=>n.find(E=>E.value===a),[n,a]),{highlightedIndex:V,setHighlightedIndex:P}=at({isOpen:g,filteredOptions:z,selectedOption:I,shouldRender:M,optionsContainerRef:R}),$=V>=0?y(V):void 0;i.useEffect(()=>{g&&M&&o&&S.current&&S.current.focus()},[g,o,M]);const B=i.useCallback(E=>{var L;E.disabled||(x==null||x(E.value),j(!1),T(""),(L=C.current)==null||L.focus())},[x]),{handleKeyDown:D}=st({isOpen:g,setIsOpen:j,filteredOptions:z,highlightedIndex:V,setHighlightedIndex:P,onSelect:B,triggerRef:C});i.useEffect(()=>{if(!g)return;const E=L=>{var Y;F.current&&!F.current.contains(L.target)&&!((Y=C.current)!=null&&Y.contains(L.target))&&(j(!1),T(""))};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[g]);const H=()=>{t||(j(!g),g||(T(""),P(-1)))},U=E=>{E.disabled||(x==null||x(E.value),j(!1),T(""))},J=E=>{const L=E.target.value;T(L),f==null||f(L),P(-1)},Q=E=>{E.preventDefault(),E.stopPropagation(),x==null||x("")};return s.jsxs("div",{className:N.join("relative",c),id:h,ref:u,"data-select":"true","data-value":a,"data-searchable":o,"data-disabled":t,"data-clearable":e,children:[s.jsxs("div",{className:"relative",children:[s.jsxs("button",{ref:C,type:"button",className:N.join("flex items-center justify-between w-full text-left bg-inherit border border-border rounded-md transition-colors","hover:border-primary focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",t&&"opacity-50 cursor-not-allowed hover:border-border",g&&"border-primary ring-1 ring-primary",me[l].trigger,d),onClick:H,onKeyDown:D,disabled:t,"aria-disabled":t,"aria-haspopup":"listbox","aria-expanded":g,"aria-controls":g?w:void 0,"aria-activedescendant":g&&!o?$:void 0,"aria-label":I?I.text:r,"data-select-trigger":"true",children:[s.jsx("span",{className:N.join("block truncate",!I&&"opacity-70"),children:I?I.text:r}),s.jsx("div",{className:"flex items-center ml-2",children:s.jsx(W.ChevronDown,{size:16,className:N.join("transition-transform duration-200",g&&"rotate-180")})})]}),e&&I&&s.jsx("button",{type:"button",onClick:Q,className:"absolute right-8 top-1/2 -translate-y-1/2 p-0.5 rounded hover:bg-accent/20 transition-colors group z-10","aria-label":"Clear selection","data-select-clear":"true",children:s.jsx(le.X,{size:14,className:"opacity-70 group-hover:opacity-100 transition-opacity"})})]}),M&&s.jsxs("div",{ref:F,className:N.join("absolute z-50 w-full mt-1 bg-popover border border-border rounded-md shadow-lg transition-all duration-150",q?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",b),id:w,role:"listbox","data-select-content":"true",children:[o&&s.jsx("div",{className:"border-b border-border",children:s.jsx("input",{ref:S,type:"text",value:k,onChange:J,onKeyDown:D,placeholder:p,className:"w-full px-2 py-2 text-inherit focus:outline-none","aria-autocomplete":"list","aria-controls":w,"aria-activedescendant":$,"data-select-search":"true"})}),s.jsx("div",{ref:R,className:"max-h-60 overflow-auto",children:z.length>0?z.map((E,L)=>s.jsxs("div",{id:y(L),className:N.join("flex items-center cursor-pointer transition-colors","hover:bg-accent/10 focus:bg-accent/10",me[l].options,E.disabled&&"opacity-50 cursor-not-allowed",L===V&&"bg-accent/20",a===E.value&&"bg-accent/30"),onClick:()=>U(E),role:"option","aria-selected":a===E.value,"aria-disabled":E.disabled,"data-select-option":"true","data-value":E.value,"data-highlighted":L===V,"data-option-index":L,children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"font-medium",children:E.text}),E.description&&s.jsx("div",{className:"text-xs opacity-70 mt-0.5",children:E.description})]}),a===E.value&&s.jsx(W.Check,{size:16,className:"ml-2 text-primary flex-shrink-0"})]},E.value)):s.jsx("div",{className:"px-3 py-2 text-sm opacity-70 text-center",children:o&&k?"No results found":"No options available"})})]})]})}const it={thin:{horizontal:"h-px",vertical:"w-px"},medium:{horizontal:"h-0.5",vertical:"w-0.5"},thick:{horizontal:"h-1",vertical:"w-1"},"extra-thick":{horizontal:"h-2",vertical:"w-2"}},lt={horizontal:"w-full",vertical:"min-h-4 h-full"};function ct({orientation:n="horizontal",decorative:a=!1,thickness:r="thin",className:o,...t}){const e=N.join("shrink-0 bg-border",lt[n],it[r][n],o);return s.jsx("div",{...t,className:e,role:a?"presentation":"separator","aria-orientation":a?void 0:n,"aria-hidden":a,"data-orientation":n,"data-thickness":r})}const be={shape:{rectangle:"rounded-md min-h-1",circle:"rounded-full aspect-square min-h-1",text:"rounded-sm min-h-1 h-4"},lineSpacing:{xs:"space-y-1",sm:"space-y-2",md:"space-y-3",lg:"space-y-4",xl:"space-y-6"}};function ut({shape:n="rectangle",lineSpacing:a="sm",className:r,lines:o=1,animate:t=!0,ref:e,...l}){const c=N.join("bg-muted/70",t&&"animate-pulse",be.shape[n],r);return o>1?s.jsx("div",{ref:e,className:be.lineSpacing[a],role:"presentation","aria-hidden":"true","data-testid":"skeleton-container","data-lines":o,"data-shape":n,"data-animate":t,...l,children:Array.from({length:o},(d,b)=>s.jsx("div",{className:N.join(c,b===o-1&&"w-3/4"),role:"presentation","aria-hidden":"true","data-testid":"skeleton-line","data-line-index":b},b))}):s.jsx("div",{ref:e,className:c,role:"presentation","aria-hidden":"true","data-testid":"skeleton","data-shape":n,"data-animate":t,...l})}function dt({id:n,value:a,defaultValue:r=0,onValueChange:o,min:t=0,max:e=100,step:l=1,disabled:c=!1,trackClassName:d,rangeClassName:b,thumbClassName:h,className:u,ref:x,ariaLabel:f,ariaLabelledBy:p,...v}){const[m,w]=i.useState(r),y=a!==void 0,g=y?a:m,j=i.useRef(null),k=i.useRef(!1),T=i.useRef(0),C=i.useCallback(z=>{const I=Math.max(t,Math.min(e,z)),V=Math.round(I/l)*l;y||w(V),o==null||o(V)},[t,e,l,y,o]),S=i.useCallback((z,I=!1)=>{var B;const V=(B=j.current)==null?void 0:B.getBoundingClientRect();if(!V)return g;let P=z.clientX;I&&(P=P-T.current);const $=Math.max(0,Math.min(1,(P-V.left)/V.width));return t+(e-t)*$},[t,e,g]),F=i.useCallback(z=>{if(c||z.target!==z.currentTarget)return;const I=S(z);C(I)},[c,S,C]),R=i.useCallback(z=>{var B;if(c)return;z.stopPropagation(),k.current=!0;const I=(B=j.current)==null?void 0:B.getBoundingClientRect(),V=z.currentTarget.getBoundingClientRect();if(I&&V){const D=V.left+V.width/2;T.current=z.clientX-D}z.currentTarget.setPointerCapture(z.pointerId);const P=D=>{if(!k.current)return;const H=S(D,!0);C(H)},$=D=>{if(D.pointerId===z.pointerId){k.current=!1,T.current=0;try{z.currentTarget.releasePointerCapture(D.pointerId)}catch{}document.removeEventListener("pointermove",P),document.removeEventListener("pointerup",$)}};document.addEventListener("pointermove",P),document.addEventListener("pointerup",$)},[c,S,C]),q=i.useCallback(z=>{if(c)return;let I=g;switch(z.key){case"ArrowRight":case"ArrowUp":I=g+l;break;case"ArrowLeft":case"ArrowDown":I=g-l;break;case"Home":I=t;break;case"End":I=e;break;case"PageUp":I=g+l*10;break;case"PageDown":I=g-l*10;break;default:return}z.preventDefault(),C(I)},[c,g,l,t,e,C]),M=e===t?0:(g-t)/(e-t)*100;return s.jsx("div",{id:n,ref:x,className:A.n("relative flex items-center w-full touch-none select-none",c&&"opacity-50 cursor-not-allowed",u),"data-disabled":c,"data-value":g,"data-min":t,"data-max":e,"data-step":l,...v,children:s.jsxs("div",{ref:j,className:A.n("relative h-1.5 w-full rounded-full bg-muted cursor-pointer",c&&"cursor-not-allowed",d),onPointerDown:F,children:[s.jsx("div",{className:A.n("absolute h-full rounded-full pointer-events-none",!k.current&&"transition-all",b),style:{width:`${M}%`}}),s.jsx("div",{className:A.n("absolute size-5 -top-2 rounded-full shadow-md cursor-grab",c&&"cursor-not-allowed",!c&&"cursor-grab focus:outline-none focus:ring-2",k.current?"cursor-grabbing scale-110":"transition-all",h),style:{left:`calc(${M}% - 10px)`},tabIndex:c?-1:0,role:"slider","aria-valuemin":t,"aria-valuemax":e,"aria-valuenow":g,"aria-label":f,"aria-labelledby":p,"aria-disabled":c,onKeyDown:q,onPointerDown:R})]})})}function ft({children:n,ref:a,...r}){if(i.isValidElement(n)){let o={...r};return n.props&&(o={...o,...n.props}),i.cloneElement(n,{...o,ref:t=>{typeof a=="function"?a(t):a&&(a.current=t)}})}return i.createElement("div",{...r,ref:a},n)}const mt=({defaultValue:n,value:a,onValueChange:r}={})=>{const[o,t]=i.useState(n||""),e=a!==void 0,l=e?a:o,c=i.useCallback(d=>{e||t(d),r==null||r(d)},[e,r]);return{value:l,onValueChange:c}};function bt({defaultValue:n,value:a,onValueChange:r,tabsWidth:o="fit",variant:t="underline",className:e,children:l,ref:c,id:d,triggersClassName:b,contentClassName:h}){const{value:u,onValueChange:x}=mt({defaultValue:n,value:a,onValueChange:r}),f={selectedValue:u,onValueChange:x,tabsWidth:o,variant:t,triggersClassName:b,contentClassName:h};return s.jsx(A.TabsContext.Provider,{value:f,children:s.jsx("div",{id:d,ref:c,className:e,"data-tabs-width":o,"data-variant":t,children:l})})}function ht({value:n,className:a,children:r,ref:o}){const{selectedValue:t,contentClassName:e}=A.useTabsContext(),l=t===n;return l?s.jsx("div",{ref:o,role:"tabpanel",id:`tabs-content-${n}`,"aria-labelledby":`tabs-trigger-${n}`,"data-state":l?"active":"inactive","data-value":n,className:N.join("mt-4 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2",e,a),tabIndex:0,children:r}):null}const he={width:{fit:"w-fit",full:"w-full *:flex-1"},variant:{underline:"border-b border-border",pills:"",bordered:"border border-border rounded-lg p-1"}},xt={underline:"border-b-2 border-transparent data-[state=active]:border-accent data-[state=active]:text-accent hover:text-accent-foreground",pills:"rounded-md data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30",bordered:"rounded data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30"};function pt({children:n,className:a,id:r,ref:o}){const{tabsWidth:t,variant:e}=A.useTabsContext();return s.jsx("div",{id:r,ref:o,role:"tablist",className:N.join("flex",he.width[t],he.variant[e],a),"data-tabs-width":t,"data-variant":e,children:n})}function vt({value:n,disabled:a=!1,className:r,children:o,onClick:t,id:e,ref:l}){const{selectedValue:c,onValueChange:d,variant:b,triggersClassName:h}=A.useTabsContext(),u=c===n,x=p=>{a||d(n),t==null||t(p)};return s.jsx("button",{id:e,ref:l,role:"tab",type:"button","aria-selected":u,"aria-controls":`tabs-content-${n}`,"data-state":u?"active":"inactive","data-value":n,disabled:a,className:N.join("inline-flex items-center justify-center whitespace-nowrap px-3 py-2 text-sm ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",u?"font-medium":"font-light",xt[b],h,r),onClick:x,children:o})}function gt({elementId:n,maxLength:a}){const[r,o]=i.useState(0);return i.useEffect(()=>{const t=document.getElementById(n);if(!t)return;const e=()=>{const l=t.value.length;o(l);const c=l>=a;t.setAttribute("aria-describedby",`${n}-character-count`),t.setAttribute("aria-invalid",c?"true":"false"),c?t.setAttribute("data-error","true"):t.removeAttribute("data-error")};return e(),t.addEventListener("input",e),t.setAttribute("maxlength",String(a)),()=>{t.removeEventListener("input",e),t.removeAttribute("maxlength"),t.removeAttribute("aria-describedby"),t.removeAttribute("aria-invalid"),t.removeAttribute("data-error")}},[n,a]),s.jsx("small",{className:N.join("mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-end",r>=a&&"text-destructive",r<a&&"text-current"),role:"status",children:s.jsxs("span",{id:`${n}-character-count`,children:[r," / ",a," characters"]})})}function yt(n,a){i.useEffect(()=>{const r=document.getElementById(n);if(!r)return;if(!a){r.style.height="auto";return}const o=()=>{r.style.height="auto",r.style.height=`${r.scrollHeight}px`};return o(),r.addEventListener("input",o),r.addEventListener("resize",o),window.addEventListener("resize",o),()=>{r.removeEventListener("input",o),r.removeEventListener("resize",o),window.removeEventListener("resize",o)}},[n,a])}const wt={base:"","left-line":"border-l border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success",outline:"border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success"},jt={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"px-3 rounded-full"},xe={variant:"outline",rounded:"none"};function Nt({variant:n=xe.variant,rounded:a,displayOnlyMode:r=!1,errorMessage:o,successMessage:t,hideResizeHandle:e=!1,autoExpand:l=!1,characterLimit:c=0,className:d,...b}){const h=i.useId();yt(h,l||r);let u=a;n==="outline"&&!a&&(u="md"),u=u||xe.rounded;let x=e;(r||n==="left-line"&&!e)&&(x=!0);const p=N.join("appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all",!r&&wt[n],!r&&jt[u],!r&&"px-2 py-1",r&&"pointer-events-none",x&&"no-resize-handle",d);return s.jsxs("div",{className:N.join("-space-y-1.5",r&&"cursor-text"),children:[s.jsx("textarea",{...b,id:h,"aria-disabled":b.disabled,readOnly:r,"aria-readonly":r||b["aria-readonly"],style:{resize:l?"none":void 0},className:p}),c>0&&s.jsx(gt,{elementId:h,maxLength:c}),!r&&s.jsx(oe,{elementId:h,type:"error",message:o}),!r&&s.jsx(oe,{elementId:h,type:"success",message:t})]})}const kt={sm:{container:"h-5 min-w-9 w-9",thumb:"h-4 w-4",translate:"translate-x-4"},md:{container:"h-6 min-w-11 w-11",thumb:"h-5 w-5",translate:"translate-x-5"},lg:{container:"h-7 min-w-13 w-13",thumb:"h-6 w-6",translate:"translate-x-6"}},Ct={default:{unchecked:"bg-muted",checked:"bg-primary"},success:{unchecked:"bg-muted",checked:"bg-success"},destructive:{unchecked:"bg-muted",checked:"bg-destructive"}},pe={variant:"default",size:"md"};function Et({ref:n,id:a,size:r=pe.size,variant:o=pe.variant,checked:t,onCheckedChange:e,disabled:l=!1,className:c,thumbClassName:d,backgroundClassNames:b,...h}){const u=i.useId(),x=i.useMemo(()=>a||`toggle-${u}`,[a,u]),[f,p]=i.useState(t);i.useEffect(()=>{p(t)},[t]);const v=()=>{if(!l){const k=!f;t===void 0&&p(k),e==null||e(k)}},m=k=>{(k.key===" "||k.key==="Enter")&&(k.preventDefault(),v())},w=kt[r],y=Ct[o],g=N.join("relative inline-flex items-center rounded-full transition-all duration-200 ease-in-out","focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",w.container,f?(b==null?void 0:b.checked)||y.checked:(b==null?void 0:b.unchecked)||y.unchecked,l&&"opacity-50 cursor-not-allowed",!l&&"cursor-pointer",c),j=N.join("absolute left-0.5 top-1/2 -translate-y-1/2 rounded-full bg-white shadow-sm transition-transform duration-200 ease-in-out",w.thumb,f&&w.translate,d);return s.jsxs("button",{ref:n,id:x,type:"button",role:"switch",tabIndex:0,"aria-checked":f,"aria-disabled":l,disabled:l,onClick:v,onKeyDown:m,className:g,...h,children:[s.jsx("span",{className:j}),s.jsx("span",{className:"sr-only",children:f?"Enabled":"Disabled"})]})}const re=8,ne=4,G=6;function St(n){return{calculatePosition:i.useCallback((r,o)=>{const t=r.getBoundingClientRect(),e=o.getBoundingClientRect(),l={width:window.innerWidth,height:window.innerHeight},c=(x,f,p,v)=>x<0||f<0||x+p>l.width||f+v>l.height,d={top:{x:t.left+t.width/2-e.width/2,y:t.top-e.height-ne,arrow:{x:e.width/2-G,y:e.height}},bottom:{x:t.left+t.width/2-e.width/2,y:t.bottom+ne,arrow:{x:e.width/2-G,y:-6}},left:{x:t.left-e.width-ne,y:t.top+t.height/2-e.height/2,arrow:{x:e.width,y:e.height/2-G}},right:{x:t.right+ne,y:t.top+t.height/2-e.height/2,arrow:{x:-6,y:e.height/2-G}}};let b=n,h=d[n];if(c(h.x,h.y,e.width,e.height)){const x={top:"bottom",bottom:"top",left:"right",right:"left"},f=d[x[n]];if(!c(f.x,f.y,e.width,e.height))b=x[n],h=f;else{const p=["top","bottom","left","right"].filter(v=>v!==n&&v!==x[n]);for(const v of p){const m=d[v];if(!c(m.x,m.y,e.width,e.height)){b=v,h=m;break}}}}h.x=Math.max(re,Math.min(h.x,l.width-e.width-re)),h.y=Math.max(re,Math.min(h.y,l.height-e.height-re));const u={x:t.left+t.width/2,y:t.top+t.height/2};return b==="top"||b==="bottom"?h.arrow.x=Math.max(G,Math.min(u.x-h.x-G,e.width-G*2)):h.arrow.y=Math.max(G,Math.min(u.y-h.y-G,e.height-G*2)),{...h,placement:b}},[n])}}function Tt(n,a,r){const o=i.useRef(null),t=i.useRef(null),e=i.useCallback(()=>{if(!o.current||!t.current)return;const l=n(o.current,t.current);r(l)},[n,r]);return i.useEffect(()=>{if(!a)return;const l=()=>e();return window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[a,e]),{triggerRef:o,tooltipRef:t,updatePosition:e}}function zt(n,a,r,o,t,e,l,c,d){const b=i.useRef(null),h=i.useCallback(()=>{n||(b.current&&clearTimeout(b.current),b.current=window.setTimeout(()=>{r(!0),requestAnimationFrame(()=>{t(),o(!0)})},a))},[n,a,r,t,o]),u=i.useCallback((x=!1)=>{if(b.current&&clearTimeout(b.current),x){o(!1),setTimeout(()=>r(!1),150);return}b.current=window.setTimeout(()=>{o(!1),setTimeout(()=>r(!1),150)},100)},[o,r]);return i.useEffect(()=>{!e&&!l&&!c&&d&&u()},[e,l,c,d,u]),i.useEffect(()=>()=>{b.current&&clearTimeout(b.current)},[]),{showTooltip:h,hideTooltip:u,timeoutRef:b}}function At({id:n,children:a,message:r,placement:o="top",disabled:t=!1,delay:e=200,className:l}){const[c,d]=i.useState(!1),[b,h]=i.useState(!1),[u,x]=i.useState(null),[f,p]=i.useState(!1),[v,m]=i.useState(!1),[w,y]=i.useState(!1),{calculatePosition:g}=St(o),{triggerRef:j,tooltipRef:k,updatePosition:T}=Tt(g,b,x),{showTooltip:C,hideTooltip:S,timeoutRef:F}=zt(t,e,h,d,T,f,v,w,c),R=i.useId(),q=n??R;return s.jsxs(s.Fragment,{children:[i.cloneElement(a,{ref:M=>{j.current=M},onMouseEnter:()=>{p(!0),C()},onMouseLeave:()=>{p(!1)},onFocus:()=>{y(!0),C()},onBlur:()=>{y(!1),S(!0)},onKeyDown:M=>{M.key==="Escape"&&S(!0)},"aria-describedby":t?void 0:q}),b&&ie.createPortal(s.jsx("div",{ref:k,id:q,role:"tooltip",className:N.join("fixed z-50 px-2 py-1 text-sm rounded shadow-lg bg-popover pointer-events-auto transition-all duration-150 ease-out",c?"opacity-100":"opacity-0",l),style:u?{left:u.x,top:u.y}:{opacity:0},onMouseEnter:()=>{m(!0),F.current&&clearTimeout(F.current)},onMouseLeave:()=>{m(!1)},children:r}),document.body)]})}exports.ActionModal=A.ActionModal;exports.Toast=A.Toast;exports.Accordion=je;exports.AccordionItem=se;exports.Button=ge;exports.Carousel=Te;exports.Checkbox=Ae;exports.Clickable=Ie;exports.CodeBlock=Ve;exports.Input=We;exports.Label=Fe;exports.LoadingDots=ve;exports.Modal=Ge;exports.Pagination=Xe;exports.Panel=Ye;exports.RadioGroup=et;exports.RadioGroupItem=ae;exports.RadioInput=ye;exports.ScrollArea=rt;exports.Select=ot;exports.Separator=ct;exports.Skeleton=ut;exports.Slider=dt;exports.Slot=ft;exports.Tabs=bt;exports.TabsContent=ht;exports.TabsList=pt;exports.TabsTrigger=vt;exports.Textarea=Nt;exports.Toggle=Et;exports.Tooltip=At;
2
3
  //# sourceMappingURL=components.cjs.js.map