@npm-questionpro/wick-ui-lib 1.48.0 → 1.49.0

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 (315) hide show
  1. package/dist/ac_divergent.svg +50 -0
  2. package/dist/ac_qualitative.svg +50 -0
  3. package/dist/ac_sequential.svg +50 -0
  4. package/dist/bp_divergent.svg +130 -0
  5. package/dist/bp_qualitative.svg +53 -0
  6. package/dist/bp_sentiment.svg +76 -0
  7. package/dist/bp_sentiment_analysis.svg +112 -0
  8. package/dist/bp_sequential.svg +99 -0
  9. package/dist/favicon.ico +0 -0
  10. package/dist/index.d.ts +2 -0
  11. package/dist/order_divergent.svg +61 -0
  12. package/dist/order_qualitative.svg +57 -0
  13. package/dist/order_sequential_blue.svg +52 -0
  14. package/dist/order_sequential_green.svg +52 -0
  15. package/dist/order_sequential_orange.svg +52 -0
  16. package/dist/order_sequential_red.svg +52 -0
  17. package/dist/src/base/ui/accordion.d.ts +7 -0
  18. package/dist/src/base/ui/avatar.d.ts +6 -0
  19. package/dist/src/base/ui/button.d.ts +12 -0
  20. package/dist/src/base/ui/checkbox.d.ts +6 -0
  21. package/dist/src/base/ui/command.d.ts +74 -0
  22. package/dist/src/base/ui/dialog.d.ts +23 -0
  23. package/dist/src/base/ui/dropdownMenu.d.ts +28 -0
  24. package/dist/src/base/ui/input.d.ts +3 -0
  25. package/dist/src/base/ui/label.d.ts +5 -0
  26. package/dist/src/base/ui/popover.d.ts +6 -0
  27. package/dist/src/base/ui/radioGroup.d.ts +5 -0
  28. package/dist/src/base/ui/scrollArea.d.ts +11 -0
  29. package/dist/src/base/ui/separator.d.ts +4 -0
  30. package/dist/src/base/ui/sheet.d.ts +29 -0
  31. package/dist/src/base/ui/skeleton.d.ts +2 -0
  32. package/dist/src/base/ui/switch.d.ts +4 -0
  33. package/dist/src/base/ui/table.d.ts +10 -0
  34. package/dist/src/base/ui/textarea.d.ts +3 -0
  35. package/dist/src/base/ui/toast.d.ts +18 -0
  36. package/dist/src/base/ui/toaster.d.ts +1 -0
  37. package/dist/src/base/ui/toggle.d.ts +12 -0
  38. package/dist/src/base/ui/toggleGroup.d.ts +12 -0
  39. package/dist/src/base/ui/tooltip.d.ts +7 -0
  40. package/dist/src/base/ui/useToast.d.ts +40 -0
  41. package/dist/src/components/accordion/WuAccordion.d.ts +26 -0
  42. package/dist/src/components/accordion/WuAccordion.test.d.ts +1 -0
  43. package/dist/src/components/accordion/index.d.ts +2 -0
  44. package/dist/src/components/activityLog/WuActivityLog.d.ts +18 -0
  45. package/dist/src/components/activityLog/WuActivityLog.test.d.ts +1 -0
  46. package/dist/src/components/activityLog/index.d.ts +2 -0
  47. package/dist/src/components/appHeader/WuAppHeader.d.ts +19 -0
  48. package/dist/src/components/appHeader/WuAppHeader.test.d.ts +1 -0
  49. package/dist/src/components/appHeader/components/WuAppHeaderBar.d.ts +6 -0
  50. package/dist/src/components/appHeader/components/WuAppHeaderDropdownWrapper.d.ts +11 -0
  51. package/dist/src/components/appHeader/components/WuAppHeaderSearch.d.ts +7 -0
  52. package/dist/src/components/appHeader/components/WuAppHeaderSearch.test.d.ts +1 -0
  53. package/dist/src/components/appHeader/components/WuTruncatedLabel.d.ts +4 -0
  54. package/dist/src/components/appHeader/components/account/WuAppHeaderAccount.d.ts +10 -0
  55. package/dist/src/components/appHeader/components/account/WuAppHeaderAccount.test.d.ts +1 -0
  56. package/dist/src/components/appHeader/components/account/ui/_logoutMenuItem.d.ts +4 -0
  57. package/dist/src/components/appHeader/components/account/ui/_otherMenuItem.d.ts +5 -0
  58. package/dist/src/components/appHeader/components/account/ui/_settingsMenuItem.d.ts +5 -0
  59. package/dist/src/components/appHeader/components/account/ui/_userMenuItem.d.ts +5 -0
  60. package/dist/src/components/appHeader/components/help/WuAppHeaderHelp.d.ts +7 -0
  61. package/dist/src/components/appHeader/components/help/WuAppHeaderHelp.test.d.ts +1 -0
  62. package/dist/src/components/appHeader/components/productSwitcher/WuAppHeaderMenu.d.ts +15 -0
  63. package/dist/src/components/appHeader/components/productSwitcher/WuAppHeaderMenu.test.d.ts +1 -0
  64. package/dist/src/components/appHeader/components/productSwitcher/ui/_categoryDetails.d.ts +8 -0
  65. package/dist/src/components/appHeader/components/productSwitcher/ui/_menuTrigger.d.ts +12 -0
  66. package/dist/src/components/appHeader/components/productSwitcher/ui/_productDropdown.d.ts +17 -0
  67. package/dist/src/components/appHeader/components/productSwitcher/ui/_productItem.d.ts +9 -0
  68. package/dist/src/components/appHeader/components/productSwitcher/ui/_productList.d.ts +13 -0
  69. package/dist/src/components/appHeader/components/productSwitcher/ui/_smallScreenMenuTrigger.d.ts +16 -0
  70. package/dist/src/components/appHeader/components/productSwitcher/ui/_smallScreenToggleMenu.d.ts +10 -0
  71. package/dist/src/components/appHeader/hooks/useOnClickOutsideHook.d.ts +2 -0
  72. package/dist/src/components/appHeader/hooks/useWindowSize.d.ts +2 -0
  73. package/dist/src/components/appHeader/index.d.ts +11 -0
  74. package/dist/src/components/appHeader/types/WuAppHeaderAccount.d.ts +47 -0
  75. package/dist/src/components/appHeader/types/WuAppHeaderHelpMenu.d.ts +7 -0
  76. package/dist/src/components/appHeader/types/WuAppHeaderMenuItem.d.ts +16 -0
  77. package/dist/src/components/appHeader/utils/dataFromApi.d.ts +3 -0
  78. package/dist/src/components/appHeader/utils/headerMenuKeyboardHandlers.d.ts +6 -0
  79. package/dist/src/components/appHeader/utils/iconMap.d.ts +4 -0
  80. package/dist/src/components/button/WuButton.d.ts +13 -0
  81. package/dist/src/components/button/WuButton.test.d.ts +1 -0
  82. package/dist/src/components/button/index.d.ts +2 -0
  83. package/dist/src/components/calendar/WuCalender.d.ts +3 -0
  84. package/dist/src/components/calendar/components/datePicker/WuDatePicker.d.ts +24 -0
  85. package/dist/src/components/calendar/components/datePicker/WuDatePicker.test.d.ts +1 -0
  86. package/dist/src/components/calendar/components/dateRangePicker/WuDateRangePicker.d.ts +31 -0
  87. package/dist/src/components/calendar/components/dateRangePicker/WuDateRangePicker.test.d.ts +1 -0
  88. package/dist/src/components/calendar/index.d.ts +5 -0
  89. package/dist/src/components/calendar/shadcn/calendar.d.ts +7 -0
  90. package/dist/src/components/calendar/ui/_footer.d.ts +8 -0
  91. package/dist/src/components/calendar/ui/_nativeSidebar.d.ts +17 -0
  92. package/dist/src/components/calendar/ui/_sidebar.d.ts +12 -0
  93. package/dist/src/components/calendar/ui/_trigger.d.ts +9 -0
  94. package/dist/src/components/calendar/utils/index.d.ts +7 -0
  95. package/dist/src/components/card/WuCard.d.ts +7 -0
  96. package/dist/src/components/card/WuCard.test.d.ts +1 -0
  97. package/dist/src/components/card/index.d.ts +2 -0
  98. package/dist/src/components/checkbox/WuCheckbox.d.ts +17 -0
  99. package/dist/src/components/checkbox/WuCheckbox.test.d.ts +1 -0
  100. package/dist/src/components/checkbox/index.d.ts +2 -0
  101. package/dist/src/components/chip/WuChip.d.ts +10 -0
  102. package/dist/src/components/chip/WuChip.test.d.ts +1 -0
  103. package/dist/src/components/chip/index.d.ts +2 -0
  104. package/dist/src/components/combobox/WuCombobox.d.ts +38 -0
  105. package/dist/src/components/combobox/WuCombobox.test.d.ts +1 -0
  106. package/dist/src/components/combobox/index.d.ts +3 -0
  107. package/dist/src/components/combobox/types/IWuComboboxOptions.d.ts +16 -0
  108. package/dist/src/components/combobox/ui/_item.d.ts +14 -0
  109. package/dist/src/components/combobox/ui/_tags.d.ts +5 -0
  110. package/dist/src/components/combobox/ui/_trigger.d.ts +22 -0
  111. package/dist/src/components/combobox/utils/index.d.ts +2 -0
  112. package/dist/src/components/combobox/utils/renderItems.d.ts +13 -0
  113. package/dist/src/components/combobox/utils/separateOptions.d.ts +7 -0
  114. package/dist/src/components/combobox/utils/useResizeContent.d.ts +2 -0
  115. package/dist/src/components/copyToClipboard/WuCopyToClipboard.d.ts +8 -0
  116. package/dist/src/components/copyToClipboard/WuCopyToClipboard.test.d.ts +1 -0
  117. package/dist/src/components/copyToClipboard/index.d.ts +2 -0
  118. package/dist/src/components/drawer/WuDrawer.d.ts +17 -0
  119. package/dist/src/components/drawer/WuDrawer.test.d.ts +1 -0
  120. package/dist/src/components/drawer/index.d.ts +2 -0
  121. package/dist/src/components/drilldown/WuDrilldown.d.ts +24 -0
  122. package/dist/src/components/drilldown/WuDrilldown.test.d.ts +1 -0
  123. package/dist/src/components/drilldown/WuDrilldownTitleMenu.d.ts +9 -0
  124. package/dist/src/components/drilldown/WuDrilldownTitles.d.ts +12 -0
  125. package/dist/src/components/drilldown/index.d.ts +3 -0
  126. package/dist/src/components/footer/WuFooter.d.ts +8 -0
  127. package/dist/src/components/footer/WuFooter.test.d.ts +1 -0
  128. package/dist/src/components/footer/index.d.ts +2 -0
  129. package/dist/src/components/formGroup/WuFormGroup.d.ts +10 -0
  130. package/dist/src/components/formGroup/WuFormGroup.test.d.ts +1 -0
  131. package/dist/src/components/formGroup/components/WuInputError.d.ts +6 -0
  132. package/dist/src/components/formGroup/components/WuInputHint.d.ts +7 -0
  133. package/dist/src/components/formGroup/components/WuLabel.d.ts +3 -0
  134. package/dist/src/components/formGroup/index.d.ts +5 -0
  135. package/dist/src/components/helpButton/WuHelpButton.d.ts +7 -0
  136. package/dist/src/components/helpButton/WuHelpButton.test.d.ts +1 -0
  137. package/dist/src/components/helpButton/index.d.ts +2 -0
  138. package/dist/src/components/input/WuInput.d.ts +13 -0
  139. package/dist/src/components/input/WuInput.test.d.ts +0 -0
  140. package/dist/src/components/input/index.d.ts +2 -0
  141. package/dist/src/components/listbox/WuListbox.d.ts +44 -0
  142. package/dist/src/components/listbox/WuListbox.test.d.ts +1 -0
  143. package/dist/src/components/listbox/index.d.ts +3 -0
  144. package/dist/src/components/listbox/subComponents/WuListboxTrigger.d.ts +4 -0
  145. package/dist/src/components/listbox/ui/_item.d.ts +14 -0
  146. package/dist/src/components/listbox/ui/_search.d.ts +3 -0
  147. package/dist/src/components/listbox/ui/_selectAll.d.ts +7 -0
  148. package/dist/src/components/listbox/ui/_trigger.d.ts +20 -0
  149. package/dist/src/components/listbox/utils/search.d.ts +2 -0
  150. package/dist/src/components/listbox/utils/useGenClass.d.ts +1 -0
  151. package/dist/src/components/loader/WuLoader.d.ts +8 -0
  152. package/dist/src/components/loader/WuLoader.test.d.ts +1 -0
  153. package/dist/src/components/loader/index.d.ts +2 -0
  154. package/dist/src/components/menu/WuMenu.d.ts +24 -0
  155. package/dist/src/components/menu/WuMenu.test.d.ts +1 -0
  156. package/dist/src/components/menu/index.d.ts +10 -0
  157. package/dist/src/components/menu/ui/WuMenuCheckboxItem.d.ts +8 -0
  158. package/dist/src/components/menu/ui/WuMenuItem.d.ts +8 -0
  159. package/dist/src/components/menu/ui/WuMenuItemGroup.d.ts +8 -0
  160. package/dist/src/components/menu/ui/WuMenuRadioItem.d.ts +15 -0
  161. package/dist/src/components/menu/ui/WuMenuSeparatorItem.d.ts +2 -0
  162. package/dist/src/components/menu/ui/WuSubMenu.d.ts +13 -0
  163. package/dist/src/components/menuIcon/WuMenuIcon.d.ts +9 -0
  164. package/dist/src/components/menuIcon/WuMenuIcon.test.d.ts +1 -0
  165. package/dist/src/components/menuIcon/index.d.ts +2 -0
  166. package/dist/src/components/modal/WuModal.d.ts +32 -0
  167. package/dist/src/components/modal/WuModal.test.d.ts +1 -0
  168. package/dist/src/components/modal/index.d.ts +2 -0
  169. package/dist/src/components/monthPicker/WuMonthPicker.d.ts +16 -0
  170. package/dist/src/components/monthPicker/WuMonthPicker.test.d.ts +1 -0
  171. package/dist/src/components/monthPicker/index.d.ts +2 -0
  172. package/dist/src/components/navbar/index.d.ts +4 -0
  173. package/dist/src/components/navbar/primaryNavbar/WuPrimaryNavbar.d.ts +12 -0
  174. package/dist/src/components/navbar/primaryNavbar/WuPrimaryNavbar.test.d.ts +1 -0
  175. package/dist/src/components/navbar/secondaryNavbar/WuSecondaryNavbar.d.ts +18 -0
  176. package/dist/src/components/navbar/secondaryNavbar/WuSecondaryNavbar.test.d.ts +1 -0
  177. package/dist/src/components/pagination/WuPagination.d.ts +10 -0
  178. package/dist/src/components/pagination/WuPagination.test.d.ts +1 -0
  179. package/dist/src/components/pagination/index.d.ts +2 -0
  180. package/dist/src/components/popover/WuPopover.d.ts +14 -0
  181. package/dist/src/components/popover/WuPopover.test.d.ts +1 -0
  182. package/dist/src/components/popover/index.d.ts +2 -0
  183. package/dist/src/components/radio/WuRadioGroup.d.ts +12 -0
  184. package/dist/src/components/radio/WuRadioGroup.test.d.ts +1 -0
  185. package/dist/src/components/radio/index.d.ts +3 -0
  186. package/dist/src/components/radio/types/IWuRadioOption.d.ts +6 -0
  187. package/dist/src/components/scrollArea/WuScrollArea.d.ts +4 -0
  188. package/dist/src/components/scrollArea/WuScrollArea.test.d.ts +1 -0
  189. package/dist/src/components/scrollArea/index.d.ts +1 -0
  190. package/dist/src/components/select/WuSelect.d.ts +33 -0
  191. package/dist/src/components/select/WuSelect.test.d.ts +1 -0
  192. package/dist/src/components/select/index.d.ts +3 -0
  193. package/dist/src/components/select/types/IWuSelectOptions.d.ts +16 -0
  194. package/dist/src/components/select/ui/_item.d.ts +15 -0
  195. package/dist/src/components/select/ui/_trigger.d.ts +20 -0
  196. package/dist/src/components/select/utils/renderItems.d.ts +10 -0
  197. package/dist/src/components/select/utils/useOptionDestructure.d.ts +8 -0
  198. package/dist/src/components/select/utils/useResizeContent.d.ts +2 -0
  199. package/dist/src/components/select/utils/useSortedSelectOptions.d.ts +4 -0
  200. package/dist/src/components/sidebar/WuSidebar.d.ts +33 -0
  201. package/dist/src/components/sidebar/WuSidebar.test.d.ts +1 -0
  202. package/dist/src/components/sidebar/index.d.ts +2 -0
  203. package/dist/src/components/sidebar/shadcn/sidebar.d.ts +44 -0
  204. package/dist/src/components/spotlight/WuSpotlight.d.ts +16 -0
  205. package/dist/src/components/spotlight/WuSpotlight.test.d.ts +1 -0
  206. package/dist/src/components/spotlight/index.d.ts +2 -0
  207. package/dist/src/components/stackedCard/WuStackedCard.d.ts +29 -0
  208. package/dist/src/components/stackedCard/WuStackedCard.test.d.ts +1 -0
  209. package/dist/src/components/stackedCard/index.d.ts +3 -0
  210. package/dist/src/components/stackedCard/utils/constant.d.ts +1 -0
  211. package/dist/src/components/stackedCard/utils/helper.d.ts +16 -0
  212. package/dist/src/components/stepper/WuStepper.d.ts +15 -0
  213. package/dist/src/components/stepper/WuStepper.test.d.ts +1 -0
  214. package/dist/src/components/stepper/index.d.ts +2 -0
  215. package/dist/src/components/surveySelect/WuSurveySelect.d.ts +5 -0
  216. package/dist/src/components/surveySelect/WuSurveySelect.test.d.ts +1 -0
  217. package/dist/src/components/surveySelect/index.d.ts +6 -0
  218. package/dist/src/components/surveySelect/subComponents/WuSharedSurvey.d.ts +3 -0
  219. package/dist/src/components/surveySelect/subComponents/WuSurveyItem.d.ts +3 -0
  220. package/dist/src/components/surveySelect/subComponents/WuSurveyList.d.ts +3 -0
  221. package/dist/src/components/surveySelect/subComponents/WuSurveySource.d.ts +8 -0
  222. package/dist/src/components/surveySelect/types/index.d.ts +15 -0
  223. package/dist/src/components/switcher/WuSwitcher.d.ts +25 -0
  224. package/dist/src/components/switcher/WuSwitcher.test.d.ts +1 -0
  225. package/dist/src/components/switcher/index.d.ts +4 -0
  226. package/dist/src/components/switcher/types/IWuSwitcherOption.d.ts +4 -0
  227. package/dist/src/components/switcher/types/IWuSwitcherOptions.d.ts +2 -0
  228. package/dist/src/components/switcher/ui/_iconTab.d.ts +11 -0
  229. package/dist/src/components/switcher/ui/_tab.d.ts +12 -0
  230. package/dist/src/components/switcher/ui/_toggle.d.ts +11 -0
  231. package/dist/src/components/tab/WuTab.d.ts +15 -0
  232. package/dist/src/components/tab/WuTab.test.d.ts +1 -0
  233. package/dist/src/components/tab/components/BaseTabContent.d.ts +8 -0
  234. package/dist/src/components/tab/hooks/useHorizontalTabScroll.d.ts +8 -0
  235. package/dist/src/components/tab/hooks/useTabIndicator.d.ts +9 -0
  236. package/dist/src/components/tab/hooks/useVerticalTabScroll.d.ts +8 -0
  237. package/dist/src/components/tab/index.d.ts +3 -0
  238. package/dist/src/components/tab/shadcn/tabs.d.ts +7 -0
  239. package/dist/src/components/tab/types/IWuItems.d.ts +5 -0
  240. package/dist/src/components/tab/ui/_horizontalTab.d.ts +3 -0
  241. package/dist/src/components/tab/ui/_verticalTab.d.ts +3 -0
  242. package/dist/src/components/table/components/dataTable/WuDataTable.d.ts +31 -0
  243. package/dist/src/components/table/components/dataTable/WuDataTable.test.d.ts +1 -0
  244. package/dist/src/components/table/components/table/WuTable.d.ts +35 -0
  245. package/dist/src/components/table/components/table/WuTable.test.d.ts +1 -0
  246. package/dist/src/components/table/hooks/useRowSelection.d.ts +11 -0
  247. package/dist/src/components/table/hooks/useTableCore.d.ts +19 -0
  248. package/dist/src/components/table/hooks/useTableScroll.d.ts +6 -0
  249. package/dist/src/components/table/index.d.ts +8 -0
  250. package/dist/src/components/table/types/IColumnDefaultSorting.d.ts +4 -0
  251. package/dist/src/components/table/types/IWuRowSelection.d.ts +10 -0
  252. package/dist/src/components/table/types/IWuTableColumnDef.d.ts +11 -0
  253. package/dist/src/components/table/ui/_body.d.ts +15 -0
  254. package/dist/src/components/table/ui/_header.d.ts +17 -0
  255. package/dist/src/components/table/ui/_virtualBody.d.ts +20 -0
  256. package/dist/src/components/table/utils/data.d.ts +65 -0
  257. package/dist/src/components/table/utils/tableHelpers.d.ts +16 -0
  258. package/dist/src/components/table/utils/tableStyles.d.ts +7 -0
  259. package/dist/src/components/table/utils/variantClass.d.ts +3 -0
  260. package/dist/src/components/textarea/WuTextarea.d.ts +8 -0
  261. package/dist/src/components/textarea/WuTextarea.test.d.ts +1 -0
  262. package/dist/src/components/textarea/index.d.ts +2 -0
  263. package/dist/src/components/timePicker/WuTimePicker.d.ts +9 -0
  264. package/dist/src/components/timePicker/WuTimePicker.test.d.ts +1 -0
  265. package/dist/src/components/timePicker/components/timeColumn.d.ts +11 -0
  266. package/dist/src/components/timePicker/hooks/useRotatedArrays.d.ts +5 -0
  267. package/dist/src/components/timePicker/hooks/useTimePickerScroll.d.ts +1 -0
  268. package/dist/src/components/timePicker/index.d.ts +2 -0
  269. package/dist/src/components/timePicker/utils/timePickerUtils.d.ts +12 -0
  270. package/dist/src/components/toast/WuToast.d.ts +1 -0
  271. package/dist/src/components/toast/WuToast.test.d.ts +1 -0
  272. package/dist/src/components/toast/hooks/useWuShowToast.d.ts +11 -0
  273. package/dist/src/components/toast/index.d.ts +3 -0
  274. package/dist/src/components/toast/types/IWuToastOptions.d.ts +5 -0
  275. package/dist/src/components/toggle/WuToggle.d.ts +8 -0
  276. package/dist/src/components/toggle/WuToggle.test.d.ts +1 -0
  277. package/dist/src/components/toggle/index.d.ts +2 -0
  278. package/dist/src/components/tooltip/WuTooltip.d.ts +15 -0
  279. package/dist/src/components/tooltip/WuTooltip.test.d.ts +1 -0
  280. package/dist/src/components/tooltip/index.d.ts +2 -0
  281. package/dist/src/components/typography/WuTypography.d.ts +21 -0
  282. package/dist/src/components/typography/WuTypography.test.d.ts +1 -0
  283. package/dist/src/components/typography/iconClasses.d.ts +1 -0
  284. package/dist/src/components/typography/index.d.ts +1 -0
  285. package/dist/src/components/useTranslation/WuTranslation.test.d.ts +1 -0
  286. package/dist/src/components/useTranslation/WuTranslationContext.d.ts +2 -0
  287. package/dist/src/components/useTranslation/WuTranslationProvider.d.ts +6 -0
  288. package/dist/src/components/useTranslation/index.d.ts +4 -0
  289. package/dist/src/components/useTranslation/types/index.d.ts +8 -0
  290. package/dist/src/components/useTranslation/useTranslationContext.d.ts +3 -0
  291. package/dist/src/components/virtualScroll/WuVirtualScroll.d.ts +11 -0
  292. package/dist/src/components/virtualScroll/WuVirtualScroll.test.d.ts +1 -0
  293. package/dist/src/components/virtualScroll/index.d.ts +2 -0
  294. package/dist/src/docs/Icons.d.ts +2 -0
  295. package/dist/src/docs/Theme.d.ts +3 -0
  296. package/dist/src/docs/Typography.d.ts +4 -0
  297. package/dist/src/docs/ui/chartColor.d.ts +4 -0
  298. package/dist/src/docs/ui/colorSystem.d.ts +10 -0
  299. package/dist/src/hooks/index.d.ts +1 -0
  300. package/dist/src/hooks/useAnimation.d.ts +9 -0
  301. package/dist/src/hooks/useAnimation.test.d.ts +1 -0
  302. package/dist/src/hooks/useMobile.d.ts +1 -0
  303. package/dist/src/hooks/useResizeList.d.ts +10 -0
  304. package/dist/src/index.d.ts +53 -0
  305. package/dist/src/lib/testUtils.d.ts +2 -0
  306. package/dist/src/lib/utils.d.ts +15 -0
  307. package/dist/src/translate/WuTranslate.d.ts +5 -0
  308. package/dist/src/translate/WuTranslateContext.d.ts +17 -0
  309. package/dist/src/translate/WuTranslateContext.test.d.ts +1 -0
  310. package/dist/src/translate/index.d.ts +3 -0
  311. package/dist/src/translate/wt.d.ts +13 -0
  312. package/dist/style.css +2 -0
  313. package/dist/wick-ui-lib/es/index.js +12354 -0
  314. package/dist/wick-ui-lib/umd/index.js +20 -0
  315. package/package.json +25 -25
@@ -0,0 +1,20 @@
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`@radix-ui/react-accordion`),require(`react`),require(`clsx`),require(`tailwind-merge`),require(`react/jsx-runtime`),require(`@radix-ui/react-avatar`),require(`@radix-ui/react-tooltip`),require(`date-fns`),require(`@radix-ui/react-popover`),require(`react-day-picker`),require(`@radix-ui/react-slot`),require(`class-variance-authority`),require(`@radix-ui/react-label`),require(`react-dom`),require(`@radix-ui/react-checkbox`),require(`cmdk`),require(`react-virtuoso`),require(`@radix-ui/react-dropdown-menu`),require(`@radix-ui/react-dialog`),require(`@radix-ui/react-scroll-area`),require(`@radix-ui/react-radio-group`),require(`@radix-ui/react-separator`),require(`@radix-ui/react-toggle-group`),require(`@radix-ui/react-toggle`),require(`@radix-ui/react-tabs`),require(`@tanstack/react-table`),require(`@radix-ui/react-toast`),require(`@radix-ui/react-switch`)):typeof define==`function`&&define.amd?define(`exports.@radix-ui/react-accordion.react.clsx.tailwind-merge.react/jsx-runtime.@radix-ui/react-avatar.@radix-ui/react-tooltip.date-fns.@radix-ui/react-popover.react-day-picker.@radix-ui/react-slot.class-variance-authority.@radix-ui/react-label.react-dom.@radix-ui/react-checkbox.cmdk.react-virtuoso.@radix-ui/react-dropdown-menu.@radix-ui/react-dialog.@radix-ui/react-scroll-area.@radix-ui/react-radio-group.@radix-ui/react-separator.@radix-ui/react-toggle-group.@radix-ui/react-toggle.@radix-ui/react-tabs.@tanstack/react-table.@radix-ui/react-toast.@radix-ui/react-switch`.split(`.`),t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`wick-ui-lib`]={},e.RadixUIAccordion,e.React,e.clsx,e.tailwindMerge,e[`react/jsx-runtime`],e.RadixUIAvatar,e.RadixUITooltip,e.dateFns,e.RadixUIPopover,e.ReactDayPicker,e.RadixUISlot,e.ClassVarianceAuthority,e.RadixUILabel,e.ReactDOM,e.RadixUICheckbox,e.cmdk,e.ReactVirtuoso,e.RadixUIDropdownMenu,e.RadixUIDialog,e.RadixUIScrollArea,e.RadixUIRadioGroup,e.RadixUISeparator,e.RadixUIToggleGroup,e.RadixUIToggle,e.RadixUITabs,e.TanstackReactTable,e.RadixUIToast,e.RadixUISwitch))})(this,function(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var k=Object.create,A=Object.defineProperty,j=Object.getOwnPropertyDescriptor,M=Object.getOwnPropertyNames,N=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,F=(e,t)=>()=>(e&&(t=e(e=0)),t),I=(e,t)=>{let n={};for(var r in e)A(n,r,{get:e[r],enumerable:!0});return t||A(n,Symbol.toStringTag,{value:`Module`}),n},ee=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=M(t),a=0,o=i.length,s;a<o;a++)s=i[a],!P.call(e,s)&&s!==n&&A(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=j(t,s))||r.enumerable});return e},L=(e,t,n)=>(n=e==null?{}:k(N(e)),ee(t||!e||!e.__esModule?A(n,`default`,{value:e,enumerable:!0}):n,e)),te=e=>P.call(e,`module.exports`)?e[`module.exports`]:ee(A({},`__esModule`,{value:!0}),e);t=L(t,1);let R=L(n,1);n=L(n),o=L(o,1),s=L(s,1),l=L(l,1),p=L(p,1),m=L(m),h=L(h,1),v=L(v,1),y=L(y,1),b=L(b,1),x=L(x,1),S=L(S,1),C=L(C,1),w=L(w,1),T=L(T,1),D=L(D,1),O=L(O,1);var ne=(0,i.extendTailwindMerge)({prefix:`wu-`});function z(...e){return ne((0,r.clsx)(e))}var B=e=>{window?.open(e,`_blank`,`toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600`)};function V(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}function re(e){switch(e){case`top`:return`wu-flex-col-reverse`;case`left`:return`wu-flex-row-reverse wu-gap-2`;case`right`:return`wu-flex-row wu-gap-2`;default:return``}}var ie=e=>e?/\S+@questionpro\.com/.test(e):!1,ae=t.Root,oe=R.forwardRef(({className:e,...n},r)=>(0,a.jsx)(t.Item,{ref:r,className:z(`wu-border-b`,e),...n}));oe.displayName=`AccordionItem`;var se=R.forwardRef(({className:e,children:n,...r},i)=>(0,a.jsx)(t.Header,{className:`wu-flex`,children:(0,a.jsxs)(t.Trigger,{ref:i,className:z(`wu-flex wu-flex-1 wu-text-xs wu-items-center wu-justify-between wu-p-2 wu-transition-all`,`[&[data-state=open]>.wu-arrow-icon]:wu-rotate-180`,e),...r,children:[n,(0,a.jsx)(`span`,{className:`wu-arrow-icon wm-keyboard-arrow-down wu-transition-transform wu-duration-200`})]})}));se.displayName=t.Trigger.displayName;var ce=R.forwardRef(({className:e,children:n,...r},i)=>(0,a.jsx)(t.Content,{ref:i,className:`wu-overflow-hidden wu-text-xs wu-px-2 wu-font-light wu-transition-all data-[state=closed]:wu-animate-accordion-up data-[state=open]:wu-animate-accordion-down`,...r,children:(0,a.jsx)(`div`,{className:z(`wu-pb-4 wu-pt-0`,e),children:n})}));ce.displayName=t.Content.displayName;var le=e=>{let{items:t,className:n,dir:r=`ltr`}=e;if(e.type===`multiple`){let{defaultValue:i=[],value:o,onValueChange:s}=e;return(0,a.jsx)(ae,{type:`multiple`,className:`wu-w-full wu-accordion-container`,defaultValue:i,value:o,onValueChange:s,dir:r,children:t.map(({value:e,Summary:t,Details:i,className:o})=>(0,a.jsxs)(oe,{value:e,dir:r,className:z(n,o),children:[(0,a.jsx)(se,{dir:r,className:`wu-accordion-summary`,children:t}),(0,a.jsx)(ce,{dir:r,className:`wu-accordion-details`,children:i})]},e))})}else{let{defaultValue:i,value:o,onValueChange:s}=e;return(0,a.jsx)(ae,{type:`single`,className:`wu-w-full wu-accordion-container`,defaultValue:i,value:o,onValueChange:s,dir:r,collapsible:!0,children:t.map(({value:e,Summary:t,Details:i,className:o})=>(0,a.jsxs)(oe,{value:e,dir:r,className:z(n,o),children:[(0,a.jsx)(se,{dir:r,className:`wu-accordion-summary`,children:t}),(0,a.jsx)(ce,{dir:r,className:`wu-accordion-details`,children:i})]},e))})}},H=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(o.Root,{ref:n,className:z(`wu-relative wu-flex wu-h-10 wu-w-10 wu-shrink-0 wu-overflow-hidden wu-rounded-full`,e),...t}));H.displayName=o.Root.displayName;var ue=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(o.Image,{ref:n,className:z(`wu-aspect-square wu-h-full wu-w-full`,e),...t}));ue.displayName=o.Image.displayName;var de=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(o.Fallback,{ref:n,className:z(`wu-flex wu-h-full wu-w-full wu-items-center wu-justify-center wu-rounded-full wu-bg-muted`,e),...t}));de.displayName=o.Fallback.displayName;var U={timelineContainer:`_timelineContainer_1rtax_1`,mainVerticalLine:`_mainVerticalLine_1rtax_5`,dateGroup:`_dateGroup_1rtax_9`,dateHeader:`_dateHeader_1rtax_13`,dateDot:`_dateDot_1rtax_17`,dateText:`_dateText_1rtax_21`,logList:`_logList_1rtax_25`,logItem:`_logItem_1rtax_29`,timelineDotSmall:`_timelineDotSmall_1rtax_33`,content:`_content_1rtax_37`,time:`_time_1rtax_1`,tags:`_tags_1rtax_45`,tag:`_tag_1rtax_45`,tagPrimary:`_tagPrimary_1rtax_53`,tagSecondary:`_tagSecondary_1rtax_57`,userActionRow:`_userActionRow_1rtax_61`,avatar:`_avatar_1rtax_65`,actionText:`_actionText_1rtax_69`,userName:`_userName_1rtax_73`},fe=(e,t)=>t.includes(`.`)?t.split(`.`).reduce((e,t)=>e?.[t],e):e?.[t],pe=R.default.memo(({log:e,accessorKey:t})=>{let n=fe(e,t.time),r=fe(e,t.userName),i=fe(e,t.userInitials),o=fe(e,t.userImage??``),s=fe(e,t.tags??``),c=fe(e,t.description);return(0,a.jsxs)(`div`,{className:U.logItem,"data-slot":`log-item`,children:[(0,a.jsx)(`div`,{className:U.timelineDotSmall,"data-slot":`timeline-dot-small`}),(0,a.jsxs)(`div`,{className:U.content,"data-slot":`content`,children:[(0,a.jsx)(`div`,{className:U.time,"data-slot":`time`,children:n}),s?.length>0&&(0,a.jsx)(`div`,{className:U.tags,"data-slot":`tags`,children:s.map((e,t)=>(0,a.jsx)(`span`,{className:z(U.tag,t===0?U.tagPrimary:U.tagSecondary),"data-slot":`tag`,children:e},e))}),(0,a.jsxs)(`div`,{className:U.userActionRow,"data-slot":`user-action-row`,children:[(0,a.jsxs)(H,{className:U.avatar,"data-slot":`avatar`,children:[(0,a.jsx)(ue,{src:o,alt:r,"data-slot":`log-user-avatar-image`}),(0,a.jsx)(de,{className:`wu-text-[10px] wu-bg-slate-400 wu-text-white`,"data-slot":`log-user-avatar-fallback`,children:i})]}),(0,a.jsxs)(`p`,{className:U.actionText,"data-slot":`action-text`,children:[(0,a.jsx)(`span`,{className:U.userName,"data-slot":`log-username`,children:r}),`\xA0`,c]})]})]})]})}),me=({logs:e,accessorKey:t,className:n,...r})=>{let i=(0,R.useMemo)(()=>e.reduce((e,n)=>{let r=fe(n,t.date);return r?(e[r]=e[r]||[],e[r].push(n),e):e},{}),[e,t.date]);return(0,a.jsxs)(`div`,{className:z(U.timelineContainer,n),"data-slot":`timeline-container`,...r,children:[(0,a.jsx)(`div`,{className:U.mainVerticalLine,"data-slot":`main-vertical-line`}),Object.entries(i).map(([e,n])=>(0,a.jsxs)(`div`,{className:U.dateGroup,"data-slot":`date-group`,children:[(0,a.jsxs)(`div`,{className:U.dateHeader,"data-slot":`date-header`,children:[(0,a.jsx)(`div`,{className:U.dateDot,"data-slot":`date-dot`}),(0,a.jsx)(`span`,{className:U.dateText,"data-slot":`date-text`,children:e})]}),(0,a.jsx)(`div`,{className:U.logList,"data-slot":`log-list`,children:n.map(e=>{let n=fe(e,t.id);return(0,a.jsx)(pe,{log:e,accessorKey:t},n)})})]},e))]})};function he(e,t){R.default.useEffect(()=>{let n=n=>{Array.isArray(e)&&e.some(e=>!e.current||e.current.contains(n.target))||!Array.isArray(e)&&(!e.current||e.current.contains(n.target))||t(n)};return document.addEventListener(`mousedown`,n),document.addEventListener(`touchstart`,n),()=>{document.removeEventListener(`mousedown`,n),document.removeEventListener(`touchstart`,n)}},[e,t])}var ge={dropdownContainer:`_dropdownContainer_vvlo9_1`,open:`_open_vvlo9_1`,dropdownMenu:`_dropdownMenu_vvlo9_1`},_e=({dir:e,Trigger:t,triggerClassName:n,DropdownContent:r,isAllowActiveStyle:i})=>{let[o,s]=(0,R.useState)(!1),c=(0,R.useRef)(null),l=(0,R.useRef)(null);he([c,l],()=>s(!1));let u=()=>{s(!o)};return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(`div`,{className:ge.dropdownContainer,children:(0,a.jsx)(`ul`,{children:(0,a.jsxs)(`li`,{className:z(`wu-flex wu-relative`,o&&ge.open),children:[(0,a.jsx)(`button`,{className:z(`wu-w-8 wu-h-8 wu-rounded-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher`,n,i&&o&&`wu-bg-white wu-text-blue-switcher`),onClick:e=>{e.preventDefault(),u()},ref:l,"aria-label":`dropdown-trigger`,children:t}),(0,a.jsx)(`div`,{className:z(ge.dropdownMenu,{open:o},e===`rtl`?`wu-left-[-10px] wu-top-[38px]`:`wu-right-[-7px] wu-top-[38px]`),dir:e,ref:c,"aria-label":`user-menu`,children:r})]})})})})},ve=R.default.forwardRef((e,t)=>ye(e,t)),ye=(e,t)=>{let{size:n=`md`,color:r=`#1B87E6`,variant:i=`dots`,...o}=e,s=z(`wu-w-[4em] wu-h-[1em] wu-inline-block wu-text-xs wu-relative wu-loader-dot-container`),c=`7px`;n===`sm`?c=`7px`:n===`md`?c=`12px`:n===`lg`?c=`18px`:typeof n==`string`&&(c=n);let l={backgroundColor:r,width:c,height:c},u=(0,a.jsxs)(`div`,{...o,ref:t,className:z(`wu-flex wu-items-center wu-justify-center wu-gap-2 wu-w-fit`,e.className),role:`status`,"aria-busy":`true`,children:[(0,a.jsx)(`div`,{className:`wu-w-12 wu-h-12 wu-border-2 wu-rounded-full wu-animate-spin`,style:{width:c,height:c,borderTopColor:r}}),e.message&&(0,a.jsx)(`p`,{className:`wu-inline-block wu-loader-message`,children:e.message})]}),d=(0,a.jsxs)(`div`,{...o,ref:t,className:z(`wu-flex wu-items-center wu-justify-center wu-gap-2 wu-w-fit`,e.className),role:`alert`,"aria-busy":`true`,children:[(0,a.jsxs)(`ul`,{className:s,style:{fontSize:c},role:`loader`,children:[(0,a.jsx)(`li`,{className:`wu-dot wu-loader-dot`,style:l}),(0,a.jsx)(`li`,{className:`wu-dot wu-loader-dot`,style:l}),(0,a.jsx)(`li`,{className:`wu-dot wu-loader-dot`,style:l}),(0,a.jsx)(`li`,{className:`wu-dot wu-loader-dot`,style:l})]}),e.message&&(0,a.jsx)(`p`,{className:`wu-inline-block wu-loader-message`,children:e.message})]});return(0,a.jsx)(a.Fragment,{children:i===`spinner`?u:d})};ve.displayName=`WuLoader`;var be={wuButton:`_wuButton_1ftm8_1`},W=(0,R.forwardRef)(({disabled:e,loading:t,variant:n=`primary`,size:r=`md`,Icon:i,iconPosition:o=`left`,children:s,floating:c,className:l,color:u=`primary`,selected:d,...f},p)=>(0,a.jsxs)(`button`,{ref:p,disabled:e||t,"data-variant":n,"data-size":r,"data-color":u,"data-loading":t||void 0,"data-selected":d||void 0,"data-floating":c||void 0,"data-icon-position":o,className:z(be.wuButton,l),...f,children:[!t&&i&&(0,a.jsx)(a.Fragment,{children:i}),t&&(0,a.jsx)(ve,{color:u===`neutral`?`#000`:`#fff`,size:n===`iconOnly`?`lg`:`sm`,variant:n===`iconOnly`?`spinner`:`dots`}),!t&&s]}));W.displayName=`WuButton`;var xe=({onLogout:e,DataCenter:t})=>(0,a.jsxs)(`section`,{className:`wu-flex wu-justify-between wu-px-4 wu-py-4 wu-text-white wu-bg-gray-lead`,children:[(0,a.jsx)(`div`,{className:`wu-flex-1 wu-flex wu-items-start`,children:t}),(0,a.jsx)(W,{variant:`outline`,size:`sm`,Icon:(0,a.jsx)(`span`,{className:`wm-logout`}),className:`wu-text-white wu-bg-transparent wu-ring-white hover:wu-bg-gray-10 hover:wu-text-gray-lead hover:wu-ring-gray-lead`,onClick:e,"aria-label":`logout`,children:`LOGOUT`})]}),Se=({user:e,dir:t})=>{let n=[e?.usage&&Object.keys(e.usage).length>0?{title:e.usage.title,url:e.usage.url,icon:`wm-bar-chart wu-text-base`,node:(0,a.jsxs)(`div`,{className:`wu-flex wu-flex-col wu-items-center wu-w-20`,children:[(0,a.jsx)(`code`,{className:`wu-font-medium`,children:e.usage.collectedResponseCount||`0`}),(0,a.jsx)(`span`,{className:`wu-text-xs wu-font-normal`,children:`Responses`})]})}:null,e?.invoice&&Object.keys(e.invoice).length>0?{title:e.invoice.title,url:e.invoice.url,icon:`wm-attach-money wu-text-base wu-font-semibold`,node:(0,a.jsx)(`div`,{className:`wu-flex wu-justify-center wu-items-center wu-w-20`,children:(0,a.jsx)(`code`,{children:e.invoice.size})})}:null].filter(Boolean);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`ul`,{children:n.map(({title:e,url:r,icon:i,node:o},s)=>(0,a.jsx)(`li`,{className:s<n.length-1?`wu-border-b wu-border-gray-subtle`:``,children:(0,a.jsxs)(`a`,{href:r,className:z(`wu-flex items-center wu-justify-between wu-py-2 hover:wu-bg-gray-20 focus-within:wu-bg-gray-20 focus:wu-outline-none`,t===`rtl`?`wu-pl-4`:`wu-pr-4`),children:[(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-gap-2`,children:[(0,a.jsx)(`span`,{className:z(i,`wu-w-12 wu-text-center`)}),(0,a.jsx)(`span`,{children:e})]}),o]})},s))}),(0,a.jsx)(`hr`,{className:`wu-border-gray-subtle`})]})},Ce=({settings:e,dir:t})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`hr`,{className:`wu-border-gray-subtle`}),(0,a.jsxs)(`section`,{className:`wu-relative wu-flex wu-items-center wu-justify-start wu-gap-2`,children:[(0,a.jsx)(`span`,{className:z(`wu-absolute wm-settings wu-text-base`,t===`rtl`?`wu-right-4`:`wu-left-4`)}),(0,a.jsx)(`ul`,{className:`wu-w-full`,dir:t,children:e?.map(e=>(0,a.jsx)(`li`,{tabIndex:-1,dir:t,children:(0,a.jsx)(`a`,{href:e.url,className:z(`wu-inline-block wu-w-full wu-py-2 hover:wu-bg-gray-20 focus-within:wu-bg-gray-20 focus:wu-outline-none`,t===`rtl`?`wu-pr-14 wu-text-right`:`wu-pl-14`),children:e.title})},e.title))})]}),(0,a.jsx)(`hr`,{className:`wu-border-gray-subtle`})]}),we=({user:e,dir:t})=>(0,a.jsxs)(`section`,{className:z(`wu-flex wu-gap-2 wu-p-4 wu-w-full`,t===`rtl`?`wu-pr-0`:`wu-pl-0`),children:[(0,a.jsx)(`div`,{className:`wu-flex wu-items-center wu-justify-center wu-w-12`,children:(0,a.jsx)(`span`,{className:`wu-text-base wm-person`})}),(0,a.jsxs)(`div`,{className:z(`wu-flex wu-flex-col wu-gap-1`,t===`rtl`&&`wu-text-right`),children:[(0,a.jsx)(`p`,{children:e?.profile?.title}),(0,a.jsxs)(`a`,{href:e?.license?.url,className:`hover:wu-text-blue-p wu-group/license focus:wu-outline-none focus:wu-text-blue-p`,dir:t,children:[(0,a.jsx)(`p`,{children:e?.profile?.subtitle}),(0,a.jsx)(`p`,{className:`wu-font-light`,children:e?.profile?.companyName})]}),e?.license&&Object.keys(e.license).length>0&&(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-justify-between wu-gap-6 wu-mt-3`,dir:t,children:[(0,a.jsx)(`a`,{href:e?.license?.url,className:`hover:wu-text-blue-p wu-group/license focus:wu-outline-none focus:wu-text-blue-p`,children:(0,a.jsxs)(`div`,{className:`wu-flex wu-flex-col wu-items-start wu-gap-1`,children:[(0,a.jsx)(`p`,{className:`wu-font-normal`,children:e?.license?.subtitle}),(0,a.jsx)(`button`,{tabIndex:-1,className:`wu-px-3 wu-py-1 wu-border wu-rounded-sm wu-border-gray-subtle group-hover/license:wu-border-blue-p`,children:e?.license?.title})]})}),(0,a.jsxs)(`div`,{className:`wu-flex wu-flex-col wu-items-start wu-gap-1`,dir:t,children:[(0,a.jsx)(`p`,{className:`wu-font-normal`,children:e?.license?.expiryDatePostFixString}),(0,a.jsx)(`p`,{children:e?.license?.expiryDate})]})]})]})]}),Te=({user:e,onLogout:t,dir:n,DataCenter:r})=>e?(0,a.jsx)(_e,{Trigger:(0,a.jsxs)(H,{className:z(`wu-group wu-border wu-border-white wu-text-sm wu-font-medium wu-bg-transparent wu-w-8 wu-h-8 wu-ring-white wu-leading-[33px] wu-text-white wu-transition-colors hover:wu-bg-white hover:wu-text-gray-switcher wu-header-user-avatar`),children:[(0,a.jsx)(ue,{className:`hover:wu-opacity-80`,src:e?.profile?.profilePicture,alt:`User`}),(0,a.jsx)(de,{children:e?.profile?.initials})]}),dir:n,triggerClassName:`wu-rounded-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher wu-w-8 wu-h-8 wu-app-user-button`,DropdownContent:(0,a.jsxs)(`div`,{className:z(`wu-p-0 wu-text-xs wu-font-medium wu-border wu-rounded-none wu-min-w-72 wu-w-max wu-max-w-96 wu-border-gray-subtle wu-text-gray-lead wu-overflow-hidden wu-bg-white`),dir:n,children:[(0,a.jsx)(we,{user:e,dir:n}),e?.settings&&e.settings.length>0&&(0,a.jsx)(Ce,{settings:e.settings,dir:n}),(0,a.jsx)(Se,{user:e,dir:n}),(0,a.jsx)(xe,{onLogout:t,DataCenter:r})]})}):null,Ee=({menuList:e,dir:t})=>(0,a.jsx)(_e,{dir:t,Trigger:(0,a.jsx)(`span`,{className:`wm-question-mark wu-text-xl`}),triggerClassName:`wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-rounded-full wu-border wu-border-white focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher wu-text-white wu-transition-colors hover:wu-bg-white hover:wu-text-blue-switcher wu-app-header-help`,isAllowActiveStyle:!0,DropdownContent:(0,a.jsx)(`ul`,{children:(e||[{icon:`wm-help`,title:`Help center`,subTitle:`Knowledge Base`,link:`https://www.questionpro.com/help/`},{icon:`wm-live-tv`,title:`Free training`,subTitle:`Webinar`,link:`https://www.questionpro.com/training`},{icon:`wm-local-fire-department`,title:`Updates`,subTitle:`What's new!`,link:`https://www.questionpro.com/updates/`},{icon:`wm-support-agent`,title:`Live support`,subTitle:`Support`,link:`https://www.questionpro.com/a/liveperson.do?mode=launch&pageMode=quickChat`,target:`window`},{icon:`wm-book-2`,title:`Org wiki`,subTitle:`wiki`,link:`https://www.questionpro.com/a/liveperson.do?mode=launch&pageMode=quickChat`,target:`window`}]).map((e,n)=>(0,a.jsx)(`li`,{className:`wu-p-0 wu-w-[136px]`,dir:t,children:e.target===`window`?(0,a.jsx)(`a`,{tabIndex:0,rel:`noopener noreferrer`,onClick:()=>B(e.link),onKeyDown:t=>{t.key===`Enter`&&B(e.link)},className:`wu-block wu-w-full wu-h-full wu-px-3 wu-py-2 hover:wu-bg-black hover:wu-bg-opacity-[.04] focus-visible:wu-border-none focus-visible:wu-bg-black
2
+ focus-visible:wu-bg-opacity-[.04] focus-visible:wu-ring-0 focus-visible:wu-outline-none focus-visible:wu-ring-offset-0 wu-cursor-pointer`,children:(0,a.jsx)(De,{item:e,dir:t})}):(0,a.jsx)(`a`,{href:e.link,target:`_blank`,className:`wu-block wu-w-full wu-h-full wu-px-3 wu-py-2 hover:wu-bg-black hover:wu-bg-opacity-[0.04] focus-visible:wu-border-none
3
+ focus-visible:wu-bg-black
4
+ focus-visible:wu-bg-opacity-[.04] focus-visible:wu-ring-0 focus-visible:wu-outline-none focus-visible:wu-ring-offset-0`,rel:`noreferrer`,children:(0,a.jsx)(De,{item:e,dir:t})})},n))})}),De=({item:e,dir:t})=>(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-gap-[5px]`,dir:t,children:[(0,a.jsx)(`div`,{className:`wu-flex wu-items-center wu-justify-center wu-w-6 wu-h-6`,children:(0,a.jsx)(`span`,{className:z(`wu-text-xl wu-text-gray-lead`,e.icon)})}),(0,a.jsx)(`p`,{className:`wu-text-sm wu-text-gray-lead`,children:e.title})]}),Oe=e=>{let[t,n]=(0,R.useState)(()=>window.innerWidth<=e);return(0,R.useEffect)(()=>{let t=()=>{n(window.innerWidth<=e)};return window.addEventListener(`resize`,t),()=>{window.removeEventListener(`resize`,t)}},[e]),t};function ke({productCategories:e,openCategory:t,setOpenCategory:n}){let r=(t,r)=>{let i=r[t];i&&(i.focus(),n(e[t]||null))},i=(e,t,n,i)=>{e.preventDefault(),r(n===`down`?t+1:t-1,i)},a=(e,n,i,a)=>{t?.products&&t.products[t.products.length-1].name===a&&(e.preventDefault(),r(n+1,i))},o=(r,i)=>{r.preventDefault(),n(e[i]===t?null:e[i])};return function(e,t,n){let r=document.querySelectorAll(`[data-product-category]`),{key:s}=e;switch(s){case`ArrowDown`:i(e,t,`down`,r);break;case`ArrowUp`:i(e,t,`up`,r);break;case`Tab`:a(e,t,r,n);break;case`Enter`:case` `:o(e,t);break;default:break}}}var Ae=e=>{let{size:t=`lg`,className:n,children:r,...i}=e,o={sm:`wu-text-body-3`,md:`wu-text-body-2`,lg:`wu-text-body-1`};return(0,a.jsx)(e.as||`div`,{...i,className:z(o[t],n),children:r})},je=e=>{let{size:t=`xl`,className:n,children:r,...i}=e,o={sm:`h4`,md:`h3`,lg:`h2`,xl:`h1`},s={sm:`wu-text-heading-4`,md:`wu-text-heading-3`,lg:`wu-text-heading-2`,xl:`wu-text-heading-1`},c=o[t];return(0,a.jsx)(c,{...i,className:z(s[t],n),children:r})},Me=e=>{let{size:t=`lg`,className:n,children:r,...i}=e,o={sm:`wu-text-sub-3`,md:`wu-text-sub-2`,lg:`wu-text-sub-1`};return(0,a.jsx)(e.as||`div`,{...i,className:z(o[t],n),children:r})},Ne=e=>{let{size:t=`lg`,className:n,children:r,...i}=e,o={md:`wu-text-display-2`,lg:`wu-text-display-1`};return(0,a.jsx)(e.as||`h1`,{...i,className:z(o[t],n),children:r})},Pe=e=>{let{icon:t,className:n,...r}=e;return(0,a.jsx)(`span`,{...r,className:z(t,n),role:`presentation`,"aria-label":t})},Fe=({buttonRef:e,handleDropdownToggle:t,handleKeyDown:n,isDropdownOpen:r,activeProductName:i,dir:o=`ltr`,homeLink:s=`/`})=>(0,a.jsxs)(`button`,{ref:e,type:`button`,className:z(`wu-text-base wu-font-normal wu-flex wu-items-center wu-justify-between wu-w-full focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-trigger`,`rtl:wu-pr-2 wu-pl-2 rtl:wu-pl-1 wu-pr-1`),onClick:t,onKeyDown:e=>{r&&e.key===`ArrowDown`&&n(e,-1)},"aria-label":`product-switcher`,children:[(0,a.jsx)(`a`,{className:`wu-aspect-auto focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-logo`,tabIndex:-1,href:s,children:(0,a.jsx)(Pe,{icon:`wc-logo`,className:`wu-text-[23px] wu-leading-4 wu-relative wu-top-1 wu-right-[2px]`})}),(0,a.jsx)(`span`,{className:`wu-relative wu-bottom-[1.5px]`,children:i}),(0,a.jsx)(`span`,{className:z(`wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300 wu-relative wu-bottom-[1.5px]`,r&&`wu-rotate-180`,o===`rtl`?`wu-mr-auto wu-left-[2px]`:`wu-ml-auto wu-right-[2px]`)})]}),G={productDropdownMenu:`_productDropdownMenu_amyba_1`,productDropdownMenuOpen:`_productDropdownMenuOpen_amyba_38`,rtlDropdownMenu:`_rtlDropdownMenu_amyba_51`,productCategory:`_productCategory_amyba_55`,open:`_open_amyba_61`,productCategoryBorderTop:`_productCategoryBorderTop_amyba_66`,rightArrowIcon:`_rightArrowIcon_amyba_80`,productList:`_productList_amyba_93`,learnMoreItem:`_learnMoreItem_amyba_110`,rtlProductList:`_rtlProductList_amyba_114`,productListItem:`_productListItem_amyba_137`,productLink:`_productLink_amyba_162`,productIcon:`_productIcon_amyba_163`,activeProduct:`_activeProduct_amyba_164`,productListCategory:`_productListCategory_amyba_169`,topBorder:`_topBorder_amyba_169`,topBorderRtl:`_topBorderRtl_amyba_190`,productText:`_productText_amyba_214`},Ie=({category:e,dir:t=`ltr`,openCategory:n})=>{let r=e.active?`#c5cce0`:`#f0c36a`,i=n?.name===e.name,o=z(`wm-arrow-forward-ios wu-text-xs wu-tracking-widest wu-text-muted-foreground wu-mr-2.5 group-hover:wu-hidden wu-text-blue-q`,t===`rtl`&&`wu-rotate-180 wu-ml-2.5 wu-text-blue-q group-hover:wu-hidden`,i&&`wu-hidden`,`wu-relative wu-top-[5px]`),s=z(`wm-lock wu-text-orange-soft wu-text-base wu-mr-2.5 group-hover:wu-hidden`,t===`rtl`&&`wu-ml-2.5 group-hover:wu-hidden`,i&&`wu-hidden`,`wu-relative wu-top-1`);return(0,a.jsxs)(`div`,{className:z(`group focus:wu-outline-none focus-visible:wu-outline-none wu-flex wu-items-center wu-w-full wu-bg-white wu-relative wu-justify-between`),dir:t,children:[(0,a.jsx)(`div`,{className:G.productCategoryBorderTop,style:{backgroundColor:r}}),(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-px-1 wu-relative wu-top-1`,children:[(0,a.jsx)(`div`,{className:`wu-w-[56px] wu-h-[56px] wu-flex wu-items-center wu-justify-center`,children:(0,a.jsx)(`img`,{src:e.logo,alt:e.name,width:`32px`,height:`32px`})}),(0,a.jsx)(`span`,{className:`wu-text-sm wu-leading-5 wu-text-blue-q wu-relative wu-top-[1px]`,children:e.name})]}),e.active?(0,a.jsx)(`span`,{className:o}):(0,a.jsx)(`span`,{className:s})]})},Le={e309:`wp-audience`,e381:`wp-bi`,e329:`wp-closed-loop`,e314:`wp-communities`,e313:`wp-cx`,e352:`wp-digsite`,e324:`wp-empower`,e317:`wp-insightshub`,e380:`wp-instant-answers`,e378:`wp-intercept`,e311:`wp-livepolls`,e316:`wp-reputation`,e379:`wp-suite-cx`,e382:`wp-suite-cx`,e308:`wp-surveys`,e315:`wp-workforce`},Re=({product:e,currentProduct:t,activeProductName:n,dir:r,focusItem:i,setFocusItem:o})=>{let[s,c]=(0,R.useState)(e.name===t),l=e.name===n,u=e.name===t,d=!e.active,f=z(`wu-font-normal wu-text-xs wu-text-gray-lead wu-text-center`,u&&`wu-text-blue-q wu-font-normal`,!e.active&&`wu-text-gray-subtle`,s&&`wu-font-normal`,e.active&&s&&`wu-text-blue-q`),p=z(`wu-text-blue-p wu-text-base`,u&&`wu-text-blue-q`,!e.active&&`wu-text-gray-subtle`,e.active&&s&&`wu-text-blue-q`),m=s||i===e.name||l?`#1b3380`:`#c5cce0`;return(0,a.jsxs)(`li`,{className:z(G.productListItem,`focus-visible:wu-outline-none focus:wu-outline-none wu-sub-product-list-item`,(l||s)&&G.activeProduct,e.name.length>15&&window.innerWidth>768&&`wu-w-[130px] wu-min-w-[130px]`,i===e.name&&G.activeProduct,`wu-product-item`),onMouseOver:()=>c(!0),onMouseOut:()=>c(!1),"aria-label":e.name,"aria-disabled":d,dir:r,onKeyDown:e=>{if(e.key===`Enter`){e.preventDefault();let t=e.currentTarget.querySelector(`a`);t&&t.click()}},onFocus:()=>{o(e.name)},onBlur:()=>o(``),children:[(0,a.jsx)(`div`,{className:z(G.topBorder,r===`rtl`&&G.topBorderRtl),style:{backgroundColor:d?`#ffcf70`:m}}),(0,a.jsxs)(`a`,{className:z(G.productLink,`focus:wu-outline-none focus-visible:wu-outline-none`),href:e.link||`#`,tabIndex:0,children:[(0,a.jsx)(`span`,{className:z(p,Le[e.icon||``]),"aria-hidden":!0}),(0,a.jsx)(`span`,{className:z(f),children:e.name})]})]},e.name)},ze=({category:e,currentProduct:t,activeProductName:n,dir:r=`ltr`,focusItem:i,setFocusItem:o,borderColorLocked:s=`#f5a300`})=>{let{products:c=[],active:l}=e,u=(0,R.useMemo)(()=>c.filter(e=>e.active).sort((e,t)=>(e.order||100)-(t.order||100)),[c]),d=(0,R.useMemo)(()=>c.filter(e=>!e.active),[c]),[f,p]=(0,R.useState)(s),m=e=>e.map((e,s)=>(0,a.jsx)(Re,{product:e,currentProduct:t,activeProductName:n,dir:r,focusItem:i,setFocusItem:o},s));return l?(0,a.jsxs)(a.Fragment,{children:[m(u),d.length>0&&(0,a.jsxs)(`li`,{className:z(G.productListItem,`focus:wu-outline-none focus-visible:wu-outline-none !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee] wu-group`),onMouseOver:()=>p(`#f5a300`),onMouseOut:()=>p(s),"aria-label":`Upgrade to unlock`,children:[(0,a.jsx)(`div`,{className:z(G.topBorder,r===`rtl`&&G.topBorderRtl),style:{backgroundColor:f},"aria-label":`top-border`}),(0,a.jsxs)(`a`,{href:`https://www.questionpro.com/a/showUpgradeUser.do`,className:z(G.productLink,`wu-flex wu-flex-col wu-items-center wu-justify-center wu-py-2 wu-min-w-[88px]`),children:[(0,a.jsx)(`span`,{className:`wu-text-base wu-transition-colors wm-lock !wu-text-orange-soft group-hover:wu-text-orange-deep`}),(0,a.jsxs)(`span`,{className:`wu-text-[10px] wu-leading-[10px] wu-text-center wu-pt-1 !wu-text-orange-deep`,children:[`Upgrade to `,(0,a.jsx)(`br`,{}),` unlock`]})]})]}),m(d)]}):(0,a.jsxs)(`li`,{className:z(G.productListItem,G.learnMore,`focus:wu-outline-none focus-visible:wu-outline-none wu-product-item-inactive !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee]`,i===`learn`&&`activeProduct`),tabIndex:0,onFocus:()=>o(`learn`),onBlur:()=>o(``),"aria-label":`Learn More`,children:[(0,a.jsx)(`div`,{className:z(G.topBorder,r===`rtl`&&G.topBorderRtl),style:{backgroundColor:s}}),(0,a.jsx)(`a`,{className:G.productLink,href:`https://www.questionpro.com/a/showUpgradeUser.do`,tabIndex:-1,children:(0,a.jsx)(`span`,{className:`wu-text-[#f99e03]`,children:`Learn More`})})]})},Be=({dropdownRef:e,dir:t,isDropdownOpen:n,productCategories:r,openCategory:i,setOpenCategory:o,handleKeyDown:s,expandAll:c,activeProductName:l,focusItem:u,setFocusItem:d})=>{let[f,p]=(0,R.useState)(window.innerWidth>768);return(0,R.useEffect)(()=>{let e=()=>{p(window.innerWidth>768)};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,a.jsx)(`ul`,{className:z(G.productDropdownMenu,n&&G.productDropdownMenuOpen,t===`rtl`&&G.rtlDropdownMenu,`wu-switcher-container`),ref:e,dir:t,"aria-label":`product-dropdown-menu`,"data-state":n?`open`:`closed`,children:r.map((e,n)=>(0,a.jsxs)(`li`,{className:z(G.productCategory,`focus:wu-outline-none focus-visible:wu-outline-none wu-h-16 wu-category-item`,i===e&&G.open,c&&G.open),onMouseEnter:()=>f&&o(e),onMouseLeave:()=>f&&o(null),onClick:()=>{f||o(t=>t===e?null:e)},"aria-label":e.name,dir:t,onKeyDown:e=>s(e,n),tabIndex:0,"data-product-category":!0,children:[(0,a.jsx)(Ie,{category:e,dir:t,openCategory:i}),(0,a.jsx)(`ul`,{className:z(G.productList,t===`rtl`&&G.rtlProductList),dir:t,children:(0,a.jsx)(ze,{category:e,dir:t,activeProductName:l,currentProduct:e.name,focusItem:u,setFocusItem:d,borderColorLocked:`#ffcf70`})})]},e.name))})},Ve=({isProductButtonShow:e,isDropdownOpen:t,activeProductColor:n,activeProductBgColor:r,activeProductName:i,dir:o,smallScreenButtonRef:s,handleDropdownToggle:c,handleKeyDown:l})=>(0,a.jsx)(`div`,{className:z(`wu-absolute wu-top-11 wu-transition-all wu-duration-300 wu-ease-in-out wu-transform wu-opacity-100 wu-w-[256px] wu-z-10`,e?o===`rtl`?`wu-right-0 wu-overflow-hidden`:`wu-translate-x-0 wu-left-0`:o===`rtl`?`wu-right-0 wu-w-0`:`wu--translate-x-full`),style:{backgroundColor:t?n.hover:r},children:(0,a.jsxs)(`button`,{ref:s,type:`button`,className:z(`wu-text-base wu-leading-[48px] wu-flex wu-items-center wu-justify-center wu-px-2 wu-gap-2 wu-w-full focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-trigger`,e?`wu-flex`:o===`rtl`?`wu-hidden`:`wu-flex`),onClick:c,onKeyDown:e=>{t&&e.key===`ArrowDown`&&l(e,-1)},"aria-label":`small-screen-product-btn`,children:[i,(0,a.jsx)(`span`,{className:z(`wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300`,t&&`wu-rotate-180`)})]})}),He=({dir:e,isProductButtonShow:t,smallScreenToggleButtonRef:n,setIsProductButtonShow:r,setDropdownOpen:i})=>(0,a.jsxs)(`button`,{className:z(`wu-relative wu-w-10 wu-h-10 wu-flex wu-flex-col wu-justify-center wu-items-center`,e===`rtl`?`wu-mr-4`:`wu-ml-4`),onClick:()=>{r(e=>!e),t&&i(!1)},ref:n,"aria-label":`menu-toggle-btn`,children:[(0,a.jsx)(`span`,{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-transform wu-duration-300 ${t?`wu-rotate-45 wu-translate-y-0`:`-wu-translate-y-2.5`}`}),(0,a.jsx)(`span`,{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-opacity wu-duration-300 ${t?`wu-opacity-0`:`wu-opacity-100`}`}),(0,a.jsx)(`span`,{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-transform wu-duration-300 ${t?`-wu-rotate-45 wu-translate-y-0`:`wu-translate-y-2.5`}`})]}),Ue=({productCategories:e,activeProductName:t,activeProductColor:n={base:`#1b87e6`,hover:`#54A5EC`},dir:r,homeLink:i,expandAll:o})=>{let s=(0,R.useRef)(null),c=(0,R.useRef)(null),l=(0,R.useRef)(null),u=(0,R.useRef)(null),[d,f]=(0,R.useState)(!1),[p,m]=(0,R.useState)(null),[h,g]=(0,R.useState)(n.base),[_,v]=(0,R.useState)(``),[y,b]=(0,R.useState)(!1),x=Oe(768);he([c,s],()=>{f(!1),m(null)}),he([l,u,c],()=>{b(!1),f(!1),m(null)}),(0,R.useEffect)(()=>{let e=e=>{e.key===`Escape`&&f(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[d]),(0,R.useEffect)(()=>g(n.base),[n.base]);let S=e=>{e.preventDefault(),e.stopPropagation(),f(e=>{let t=!e;return t||m(null),t})},C=(t,n)=>{ke({productCategories:e,openCategory:p,setOpenCategory:m})(t,n,_)};return(0,a.jsx)(`div`,{className:z(`wu-inline-flex wu-items-center wu-justify-between wu-relative wu-z-auto wu-h-12 wu-text-white`),children:x?(0,a.jsxs)(`div`,{className:`wu-relative wu-flex`,children:[(0,a.jsx)(He,{dir:r,isProductButtonShow:y,smallScreenToggleButtonRef:u,setDropdownOpen:f,setIsProductButtonShow:b}),(0,a.jsx)(Ve,{isProductButtonShow:y,isDropdownOpen:d,activeProductColor:n,activeProductBgColor:h,activeProductName:t,handleDropdownToggle:S,smallScreenButtonRef:l,handleKeyDown:C,dir:r}),(0,a.jsx)(`div`,{className:z(`wu-absolute wu-top-[92px] wu-left-0 wu-text-[18px]`,r===`rtl`&&`wu-right-[256px] wu-left-auto`),children:(0,a.jsx)(Be,{activeProductName:t,focusItem:_,setFocusItem:v,handleKeyDown:C,isDropdownOpen:d,openCategory:p,productCategories:e,setOpenCategory:m,dropdownRef:c,expandAll:o,dir:r})})]}):(0,a.jsxs)(`div`,{className:`wu-relative wu-flex wu-items-center wu-justify-start wu-h-full wu-w-[256px]`,dir:r,style:{backgroundColor:d?n.hover:h},onMouseOver:()=>g(n.hover),onMouseOut:()=>g(n.base),children:[(0,a.jsx)(Fe,{activeProductName:t,dir:r,homeLink:i,buttonRef:s,handleDropdownToggle:S,handleKeyDown:C,isDropdownOpen:d}),(0,a.jsx)(Be,{activeProductName:t,focusItem:_,setFocusItem:v,handleKeyDown:C,isDropdownOpen:d,openCategory:p,productCategories:e,setOpenCategory:m,dropdownRef:c,expandAll:o,dir:r})]})})},We=({children:e,dir:t,className:n})=>(0,a.jsx)(`section`,{className:z(`wu-flex wu-items-center wu-flex-1 wu-min-w-0 wu-h-12 wu-gap-2 wu-px-2`,t===`rtl`&&`wu-flex-row-reverse`,n),children:(0,a.jsx)(`div`,{className:`wu-grow`,children:e})}),Ge=({className:e,placeholder:t=`Search surveys, folders or tools`,defaultCollapsed:n=!0,onSearch:r,...i})=>{let[o,s]=(0,R.useState)(n);return(0,R.useEffect)(()=>{s(n)},[n]),(0,a.jsxs)(`div`,{className:`wu-relative`,children:[(0,a.jsx)(Pe,{"data-testid":`search-icon`,icon:`wm-search`,className:z(`wu-absolute wu-top-1 wu-left-0.5`,`wu-text-gray-lead wu-cursor-pointer wu-text-[19px]`,o&&`wu-text-white`),onClick:()=>s(e=>!e)}),(0,a.jsx)(`input`,{placeholder:t,onChange:e=>r(e.target.value),className:z(`wu-rounded-full focus-visible:wu-outline-2 focus-visible:wu-outline-blue-focus -wu-outline-offset-2 wu-bg-white`,`wu-transition-all wu-duration-300 wu-ease-in-out`,`wu-h-8 wu-pl-8 wu-pr-4 wu-text-xs wu-text-gray-lead`,o?`wu-w-8 wu-px-2 wu-text-lg wu-rounded-full wu-h-8 wu-border wu-border-white wu-bg-transparent`:`wu-w-40 sm:wu-w-60`,e),type:`search`,...i})]})},Ke=s.Provider,qe=s.Root,Je=s.Trigger,Ye=R.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,a.jsx)(s.Content,{ref:r,sideOffset:t,className:z(`wu-z-50 wu-overflow-hidden wu-bg-gray-notification wu-text-white wu-px-3 wu-py-1.5 wu-text-sm wu-shadow-md`,e),...n}));Ye.displayName=s.Content.displayName;var Xe=R.default.forwardRef(({content:e,position:t,positionOffset:n,duration:r,children:i,className:o,showArrow:c=!1,open:l,onOpenChange:u,style:d,...f},p)=>(0,a.jsx)(Ke,{delayDuration:r||200,children:(0,a.jsxs)(qe,{open:l,onOpenChange:u,children:[(0,a.jsx)(Je,{asChild:!0,children:(0,a.jsx)(`span`,{ref:p,...f,children:i})}),(0,a.jsx)(s.Portal,{children:e&&(0,a.jsxs)(Ye,{side:t||`top`,sideOffset:n||0,className:z(`wu-max-w-sm wu-max-h-96 wu-overflow-y-auto`,o),style:d,children:[e,c&&(0,a.jsx)(s.Arrow,{className:`wu-fill-gray-notification wu-tooltip-arrow`})]})})]})}));Xe.displayName=`WuTooltip`;var Ze=({label:e,className:t})=>{let n=(0,R.useRef)(null),[r,i]=(0,R.useState)(!1);return(0,R.useEffect)(()=>{let t=n.current;if(t){let n=t.clientWidth,r=t.scrollWidth,a=r/e.length;i(e.length*a>n||r>n)}},[e]),(0,a.jsx)(`p`,{ref:n,className:z(`wu-w-full wu-truncate`,t),children:r?(0,a.jsx)(Xe,{content:e,positionOffset:8,children:e}):e})},Qe=e=>{let{productName:t,categories:n=[],user:r,children:i,onLogout:o,homeLink:s=window.location.origin,brandColor:c,dir:l=`ltr`,expandAll:u,DataCenter:d}=e;return(0,a.jsx)(`div`,{className:`wu-sticky wu-top-0 wu-z-50 wu-w-full`,children:(0,a.jsxs)(`header`,{className:z(`wu-h-12 wu-flex wu-items-center wu-justify-between wu-relative wu-bg-blue-switcher wu-text-white`,l===`rtl`&&`wu-flex-row-reverse`,e.className),style:e.style,children:[ie(r?.profile?.subtitle)&&window.wickUiVersion&&(0,a.jsxs)(`p`,{className:`wu-text-[10px] wu-text-gray-subtle wu-font-normal wu-absolute wu-top-11 wu-right-1 wu-z-[-1] wu-invisible`,"aria-label":`wickUiVersion`,children:[`Wick UI: v`,window.wickUiVersion]}),(0,a.jsx)(`section`,{className:`wu-flex wu-items-center wu-gap-2 wu-shrink-0`,children:(0,a.jsx)(Ue,{productCategories:n,activeProductName:t,activeProductColor:c,dir:l,homeLink:s,expandAll:u})}),(0,a.jsx)(We,{dir:l,children:i}),(0,a.jsxs)(`section`,{className:z(`wu-flex wu-items-center wu-justify-end wu-shrink-0 wu-gap-2`,l===`rtl`?`wu-flex-row-reverse wu-pl-4`:`wu-flex-row wu-pr-4`),children:[(0,a.jsx)(Ee,{dir:l}),r?.profile&&Object.keys(r.profile).length>0&&(0,a.jsx)(Te,{user:r,onLogout:o,dir:l,DataCenter:d})]})]})})},$e=l.Root,et=l.Trigger,tt=R.forwardRef(({className:e,align:t=`center`,sideOffset:n=4,...r},i)=>(0,a.jsx)(l.Portal,{children:(0,a.jsx)(l.Content,{ref:i,align:t,sideOffset:n,className:z(`wu-z-50 wu-w-72 wu-border wu-bg-popover wu-p-4 wu-text-popover-foreground wu-shadow-md wu-outline-none data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2`,e),...r})}));tt.displayName=l.Content.displayName;var nt=(0,f.cva)([`wu-inline-flex wu-items-center wu-justify-center wu-rounded`,`wu-whitespace-nowrap wu-text-sm wu-leading-normal wu-font-normal`,`wu-transition-colors wu-duration-300`,`focus:wu-outline-none focus-visible:wu-outline-2 focus-visible:wu-outline-offset-2`,`disabled:wu-cursor-not-allowed disabled:wu-bg-black/10 disabled:wu-text-gray-subtle disabled:wu-outline-gray-subtle`],{variants:{size:{md:[`wu-p-2 wu-h-8 wu-min-w-[104px]`,`wu-text-sm wu-leading-normal`],sm:[`wu-p-1 wu-h-6 wu-min-w-[90px]`,`wu-text-xs`],mobile:[`wu-p-4 wu-h-10 wu-min-w-[104px] wu-rounded-lg`,`wu-text-base`]},color:{primary:[`wu-bg-blue-p hover:wu-bg-blue-pHoverDeep`,`wu-text-blue-p hover:wu-text-blue-q`,`wu-border wu-border-blue-p hover:wu-border-blue-pHoverDeep`,`focus-visible:wu-outline-blue-p/50`],upgrade:[`wu-bg-orange-soft hover:wu-bg-orange-deep`,`wu-text-orange-deep hover:wu-text-orange-deep`,`wu-border-1 wu-border-orange-soft hover:wu-border-orange-deep`,`focus-visible:wu-outline-orange-deep/50`],error:[`wu-bg-red-deep hover:wu-bg-red-soft`,`wu-text-red-deep hover:wu-text-red-deep`,`wu-border-1 wu-border-red-deep hover:wu-border-red-soft`,`focus-visible:wu-outline-red-deep/50`]},variant:{primary:[`wu-text-white hover:wu-text-white`,`wu-border-0`],secondary:[`wu-bg-transparent hover:wu-bg-black hover:wu-bg-opacity-[0.04]`,`wu-border-0`],outline:[`wu-bg-white hover:wu-text-white`,`disabled:wu-bg-transparent disabled:wu-border-gray-subtle`],rounded:[`wu-text-white hover:wu-text-white`,`wu-border-0 wu-rounded-full`],link:[`wu-bg-transparent hover:wu-bg-transparent`,`disabled:wu-bg-transparent`,`hover:wu-underline wu-underline-offset-2`,`wu-min-w-[auto] wu-px-2`,`wu-border-0`,`focus-visible:wu-outline-offset-0`],iconOnly:[`wu-aspect-square`,`wu-p-2 wu-h-8 wu-w-8 wu-min-w-[auto]`,`wu-text-xl wu-leading-5`,`wu-bg-transparent wu-text-gray-lead`,`hover:wu-bg-black hover:wu-bg-opacity-[0.04]`,`focus-visible:wu-bg-black focus-visible:wu-bg-opacity-[0.04]`,`wu-border-0`,`disabled:wu-grayscale disabled:wu-opacity-80`]}},defaultVariants:{variant:`primary`,size:`md`,color:`primary`},compoundVariants:[]}),rt=R.forwardRef(({className:e,variant:t,size:n,color:r,asChild:i=!1,...o},s)=>(0,a.jsx)(i?d.Slot:`button`,{className:z(nt({size:n,color:r,variant:t,className:e})),ref:s,...o}));rt.displayName=`Button`;function it({className:e,classNames:t,dir:n=`ltr`,...r}){let i=(0,u.getDefaultClassNames)();return(0,a.jsx)(u.DayPicker,{showOutsideDays:r.showOutsideDays||!1,className:z(`wu-p-3`,e),classNames:{root:z(i.root,`wu-relative wu-rounded-none wu-bg-white dark:wu-bg-gray-switcher`),caption_label:z(`wu-text-xs`,r.captionLayout===`dropdown`?`wu-hidden`:``),month_caption:z(i.month_caption,`wu-mb-5`),months:z(i.months,`wu-flex wu-flex-col sm:wu-flex-row wu-gap-4`),dropdowns:z(i.dropdowns,`wu-flex wu-items-center wu-justify-start wu-gap-2`,(r.mode,``)),dropdown:z(i.dropdown,`wu-px-2 wu-py-1 wu-text-sm wu-text-gray-lead wu-font-medium focus:wu-outline-none wu-bg-white wu-border-b wu-border-gray-subtle focus-visible:wu-border-blue-p`),weekday:z(i.weekday,`wu-text-gray-lead wu-rounded-none wu-w-9 wu-font-normal wu-text-xs wu-bg-gray-10 wu-py-2`),day_button:z(i.day_button,`wu-w-full wu-h-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-pHover focus-visible:wu-ring-offset-2`),day:z(i.day,`wu-text-gray-lead wu-transition-colors wu-duration-300 [&:not([aria-selected])]:hover:wu-bg-gray-25 wu-text-sm wu-w-9 wu-h-9 wu-min-w-0 wu-text-center wu-p-0 wu-rounded-none data-[today=true]:[&:not([aria-selected])]:wu-border data-[today=true]:[&:not([aria-selected])]:wu-border-blue-p data-[today=true]:[&:not([aria-selected])]:wu-text-gray-lead`),selected:z(i.selected,`wu-bg-blue-p [&:not(.rm)]:wu-text-white hover:wu-bg-blue-pHover`),range_middle:z(`rm`,i.range_middle,`wu-bg-blue-p/10 wu-rounded-none hover:wu-bg-blue-p/20 wu-text-gray-lead hover:wu-text-white data-[today=true]:wu-bg-blue-p/20 hover:data-[today=true]:wu-bg-blue-pHover`),range_end:z(i.range_end,`wu-rounded-none`),range_start:z(i.range_start,`wu-rounded-none wu-bg-blue-p hover:wu-bg-blue-pHover`),month_grid:z(i.month_grid,`[&>thead>tr>th]:wu-pb-2 wu-border-collapse wu-space-y-1`),button_next:z(i.button_next,nt({variant:`iconOnly`}),`wu-h-6 wu-w-6 wu-text-gray-lead`),button_previous:z(i.button_previous,nt({variant:`iconOnly`}),`wu-h-6 wu-w-6 wu-rotate-180 wu-text-gray-lead`),nav:z(i.nav,`wu-absolute wu-top-4 wu-right-3 wu-flex`,n===`rtl`&&`wu-right-auto wu-left-3 wu-flex-row-reverse`),chevron:z(i.chevron,`!wu-text-red-500`),outside:z(i.outside,`wu-invisible`),disabled:z(i.disabled,`hover:wu-bg-white wu-text-gray-subtle`),...t},components:{Chevron:()=>(0,a.jsx)(`span`,{className:`wm-chevron-right wu-text-lg wu-leading-5`})},...r})}it.displayName=`Calendar`;var at=e=>(0,a.jsx)(it,{...e}),ot=e=>{let{handleDateChange:t,disabled:n,onReset:r,showResetButton:i}=e;return(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-justify-end wu-gap-2 wu-mt-2 wu-date-picker-footer`,children:[i&&(0,a.jsx)(W,{variant:`secondary`,onClick:r,Icon:(0,a.jsx)(`span`,{className:`wu-text-[20px] wu-leading-5 -wu-mt-[1px] wm-refresh`}),className:`wu-date-picker-footer-reset`,children:`Reset`}),(0,a.jsx)(l.PopoverClose,{asChild:!0,children:(0,a.jsx)(W,{onClick:t,disabled:n,className:`wu-date-picker-apply`,children:`Apply`})})]})},st=({formattedString:e,dir:t,placeholder:n=`Select Date`,className:r,variant:i=`primary`,color:o,CustomTrigger:s,...c})=>(0,a.jsx)(l.PopoverTrigger,{asChild:!s,dir:t,children:s?(0,a.jsx)(a.Fragment,{children:s(e)}):(0,a.jsxs)(`button`,{type:`button`,className:z(`wu-justify-between wu-w-full wu-gap-2 wu-text-xs wu-border-b wu-rounded-none wu-rounded-t-sm wu-min-w-48 wu-border-gray-subtle wu-text-gray-lead wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light wu-bg-gray-10 hover disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-subtle hover:wu-text-gray-lead hover:wu-bg-gray-10 hover:wu-border-gray-40 wu-datepicker-trigger`,`wu-flex wu-items-center wu-justify-between wu-px-2 wu-h-8`,i===`outlined`&&`wu-border wu-border-subtle wu-bg-transparent`,r),...c,children:[(0,a.jsx)(`span`,{children:e||n}),(0,a.jsx)(`span`,{className:`wm-calendar-month wu-text-sm`})]})}),ct=(e,t,n,r)=>{let i=(0,c.startOfDay)(e).getTime();return!!(t||n&&i<(0,c.startOfDay)(n).getTime()||r&&i>(0,c.startOfDay)(r).getTime())},lt=e=>e?typeof e==`string`?new Date(e):e:new Date,ut=`(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])-\\d{4}`,dt=[{label:`Last week`,value:7},{label:`Last month`,value:30},{label:`Last quarter`,value:90},{label:`Last year`,value:365}],ft=e=>{let{message:t,className:n,...r}=e;return(0,a.jsx)(`p`,{...r,className:z(`wu-text-sub-3 wu-break-words wu-font-light`,n),style:{color:`rgb(var(--wu-red-deep))`,...r.style},children:t})},pt=e=>{let{inputRef:t,maxLength:n=50,className:r,...i}=e,[o,s]=(0,R.useState)(!1);return(0,R.useEffect)(()=>{(t?.current?.value.length||0)>.75*n?s(!0):s(!1)},[t?.current?.value,n]),(0,a.jsx)(`p`,{...i,className:z(`wu-text-sub-3 wu-font-light`,r),style:{color:`rgb(var(--wu-gray-subtle))`,...i.style},children:o&&`${t?.current?.value.length}/${n}`})},mt=(0,f.cva)(`wu-text-xs wu-font-normal wu-leading-none peer-disabled:wu-cursor-not-allowed peer-disabled:wu-text-gray-subtle peer-readonly:wu-text-gray-subtle peer-required:after:wu-content-['*'] peer-required:after:wu-ml-[2px] peer-required:after:wu-text-red-deep peer-aria-[required]:after:wu-content-['*'] peer-aria-[required]:after:wu-ml-[2px] peer-aria-[required]:after:wu-text-red-deep`),ht=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(p.Root,{ref:n,className:z(mt(),e),...t}));ht.displayName=p.Root.displayName;var K=e=>(0,a.jsx)(ht,{...e,className:z(`wu-text-gray-lead wu-leading-6`,e.className)}),gt=({Label:e,Error:t,Hint:n,Input:r,labelPosition:i=`top`,dir:o=`ltr`,className:s,...c})=>{let l=z(`wu-flex`,i===`top`?`wu-flex-col wu-gap-1`:`wu-flex-row wu-items-center wu-gap-2`,s),u=z(`wu-flex wu-flex-col wu-gap-1 wu-relative wu-flex-1 wu-form-group-wrapper`),d=z(`wu-absolute -wu-bottom-5`,o===`ltr`?`wu-right-0`:`wu-left-0`,`wu-form-group-hint`),f=z(`wu-absolute -wu-bottom-5`,o===`ltr`?`wu-left-0`:`wu-right-0`,`wu-form-group-error`);return(0,a.jsxs)(`div`,{className:l,dir:o,...c,children:[e,(0,a.jsxs)(`div`,{className:u,children:[r,n&&(0,a.jsx)(`div`,{className:d,children:n}),t&&(0,a.jsx)(`div`,{className:f,children:t})]})]})},_t=({formatString:e=`MMM dd, yyyy`,value:t,onChange:n,disabled:r,minDate:i=(0,c.sub)(new Date,{years:5}),maxDate:o=(0,c.add)(new Date,{years:1}),dir:s=`ltr`,Label:l,labelPosition:u=`top`,onReset:d,showResetButton:f=!1,placeholder:p=`Select Date`,CustomTrigger:m,align:h=`start`,sideOffset:g=-.5,side:_,alignOffset:v,...y})=>{let[b,x]=(0,R.useState)(),[S,C]=(0,R.useState)(``),w=(0,R.useCallback)(()=>{C((0,c.format)(lt(b),e)),n&&n(b)},[b,e,n]),T=(0,R.useCallback)(()=>{d?d():(x(void 0),C(``),n&&n(void 0))},[n,d]);return(0,R.useEffect)(()=>{let n=lt(t);x(n),C((0,c.format)(n,e))},[t,e]),(0,a.jsxs)(K,{className:z(`wu-flex wu-gap-1`,u===`left`?`wu-items-center`:`wu-flex-col wu-items-start`,`wu-date-picker-label`),dir:s,children:[l,(0,a.jsxs)($e,{children:[(0,a.jsx)(st,{formattedString:S,dir:s,placeholder:p,CustomTrigger:m,...y}),(0,a.jsx)(tt,{className:`wu-p-0 wu-w-fit wu-date-picker-content`,align:h,sideOffset:g,side:_,alignOffset:v,dir:s,children:(0,a.jsx)(at,{dir:s,mode:`single`,captionLayout:`dropdown`,selected:b,onSelect:x,disabled:e=>ct(e,r,i,o),startMonth:i,endMonth:o,required:!0,autoFocus:!0,defaultMonth:b,className:z(`wu-border wu-border-blue-p wu-date-picker`),footer:(0,a.jsx)(ot,{handleDateChange:w,disabled:r,onReset:T,showResetButton:f})})})]})]})},vt={...n},yt={};function bt(e,t){let r=n.useRef(yt);return r.current===yt&&(r.current=e(t)),r}var xt=vt.useInsertionEffect,St=xt&&xt!==vt.useLayoutEffect?xt:e=>e();function q(e){let t=bt(Ct).current;return t.next=e,St(t.effect),t.trampoline}function Ct(){let e={next:void 0,callback:wt,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function wt(){if(process.env.NODE_ENV!==`production`)throw Error(`Base UI: Cannot call an event handler while rendering.`)}function Tt(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var Et=Tt(`https://base-ui.com/production-error`,`Base UI`);function Dt(){}Object.freeze([]);var Ot=Object.freeze({}),kt=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),At={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},jt={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Mt={disabled:!1,...jt},Nt={valid(e){return e===null?null:e?{[kt.valid]:``}:{[kt.invalid]:``}}},Pt={invalid:void 0,name:void 0,validityData:{state:At,errors:[],error:``,value:``,initialValue:null},setValidityData:Dt,disabled:void 0,touched:jt.touched,setTouched:Dt,dirty:jt.dirty,setDirty:Dt,filled:jt.filled,setFilled:Dt,focused:jt.focused,setFocused:Dt,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:Mt,markedDirtyRef:{current:!1},registerFieldControl:Dt,validation:{getValidationProps:(e=Ot)=>e,getInputValidationProps:(e=Ot)=>e,inputRef:{current:null},commit:async()=>{}}},Ft=n.createContext(Pt);process.env.NODE_ENV!==`production`&&(Ft.displayName=`FieldRootContext`);function It(e=!0){let t=n.useContext(Ft);if(t.setValidityData===Dt&&!e)throw Error(process.env.NODE_ENV===`production`?Et(28):`Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.`);return t}var Lt=n.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Dt,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});process.env.NODE_ENV!==`production`&&(Lt.displayName=`FormContext`);function Rt(){return n.useContext(Lt)}function zt(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var Bt={};function Vt(e,t,n,r,i){if(!n&&!r&&!i&&!e)return Ut(t);let a=Ut(e);return t&&(a=Wt(a,t)),n&&(a=Wt(a,n)),r&&(a=Wt(a,r)),i&&(a=Wt(a,i)),a}function Ht(e){if(e.length===0)return Bt;if(e.length===1)return Ut(e[0]);let t=Ut(e[0]);for(let n=1;n<e.length;n+=1)t=Wt(t,e[n]);return t}function Ut(e){return Jt(e)?{...Yt(e,Bt)}:Gt(e)}function Wt(e,t){return Jt(t)?Yt(t,e):Kt(e,t)}function Gt(e){let t={...e};for(let e in t){let n=t[e];qt(e,n)&&(t[e]=Zt(n))}return t}function Kt(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=zt(e.style,r);break;case`className`:e[n]=$t(e.className,r);break;default:qt(n,r)?e[n]=Xt(e[n],r):e[n]=r}}return e}function qt(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function Jt(e){return typeof e==`function`}function Yt(e,t){return Jt(e)?e(t):e??Bt}function Xt(e,t){return t?e?(...n)=>{let r=n[0];if(en(r)){let i=r;Qt(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:Zt(t):e}function Zt(e){return e&&((...t)=>{let n=t[0];return en(n)&&Qt(n),e(...t)})}function Qt(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function $t(e,t){return t?e?t+` `+e:t:e}function en(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}var tn=0;function nn(e,t=`mui`){let[r,i]=n.useState(e),a=e||r;return n.useEffect(()=>{r??(tn+=1,i(`${t}-${tn}`))},[r,t]),a}var rn=vt.useId;function an(e,t){if(rn!==void 0){let n=rn();return e??(t?`${t}-${n}`:n)}return nn(e,t)}function on(e){return an(e,`base-ui`)}var sn=n.createContext({controlId:void 0,registerControlId:Dt,labelId:void 0,setLabelId:Dt,messageIds:[],setMessageIds:Dt,getDescriptionProps:e=>e});process.env.NODE_ENV!==`production`&&(sn.displayName=`LabelableContext`);function cn(){return n.useContext(sn)}var J=typeof document<`u`?n.useLayoutEffect:()=>{};function ln(){return typeof window<`u`}function un(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function dn(e){return ln()?e instanceof Element||e instanceof un(e).Element:!1}function fn(e){return ln()?e instanceof HTMLElement||e instanceof un(e).HTMLElement:!1}function pn(e={}){let{id:t,implicit:r=!1,controlRef:i}=e,{controlId:a,registerControlId:o}=cn(),s=on(t),c=r?a:void 0,l=bt(()=>Symbol(`labelable-control`)),u=n.useRef(!1),d=n.useRef(t!=null),f=q(()=>{!u.current||o===Dt||(u.current=!1,o(l.current,void 0))});return J(()=>{if(o===Dt)return;let e;if(r){let n=i?.current;e=dn(n)&&n.closest(`label`)!=null?t??null:c??s}else if(t!=null)d.current=!0,e=t;else if(d.current)e=s;else{f();return}if(e===void 0){f();return}u.current=!0,o(l.current,e)},[t,i,c,o,r,s,l,f]),n.useEffect(()=>f,[f]),a??s}function mn(e){return e?.ownerDocument||document}var hn=typeof navigator<`u`,gn=bn(),_n=Sn(),vn=xn();typeof CSS>`u`||!CSS.supports||CSS.supports(`-webkit-backdrop-filter:none`);var yn=gn.platform===`MacIntel`&&gn.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(gn.platform);hn&&/firefox/i.test(vn),hn&&/apple/i.test(navigator.vendor),hn&&/Edg/i.test(vn),hn&&/android/i.test(_n)||/android/i.test(vn),hn&&_n.toLowerCase().startsWith(`mac`)&&navigator.maxTouchPoints,vn.includes(`jsdom/`);function bn(){if(!hn)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function xn(){if(!hn)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function Sn(){if(!hn)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}function Cn(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function wn(e){e.preventDefault(),e.stopPropagation()}function Tn(e,t,n,r){let i=bt(Dn).current;return On(i,e,t,n,r)&&An(i,[e,t,n,r]),i.callback}function En(e){let t=bt(Dn).current;return kn(t,e)&&An(t,e),t.callback}function Dn(){return{callback:null,cleanup:null,refs:[]}}function On(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function kn(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function An(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break;default:}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break;default:}}}}}}var jn=parseInt(n.version,10);function Mn(e){return jn>=e}function Nn(e){if(!n.isValidElement(e))return null;let t=e,r=t.props;return(Mn(19)?r?.ref:t.ref)??null}var Pn;process.env.NODE_ENV!==`production`&&(Pn=new Set);function Fn(...e){if(process.env.NODE_ENV!==`production`){let t=e.join(` `);Pn.has(t)||(Pn.add(t),console.warn(`Base UI: ${t}`))}}function In(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function Ln(e,t){return typeof e==`function`?e(t):e}function Rn(e,t){return typeof e==`function`?e(t):e}function zn(e,t,n={}){let r=t.render,i=Bn(t,n);return n.enabled===!1?null:Gn(e,r,i,n.state??Ot)}function Bn(e,t={}){let{className:n,style:r,render:i}=e,{state:a=Ot,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?Ln(n,a):void 0,d=l?Rn(r,a):void 0,f=l?In(a,c):Ot,p=l&&s?Vn(s):void 0,m=l?zt(f,p)??{}:Ot;return typeof document<`u`&&(l?Array.isArray(o)?m.ref=En([m.ref,Nn(i),...o]):m.ref=Tn(m.ref,Nn(i),o):Tn(null,null)),l?(u!==void 0&&(m.className=$t(m.className,u)),d!==void 0&&(m.style=zt(m.style,d)),m):Ot}function Vn(e){return Array.isArray(e)?Ht(e):Vt(void 0,e)}var Hn=Symbol.for(`react.lazy`),Un=/^[A-Z][A-Za-z0-9$]*$/,Wn=/[a-z]/;function Gn(e,t,r,i){if(t){if(typeof t==`function`)return process.env.NODE_ENV!==`production`&&Kn(t),t(r,i);let e=Vt(r,t.props);e.ref=r.ref;let a=t;if(a?.$$typeof===Hn&&(a=n.Children.toArray(t)[0]),process.env.NODE_ENV!==`production`&&!n.isValidElement(a))throw Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.",`https://base-ui.com/r/invalid-render-prop`].join(`
5
+ `));return n.cloneElement(a,e)}if(e&&typeof e==`string`)return qn(e,r);throw Error(process.env.NODE_ENV===`production`?Et(8):`Base UI: Render element or function are not defined.`)}function Kn(e){let t=e.name;t.length!==0&&Un.test(t)&&Wn.test(t)&&Fn(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`,"This usually means a React component was passed directly as `render={Component}`.","Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.",`If this is an intentional render callback, rename it to start with a lowercase letter.`,"Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.",`https://base-ui.com/r/invalid-render-prop`)}function qn(e,t){return e===`button`?(0,n.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,n.createElement)(`img`,{alt:``,...t,key:t.key}):n.createElement(e,t)}var Jn=[];function Yn(e){n.useEffect(e,Jn)}var Xn=0,Zn=class e{static create(){return new e}currentId=Xn;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Xn,t()},e)}isStarted(){return this.currentId!==Xn}clear=()=>{this.currentId!==Xn&&(clearTimeout(this.currentId),this.currentId=Xn)};disposeEffect=()=>this.clear};function Qn(){let e=bt(Zn.create).current;return Yn(e.disposeEffect),e}var $n;process.env.NODE_ENV!==`production`&&($n=new Set);function er(...e){if(process.env.NODE_ENV!==`production`){let t=e.join(` `);$n.has(t)||($n.add(t),console.error(`Base UI: ${t}`))}}var tr=null,nr=globalThis.requestAnimationFrame,rr=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1;let n=process.env.NODE_ENV!==`production`&&nr!==requestAnimationFrame&&(nr=requestAnimationFrame,!0);return(!this.isScheduled||n)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},ir=class e{static create(){return new e}static request(e){return rr.request(e)}static cancel(e){return rr.cancel(e)}currentId=tr;request(e){this.cancel(),this.currentId=rr.request(()=>{this.currentId=tr,e()})}cancel=()=>{this.currentId!==tr&&(rr.cancel(this.currentId),this.currentId=tr)};disposeEffect=()=>this.cancel};function ar(){let e=bt(ir.create).current;return Yn(e.disposeEffect),e}function or(e){return e==null?e:`current`in e?e.current:e}var sr=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),cr={[sr.startingStyle]:``},lr={[sr.endingStyle]:``},ur={transitionStatus(e){return e===`starting`?cr:e===`ending`?lr:null}};function dr(e,t=!1,n=!0){let r=ar();return q((i,a=null)=>{r.cancel();let o=or(e);if(o==null)return;let s=o,c=()=>{m.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()}).catch(()=>{if(n){a?.aborted||c();return}let e=s.getAnimations();!a?.aborted&&e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&l()})}if(t){let e=sr.startingStyle;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function fr(e){let{enabled:t=!0,open:r,ref:i,onComplete:a}=e,o=q(a),s=dr(i,r,!1);n.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,r,o,s])}function pr(e,t=!1,r=!1){let[i,a]=n.useState(e&&t?`idle`:void 0),[o,s]=n.useState(e);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!r&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),J(()=>{if(!e&&o&&i!==`ending`&&r){let e=ir.request(()=>{a(`ending`)});return()=>{ir.cancel(e)}}},[e,o,i,r]),J(()=>{if(!e||t)return;let n=ir.request(()=>{a(void 0)});return()=>{ir.cancel(n)}},[t,e]),J(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=ir.request(()=>{a(`idle`)});return()=>{ir.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function mr({controlled:e,default:t,name:r,state:i=`value`}){let{current:a}=n.useRef(e!==void 0),[o,s]=n.useState(t),c=a?e:o;if(process.env.NODE_ENV!==`production`){n.useEffect(()=>{a!==(e!==void 0)&&er([`A component is changing the ${a?``:`un`}controlled ${i} state of ${r} to be ${a?`un`:``}controlled.`,`Elements should not switch from uncontrolled to controlled (or vice versa).`,`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.",`More info: https://fb.me/react-controlled-components`].join(`
6
+ `))},[i,r,e]);let{current:o}=n.useRef(t);n.useEffect(()=>{!a&&hr(o)!==hr(t)&&er([`A component is changing the default ${i} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
7
+ `))},[t])}return[c,n.useCallback(e=>{a||s(e)},[])]}function hr(e){let t=0,n=new WeakMap;try{return JSON.stringify(e,function(e,r){if(!(e===`_owner`&&this!=null&&typeof this==`object`&&`$$typeof`in this)){if(typeof r==`bigint`)return`__bigint__:${r}`;if(typeof r==`object`&&r){let e=n.get(r);if(e!==void 0)return`__object__:${e}`;n.set(r,t),t+=1}return r}})??`__top__:${typeof e}`}catch{return`__unserializable__`}}function gr(e,t,r,i,a=!0){let{registerFieldControl:o}=It(),s=n.useRef(null);s.current||=Symbol(),J(()=>{let n=s.current;if(!(!n||!a))return o(n,{controlRef:e,getValue:i,id:t,value:r}),()=>{o(n,void 0)}},[e,a,i,t,o,r])}var _r=`none`,vr=`trigger-press`,yr=`increment-press`,br=`decrement-press`,xr=`input-change`,Sr=`input-clear`,Cr=`input-blur`,wr=`input-paste`,Tr=`keyboard`;function Er(e,t,n,r){let i=!1,a=!1,o=r??Ot;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function Dr(e,t,n){let r=n??Ot;return{reason:e,event:t??new Event(`base-ui`),...r}}var Or=n.forwardRef(function(e,t){let{render:r,className:i,id:a,name:o,value:s,disabled:c=!1,onValueChange:l,defaultValue:u,autoFocus:d=!1,style:f,...p}=e,{state:m,name:h,disabled:g,setTouched:_,setDirty:v,validityData:y,setFocused:b,setFilled:x,validationMode:S,validation:C}=It(),w=g||c,T=h??o,E={...m,disabled:w},{labelId:D}=cn(),O=pn({id:a});J(()=>{let e=s!=null;C.inputRef.current?.value||e&&s!==``?x(!0):e&&s===``&&x(!1)},[C.inputRef,x,s]);let k=n.useRef(null);J(()=>{d&&k.current===Cn(mn(k.current))&&b(!0)},[d,b]);let[A]=mr({controlled:s,default:u,name:`FieldControl`,state:`value`}),j=s!==void 0,M=j?A:void 0,N=q(()=>C.inputRef.current?.value);return gr(C.inputRef,O,M,N),zn(`input`,e,{ref:[t,k],state:E,props:[{id:O,disabled:w,name:T,ref:C.inputRef,"aria-labelledby":D,autoFocus:d,...j?{value:M}:{defaultValue:u},onChange(e){let t=e.currentTarget.value;l?.(t,Er(_r,e.nativeEvent)),v(t!==y.initialValue),x(t!==``)},onFocus(){b(!0)},onBlur(e){_(!0),b(!1),S===`onBlur`&&C.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(_(!0),C.commit(e.currentTarget.value))}},C.getInputValidationProps(),p],stateAttributesMapping:Nt})});process.env.NODE_ENV!==`production`&&(Or.displayName=`FieldControl`);var kr=n.forwardRef(function(e,t){return(0,a.jsx)(Or,{ref:t,...e})});process.env.NODE_ENV!==`production`&&(kr.displayName=`Input`);var Ar={wuInputGroup:`_wuInputGroup_1t4ep_1`,wuInputIcon:`_wuInputIcon_1t4ep_20`,wuInput:`_wuInput_1t4ep_1`,passwordToggle:`_passwordToggle_1t4ep_89`},jr=R.default.memo(({showPassword:e,onToggle:t,disabled:n,readOnly:r})=>{let i=R.default.useCallback(e=>{if(n||r){e.preventDefault(),e.stopPropagation();return}t()},[n,r,t]),o=n||r;return(0,a.jsx)(`button`,{type:`button`,"data-slot":`wu-input-password-toggle`,className:Ar.passwordToggle,onClick:i,disabled:o,"aria-disabled":o||void 0,"aria-label":e?`Hide password`:`Show password`,children:(0,a.jsx)(Pe,{icon:e?`wm-visibility`:`wm-visibility-off`})})});jr.displayName=`PasswordToggle`;var Mr=R.default.memo(R.default.forwardRef(({className:e,Label:t,labelPosition:n=`top`,Icon:r,iconPosition:i=`left`,variant:o=`flat`,type:s,readonly:c,invalid:l,id:u,...d},f)=>{let p=R.default.useId(),m=u||p;if(s===`submit`)return(0,a.jsx)(W,{className:e,id:m,"aria-label":d[`aria-label`],type:`submit`,"data-slot":`wu-input-submit`,disabled:d.disabled,children:t||`Submit`});let[h,g]=(0,R.useState)(!1),_=(0,R.useCallback)(()=>{g(e=>!e)},[]),{finalIcon:v,finalIconPosition:y}=(0,R.useMemo)(()=>s===`password`?{finalIcon:(0,a.jsx)(jr,{showPassword:h,onToggle:_,readOnly:c,disabled:d.disabled}),finalIconPosition:`right`}:{finalIcon:r,finalIconPosition:i},[s,r,i,h,_]),b=(0,R.useMemo)(()=>s===`password`&&h?`text`:s,[s,h]),x=(0,R.useMemo)(()=>z(Ar.wuInput,`wu-peer`,e),[e]);return(0,a.jsxs)(`div`,{"data-slot":`wu-input-group`,role:`group`,className:Ar.wuInputGroup,"data-label-position":n,"data-icon-position":v&&y,children:[v&&(0,a.jsx)(`span`,{className:Ar.wuInputIcon,children:v}),(0,a.jsx)(kr,{ref:f,className:x,"data-variant":o,type:b,readOnly:c,"aria-invalid":l,id:m,...d}),t&&(0,a.jsx)(K,{htmlFor:m,children:t})]})}));Mr.displayName=`WuInput`;var Nr=`MM-dd-yyyy`,Pr=[{label:`Day`,value:1},{label:`Week`,value:7},{label:`Month`,value:30},{label:`Quarter`,value:90},{label:`Year`,value:365}],Fr=({current:e,onSelect:t,presetRanges:n=dt})=>{let[r,i]=(0,R.useState)(),[o,s]=(0,R.useState)(!1),[l,u]=(0,R.useState)(``),[d,f]=(0,R.useState)(``),[p,m]=(0,R.useState)(!1),h=(0,R.useMemo)(()=>n.map(e=>e.value),[n]),g=z(`wu-flex wu-w-full wu-gap-2 wu-px-4 wu-py-2 wu-text-sm wu-text-gray-lead wu-transition-colors`,`wu-rounded-none hover:wu-bg-gray-10 focus:wu-outline-none focus-visible:wu-ring-2`,`focus-visible:wu-ring-blue-pHover focus-visible:wu-ring-offset-1 wu-text-start`),_=(0,R.useCallback)(e=>{if(e===void 0){i(void 0),s(!0);return}let n=Number(e)-1;i(n),s(!1),t({from:(0,c.sub)(new Date,{days:n}),to:new Date})},[t]),v=(0,R.useCallback)((t,n)=>{if(!t||!e?.to||!e?.from||!RegExp(`(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])-\\d{4}`).test(t))return!1;let r=n===`start`?(0,c.parse)(t,Nr,new Date):new Date(e.from),i=n===`end`?(0,c.parse)(t,Nr,new Date):new Date(e.to);return(0,c.isBefore)(i,r)?(m(!0),!1):(m(!1),!((0,c.isSameDay)(r,e.from)&&(0,c.isSameDay)(i,e.to)))},[e]),y=(0,R.useCallback)((n,r)=>{if((r===`start`?u:f)(n),v(n,r)){let i={from:e?.from,to:e?.to};r===`start`&&(i.from=(0,c.parse)(n,Nr,new Date)),r===`end`&&(i.to=(0,c.parse)(n,Nr,new Date)),t(i)}},[e,t,v]);return(0,R.useEffect)(()=>{if(e?.to&&e?.from&&(0,c.isValid)(e.to)&&(0,c.isValid)(e.from)){u((0,c.format)(e.from,Nr)),f((0,c.format)(e.to,Nr));let t=(0,c.differenceInCalendarDays)(e.to,e.from);(0,c.isToday)(e.to)&&h.includes(t+1)?(i(t),s(!1)):(i(void 0),s(!0))}},[e,h]),(0,a.jsxs)(`div`,{className:`wu-flex wu-flex-col wu-gap-1 wu-p-2 wu-bg-white wu-w-60 wu-date-picker-sidebar`,children:[(0,a.jsx)(`ul`,{className:`wu-flex wu-gap-1 wu-py-2 wu-date-picker-batch-list wu-hidden`,children:Pr.map(({label:e,value:t})=>(0,a.jsx)(rt,{variant:`secondary`,className:`wu-px-1 wu-py-1 wu-text-xs wu-h-fit wu-min-w-fit disabled:wu-bg-white`,disabled:t!==1,children:e},t))}),(0,a.jsxs)(`ul`,{className:`wu-flex wu-flex-col wu-gap-1 wu-date-picker-ranges`,children:[n.map(({label:e,value:t})=>(0,a.jsx)(`li`,{children:(0,a.jsx)(`button`,{className:z(g,r===t-1&&`wu-bg-blue-p/10`),onClick:()=>_(t),children:e})},t)),(0,a.jsx)(`li`,{children:(0,a.jsx)(`button`,{className:z(g,o&&`wu-bg-blue-p/10`),onClick:()=>_(),children:`Custom Range`})})]}),(0,a.jsxs)(`div`,{className:`wu-relative wu-flex wu-gap-3 wu-pt-2 wu-date-picker-range-footer`,children:[(0,a.jsx)(Mr,{placeholder:`Start Date`,pattern:ut,value:l,onChange:e=>y(e.target.value,`start`),"aria-label":`Start Date`}),(0,a.jsx)(Mr,{placeholder:`End Date`,pattern:ut,value:d,onChange:e=>y(e.target.value,`end`),"aria-label":`End Date`}),p?(0,a.jsx)(`small`,{className:`wu-absolute wu-text-[10px] wu-leading-[14px] wu-text-red-deep wu-left-0 -wu-bottom-5 wu-text-start`,children:`End date must be after start date`}):(0,a.jsx)(`small`,{className:`wu-absolute wu-right-0 wu-leading-[14px] -wu-bottom-4 wu-text-gray-subtle wu-text-end`,children:`mm-dd-yyyy`})]})]})},Ir=({Trigger:e,children:t,className:n,dir:r,open:i,onOpenChange:o,modal:s,...c})=>(0,a.jsxs)($e,{open:i,onOpenChange:o,modal:s,children:[(0,a.jsx)(et,{asChild:!0,dir:r,children:e}),(0,a.jsx)(tt,{className:z(`wu-w-80 wu-p-0 wu-border-blue-p wu-bg-white wu-dark:border-gray-switcher`,n),dir:r,...c,children:t})]}),Lr=e=>(0,a.jsx)(l.PopoverClose,{asChild:!0,children:(0,a.jsx)(W,{...e})}),Rr={wuDateRangeNativeSidebar:`_wuDateRangeNativeSidebar_1oiuh_1`,customInputs:`_customInputs_1oiuh_26`,inputsRow:`_inputsRow_1oiuh_42`,errorWrapper:`_errorWrapper_1oiuh_63`,errorText:`_errorText_1oiuh_67`},zr=[{label:`Last week`,value:7},{label:`Last month`,value:30},{label:`Last quarter`,value:90},{label:`Last year`,value:365}],Y=e=>{if(!e)return``;try{let t=new Date(e);return(0,c.isValid)(t)?`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)}`:``}catch{return``}},Br=e=>{if(!e)return null;try{let t=(0,c.parseISO)(e);return(0,c.isValid)(t)?(0,c.startOfDay)(t):null}catch{return null}},Vr=(e,t,n)=>!(t&&e<(0,c.startOfDay)(t)||n&&e>(0,c.startOfDay)(n)),Hr=e=>(0,c.sub)(new Date,{days:e}),Ur=e=>e?(0,c.sub)(new Date,{days:1}):new Date;function Wr({ranges:e=zr,excludeToday:t=!0,current:n,onSelect:r,onReset:i,onApply:o,showResetButton:s=!0,maxDate:l,minDate:u,...d}){let[f,p]=R.default.useState(Y(n?.from)||Y(u)),[m,h]=R.default.useState(Y(n?.to)||Y(l)),[g,_]=R.default.useState(!1),[v,y]=R.default.useState(``),[b,x]=R.default.useState(``);R.default.useEffect(()=>{p(Y(n?.from)||Y(u)),h(Y(n?.to)||Y(l)),y(``),x(``)},[n?.from,n?.to,u,l]);let S=R.default.useMemo(()=>{if(!n?.from||!n?.to)return null;let t=(0,c.differenceInCalendarDays)(n.to,n.from)+1;return e.find(e=>e.value===t)??null},[n?.from,n?.to,e]),C=R.default.useCallback(e=>{let n=Hr(e),i=Ur(t);p(Y(n)),h(Y(i)),y(``),x(``),_(!1),r?.({from:n,to:i})},[t,r]),w=R.default.useCallback((e,t)=>{let n=Br(e);if(t===`start`?(p(e),y(``)):(h(e),x(``)),!n){if(e){let e=`Please enter a valid date`;t===`start`?y(e):x(e)}return}if(!Vr(n,u,l)){let e=u&&n<(0,c.startOfDay)(u)?`Date must be on or after ${(0,c.format)(u,`MMM d, yyyy`)}`:`Date must be on or before ${(0,c.format)(l,`MMM d, yyyy`)}`;t===`start`?y(e):x(e);return}let i=Br(t===`start`?m:f);t===`start`&&i?n<=i?r?.({from:n,to:i}):y(`Start date must be before or equal to end date`):t===`end`&&i&&(n>=i?r?.({from:i,to:n}):x(`End date must be after or equal to start date`))},[f,m,r,u,l]),T=R.default.useMemo(()=>e.map(e=>{let n=Hr(e.value),r=Ur(t);return{...e,displayStartDate:(0,c.format)(n,`MMM d, yyyy`),displayEndDate:(0,c.format)(r,`MMM d, yyyy`)}}),[e,t]),E=g||n?.from&&n?.to&&!S;return(0,a.jsxs)(`div`,{className:Rr.wuDateRangeNativeSidebar,...d,children:[(0,a.jsxs)(`ul`,{children:[(0,a.jsx)(`li`,{children:(0,a.jsx)(`button`,{onClick:()=>_(!0),"data-selected":E,"aria-pressed":E,"aria-label":`Select custom date range`,children:`Custom Range`})}),(0,a.jsxs)(`li`,{className:Rr.customInputs,"data-expanded":E,children:[(0,a.jsxs)(`div`,{className:Rr.inputsRow,children:[(0,a.jsx)(Mr,{type:`date`,value:f,onChange:e=>w(e.target.value,`start`),Label:`Start`,min:Y(u),max:Y(l),"aria-describedby":v?`start-date-error`:void 0}),(0,a.jsx)(Mr,{type:`date`,value:m,onChange:e=>w(e.target.value,`end`),Label:`End`,min:f||Y(u),max:Y(l),"aria-describedby":b?`end-date-error`:void 0})]}),(v||b)&&(0,a.jsxs)(`div`,{className:Rr.errorWrapper,role:`alert`,"aria-live":`polite`,children:[v&&(0,a.jsx)(`p`,{id:`start-date-error`,className:Rr.errorText,children:v}),b&&(0,a.jsx)(`p`,{id:`end-date-error`,className:Rr.errorText,children:b})]})]}),T.map(e=>(0,a.jsx)(`li`,{children:(0,a.jsx)(`button`,{onClick:()=>C(e.value),"data-selected":!E&&S?.value===e.value,"aria-pressed":!E&&S?.value===e.value,"aria-label":`Select ${e.label}`,children:e.label})},e.value))]}),(0,a.jsxs)(`footer`,{children:[s&&(0,a.jsx)(Lr,{variant:`secondary`,Icon:(0,a.jsx)(Pe,{icon:`wm-refresh`}),onClick:i,children:`Reset`}),(0,a.jsx)(Lr,{onClick:o,disabled:!!(v||b),children:`Apply`})]})]})}var Gr=({formatString:e=`MMM dd, yyyy`,value:t,onChange:n,disabled:r,minDate:i=(0,c.sub)(new Date,{years:5}),maxDate:o=(0,c.add)(new Date,{years:1}),dir:s=`ltr`,minDateToSelect:l,maxDateToSelect:u,presetRanges:d,Label:f,labelPosition:p=`top`,onReset:m,showResetButton:h=!0,placeholder:g=`Select Date Range`,CustomTrigger:_,native:v,align:y=`start`,alignOffset:b,side:x,sideOffset:S=-.5,...C})=>{let[w,T]=R.default.useState(t),[E,D]=R.default.useState(t),[O,k]=R.default.useState(``),A=R.default.useCallback(()=>{if(E){let t=E.from,r=E.to;T({from:t,to:r}),k(`${(0,c.format)(t,e)} - ${(0,c.format)(r,e)}`),n&&n({from:t,to:r})}},[E,e,n]),j=R.default.useCallback(()=>{D(w)},[w]),M=R.default.useCallback(()=>{m?m():(T(void 0),D(void 0),k(``),n&&n(void 0))},[m,n]);return R.default.useEffect(()=>{if(t?.from&&t?.to){let n=lt(t.from),r=lt(t.to);T(t),D(t),k(`${(0,c.format)(n,e)} - ${(0,c.format)(r,e)}`)}else T(void 0),D({to:new Date,from:new Date})},[t,e]),(0,a.jsxs)(K,{className:z(`wu-flex wu-gap-1`,p===`left`?`wu-items-center`:`wu-flex-col wu-items-start`,`wu-date-picker-label`),dir:s,children:[f,(0,a.jsxs)($e,{onOpenChange:e=>!e&&j(),children:[(0,a.jsx)(st,{formattedString:O,dir:s,placeholder:g,CustomTrigger:_,...C}),(0,a.jsx)(tt,{className:`wu-flex wu-p-0 wu-border wu-w-fit wu-border-blue-p wu-bg-white`,align:y,sideOffset:S,side:x,alignOffset:b,dir:s,children:v?(0,a.jsx)(Wr,{current:E,onSelect:e=>{D(e)},ranges:d,onApply:A,onReset:M,showResetButton:h,minDate:i,maxDate:o}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Fr,{current:E,onSelect:D,presetRanges:d}),(0,a.jsx)(at,{dir:s,numberOfMonths:2,mode:`range`,captionLayout:`dropdown`,selected:E,onSelect:D,disabled:e=>ct(e,r,i,o),startMonth:i,endMonth:o,required:!0,autoFocus:!0,defaultMonth:w?.from,className:z(`wu-shadow-none wu-date-range-picker`),min:l,max:u,footer:(0,a.jsx)(ot,{handleDateChange:A,disabled:r,onReset:M,showResetButton:h})})]})})]})]})},Kr=R.default.forwardRef((e,t)=>{let{className:n,rounded:r,...i}=e;return(0,a.jsx)(`div`,{className:z(`wu-card wu-p-2 wu-pt-1 hover:wu-shadow-card wu-border wu-border-black/20 hover:wu-border-black/30 wu-transition-colors wu-duration-300`,r?`wu-rounded-lg`:`wu-rounded-sm`,n),ref:t,...i})});Kr.displayName=`WuCard`;var qr=R.default.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,a.jsx)(`div`,{ref:t,...r,className:z(`wu-p-2 wu-mb-2 wu-border-b wu-border-gray-40 min-h-12 wu-card-header`,n)})});qr.displayName=`WuCardHeader`;var Jr=R.default.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,a.jsx)(`div`,{ref:t,...r,className:z(`wu-p-2 wu-mt-2 wu-border-t wu-border-gray-40 min-h-12 wu-card-footer`,n)})});Jr.displayName=`WuCardHeader`;var Yr=R.forwardRef(({className:e,partial:t,...n},r)=>(0,a.jsx)(h.Root,{ref:r,className:z(`wu-h-4 wu-w-4 wu-shrink-0 wu-rounded-[2px] wu-bg-white wu-border wu-border-gray-subtle wu-ring-offset-background focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-[1px] data-[state=checked]:wu-bg-blue-p data-[state=checked]:wu-text-white data-[state=checked]:wu-border-none data-[state=checked]:hover:wu-bg-blue-q hover:wu-bg-gray-20 hover:wu-border-blue-p wu-transition-all data-[state=checked]:disabled:wu-bg-gray-20`,`disabled:wu-cursor-not-allowed disabled:wu-opacity-50 disabled:data-[state=unchecked]:wu-bg-gray-20 disabled:hover:wu-border-gray-subtle disabled:wu-border-gray-subtle`,e),...n,children:(0,a.jsxs)(h.Indicator,{className:z(`wu-flex wu-items-center wu-justify-center wu-text-current`),children:[!t&&(0,a.jsx)(`span`,{className:`wm-check wu-text-base wu-leading-4`}),t&&(0,a.jsx)(`span`,{className:`wm-check-indeterminate-small wu-text-base wu-leading-4`})]})}));Yr.displayName=h.Root.displayName;var Xr=R.default.forwardRef((e,t)=>{let{disabled:n,checked:r,Label:i,labelPosition:o=`right`,className:s,id:c=V(),partial:l,onChange:u,required:d,readonly:f,...p}=e;return R.default.useEffect(()=>{p.defaultChecked!==void 0&&r!==void 0&&console.error("WuCheckbox: Both `checked` and `defaultChecked` cannot be used together. Use only one of them.")},[p.defaultChecked,r]),(0,a.jsxs)(`div`,{className:Zr({labelPosition:o,className:`wu-checkbox-container`}),dir:p.dir,children:[(0,a.jsx)(Yr,{id:c,...p,partial:l,checked:r,disabled:n||f,onCheckedChange:u,className:z(`wu-peer wu-checkbox`,s),required:d,ref:t}),i&&(0,a.jsx)(K,{htmlFor:c,className:`wu-w-full wu-checkbox-label`,children:i})]})}),Zr=(0,f.cva)(`wu-flex wu-items-center wu-gap-2 wu-w-fit`,{variants:{labelPosition:{left:`wu-flex-row-reverse wu-text-right`,right:`wu-flex-row`}}});Xr.displayName=`WuCheckbox`;var Qr={WuChip:`_WuChip_l50hr_1`,WuLabel:`_WuLabel_l50hr_70`,WuCloseBtn:`_WuCloseBtn_l50hr_74`},$r=(0,R.forwardRef)(({variant:e=`primary`,size:t=`md`,shape:n=`default`,color:r,disabled:i=!1,selected:o=!1,onClose:s,className:c,children:l,onClick:u,onKeyDown:d,...f},p)=>{let m=!!u,h=!!s,g=m?`button`:`span`,_=e=>{e.stopPropagation(),!i&&s?.()},v=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),_(e))};return(0,a.jsxs)(g,{ref:p,type:m?`button`:void 0,disabled:m?i:void 0,"aria-disabled":i||void 0,"data-variant":e,"data-size":t,"data-shape":n,"data-color":r,"data-selected":o?`true`:`false`,"data-disabled":i||void 0,"data-closable":h||void 0,className:z(Qr.WuChip,c),onClick:i?void 0:u,onKeyDown:d,...f,children:[(0,a.jsx)(`span`,{className:Qr.WuLabel,children:l}),h&&(0,a.jsx)(`span`,{role:`button`,tabIndex:i?-1:0,"aria-label":`Remove`,className:Qr.WuCloseBtn,onClick:_,onKeyDown:v,children:(0,a.jsx)(`span`,{className:`wm-close`})})]})});$r.displayName=`WuChip`;var ei=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(g.Command,{ref:n,className:z(`wu-flex wu-h-full wu-w-full wu-flex-col wu-overflow-hidden wu-rounded-md`,e),...t}));ei.displayName=g.Command.displayName;var ti=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`div`,{className:`wu-flex wu-items-center wu-border-b wu-px-3`,children:(0,a.jsx)(g.Command.Input,{ref:n,className:z(`wu-flex wu-h-11 wu-w-full wu-rounded-md wu-bg-transparent wu-py-3 wu-text-sm wu-outline-none wu-placeholder:wu-text-muted-foreground disabled:wu-cursor-not-allowed disabled:wu-opacity-50`,e),...t})}));ti.displayName=g.Command.Input.displayName;var ni=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(g.Command.List,{ref:n,className:z(``,e),...t}));ni.displayName=g.Command.List.displayName;var ri=R.forwardRef((e,t)=>(0,a.jsx)(g.Command.Empty,{ref:t,className:`wu-text-center wu-p-2 wu-pb-2.5 wu-text-xs`,...e}));ri.displayName=g.Command.Empty.displayName;var ii=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(g.Command.Group,{ref:n,className:z(``,e),...t}));ii.displayName=g.Command.Group.displayName;var ai=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(g.Command.Separator,{ref:n,className:z(`wu-mx-2 wu-my-1 wu-h-px wu-bg-gray-40`,e),...t}));ai.displayName=g.Command.Separator.displayName;var oi=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(g.Command.Item,{ref:n,className:z(`wu-relative wu-flex wu-cursor-default wu-gap-2 wu-select-none wu-items-center wu-rounded-sm wu-px-2 wu-py-3 wu-text-sm wu-outline-none data-[disabled=true]:wu-pointer-events-none data-[disabled=true]:wu-opacity-50 [&_svg]:wu-pointer-events-none [&_svg]:wu-size-4 [&_svg]:wu-shrink-0`,e),...t}));oi.displayName=g.Command.Item.displayName;var si=({className:e,...t})=>(0,a.jsx)(`span`,{className:z(`wu-ml-auto wu-text-xs wu-tracking-widest`,e),...t});si.displayName=`CommandShortcut`;var ci=(e,t,n,r)=>(0,R.useMemo)(()=>{if(!e||!n||t.length===0)return t;let i=Array.isArray(n)?n:[n];if(i.length===0)return t;let a=new Set(i.map(e=>String(e[r.value]))),o=[],s=[],c=[];return t.forEach(e=>{let t=e[r.value];t===void 0?o.push(e):a.has(String(t))?s.push(e):c.push(e)}),[...o,...s,...c]},[t,n,r.value,e]),li=R.default.forwardRef(({containerHeight:e=400,list:t,callback:n,dir:r,className:i,style:o},s)=>(0,a.jsx)(_.Virtuoso,{ref:s,dir:r,className:i,style:{height:e,scrollbarWidth:`thin`,scrollbarColor:`#d4d4d4 #f1f1f1`,overflowX:`hidden`,...o},data:t,itemContent:(e,t)=>n(e,t)}));li.displayName=`WuVirtualScroll`;var ui=({tags:e,triggerRef:t})=>{let[n,r]=(0,R.useState)([]),[i,o]=(0,R.useState)([]),s=(0,R.useMemo)(()=>(0,a.jsx)(`ul`,{className:`wu-flex wu-flex-col wu-items-start wu-justify-center wu-list-none`,children:i.map(e=>(0,a.jsx)(`li`,{className:`wu-py-1 wu-text-xs wu-text-left`,children:e},e))}),[i]),c=e=>{let t=document.createElement(`div`);Object.assign(t.style,{display:`inline-block`,visibility:`hidden`,position:`absolute`,whiteSpace:`nowrap`}),t.textContent=e,document.body.appendChild(t);let n=t.offsetWidth;return document.body.removeChild(t),n+8};return(0,R.useEffect)(()=>{let n=()=>{if(t.current){let n=t.current.offsetWidth-20-36,i=0,a=[],s=[];e.forEach(e=>{let t=c(e);i+t+8<n?(a.push(e),i+=t+8):s.push(e)}),r(a),o(s)}};return n(),window.addEventListener(`resize`,n),()=>{window.removeEventListener(`resize`,n)}},[e,t]),(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-gap-2 wu-text-xs`,children:[n.map(e=>(0,a.jsx)(`span`,{className:`wu-px-1 wu-py-0.5 wu-text-xs wu-rounded-sm wu-bg-gray-10 wu-combobox-tag`,children:e},e)),i.length>0&&(0,a.jsx)(Xe,{content:s,className:`wu-z-[51] wu-text-left`,children:(0,a.jsxs)(`span`,{className:`wu-px-1 wu-py-0.5 wu-text-xs wu-rounded-sm wu-bg-gray-10 wu-combobox-tag`,children:[`+`,i.length]})})]})},di=({placeholder:e=`Select...`,isEllipse:t=!1,selectedOptions:n,variant:r=`flat`,dir:i=`ltr`,accessorKey:o,multiple:s,id:c,disabled:l,selectAll:u,isCheckedAll:d,className:f,...p})=>{let[m,h]=(0,R.useState)([]),g=(0,R.useRef)(null);(0,R.useEffect)(()=>{if(!n||Array.isArray(n)&&n.length===0){h([]);return}if(s){h(n?.map(e=>e[o.label]));return}else h([n[o.label]])},[n]);let _=()=>m.length?d&&u?.enable&&u?.triggerText?(0,a.jsx)(`span`,{className:`wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap`,children:u.triggerText}):t?(0,a.jsx)(`span`,{className:`wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap`,style:{width:`${(g.current?.offsetWidth||0)-32}px`},children:m.join(`, `)}):(0,a.jsx)(ui,{tags:m,triggerRef:g}):(0,a.jsx)(`p`,{className:`wu-text-xs wu-opacity-70`,children:e});return(0,a.jsx)(et,{dir:i,asChild:!0,id:c,disabled:l,children:(0,a.jsxs)(`button`,{...p,ref:g,disabled:l,className:z(`focus-visible:wu-ring-2 focus-visible:wu-ring-blue-pHover wu-bg-white focus-visible:wu-ring-offset-2 wu-flex wu-w-full wu-items-center wu-justify-between wu-border-b wu-border-gray-subtle wu-py-1.5 wu-px-2 placeholder:wu-text-gray-40 focus:wu-outline-none disabled:wu-cursor-not-allowed disabled:wu-opacity-50 hover:wu-bg-gray-10 hover:wu-border-blue-p wu-transition-colors focus-visible:wu-bg-gray-20 focus-visible:wu-border-blue-p wu-cursor-pointer wu-text-xs wu-rounded-t-sm wu-gap-2 wu-h-8 wu-group/wuCombobox wu-combobox-trigger`,r===`outlined`&&`wu-border wu-border-gray-subtle`,`disabled:wu-cursor-not-allowed disabled:hover:wu-border-gray-subtle disabled:wu-bg-gray-10`,f),children:[_(),(0,a.jsx)(`span`,{className:`wm-arrow-drop-down group-data-[state=open]/wuCombobox:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base`})]})})},fi=v.Root,pi=v.Trigger,mi=v.Group,hi=v.Portal,gi=v.Sub,_i=v.RadioGroup,vi=R.forwardRef(({className:e,inset:t,children:n,position:r,...i},o)=>(0,a.jsxs)(v.SubTrigger,{ref:o,className:z(`wu-flex wu-cursor-default wu-select-none wu-text-xs wu-items-center wu-p-2 wu-outline-none focus:wu-bg-gray-20 data-[state=open]:wu-bg-gray-20`,t&&`wu-pl-8`,e),...i,children:[r===`left`&&(0,a.jsx)(`span`,{className:z(`wm-chevron-right`,i.dir===`rtl`&&`ml-2`)}),n,r!==`left`&&(0,a.jsx)(`span`,{className:z(`wu-text-base wu-leading-4`,i.dir===`rtl`&&`wu-mr-auto wm-chevron-left`,i.dir!==`rtl`&&`wu-ml-auto wm-chevron-right`)})]}));vi.displayName=v.SubTrigger.displayName;var yi=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(v.SubContent,{ref:n,className:z(`wu-z-50 wu-min-w-[8rem] wu-overflow-hidden wu-border wu-text-xs wu-bg-white wu-text-gray-lead wu-shadow-lg data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2`,e),...t}));yi.displayName=v.SubContent.displayName;var bi=R.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,a.jsx)(v.Portal,{children:(0,a.jsx)(v.Content,{ref:r,sideOffset:t,className:z(`wu-z-50 wu-min-w-[8rem] wu-overflow-hidden wu-border wu-text-xs wu-bg-white wu-text-gray-lead wu-shadow-md data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2`,e),...n})}));bi.displayName=v.Content.displayName;var xi=R.forwardRef(({className:e,inset:t,...n},r)=>(0,a.jsx)(v.Item,{ref:r,className:z(`wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-p-2 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50`,t&&`wu-pl-8`,e),...n}));xi.displayName=v.Item.displayName;var Si=R.forwardRef(({className:e,children:t,checked:n,dir:r,...i},o)=>(0,a.jsxs)(v.CheckboxItem,{ref:o,className:z(`wu-group wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-py-3 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50`,r===`rtl`&&`wu-pr-8 wu-pl-2`,r!==`rtl`&&`wu-pl-8 wu-pr-2`,e),checked:n,...i,children:[(0,a.jsx)(`span`,{className:z(`wu-absolute wu-flex wu-items-center wu-justify-center wu-w-4 wu-h-4 wu-rounded-sm wu-ring-1 wu-ring-gray-subtle group-disabled:wu-bg-gray-20 group-data-[state=checked]:wu-bg-blue-p group-hover:wu-bg-gray-20 group-hover:wu-ring-blue-p wu-transition-all group-data-[state=checked]:wu-ring-blue-p`,r===`rtl`&&`wu-right-2`,r!==`rtl`&&`wu-left-2`),children:(0,a.jsx)(v.ItemIndicator,{children:(0,a.jsx)(`span`,{className:`wm-check wu-text-base wu-text-white`})})}),t]}));Si.displayName=v.CheckboxItem.displayName;var Ci=R.forwardRef(({className:e,children:t,...n},r)=>(0,a.jsxs)(v.RadioItem,{ref:r,className:z(`wu-group wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-py-3 wu-pl-8 wu-pr-2 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 focus:wu-text-accent-foreground data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50`,e),...n,children:[(0,a.jsx)(`span`,{className:`wu-absolute wu-rounded-full wu-left-2 wu-flex wu-h-4 wu-w-4 wu-items-center wu-justify-center wu-ring-1 wu-ring-gray-subtle group-disabled:wu-bg-gray-20 group-data-[state=checked]:wu-bg-white group-hover:wu-bg-gray-20 group-hover:wu-ring-blue-p wu-transition-all group-data-[state=checked]:wu-ring-blue-p group-hover:group-data-[state=checked]:wu-ring-blue-q`,children:(0,a.jsx)(v.ItemIndicator,{className:`wu-w-4 wu-h-4 wu-flex wu-items-center wu-justify-center`,children:(0,a.jsx)(`span`,{className:`wm-circle wu-text-blue-p group-hover:group-data-[state=checked]:wu-text-blue-q wu-text-xs`})})}),t]}));Ci.displayName=v.RadioItem.displayName;var wi=R.forwardRef(({className:e,inset:t,...n},r)=>(0,a.jsx)(v.Label,{ref:r,className:z(`wu-p-2 wu-font-medium wu-text-xs`,t&&`wu-pl-8`,e),...n}));wi.displayName=v.Label.displayName;var Ti=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(v.Separator,{ref:n,className:z(`-wu-mx-1 wu-my-1 wu-h-px wu-bg-gray-20`,e),...t}));Ti.displayName=v.Separator.displayName;var Ei=({className:e,...t})=>(0,a.jsx)(`span`,{className:z(`wu-ml-auto wu-text-xs wu-tracking-widest wu-opacity-60`,e),...t});Ei.displayName=`DropdownMenuShortcut`;var Di=({option:e,value:t,multiple:n=!1,onSelect:r,accessorKey:i,dir:o})=>{let[s,c]=(0,R.useState)(n?[]:``);(0,R.useEffect)(()=>{t&&c(n?t.map(e=>JSON.stringify(e[i.value])):JSON.stringify(t[i.value]))},[t,i.value,n]);let l=n?s.includes(JSON.stringify(e[i.value])):s===JSON.stringify(e[i.value]);return(0,a.jsxs)(oi,{onSelect:()=>{e.disabled||r(e)},disabled:e.disabled,className:z(`wu-cursor-pointer wu-text-xs wu-items-start wu-leading-4 wu-py-2 wu-combobox-item hover:wu-bg-gray-100`,l&&`wu-bg-gray-10`),dir:o,children:[n&&(0,a.jsx)(Xr,{checked:l}),(0,a.jsx)(Oi,{option:e,accessorKey:i})]})},Oi=({option:e,accessorKey:t})=>{let n=e[t.label];return(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-w-full wu-gap-1`,children:[e.icon&&e.icon,n,e.isAdmin&&(0,a.jsx)(`span`,{className:`wu-ml-auto wu-text-sm wm-lock wu-text-orange-deep`})]})},ki=e=>{let{option:t,selectAll:n,handleSelectAll:r,isCheckedAll:i,isPartialSelected:o,...s}=e;switch(`type`in t?t.type:`option`){case`all`:return(0,a.jsxs)(oi,{onSelect:r,className:z(`wu-cursor-pointer wu-text-xs wu-leading-4 wu-py-2 wu-combobox-item`),dir:s.dir,children:[(0,a.jsx)(Xr,{checked:i||o,partial:o,"data-partial":o,"aria-label":n?.label||`Select All`}),(0,a.jsx)(`span`,{"aria-hidden":!0,children:n?.label||`Select All`})]});case`group`:return(0,a.jsxs)(ii,{children:[(0,a.jsx)(wi,{children:t.label}),t.options.map((e,t)=>{let n=e[s.accessorKey.value],r=n==null?`group-item-${t}`:String(n);return(0,R.createElement)(Di,{...s,option:e,key:r})})]});case`divider`:return(0,a.jsx)(ai,{className:`wu-mx-4`});default:return(0,a.jsx)(Di,{...s,option:t})}},Ai=e=>{let t=[],n=[],r=[],i=[];return e.forEach(e=>{e.type===`group`?(t.push(e),r.push(...e.options),i.push(...e.options.filter(e=>!e.disabled))):e.type===`divider`?n.push(e):r.push(e),e?.disabled||i.push(e)}),{groups:t,dividers:n,allOptions:r,enabledOptions:i}},ji=(0,R.memo)(Mr),Mi=({data:e,accessorKey:t,value:n,defaultValue:r,Header:i,virtualizedThreshold:o=100,isEllipse:s,placeholder:c,variant:l,dir:u,onSelect:d,Label:f,maxHeight:p=420,multiple:m=!1,hasGroup:h=!1,selectAll:g,id:_,disabled:v,labelPosition:y=`top`,className:b,onScroll:x,maxContentWidth:S,enableSearch:C=!0,noDataContent:w,selectedToTop:T=!1,...E})=>{let[D,O]=(0,R.useState)(``),[k,A]=(0,R.useState)(),[j,M]=(0,R.useState)(!1),[N,P]=(0,R.useState)(!1),[F,I]=(0,R.useState)(!1),ee=(0,R.useRef)(null),{allOptions:L,enabledOptions:te}=(0,R.useMemo)(()=>h||g&&!g.includeDisabled?Ai(e):{allOptions:e,groups:[],dividers:[],enabledOptions:[]},[e,h]),ne=(0,R.useMemo)(()=>{if(!D)return e;let n=D.toLowerCase();return L.filter(e=>e[t.label].toLowerCase().includes(n))},[D,L,e,t.label]),B=ci(T,(0,R.useMemo)(()=>m&&g?.enable&&!D&&ne.length>0?[{type:`all`},...ne]:ne,[ne,D,m]),k,t),V=(0,R.useCallback)(e=>{let n=e[t.value];m?A(r=>{let i=r||[],a=i.some(e=>e[t.value]===n)?i.filter(e=>e[t.value]!==n):[...i,e];return d?.(a),a}):(M(!1),A(e),d?.(e))},[m,t.value,d]),ie=(0,R.useCallback)(e=>O(e.target.value),[]),ae=(0,R.useCallback)(()=>O(``),[]);(0,R.useEffect)(()=>{if(n!==void 0&&r!==void 0){console.error(`defaultValue and value cannot be used simultaneously`);return}else n===void 0?r!==void 0&&A(r):A(n)},[n,r]),(0,R.useEffect)(()=>{if(!m)return;let e=g?.includeDisabled?k?.length===L.length:k?.length===te.length;P(e),I(k?.length>0&&!e)},[k,g]);let oe=(0,R.useCallback)(()=>{let e=N?[]:g?.includeDisabled?L:te;A(e),d?.(e)},[N,m,L,te,d,g]);return(0,a.jsxs)(`div`,{className:z(re(y),`wu-flex wu-combobox-container`),ref:ee,children:[(0,a.jsxs)($e,{onOpenChange:e=>{e&&ae(),M(e)},open:j,modal:!0,children:[(0,a.jsx)(di,{selectedOptions:k,accessorKey:t,isEllipse:s,placeholder:c,variant:l,dir:u,multiple:m,disabled:v,selectAll:g,isCheckedAll:N,className:b,id:_,...E}),(0,a.jsx)(tt,{className:`wu-min-w-[--radix-popover-trigger-width] wu-max-w-[calc(100vw-32px)] wu-p-0 wu-bg-white wu-border wu-border-blue-p wu-combobox-content`,align:`start`,sideOffset:-1,style:{maxWidth:S},children:(0,a.jsxs)(ei,{id:_,children:[C&&(0,a.jsx)(`div`,{className:`wu-m-2`,children:(0,a.jsx)(ji,{placeholder:`Search...`,Icon:(0,a.jsx)(`span`,{className:`wm-search`}),className:`wu-text-xs wu-combobox-search`,onChange:ie,name:`Search`,"aria-label":`Search`,dir:u,iconPosition:u===`rtl`?`right`:`left`})}),i,(0,a.jsxs)(ni,{children:[(0,a.jsx)(ri,{children:w||`No results found.`}),B.length>=o?(0,a.jsx)(li,{className:`wu-combobox-list`,containerHeight:p,list:B,callback:(e,n)=>{let r=n,i=r[t.value],o=i==null?`__${`type`in r?r.type:`item`}__${e}`:String(i);return(0,a.jsx)(ki,{option:n,value:k,onSelect:V,multiple:m,accessorKey:t,dir:u,selectAll:g,handleSelectAll:oe,isCheckedAll:N,isPartialSelected:F},o)},dir:u}):(0,a.jsx)(`div`,{style:{height:`fit-content`,maxHeight:p,overflow:`auto`},className:`wu-combobox-list`,onScroll:x,children:B.map((e,n)=>{let r=e,i=r[t.value],o=i==null?`__${`type`in r?r.type:`item`}__${n}`:String(i);return(0,a.jsx)(ki,{option:r,value:k,onSelect:V,multiple:m,accessorKey:t,dir:u,selectAll:g,handleSelectAll:oe,isCheckedAll:N,isPartialSelected:F},o)})})]})]})})]}),f&&(0,a.jsx)(K,{htmlFor:_,className:`wu-combobox-label`,children:f})]})},Ni=e=>{let{textToCopy:t,notificationText:n,...r}=e,[i,o]=R.default.useState(!1),s=async()=>{if(t)try{await navigator.clipboard.writeText(t),o(!0),setTimeout(()=>o(!1),2e3)}catch(e){console.error(`Failed to copy:`,e)}};return(0,a.jsxs)(W,{...r,onClick:s,variant:`iconOnly`,className:z(`wu-relative`,e.className),"aria-label":`Copy to clipboard`,children:[n&&(0,a.jsx)(`span`,{className:z(`wu-absolute wu-text-[6px] wu-leading-3 -wu-top-4 wu-right-0 wu-bg-gray-notification wu-text-white wu-rounded-sm wu-shadow-md wu-px-1 wu-animate-ping-once`,i?`wu-block`:`wu-hidden`),children:n}),(0,a.jsx)(Pe,{icon:`wm-content-copy`,className:`wu-text-lg`})]})},Pi=y.Root,Fi=y.Trigger,Ii=y.Close,Li=y.Portal,Ri=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(y.Overlay,{className:z(`wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30 data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0`,`wu-drawer-overlay`,e),...t,ref:n}));Ri.displayName=y.Overlay.displayName;var zi=(0,f.cva)(`wu-fixed wu-z-50 wu-gap-4 wu-p-6 wu-shadow-lg wu-transition wu-ease-in-out data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-duration-500 data-[state=open]:wu-duration-500`,{variants:{side:{top:`wu-inset-x-0 wu-top-0 wu-border-b data-[state=closed]:wu-slide-out-to-top data-[state=open]:wu-slide-in-from-top`,bottom:`wu-inset-x-0 wu-bottom-0 wu-border-t data-[state=closed]:wu-slide-out-to-bottom data-[state=open]:wu-slide-in-from-bottom`,left:`wu-inset-y-0 wu-left-0 wu-h-full wu-w-3/4 wu-border-r data-[state=closed]:wu-slide-out-to-left data-[state=open]:wu-slide-in-from-left sm:wu-max-w-sm`,right:`wu-inset-y-0 wu-right-0 wu-h-full wu-w-3/4 wu-border-l data-[state=closed]:wu-slide-out-to-right data-[state=open]:wu-slide-in-from-right sm:wu-max-w-sm`}},defaultVariants:{side:`right`}}),Bi=R.forwardRef(({side:e=`right`,className:t,children:n,hideCloseButton:r,overlayClassName:i,closeButtonClassName:o,...s},c)=>(0,a.jsxs)(Li,{children:[(0,a.jsx)(Ri,{className:i}),(0,a.jsxs)(y.Content,{ref:c,className:z(zi({side:e}),t),...s,children:[n,!r&&(0,a.jsx)(y.Close,{"aria-label":`close`,asChild:!0,children:(0,a.jsxs)(rt,{variant:`iconOnly`,className:z(`wu-absolute wu-right-4 wu-top-4`,o),children:[(0,a.jsx)(`span`,{className:`wm-close`}),(0,a.jsx)(`span`,{className:`wu-sr-only`,children:`Close`})]})})]})]}));Bi.displayName=y.Content.displayName;var Vi=({className:e,...t})=>(0,a.jsx)(`div`,{className:z(``,e),...t});Vi.displayName=`SheetHeader`;var Hi=({className:e,...t})=>(0,a.jsx)(`div`,{className:z(`wu-flex wu-flex-col-reverse sm:wu-flex-row sm:wu-justify-end sm:wu-space-x-2`,e),...t});Hi.displayName=`SheetFooter`;var Ui=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(y.Title,{ref:n,className:z(`wu-text-lg wu-font-semibold`,e),...t}));Ui.displayName=y.Title.displayName;var Wi=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(y.Description,{ref:n,className:z(`wu-text-sm`,e),...t}));Wi.displayName=y.Description.displayName;var Gi=e=>t=>{e&&t.preventDefault()},Ki=e=>{let{Trigger:t,children:n,hideCloseButton:r,className:i,side:o=`left`,open:s,onOpenChange:c,preventClickOutside:l,overlayClassName:u,closeButtonClassName:d,...f}=e;return(0,a.jsxs)(Pi,{open:s,onOpenChange:c,children:[(0,a.jsx)(Fi,{asChild:!0,children:t}),(0,a.jsxs)(Bi,{onInteractOutside:Gi(l),side:o,className:z(`wu-bg-white wu-text-gray-lead wu-px-0`,i),hideCloseButton:r,overlayClassName:u,closeButtonClassName:d,...f,children:[(0,a.jsx)(`div`,{className:`wu-hidden`,children:(0,a.jsx)(Ui,{})}),n]})]})},qi=({children:e,...t})=>(0,a.jsx)(Ii,{...t,children:e}),Ji=(0,R.createContext)({});function Yi(e){let t=(0,R.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Xi=typeof window<`u`?R.useLayoutEffect:R.useEffect,Zi=(0,R.createContext)(null);function Qi(e,t){e.indexOf(t)===-1&&e.push(t)}function $i(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var ea=(e,t,n)=>n>t?t:n<e?e:n;function ta(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var na=()=>{},ra=()=>{};typeof process<`u`&&process.env.NODE_ENV!==`production`&&(na=(e,t,n)=>{!e&&typeof console<`u`&&console.warn(ta(t,n))},ra=(e,t,n)=>{if(!e)throw Error(ta(t,n))});var ia={},aa=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),oa=e=>typeof e==`object`&&!!e,sa=e=>/^0[^.\s]+$/u.test(e);function ca(e){let t;return()=>(t===void 0&&(t=e()),t)}var la=e=>e,ua=(...e)=>e.reduce((e,t)=>n=>t(e(n))),da=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},fa=class{constructor(){this.subscriptions=[]}add(e){return Qi(this.subscriptions,e),()=>$i(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},pa=e=>e*1e3,ma=e=>e/1e3,ha=(e,t)=>t?1e3/t*e:0,ga=new Set;function _a(e,t,n){e||ga.has(t)||(console.warn(ta(t,n)),ga.add(t))}var va=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,ya=1e-7,ba=12;function xa(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=va(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>ya&&++s<ba);return o}function Sa(e,t,n,r){if(e===t&&n===r)return la;let i=t=>xa(t,0,1,e,n);return e=>e===0||e===1?e:va(i(e),t,r)}var Ca=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,wa=e=>t=>1-e(1-t),Ta=Sa(.33,1.53,.69,.99),Ea=wa(Ta),Da=Ca(Ea),Oa=e=>e>=1?1:(e*=2)<1?.5*Ea(e):.5*(2-2**(-10*(e-1))),ka=e=>1-Math.sin(Math.acos(e)),Aa=wa(ka),ja=Ca(ka),Ma=Sa(.42,0,1,1),Na=Sa(0,0,.58,1),Pa=Sa(.42,0,.58,1),Fa=e=>Array.isArray(e)&&typeof e[0]!=`number`,Ia=e=>Array.isArray(e)&&typeof e[0]==`number`,La={linear:la,easeIn:Ma,easeInOut:Pa,easeOut:Na,circIn:ka,circInOut:ja,circOut:Aa,backIn:Ea,backInOut:Da,backOut:Ta,anticipate:Oa},Ra=e=>typeof e==`string`,za=e=>{if(Ia(e)){ra(e.length===4,`Cubic bezier arrays must contain four numerical values.`,`cubic-bezier-length`);let[t,n,r,i]=e;return Sa(t,n,r,i)}else if(Ra(e))return ra(La[e]!==void 0,`Invalid easing type '${e}'`,`invalid-easing-type`),La[e];return e},Ba=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],Va={value:null,addProjectionMetrics:null};function Ha(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&Va.value&&Va.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var Ua=40;function Wa(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Ba.reduce((e,n)=>(e[n]=Ha(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=ia.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Ua),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Ba.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Ba.length;t++)o[Ba[t]].cancel(e)},state:i,steps:o}}var{schedule:Ga,cancel:Ka,state:qa,steps:Ja}=Wa(typeof requestAnimationFrame<`u`?requestAnimationFrame:la,!0),Ya;function Xa(){Ya=void 0}var Za={now:()=>(Ya===void 0&&Za.set(qa.isProcessing||ia.useManualTiming?qa.timestamp:performance.now()),Ya),set:e=>{Ya=e,queueMicrotask(Xa)}},Qa={layout:0,mainThread:0,waapi:0},$a=e=>t=>typeof t==`string`&&t.startsWith(e),eo=$a(`--`),to=$a(`var(--`),no=e=>to(e)?ro.test(e.split(`/*`)[0].trim()):!1,ro=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function io(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var ao={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},oo={...ao,transform:e=>ea(0,1,e)},so={...ao,default:1},co=e=>Math.round(e*1e5)/1e5,lo=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function uo(e){return e==null}var fo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,po=(e,t)=>n=>!!(typeof n==`string`&&fo.test(n)&&n.startsWith(e)||t&&!uo(n)&&Object.prototype.hasOwnProperty.call(n,t)),mo=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(lo);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},ho=e=>ea(0,255,e),go={...ao,transform:e=>Math.round(ho(e))},_o={test:po(`rgb`,`red`),parse:mo(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+go.transform(e)+`, `+go.transform(t)+`, `+go.transform(n)+`, `+co(oo.transform(r))+`)`};function vo(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var yo={test:po(`#`),parse:vo,transform:_o.transform},bo=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),xo=bo(`deg`),So=bo(`%`),X=bo(`px`),Co=bo(`vh`),wo=bo(`vw`),To={...So,parse:e=>So.parse(e)/100,transform:e=>So.transform(e*100)},Eo={test:po(`hsl`,`hue`),parse:mo(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+So.transform(co(t))+`, `+So.transform(co(n))+`, `+co(oo.transform(r))+`)`},Z={test:e=>_o.test(e)||yo.test(e)||Eo.test(e),parse:e=>_o.test(e)?_o.parse(e):Eo.test(e)?Eo.parse(e):yo.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?_o.transform(e):Eo.transform(e),getAnimatableNone:e=>{let t=Z.parse(e);return t.alpha=0,Z.transform(t)}},Do=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Oo(e){return isNaN(e)&&typeof e==`string`&&(e.match(lo)?.length||0)+(e.match(Do)?.length||0)>0}var ko=`number`,Ao=`color`,jo=`var`,Mo=`var(`,No="${}",Po=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Fo(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Po,e=>(Z.test(e)?(r.color.push(a),i.push(Ao),n.push(Z.parse(e))):e.startsWith(Mo)?(r.var.push(a),i.push(jo),n.push(e)):(r.number.push(a),i.push(ko),n.push(parseFloat(e))),++a,No)).split(No),indexes:r,types:i}}function Io(e){return Fo(e).values}function Lo({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===ko?i+=co(r[a]):e===Ao?i+=Z.transform(r[a]):i+=r[a]}return i}}function Ro(e){return Lo(Fo(e))}var zo=e=>typeof e==`number`?0:Z.test(e)?Z.getAnimatableNone(e):e,Bo=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:zo(e);function Vo(e){let t=Fo(e);return Lo(t)(t.values.map((e,n)=>Bo(e,t.split[n])))}var Ho={test:Oo,parse:Io,createTransformer:Ro,getAnimatableNone:Vo};function Uo(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Wo({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Uo(s,r,e+1/3),a=Uo(s,r,e),o=Uo(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Go(e,t){return n=>n>0?t:e}var Ko=(e,t,n)=>e+(t-e)*n,qo=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Jo=[yo,_o,Eo],Yo=e=>Jo.find(t=>t.test(e));function Xo(e){let t=Yo(e);if(na(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,`color-not-animatable`),!t)return!1;let n=t.parse(e);return t===Eo&&(n=Wo(n)),n}var Zo=(e,t)=>{let n=Xo(e),r=Xo(t);if(!n||!r)return Go(e,t);let i={...n};return e=>(i.red=qo(n.red,r.red,e),i.green=qo(n.green,r.green,e),i.blue=qo(n.blue,r.blue,e),i.alpha=Ko(n.alpha,r.alpha,e),_o.transform(i))},Qo=new Set([`none`,`hidden`]);function $o(e,t){return Qo.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function es(e,t){return n=>Ko(e,t,n)}function ts(e){return typeof e==`number`?es:typeof e==`string`?no(e)?Go:Z.test(e)?Zo:as:Array.isArray(e)?ns:typeof e==`object`?Z.test(e)?Zo:rs:Go}function ns(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>ts(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function rs(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=ts(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function is(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var as=(e,t)=>{let n=Ho.createTransformer(t),r=Fo(e),i=Fo(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Qo.has(e)&&!i.values.length||Qo.has(t)&&!r.values.length?$o(e,t):ua(ns(is(r,i),i.values),n):(na(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,`complex-values-different`),Go(e,t))};function os(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?Ko(e,t,n):ts(e)(e,t)}var ss=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>Ga.update(t,e),stop:()=>Ka(t),now:()=>qa.isProcessing?qa.timestamp:Za.now()}},cs=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},ls=2e4;function us(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function ds(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(us(r),ls);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:ma(i)}}var Q={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function fs(e,t){return e*Math.sqrt(1-t*t)}var ps=12;function ms(e,t,n){let r=n;for(let n=1;n<ps;n++)r-=e(r)/t(r);return r}var hs=.001;function gs({duration:e=Q.duration,bounce:t=Q.bounce,velocity:n=Q.velocity,mass:r=Q.mass}){let i,a;na(e<=pa(Q.maxDuration),`Spring duration must be 10 seconds or less`,`spring-duration-limit`);let o=1-t;o=ea(Q.minDamping,Q.maxDamping,o),e=ea(Q.minDuration,Q.maxDuration,ma(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=fs(t,o),c=Math.exp(-i);return hs-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=fs(t**2,o);return(-i(t)+hs>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-hs+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=ms(i,a,s);if(e=pa(e),isNaN(c))return{stiffness:Q.stiffness,damping:Q.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var _s=[`duration`,`bounce`],vs=[`stiffness`,`damping`,`mass`];function ys(e,t){return t.some(t=>e[t]!==void 0)}function bs(e){let t={velocity:Q.velocity,stiffness:Q.stiffness,damping:Q.damping,mass:Q.mass,isResolvedFromDuration:!1,...e};if(!ys(e,vs)&&ys(e,_s))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*ea(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Q.mass,stiffness:i,damping:a}}else{let n=gs({...e,velocity:0});t={...t,...n,mass:Q.mass},t.isResolvedFromDuration=!0}return t}function xs(e=Q.visualDuration,t=Q.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=bs({...n,velocity:-ma(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=ma(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?Q.restSpeed.granular:Q.restSpeed.default,i||=v?Q.restDelta.granular:Q.restDelta.default;let y,b,x,S,C,w;if(h<1)x=fs(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>pa(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=pa(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=pa(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(us(T),ls),t=cs(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}xs.applyToOptions=e=>{let t=ds(e,100,xs);return e.ease=t.ease,e.duration=pa(t.duration),e.type=`keyframes`,e};var Ss=5;function Cs(e,t,n){let r=Math.max(t-Ss,0);return ha(n-e(r),t-r)}function ws({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=xs({keyframes:[f.value,m(f.value)],velocity:Cs(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function Ts(e,t,n){let r=[],i=n||ia.mix||os,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=ua(Array.isArray(t)?t[n]||la:t,a)),r.push(a)}return r}function Es(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(ra(a===t.length,`Both input and output ranges must be the same length`,`range-length`),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Ts(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=da(e[r],e[r+1],n);return s[r](i)};return n?t=>l(ea(e[0],e[a-1],t)):l}function Ds(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=da(0,t,r);e.push(Ko(n,1,i))}}function Os(e){let t=[0];return Ds(t,e.length-1),t}function ks(e,t){return e.map(e=>e*t)}function As(e,t){return e.map(()=>t||Pa).splice(0,e.length-1)}function js({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Fa(r)?r.map(za):za(r),a={done:!1,value:t[0]},o=Es(ks(n&&n.length===t.length?n:Os(t),e),t,{ease:Array.isArray(i)?i:As(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Ms=e=>e!==null;function Ns(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Ms),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Ps={decay:ws,inertia:ws,tween:js,keyframes:js,spring:xs};function Fs(e){typeof e.type==`string`&&(e.type=Ps[e.type])}var Is=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},Ls=e=>e/100,Rs=class extends Is{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==Za.now()&&this.tick(Za.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},Qa.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Fs(e);let{type:t=js,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||js;process.env.NODE_ENV!==`production`&&s!==js&&ra(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`,`spring-two-frames`),s!==js&&typeof o[0]!=`number`&&(this.mixKeyframes=ua(Ls,os(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=us(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=ea(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==ws&&(b.value=Ns(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return ma(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+ma(e)}get time(){return ma(this.currentTime)}set time(e){e=pa(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return Cs(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Za.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=ma(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=ss,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(Za.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,Qa.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function zs(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Bs=e=>e*180/Math.PI,Vs=e=>Us(Bs(Math.atan2(e[1],e[0]))),Hs={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Vs,rotateZ:Vs,skewX:e=>Bs(Math.atan(e[1])),skewY:e=>Bs(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Us=e=>(e%=360,e<0&&(e+=360),e),Ws=Vs,Gs=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ks=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),qs={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Gs,scaleY:Ks,scale:e=>(Gs(e)+Ks(e))/2,rotateX:e=>Us(Bs(Math.atan2(e[6],e[5]))),rotateY:e=>Us(Bs(Math.atan2(-e[2],e[0]))),rotateZ:Ws,rotate:Ws,skewX:e=>Bs(Math.atan(e[4])),skewY:e=>Bs(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Js(e){return+!!e.includes(`scale`)}function Ys(e,t){if(!e||e===`none`)return Js(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=qs,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Hs,i=t}if(!i)return Js(t);let a=r[t],o=i[1].split(`,`).map(Zs);return typeof a==`function`?a(o):o[a]}var Xs=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Ys(n,t)};function Zs(e){return parseFloat(e.trim())}var Qs=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],$s=new Set(Qs),ec=e=>e===ao||e===X,tc=new Set([`x`,`y`,`z`]),nc=Qs.filter(e=>!tc.has(e));function rc(e){let t=[];return nc.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var ic={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Ys(t,`x`),y:(e,{transform:t})=>Ys(t,`y`)};ic.translateX=ic.x,ic.translateY=ic.y;var ac=new Set,oc=!1,sc=!1,cc=!1;function lc(){if(sc){let e=Array.from(ac).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=rc(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}sc=!1,oc=!1,ac.forEach(e=>e.complete(cc)),ac.clear()}function uc(){ac.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(sc=!0)})}function dc(){cc=!0,uc(),lc(),cc=!1}var fc=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(ac.add(this),oc||(oc=!0,Ga.read(uc),Ga.resolveKeyframes(lc))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}zs(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ac.delete(this)}cancel(){this.state===`scheduled`&&(ac.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},pc=e=>e.startsWith(`--`);function mc(e,t,n){pc(t)?e.style.setProperty(t,n):e.style[t]=n}var hc={};function gc(e,t){let n=ca(e);return()=>hc[t]??n()}var _c=gc(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),vc=gc(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),yc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,bc={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:yc([0,.65,.55,1]),circOut:yc([.55,0,1,.45]),backIn:yc([.31,.01,.66,-.59]),backOut:yc([.33,1.53,.69,.99])};function xc(e,t){if(e)return typeof e==`function`?vc()?cs(e,t):`ease-out`:Ia(e)?yc(e):Array.isArray(e)?e.map(e=>xc(e,t)||bc.easeOut):bc[e]}function Sc(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=xc(s,i);Array.isArray(d)&&(u.easing=d),Va.value&&Qa.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return Va.value&&p.finished.finally(()=>{Qa.waapi--}),p}function Cc(e){return typeof e==`function`&&`applyToOptions`in e}function wc({type:e,...t}){return Cc(e)&&vc()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Tc=class extends Is{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,ra(typeof e.type!=`string`,`Mini animate() doesn't support "type" as a string.`,`mini-spring`);let c=wc(e);this.animation=Sc(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Ns(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),mc(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return ma(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+ma(e)}get time(){return ma(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=pa(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&_c()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),la):r(this)}},Ec={anticipate:Oa,backInOut:Da,circInOut:ja};function Dc(e){return e in Ec}function Oc(e){typeof e.ease==`string`&&Dc(e.ease)&&(e.ease=Ec[e.ease])}var kc=10,Ac=class extends Tc{constructor(e){Oc(e),Fs(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new Rs({...a,autoplay:!1}),s=Math.max(kc,Za.now()-this.startTime),c=ea(0,kc,s-kc),l=o.sample(s).value,{name:u}=this.options;i&&u&&mc(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},jc=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Ho.test(e)||e===`0`)&&!e.startsWith(`url(`));function Mc(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Nc(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=jc(i,t),s=jc(a,t);return na(o===s,`You are trying to animate ${t} from "${i}" to "${a}". "${o?a:i}" is not an animatable value.`,`value-not-animatable`),!o||!s?!1:Mc(e)||(n===`spring`||Cc(n))&&r}function Pc(e){e.duration=0,e.type=`keyframes`}var Fc=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Ic=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Lc(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Ic.test(e[t]))return!0;return!1}var Rc=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),zc=ca(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Bc(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return zc()&&n&&(Fc.has(n)||Rc.has(n)&&Lc(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Vc=40,Hc=class extends Is{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Za.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||fc;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=Za.now();let u=!0;Nc(e,i,a,o)||(u=!1,(ia.instantAnimations||!s)&&l?.(Ns(e,n,t)),e[0]=e[e.length-1],Pc(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>Vc?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&Bc(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new Ac({...d,element:p})}catch{m=new Rs(d)}else m=new Rs(d);m.finished.then(()=>{this.notifyFinished()}).catch(la),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),dc()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function Uc(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var Wc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Gc(e){let t=Wc.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}var Kc=4;function qc(e,t,n=1){ra(n<=Kc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,`max-css-var-depth`);let[r,i]=Gc(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return aa(e)?parseFloat(e):e}return no(i)?qc(i,t,n+1):i}var Jc={type:`spring`,stiffness:500,damping:25,restSpeed:10},Yc=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Xc={type:`keyframes`,duration:.8},Zc={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Qc=(e,{keyframes:t})=>t.length>2?Xc:$s.has(e)?e.startsWith(`scale`)?Yc(t[1]):Jc:Zc;function $c(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function el(e,t){let n=e?.[t]??e?.default??e;return n===e?n:$c(n,e)}var tl=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function nl(e){for(let t in e)if(!tl.has(t))return!0;return!1}var rl=(e,t,n,r={},i,a)=>o=>{let s=el(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=pa(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};nl(s)||Object.assign(u,Qc(e,u)),u.duration&&=pa(u.duration),u.repeatDelay&&=pa(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Pc(u),u.delay===0&&(d=!0)),(ia.instantAnimations||ia.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,Pc(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Ns(u.keyframes,s);if(e!==void 0){Ga.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Rs(u):new Hc(u)};function il(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function al(e,t,n,r){if(typeof t==`function`){let[i,a]=il(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=il(r);t=t(n===void 0?e.custom:n,i,a)}return t}function ol(e,t,n){let r=e.getProps();return al(r,t,n===void 0?r.custom:n,e)}var sl=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Qs]),cl=30,ll=e=>!isNaN(parseFloat(e)),ul={current:void 0},dl=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=Za.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Za.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ll(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!==`production`&&_a(!1,`value.onChange(callback) is deprecated. Switch to value.on("change", callback).`),this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new fa);let n=this.events[e].add(t);return e===`change`?()=>{n(),Ga.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return ul.current&&ul.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=Za.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>cl)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,cl);return ha(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function fl(e,t){return new dl(e,t)}var pl=e=>Array.isArray(e);function ml(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,fl(n))}function hl(e){return pl(e)?e[e.length-1]||0:e}function gl(e,t){let{transitionEnd:n={},transition:r={},...i}=ol(e,t)||{};i={...i,...n};for(let t in i)ml(e,t,hl(i[t]))}var $=e=>!!(e&&e.getVelocity);function _l(e){return!!($(e)&&e.add)}function vl(e,t){let n=e.getValue(`willChange`);if(_l(n))return n.add(t);if(!n&&ia.WillChange){let n=new ia.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function yl(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var bl=`data-`+yl(`framerAppearId`);function xl(e){return e.props[bl]}function Sl({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Cl(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?$c(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&Sl(f,t))continue;let o={delay:n,...el(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){Ga.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=xl(e);if(n){let e=window.MotionHandoffAnimation(n,t,Ga);e!==null&&(o.startTime=e,p=!0)}}vl(e,t);let m=l??e.shouldReduceMotion;r.start(rl(t,r,i,m&&sl.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>Ga.update(()=>{o&&gl(e,o)});d.length?Promise.all(d).then(t):t()}return d}function wl(e,t,n={}){let r=ol(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(Cl(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Tl(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function Tl(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(wl(c,t,{...o,delay:n+(typeof r==`function`?0:r)+Uc(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function El(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>wl(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=wl(e,t,n);else{let i=typeof t==`function`?ol(e,t,n.custom):t;r=Promise.all(Cl(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Dl={test:e=>e===`auto`,parse:e=>e},Ol=e=>t=>t.test(e),kl=[ao,X,So,xo,wo,Co,Dl],Al=e=>kl.find(Ol(e));function jl(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||sa(e)}var Ml=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Nl(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(lo)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Ml.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Pl=/\b([a-z-]*)\(.*?\)/gu,Fl={...Ho,getAnimatableNone:e=>{let t=e.match(Pl);return t?t.map(Nl).join(` `):e}},Il={...Ho,getAnimatableNone:e=>{let t=Ho.parse(e);return Ho.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Ll={...ao,transform:Math.round},Rl={borderWidth:X,borderTopWidth:X,borderRightWidth:X,borderBottomWidth:X,borderLeftWidth:X,borderRadius:X,borderTopLeftRadius:X,borderTopRightRadius:X,borderBottomRightRadius:X,borderBottomLeftRadius:X,width:X,maxWidth:X,height:X,maxHeight:X,top:X,right:X,bottom:X,left:X,inset:X,insetBlock:X,insetBlockStart:X,insetBlockEnd:X,insetInline:X,insetInlineStart:X,insetInlineEnd:X,padding:X,paddingTop:X,paddingRight:X,paddingBottom:X,paddingLeft:X,paddingBlock:X,paddingBlockStart:X,paddingBlockEnd:X,paddingInline:X,paddingInlineStart:X,paddingInlineEnd:X,margin:X,marginTop:X,marginRight:X,marginBottom:X,marginLeft:X,marginBlock:X,marginBlockStart:X,marginBlockEnd:X,marginInline:X,marginInlineStart:X,marginInlineEnd:X,fontSize:X,backgroundPositionX:X,backgroundPositionY:X,rotate:xo,rotateX:xo,rotateY:xo,rotateZ:xo,scale:so,scaleX:so,scaleY:so,scaleZ:so,skew:xo,skewX:xo,skewY:xo,distance:X,translateX:X,translateY:X,translateZ:X,x:X,y:X,z:X,perspective:X,transformPerspective:X,opacity:oo,originX:To,originY:To,originZ:X,zIndex:Ll,fillOpacity:oo,strokeOpacity:oo,numOctaves:Ll},zl={...Rl,color:Z,backgroundColor:Z,outlineColor:Z,fill:Z,stroke:Z,borderColor:Z,borderTopColor:Z,borderRightColor:Z,borderBottomColor:Z,borderLeftColor:Z,filter:Fl,WebkitFilter:Fl,mask:Il,WebkitMask:Il},Bl=e=>zl[e],Vl=new Set([Fl,Il]);function Hl(e,t){let n=Bl(e);return Vl.has(n)||(n=Ho),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Ul=new Set([`auto`,`none`,`0`]);function Wl(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Ul.has(t)&&Fo(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=Hl(n,i)}var Gl=class extends fc{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),no(r))){let i=qc(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!sl.has(n)||e.length!==2)return;let[r,i]=e,a=Al(r),o=Al(i);if(io(r)!==io(i)&&ic[n]){this.needsMeasurement=!0;return}if(a!==o)if(ec(a)&&ec(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else ic[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||jl(e[t]))&&n.push(t);n.length&&Wl(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ic[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=ic[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function Kl(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var ql=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function Jl(e){return oa(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:Yl,cancel:Xl}=Wa(queueMicrotask,!1),Zl={x:!1,y:!1};function Ql(){return Zl.x||Zl.y}function $l(e,t){let n=Kl(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function eu(e){return!(e.pointerType===`touch`||Ql())}function tu(e,t,n={}){let[r,i,a]=$l(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!eu(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var nu=(e,t)=>t?e===t?!0:nu(e,t.parentElement):!1,ru=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,iu=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function au(e){return iu.has(e.tagName)||e.isContentEditable===!0}var ou=new WeakSet;function su(e){return t=>{t.key===`Enter`&&e(t)}}function cu(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var lu=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=su(()=>{if(ou.has(n))return;cu(n,`down`);let e=su(()=>{cu(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>cu(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function uu(e){return ru(e)&&!Ql()}var du=new WeakSet;function fu(e,t,n={}){let[r,i,a]=$l(e,n),o=e=>{let r=e.currentTarget;if(!uu(e)||du.has(e))return;ou.add(r),n.stopPropagation&&du.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),ou.has(r)&&ou.delete(r),uu(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||nu(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),Jl(e)&&(e.addEventListener(`focus`,e=>lu(e,i)),!au(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var pu=[...kl,Z,Ho],mu=e=>pu.find(Ol(e)),hu=()=>({min:0,max:0}),gu=()=>({x:hu(),y:hu()}),_u=new WeakMap;function vu(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function yu(e){return typeof e==`string`||Array.isArray(e)}var bu=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],xu=[`initial`,...bu];function Su(e){return vu(e.animate)||xu.some(t=>yu(e[t]))}function Cu(e){return!!(Su(e)||e.variants)}function wu(e,t,n){for(let r in t){let i=t[r],a=n[r];if($(i))e.addValue(r,i);else if($(a))e.addValue(r,fl(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,fl(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Tu={current:null},Eu={current:!1},Du=typeof window<`u`;function Ou(){if(Eu.current=!0,Du)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Tu.current=e.matches;e.addEventListener(`change`,t),t()}else Tu.current=!1}var ku=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Au={};function ju(e){Au=e}function Mu(){return Au}var Nu=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=fc,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=Za.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Ga.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Su(t),this.isVariantNode=Cu(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&$(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,_u.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(Eu.current||Ou(),this.shouldReduceMotion=Tu.current),process.env.NODE_ENV!==`production`&&_a(this.shouldReduceMotion!==!0,`You have Reduced Motion enabled on your device. Animations may not appear as expected.`,`reduced-motion-disabled`),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Ka(this.notifyUpdate),Ka(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Fc.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Tc({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:pa(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=$s.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&Ga.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in Au){let t=Au[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):gu()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<ku.length;t++){let n=ku[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=wu(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=fl(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(aa(n)||sa(n))?n=parseFloat(n):!mu(n)&&Ho.test(t)&&(n=Hl(e,t)),this.setBaseTarget(e,$(n)?n.get():n)),$(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=al(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!$(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new fa),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Yl.render(this.render)}},Pu=class extends Nu{constructor(){super(...arguments),this.KeyframeResolver=Gl}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;$(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},Fu=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function Iu({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Lu(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Ru(e,t){return Iu(Lu(e.getBoundingClientRect(),t))}var zu={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Bu=Qs.length;function Vu(e,t,n){let r=``,i=!0;for(let a=0;a<Bu;a++){let o=Qs[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=ql(s,Rl[o]);if(!c){i=!1;let t=zu[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Hu(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if($s.has(e)){o=!0;continue}else if(eo(e)){i[e]=n;continue}else{let t=ql(n,Rl[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Vu(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function Uu(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Wu(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Gu={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(X.test(e))e=parseFloat(e);else return e;return`${Wu(e,t.target.x)}% ${Wu(e,t.target.y)}%`}},Ku={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Ho.parse(e);if(i.length>5)return r;let a=Ho.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Ko(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},qu={borderRadius:{...Gu,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:Gu,borderTopRightRadius:Gu,borderBottomLeftRadius:Gu,borderBottomRightRadius:Gu,boxShadow:Ku};function Ju(e,{layout:t,layoutId:n}){return $s.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!qu[e]||e===`opacity`)}function Yu(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)($(r[t])||i&&$(i[t])||Ju(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Xu(e){return window.getComputedStyle(e)}var Zu=class extends Pu{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Uu}readValueFromInstance(e,t){if($s.has(t))return this.projection?.isProjecting?Js(t):Xs(e,t);{let n=Xu(e),r=(eo(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ru(e,t)}build(e,t,n){Hu(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Yu(e,t,n)}},Qu={offset:`stroke-dashoffset`,array:`stroke-dasharray`},$u={offset:`strokeDashoffset`,array:`strokeDasharray`};function ed(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Qu:$u;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var td=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function nd(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Hu(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of td)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&ed(d,i,a,o,!1)}var rd=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),id=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function ad(e,t,n,r){Uu(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(rd.has(n)?n:yl(n),t.attrs[n])}function od(e,t,n){let r=Yu(e,t,n);for(let n in e)if($(e[n])||$(t[n])){let t=Qs.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var sd=class extends Pu{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=gu}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if($s.has(t)){let e=Bl(t);return e&&e.default||0}return t=rd.has(t)?t:yl(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return od(e,t,n)}build(e,t,n){nd(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){ad(e,t,n,r)}mount(e){this.isSVGTag=id(e.tagName),super.mount(e)}},cd=xu.length;function ld(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&ld(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<cd;n++){let r=xu[n],i=e.props[r];(yu(i)||i===!1)&&(t[r]=i)}return t}function ud(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var dd=[...bu].reverse(),fd=bu.length;function pd(e){return t=>Promise.all(t.map(({animation:t,options:n})=>El(e,t,n)))}function md(e){let t=pd(e),n=_d(),r=!0,i=!1,a=t=>(n,r)=>{let i=ol(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=ld(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<fd;t++){let p=dd[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=yu(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||vu(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=hd(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=pl(t)&&pl(n)?!ud(t,n)||y:t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=ol(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=Uc(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=ol(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=_d(),i=!0}}}function hd(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!ud(t,e):!1}function gd(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _d(){return{animate:gd(!0),whileInView:gd(),whileHover:gd(),whileTap:gd(),whileDrag:gd(),whileFocus:gd(),exit:gd()}}function vd(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function yd(e){return $(e)?e.get():e}var bd=(0,R.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function xd(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Sd(...e){return t=>{let n=!1,r=e.map(e=>{let r=xd(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():xd(e[t],null)}}}}function Cd(...e){return R.useCallback(Sd(...e),e)}var wd=class extends R.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(Jl(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=Jl(e)&&e.offsetWidth||0,r=Jl(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function Td({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:o}){let s=(0,R.useId)(),c=(0,R.useRef)(null),l=(0,R.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:u}=(0,R.useContext)(bd),d=Cd(c,e.props?.ref??e?.ref);return(0,R.useInsertionEffect)(()=>{let{width:e,height:a,top:d,left:f,right:p,bottom:m,direction:h}=l.current;if(t||o===!1||!c.current||!e||!a)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;c.current.dataset.motionPopId=s;let y=document.createElement(`style`);u&&(y.nonce=u);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
8
+ [data-motion-pop-id="${s}"] {
9
+ position: absolute !important;
10
+ width: ${e}px !important;
11
+ height: ${a}px !important;
12
+ ${_}px !important;
13
+ ${v}px !important;
14
+ }
15
+ `),()=>{c.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,a.jsx)(wd,{isPresent:t,childRef:c,sizeRef:l,pop:o,children:o===!1?e:R.cloneElement(e,{ref:d})})}var Ed=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:c,anchorY:l,root:u})=>{let d=Yi(Dd),f=(0,R.useId)(),p=!0,m=(0,R.useMemo)(()=>(p=!1,{id:f,initial:t,isPresent:n,custom:i,onExitComplete:e=>{d.set(e,!0);for(let e of d.values())if(!e)return;r&&r()},register:e=>(d.set(e,!1),()=>d.delete(e))}),[n,d,r]);return o&&p&&(m={...m}),(0,R.useMemo)(()=>{d.forEach((e,t)=>d.set(t,!1))},[n]),R.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=(0,a.jsx)(Td,{pop:s===`popLayout`,isPresent:n,anchorX:c,anchorY:l,root:u,children:e}),(0,a.jsx)(Zi.Provider,{value:m,children:e})};function Dd(){return new Map}function Od(e=!0){let t=(0,R.useContext)(Zi);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,R.useId)();(0,R.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,R.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var kd=e=>e.key||``;function Ad(e){let t=[];return R.Children.forEach(e,e=>{(0,R.isValidElement)(e)&&t.push(e)}),t}var jd=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o=`sync`,propagate:s=!1,anchorX:c=`left`,anchorY:l=`top`,root:u})=>{let[d,f]=Od(s),p=(0,R.useMemo)(()=>Ad(e),[e]),m=s&&!d?[]:p.map(kd),h=(0,R.useRef)(!0),g=(0,R.useRef)(p),_=Yi(()=>new Map),v=(0,R.useRef)(new Set),[y,b]=(0,R.useState)(p),[x,S]=(0,R.useState)(p);Xi(()=>{h.current=!1,g.current=p;for(let e=0;e<x.length;e++){let t=kd(x[e]);m.includes(t)?(_.delete(t),v.current.delete(t)):_.get(t)!==!0&&_.set(t,!1)}},[x,m.length,m.join(`-`)]);let C=[];if(p!==y){let e=[...p];for(let t=0;t<x.length;t++){let n=x[t],r=kd(n);m.includes(r)||(e.splice(t,0,n),C.push(n))}return o===`wait`&&C.length&&(e=C),S(Ad(e)),b(p),null}process.env.NODE_ENV!==`production`&&o===`wait`&&x.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);let{forceRender:w}=(0,R.useContext)(Ji);return(0,a.jsx)(a.Fragment,{children:x.map(e=>{let y=kd(e),b=s&&!d?!1:p===x||m.includes(y);return(0,a.jsx)(Ed,{isPresent:b,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,root:u,onExitComplete:b?void 0:()=>{if(v.current.has(y))return;if(_.has(y))v.current.add(y),_.set(y,!0);else return;let e=!0;_.forEach(t=>{t||(e=!1)}),e&&(w?.(),S(g.current),s&&f?.(),r&&r())},anchorX:c,anchorY:l,children:e},y)})})},Md=(0,R.createContext)({strict:!1}),Nd={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},Pd=!1;function Fd(){if(Pd)return;let e={};for(let t in Nd)e[t]={isEnabled:e=>Nd[t].some(t=>!!e[t])};ju(e),Pd=!0}function Id(){return Fd(),Mu()}function Ld(e){let t=Id();for(let n in e)t[n]={...t[n],...e[n]};ju(t)}function Rd({children:e,features:t,strict:n=!1}){let[,r]=(0,R.useState)(!zd(t)),i=(0,R.useRef)(void 0);if(!zd(t)){let{renderer:e,...n}=t;i.current=e,Ld(n)}return(0,R.useEffect)(()=>{zd(t)&&t().then(({renderer:e,...t})=>{Ld(t),i.current=e,r(!0)})},[]),(0,a.jsx)(Md.Provider,{value:{renderer:i.current,strict:n},children:e})}function zd(e){return typeof e==`function`}var Bd=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function Vd(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Bd.has(e)}var Hd=I({default:()=>Ud}),Ud,Wd=F((()=>{throw Ud={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),Gd=e=>!Vd(e);function Kd(e){typeof e==`function`&&(Gd=t=>t.startsWith(`on`)?!Vd(t):e(t))}try{Kd((Wd(),te(Hd)).default)}catch{}function qd(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||$(e[i])||(Gd(i)||n===!0&&Vd(i)||!t&&!Vd(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var Jd=(0,R.createContext)({});function Yd(e,t){if(Su(e)){let{initial:t,animate:n}=e;return{initial:t===!1||yu(t)?t:void 0,animate:yu(n)?n:void 0}}return e.inherit===!1?{}:t}function Xd(e){let{initial:t,animate:n}=Yd(e,(0,R.useContext)(Jd));return(0,R.useMemo)(()=>({initial:t,animate:n}),[Zd(t),Zd(n)])}function Zd(e){return Array.isArray(e)?e.join(` `):e}var Qd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function $d(e,t,n){for(let r in t)!$(t[r])&&!Ju(r,n)&&(e[r]=t[r])}function ef({transformTemplate:e},t){return(0,R.useMemo)(()=>{let n=Qd();return Hu(n,t,e),Object.assign({},n.vars,n.style)},[t])}function tf(e,t){let n=e.style||{},r={};return $d(r,n,e),Object.assign(r,ef(e,t)),r}function nf(e,t){let n={},r=tf(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var rf=()=>({...Qd(),attrs:{}});function af(e,t,n,r){let i=(0,R.useMemo)(()=>{let n=rf();return nd(n,t,id(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};$d(t,e.style,e),i.style={...t,...i.style}}return i}var of=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function sf(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(of.indexOf(e)>-1||/[A-Z]/u.test(e))}function cf(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??sf(e)?af:nf)(t,r,i,e),c=qd(t,typeof e==`string`,a),l=e===R.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,R.useMemo)(()=>$(u)?u.get():u,[u]);return(0,R.createElement)(e,{...l,children:d})}function lf({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:uf(n,r,i,e),renderState:t()}}function uf(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=yd(a[e]);let{initial:o,animate:s}=e,c=Su(e),l=Cu(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!vu(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=al(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var df=e=>(t,n)=>{let r=(0,R.useContext)(Jd),i=(0,R.useContext)(Zi),a=()=>lf(e,t,r,i);return n?a():Yi(a)},ff=df({scrapeMotionValuesFromProps:Yu,createRenderState:Qd}),pf=df({scrapeMotionValuesFromProps:od,createRenderState:rf}),mf=Symbol.for(`motionComponentSymbol`);function hf(e,t,n){let r=(0,R.useRef)(n);(0,R.useInsertionEffect)(()=>{r.current=n});let i=(0,R.useRef)(null);return(0,R.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n)},[t])}var gf=(0,R.createContext)({});function _f(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function vf(e,t,n,r,i,a){let{visualElement:o}=(0,R.useContext)(Jd),s=(0,R.useContext)(Md),c=(0,R.useContext)(Zi),l=(0,R.useContext)(bd),u=l.reducedMotion,d=l.skipAnimations,f=(0,R.useRef)(null),p=(0,R.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,R.useContext)(gf);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&yf(f.current,n,i,h);let g=(0,R.useRef)(!1);(0,R.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[bl],v=(0,R.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return Xi(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,R.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function yf(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:bf(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&_f(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function bf(e){if(e)return e.options.allowProjection===!1?bf(e.parent):e.projection}function xf(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Ld(r);let o=n?n===`svg`:sf(e),s=o?pf:ff;function c(n,c){let l,u={...(0,R.useContext)(bd),...n,layoutId:Sf(n)},{isStatic:d}=u,f=Xd(n),p=s(n,d);if(!d&&typeof window<`u`){Cf(u,r);let t=wf(u);l=t.MeasureLayout,f.visualElement=vf(e,p,u,i,t.ProjectionNode,o)}return(0,a.jsxs)(Jd.Provider,{value:f,children:[l&&f.visualElement?(0,a.jsx)(l,{visualElement:f.visualElement,...u}):null,cf(e,n,hf(p,f.visualElement,c),p,d,t,o)]})}c.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let l=(0,R.forwardRef)(c);return l[mf]=e,l}function Sf({layoutId:e}){let t=(0,R.useContext)(Ji).id;return t&&e!==void 0?t+`-`+e:e}function Cf(e,t){let n=(0,R.useContext)(Md).strict;if(process.env.NODE_ENV!==`production`&&t&&n){let t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?na(!1,t,`lazy-strict-mode`):ra(!1,t,`lazy-strict-mode`)}}function wf(e){let{drag:t,layout:n}=Id();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}var Tf=(e,t)=>t.isSVG??sf(e)?new sd(t):new Zu(t,{allowProjection:e!==R.Fragment}),Ef=class extends Fu{constructor(e){super(e),e.animationState||=md(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();vu(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Df=0,Of={animation:{Feature:Ef},exit:{Feature:class extends Fu{constructor(){super(...arguments),this.id=Df++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`||typeof e==`object`&&e&&!Array.isArray(e)){let n=ol(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function kf(e){return{point:{x:e.pageX,y:e.pageY}}}function Af(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&Ga.postRender(()=>i(t,kf(t)))}var jf=class extends Fu{mount(){let{current:e}=this.node;e&&(this.unmount=tu(e,(e,t)=>(Af(this.node,t,`Start`),e=>Af(this.node,e,`End`))))}unmount(){}},Mf=class extends Fu{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=ua(vd(this.node.current,`focus`,()=>this.onFocus()),vd(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Nf(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&Ga.postRender(()=>i(t,kf(t)))}var Pf=class extends Fu{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=fu(e,(e,t)=>(Nf(this.node,t,`Start`),(e,{success:t})=>Nf(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Ff=new WeakMap,If=new WeakMap,Lf=e=>{let t=Ff.get(e.target);t&&t(e)},Rf=e=>{e.forEach(Lf)};function zf({root:e,...t}){let n=e||document;If.has(n)||If.set(n,{});let r=If.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Rf,{root:e,...t})),r[i]}function Bf(e,t,n){let r=zf(t);return Ff.set(e,n),r.observe(e),()=>{Ff.delete(e),r.unobserve(e)}}var Vf={some:0,all:1},Hf=class extends Fu{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Vf[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=Bf(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Uf(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Uf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Wf={inView:{Feature:Hf},tap:{Feature:Pf},focus:{Feature:Mf},hover:{Feature:jf}},Gf={renderer:Tf,...Of,...Wf};function Kf(e,t){return xf(e,t)}var qf=Kf(`div`),Jf=e=>{let{checked:t,onSelect:n,children:r,disabled:i,preventCloseOnSelect:o}=e;return(0,a.jsx)(Si,{disabled:i,checked:t,onCheckedChange:n,onSelect:e=>o&&e.preventDefault(),children:r})},Yf=e=>{let{children:t,className:n,Icon:r,iconPosition:i=`left`,disabled:o,onSelect:s,preventCloseOnSelect:c}=e,l=z(`wu-flex wu-items-center wu-gap-2`,r&&(i===`left`?``:`wu-justify-between wu-flex-row-reverse`),n);return(0,a.jsxs)(xi,{onSelect:e=>{s&&s(e),c&&e.preventDefault()},disabled:o,className:l,children:[r&&(0,a.jsx)(`div`,{className:`wu-text-base`,children:r}),t]})},Xf=e=>{let{children:t,Label:n,...r}=e;return(0,a.jsxs)(mi,{...r,children:[(0,a.jsx)(wi,{children:n||e.label}),t]})},Zf=e=>{let{options:t,value:n,onSelect:r}=e;return(0,a.jsx)(_i,{value:n,onValueChange:r,children:t.map(e=>(0,a.jsx)(Ci,{value:e.value,disabled:e.disabled,children:e.Label||e.label},e.value))})},Qf=e=>{let{className:t,...n}=e,r=z(`wu-w-11/12 wu-mx-auto wu-border-gray-40`,t);return(0,a.jsx)(Ti,{...n,className:r})},$f=R.forwardRef(({className:e,children:t,thumbColor:n,railColor:r,...i},o)=>(0,a.jsxs)(b.Root,{ref:o,className:z(`wu-relative wu-overflow-hidden`,e),children:[(0,a.jsx)(b.Viewport,{className:`wu-h-full wu-w-full wu-rounded-[inherit]`,...i,children:t}),(0,a.jsx)(ep,{thumbColor:n,railColor:r}),(0,a.jsx)(b.Corner,{})]}));$f.displayName=b.Root.displayName;var ep=R.forwardRef(({className:e,orientation:t=`vertical`,thumbColor:n=`#d4d4d4`,railColor:r=`#eeeeee`,...i},o)=>(0,a.jsx)(b.ScrollAreaScrollbar,{ref:o,orientation:t,className:z(`wu-flex wu-touch-none wu-select-none wu-transition-colors`,t===`vertical`&&`wu-h-full wu-w-2 wu-border-l wu-border-l-transparent wu-p-[1px]`,t===`horizontal`&&`wu-h-2 wu-flex-col wu-border-t wu-border-t-transparent wu-p-[1px]`,e),style:{background:r},...i,children:(0,a.jsx)(b.ScrollAreaThumb,{className:`wu-relative wu-flex-1 wu-rounded-full`,style:{background:n}})}));ep.displayName=b.ScrollAreaScrollbar.displayName;var tp=e=>{let{children:t,label:n,Label:r,open:i,onOpenChange:o,height:s,dir:c,...l}=e;return(0,a.jsxs)(gi,{...l,open:i,onOpenChange:o,children:[(0,a.jsx)(vi,{dir:c,children:r||n}),(0,a.jsx)(hi,{children:(0,a.jsx)(yi,{onInteractOutside:e=>e.preventDefault(),children:(0,a.jsx)($f,{className:`wu-h-fit`,style:{height:s},dir:c,children:t})})})]})},np=`wu-p-1.5 wu-cursor-pointer hover:wu-bg-gray-20 wu-border-gray-40 wu-transition wu-duration-300 focus:wu-outline-2 focus:wu-outline-offset focus:wu-outline-blue-p/80 focus:wu-bg-gray-20 hover:wu-bg-gray-20 wu-rounded-t-sm`,rp=e=>{let{children:t,menuTitle:n,MenuTitle:r,variant:i=`flat`,name:o,open:s,onOpenChange:c,height:l,preventCloseOnClickOutside:u,dir:d,Trigger:f,align:p=`start`,sideOffset:m=0,side:h=`bottom`,alignOffset:g,className:_,disabled:v,...y}=e;return(0,a.jsxs)(fi,{...y,open:s,onOpenChange:c,dir:d,children:[(0,a.jsx)(pi,{asChild:!0,dir:d,disabled:v,className:z(`disabled:wu-text-zinc-300 disabled:wu-bg-white disabled:wu-cursor-not-allowed disabled:hover:wu-bg-transparent`),children:f??ip(i,o,v)}),(0,a.jsx)(bi,{className:z(`wu-w-56 wu-border wu-border-blue-p disabled:wu-border-gray-40`,_,`wu-menu-content`),align:p,sideOffset:m,side:h,alignOffset:g,onInteractOutside:e=>u&&e.preventDefault(),children:(0,a.jsxs)($f,{className:`h-fit`,style:{height:l},dir:d,children:[(n||r)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(wi,{dir:d,className:`wu-menu-title`,children:r||n}),(0,a.jsx)(Ti,{className:`wu-mt-0 wu-menu-separator`,dir:d})]}),t??(0,a.jsx)(`p`,{children:`Menu Is Empty`})]})})]})},ip=(e,t,n)=>(0,a.jsxs)(`button`,{className:z(np,`wu-flex wu-items-center wu-justify-between wu-gap-2 wu-h-8 wu-text-xs wu-group/wuMenu`,e===`outlined`?`wu-border`:`wu-border-b`,`wu-trigger-btn`),"aria-label":`menu-trigger`,children:[(0,a.jsx)(`span`,{children:t??`Menu`}),(0,a.jsx)(`span`,{className:z(`wm-arrow-drop-down wu-text-gray-lead wu-text-base wu-rotate-180 group-data-[state=closed]/wuMenu:wu-rotate-0 wu-transition-transform wu-duration-300 group-hover:wu-text-blue-q`,n&&`wu-text-zinc-300 group-hover:wu-text-zinc-300`)})]}),ap=({titles:e,dir:t=`ltr`,handleTitleClick:n})=>{let[r,i]=R.default.useState(!1);return(0,a.jsx)(rp,{className:`wu-rounded-sm`,open:r,onOpenChange:i,dir:t,sideOffset:4,Trigger:(0,a.jsx)(W,{variant:`iconOnly`,className:z(`wu-w-6 wu-h-6 wu-shrink-0 wu-rounded-sm`),Icon:(0,a.jsx)(`span`,{className:z(`wm-keyboard-arrow-down wu-text-[16px] wu-origin-center wu-transition-transform wu-duration-300`,r&&(t===`rtl`?`-wu-rotate-180`:`wu-rotate-180`))})}),children:e.map(e=>(0,a.jsx)(Yf,{onSelect:t=>n(t,e.id),children:e.title},e.id))})},op=({titles:e,currentLevel:t,initial:n,handleTitleClick:r,headerClasses:i,offsetHeight:o,dir:s=`ltr`})=>{let c=(0,R.useMemo)(()=>s===`rtl`?{initial:{x:8,opacity:0,zIndex:0},animate:{x:0,opacity:1,zIndex:50},exit:{x:-8,opacity:0,zIndex:0}}:{initial:{x:-8,opacity:0,zIndex:0},animate:{x:0,opacity:1,zIndex:50},exit:{x:8,opacity:0,zIndex:0}},[s]);return(0,a.jsxs)(`div`,{className:z(`wu-absolute wu-top-0 wu-left-0 wu-flex wu-gap-x-2 wu-px-4 wu-items-center wu-origin-left wu-w-full wu-transition wu-duration-200`,t===n?s===`rtl`?`wu-translate-x-1 wu-opacity-0 wu-z-0 wu-delay-0`:`-wu-translate-x-1 wu-opacity-0 wu-z-0 wu-delay-0`:`wu-translate-x-0 wu-opacity-100 wu-z-50 wu-delay-200`,i),style:{height:t===n?`-40px`:`${o}px`},dir:s,children:[(0,a.jsx)(ap,{titles:e,handleTitleClick:r,dir:s}),(0,a.jsx)(`div`,{className:`wu-w-full wu-relative wu-h-full wu-flex wu-items-center wu-flex-nowrap wu-whitespace-nowrap wu-text-nowrap wu-gap-2 wu-overflow-x-auto wu-no-scrollbar wu-snap-x wu-snap-mandatory wu-scroll-smooth`,children:(0,a.jsx)(Rd,{features:Gf,children:(0,a.jsxs)(jd,{initial:!1,mode:`popLayout`,children:[sp(e).map((e,t)=>(0,a.jsx)(qf,{initial:c.initial,animate:c.animate,exit:c.exit,transition:{duration:.4,ease:`easeInOut`},children:(0,a.jsxs)(`h6`,{"data-id":e.id,onClick:r,className:z(`wu-flex wu-text-sm wu-leading-4 wu-font-normal wu-items-center wu-gap-2`,t===2||t===1||e.id===`LEVEL_DOTS`?`wu-cursor-default wu-text-gray-600`:`wu-cursor-pointer wu-text-[#1B87E6] wu-hover:text-[#145DBF]/70`),children:[t!==0&&(0,a.jsx)(`span`,{className:z(`wm-keyboard-arrow-right wu-text-[16px] wu-font-light wu-max-w-4 wu-flex wu-justify-center`,s===`rtl`&&`wu-rotate-180`)}),e.id===`LEVEL_DOTS`?(0,a.jsx)(`span`,{className:`wu-flex wu-justify-center wu-w-[11px]`,children:e.title}):e.title]})},e.id)),"``"]})})})]})},sp=e=>{let t=e.length;return t>2?[e[0],{id:`LEVEL_DOTS`,title:`...`},e[t-1]]:e},cp=({items:e,initial:t,baseTitle:n,mode:r=`popLayout`,headerClasses:i=``,offsetHeight:o=40,variant:s=`default`,dir:c=`ltr`})=>{let[l,u]=(0,R.useState)(n?[n]:[]),[[d,f],p]=(0,R.useState)([t,1]),m=(e,t)=>{t&&u([...l,t]),p([e,1])},h=e=>{let t=l.findIndex(t=>t.id===e);t!==-1&&u(l.slice(0,t+1)),p([e,-1])};return(0,a.jsxs)(`div`,{dir:c,className:`wu-w-full wu-h-full wu-relative wu-overflow-hidden wu-flex wu-flex-col`,children:[(0,a.jsx)(op,{titles:l,currentLevel:d,initial:t,handleTitleClick:(e,t)=>{let n=t||e.currentTarget.getAttribute(`data-id`)||``;if(n&&n!==d){let e=l.findIndex(e=>e.id===n);e!==-1&&(u(l.slice(0,e+1)),h(n))}},headerClasses:i,offsetHeight:o,dir:c}),(0,a.jsx)(Rd,{features:Gf,children:(0,a.jsx)(jd,{initial:!1,custom:f,mode:r,children:(()=>{let n=e[d]?e[d]:null;if(!n)return(0,a.jsx)(`div`,{className:`wu-absolute wu-inset-0 wu-w-full wu-h-full wu-flex wu-items-center wu-justify-center`,children:(0,a.jsx)(`p`,{className:`wu-text-gray-500`,children:`No content available.`})});let r=typeof n.component==`function`?n.component({goNext:m,goBack:h}):n.component;return(0,a.jsx)(qf,{dir:c,custom:f,variants:lp(s),initial:`enter`,animate:`center`,exit:`exit`,transition:{opacity:{duration:.325,ease:`easeInOut`},scale:{duration:.275,ease:`easeInOut`}},className:`wu-w-full wu-h-full`,style:{paddingTop:d===t?`0px`:`${o}px`},children:r},d)})()})})]})},lp=e=>{switch(e){case`slideRight`:return dp;case`slideLeft`:return fp;case`fadeZoom`:return pp;default:return up}},up={enter:e=>({scale:e>0?.825:1.1,opacity:0,zIndex:0}),center:{scale:1,opacity:1,zIndex:1},exit:e=>({scale:e>0?1.1:.825,opacity:0,zIndex:0})},dp={enter:e=>({x:e>0?-15:15,opacity:0,zIndex:0}),center:{x:0,opacity:1,zIndex:1},exit:e=>({x:e>0?15:-15,opacity:0,zIndex:0})},fp={enter:e=>({x:e>0?15:-15,opacity:0,zIndex:0}),center:{x:0,opacity:1,zIndex:1},exit:e=>({x:e>0?-15:15,opacity:0,zIndex:0})},pp={enter:e=>({opacity:0,zIndex:0,scale:e>0?.925:1.1}),center:{opacity:1,zIndex:1,scale:1},exit:{opacity:0,zIndex:0,scale:1}},mp=({className:e,isLoading:t,loadingText:n,children:r,...i})=>(0,a.jsxs)(`footer`,{className:z(`wu-flex wu-items-center wu-justify-between wu-gap-2 wu-border-t wu-border-gray-10 wu-py-3 wu-px-4 wu-bg-white/80 wu-backdrop-blur-sm wu-text-xs wu-font-normal wu-text-gray-footer wu-sticky wu-bottom-0`,e),...i,children:[(0,a.jsx)(`div`,{className:`wu-flex-1`,children:r}),t&&(0,a.jsx)(ve,{size:`16px`,variant:`spinner`,color:`#a3a3a3`,message:n})]});mp.displayName=`WuFooter`;var hp=R.default.forwardRef((e,t)=>{let{size:n=`sm`,idOrSlugOrUrl:r,variant:i=`primary`,...o}=e,s=n===`sm`?16:18,c=r.includes(`http`)?r:`/help/${r}.html`,l=i===`primary`?`wu-text-blue-p`:`wu-text-gray-lead`;return(0,a.jsx)(`button`,{...o,ref:t,onClick:()=>B(c),children:(0,a.jsx)(`span`,{className:z(`wm-help wu-text-gray-subtle`,`wu-text-[${s}px]`,l,o.disabled&&`wu-text-neutral-300`,`wu-help-button-icon`)})})});hp.displayName=`WuHelpButton`;var gp=(e,t)=>`wu-${t?`combobox`:`listbox`}-${e}`;function _p(e){let{option:t,accessorKey:n,onSelect:r,multiple:i,dir:o,GroupLabel:s,Item:c,isSelected:l,...u}=e,d=n.group&&Array.isArray(t[n.group]),f=({item:e,className:s})=>(0,R.createElement)(oi,{...u,key:JSON.stringify(e),onSelect:()=>r?.(e),value:t[n.value],className:z(`data-[selected='true']:wu-bg-gray-100 wu-cursor-pointer wu-text-xs wu-min-h-8 wu-py-0 hover:wu-bg-gray-10`,!!l?.(e)&&!i&&`wu-bg-blue-p/10`,o===`rtl`&&`wu-justify-end`,s,gp(`item`)),disabled:e.disabled},i&&(0,a.jsx)(Xr,{checked:l?.(e)}),c?c({value:e,isSelected:l?.(e)}):(0,a.jsx)(a.Fragment,{children:e[n.label]}));if(d){let e=t[n.group];return(0,a.jsx)(ii,{heading:typeof s==`string`?t[s]:s?.(t),children:e?.map(e=>(0,a.jsx)(f,{item:e,className:`wu-pl-6`},JSON.stringify(e)))})}return(0,a.jsx)(f,{item:t})}var vp=R.default.memo(_p),yp=e=>{let{className:t,...n}=e;return(0,a.jsxs)(`div`,{className:`wu-relative`,children:[(0,a.jsx)(Pe,{icon:`wm-search`,className:`wu-absolute wu-top-[14px] wu-left-5`}),(0,a.jsx)(ti,{...n,"aria-label":`Search`,className:z(`wu-bg-gray-10 wu-border-b wu-border-gray-subtle wu-rounded-none wu-rounded-t-sm wu-h-8 wu-my-2 wu-pl-8`,`focus:wu-border-blue-p focus-visible:wu-outline-none;`,gp(`input`),t)})]})},bp=e=>{let{label:t,onSelectAll:n,data:r,value:i}=e,[o,s]=R.default.useState(!1),[c,l]=R.default.useState(!1);return R.default.useEffect(()=>{!i||!r||(s(i.length>0),l(i.length>0&&i.length<r.length))},[r,i]),(0,a.jsxs)(oi,{className:`data-[selected='true']:wu-bg-gray-100 wu-cursor-pointer wu-text-xs wu-min-h-8 wu-py-0 hover:wu-bg-gray-100`,onSelect:()=>n?.(!o),children:[(0,a.jsx)(Xr,{checked:o,partial:c}),t||`Select All`]})},xp=e=>{let{CustomTrigger:t,disabled:n,value:r,placeholder:i,accessorKey:o,Chip:s,handleUnselect:c,variant:l,dir:u,className:d,...f}=e,[p,m]=R.default.useState(),h=R.default.useRef(null);return R.default.useEffect(()=>{if(!r){m(null);return}m(Array.isArray(r)?s?r.map((e,t)=>s({value:e,unselect:c,key:t})):r.map(e=>e[o.label]).join(`, `):s?s({value:r,unselect:c}):r[o.label])},[r,s,o.label,m]),(0,a.jsx)(et,{asChild:!0,id:e.id,disabled:n,ref:h,children:t?.(r)||(0,a.jsxs)(`button`,{...f,className:z(`wu-group/wuListbox wu-relative wu-min-h-8 wu-text-xs wu-border-gray-subtle wu-bg-gray-10 wu-p-1 wu-pl-2 rtl:wu-pr-2 wu-border-b wu-w-full wu-text-left wu-pr-5 rtl:wu-pl-5`,`hover:wu-border-blue-p`,`disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle`,`rtl:wu-text-right`,l===`outlined`&&`wu-border wu-border-gray-subtle wu-bg-white`,d,gp(`trigger`)),children:[(0,a.jsx)(`div`,{className:z(`wu-truncate`,s&&`wu-flex wu-items-center wu-gap-1 wu-flex-wrap`,!p&&`wu-font-light`),children:p||i}),(0,a.jsx)(Pe,{icon:`wm-arrow-drop-down`,className:z(`wu-absolute wu-top-1 wm-arrow-drop-down group-data-[state=open]/wuListbox:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base`,u===`rtl`?`wu-left-1`:`wu-right-1`,gp(`drop-icon`))})]})})},Sp=(e,t,n)=>{let r=String(e[n.label]??``).toLowerCase(),i=String(e[n.value]??``).toLowerCase();return r.includes(t)||i.includes(t)},Cp=(e,t,n)=>{let r=t.trim();if(r===``)return e;let i=r.toLowerCase(),a=[];for(let t of e){let e=n.group,r=e?t[e]:void 0;if(Array.isArray(r)){let o=r.filter(e=>Sp(e,i,n));o.length>0&&a.push({...t,[e]:o})}else Sp(t,i,n)&&a.push(t)}return a},wp=e=>{let{data:t,accessorKey:n,value:r,Item:i,Label:o,GroupLabel:s,CustomHeader:c,CustomTrigger:l,NoDataContent:u,Chip:d,onSelect:f,onScroll:p,disabled:m,multiple:h,searchable:g,selectAll:_,virtualizedThreshold:v=100,showGroupSeparator:y,id:b,dir:x,className:S,listClass:C,placeholder:w=`Select items...`,variant:T,labelPosition:E=`top`,maxContentWidth:D,maxContentHeight:O,modal:k,...A}=e,[j,M]=R.default.useState(!1),[N,P]=R.default.useState(``),[F,I]=R.default.useState(r),ee=R.default.useMemo(()=>n,[n]),L=R.default.useMemo(()=>!g||!N?t:Cp(t,N.toLowerCase().trim(),n),[t,N,n.label,g]),te=e=>{h?I(t=>{let r=e[n.value],i=Array.isArray(t)?t:[],a=i.some(e=>e[n.value]===r)?i.filter(e=>e[n.value]!==r):[...i,e];return f&&f(a),a}):(I(e),f&&f(e),M(!1))},ne=R.default.useCallback(e=>{let n=e?t:[];I(n),_?.onSelectAll&&_.onSelectAll(e),f&&f(n)},[t,_,f]),B=e=>Array.isArray(F)?F.some(t=>t[n.value]===e[n.value]):F?.[n.value]===e[n.value];R.default.useEffect(()=>{I(r)},[r]);let V=e=>{let t=(t,r)=>{let o=n.group&&Array.isArray(t[n.group]),c=y&&o&&r>0&&e.length>1;return(0,a.jsxs)(R.default.Fragment,{children:[c&&(0,a.jsx)(ai,{}),(0,a.jsx)(vp,{option:t,accessorKey:ee,multiple:h,onSelect:e=>te(e),dir:x,GroupLabel:s,Item:i,isSelected:e=>B(e)})]},JSON.stringify(t))};return e.length>v?(0,a.jsx)(li,{list:e,callback:(e,n)=>t(n,e),dir:x}):e.map((e,n)=>t(e,n))};return(0,a.jsxs)(`div`,{className:z(`wu-flex wu-text-sm wu-gap-2`,E===`top`&&`wu-flex-col wu-gap-1`,E===`left`&&`wu-flex-row`,E===`right`&&`wu-flex-row-reverse`,gp(`container`)),dir:x,children:[o&&(0,a.jsx)(K,{htmlFor:b,className:gp(`label`),children:o}),(0,a.jsxs)($e,{open:j,onOpenChange:e=>{M(e),e||setTimeout(()=>{P(``)},100)},modal:k,children:[(0,a.jsx)(xp,{CustomTrigger:l,disabled:m,value:F,accessorKey:n,placeholder:w,Chip:d,className:S,handleUnselect:te,variant:T,id:b,dir:x,...A}),(0,a.jsx)(tt,{className:z(`wu-min-w-[--radix-popover-trigger-width] wu-max-w-[calc(100vw-32px)] wu-w-auto wu-p-0 wu-bg-white wu-border wu-border-blue-p`,gp(`content`)),align:`start`,sideOffset:-1,style:{maxWidth:D},children:(0,a.jsxs)(ei,{id:e.id,shouldFilter:!1,children:[g&&(0,a.jsx)(yp,{value:N,onValueChange:P}),c,(0,a.jsxs)(ni,{className:z(`wu-overflow-y-auto`,gp(`list`),C),onScroll:p,style:{maxHeight:O||`420px`},children:[(0,a.jsx)(ri,{children:u||`No results found.`}),(0,a.jsx)(ii,{children:h&&_?.enabled&&!N&&(0,a.jsx)(bp,{data:t,value:F,onSelectAll:ne,label:_.label})}),(0,a.jsx)(ii,{children:V(L)})]})]})})]})]})},Tp=R.default.forwardRef(({showMenu:e=!1,className:t,color:n=`#1B3380`,...r},i)=>{let o=z(`wu-w-full wu-border wu-transition-all wu-duration-300`);return(0,a.jsxs)(`div`,{...r,className:z(`wu-flex wu-flex-col wu-w-[18px] wu-justify-between wu-aspect-[3/2] wu-transition-all wu-duration-300`,t),ref:i,"aria-label":`menu-icon`,children:[(0,a.jsx)(`div`,{className:`${o} wu-origin-center ${e?`wu-rotate-45 wu-translate-y-[5px]`:``}`,style:{borderColor:n}}),(0,a.jsx)(`div`,{className:`${o} ${e?`wu-opacity-0`:``}`,style:{borderColor:n}}),(0,a.jsx)(`div`,{className:`${o} wu-origin-center ${e?`-wu-rotate-45 -wu-translate-y-[5px]`:``}`,style:{borderColor:n}})]})});Tp.displayName=`WuMenuIcon`;var Ep={overlay:`data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0`,content:`data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[state=closed]:wu-slide-out-to-left-1/2 data-[state=closed]:wu-slide-out-to-top-[48%] data-[state=open]:wu-slide-in-from-left-1/2 data-[state=open]:wu-slide-in-from-top-[48%]`},Dp=y.Root,Op=y.Trigger,kp=y.Portal,Ap=y.Close,jp=(0,R.forwardRef)(({className:e,...t},n)=>(0,a.jsx)(y.Overlay,{ref:n,className:z(`wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30`,Ep.overlay,e),...t}));jp.displayName=y.Overlay.displayName;var Mp=(0,R.forwardRef)(({className:e,children:t,hideCloseButton:n,isStackedCard:r,...i},o)=>(0,a.jsxs)(kp,{children:[(0,a.jsx)(jp,{className:r?`wu-bg-transparent`:``,"data-wu-overlay":!0}),(0,a.jsxs)(y.Content,{ref:o,className:z(`wu-fixed wu-left-[50%] wu-z-50 wu-top-[50%] wu-flex wu-flex-col wu-w-full wu-max-w-lg wu-translate-x-[-50%] wu-translate-y-[-50%] wu-bg-white wu-shadow-lg wu-duration-200`,Ep.content,e),...i,children:[t,!n&&(0,a.jsx)(y.Close,{"aria-label":`close`,asChild:!0,children:(0,a.jsxs)(rt,{variant:`iconOnly`,className:z(`wu-absolute wu-right-2 wu-top-1 hover:wu-bg-black/[0.08] wu-w-8 wu-h-8 wu-p-0`,`wu-top-3 wu-right-4`,`group-data-[variant=action]:wu-text-blue-q`,`group-data-[variant=upgrade]:wu-text-yellow-deep`,`group-data-[variant=critical]:wu-text-red-deep`),children:[(0,a.jsx)(`span`,{className:`wm-close wu-leading-5`}),(0,a.jsx)(`span`,{className:`wu-sr-only`,children:`Close`})]})})]})]}));Mp.displayName=y.Content.displayName;var Np=({className:e,...t})=>(0,a.jsx)(`div`,{className:z(`wu-text-center wu-bg-gray-20 wu-w-full`,e),...t});Np.displayName=`DialogHeader`;var Pp=({className:e,...t})=>(0,a.jsx)(`div`,{className:z(`wu-flex wu-flex-col-reverse sm:wu-flex-row sm:wu-justify-end sm:wu-space-x-2 wu-p-4`,e),...t});Pp.displayName=`DialogFooter`;var Fp=(0,R.forwardRef)(({className:e,...t},n)=>(0,a.jsx)(y.Title,{ref:n,className:z(`wu-text-lg wu-font-medium wu-flex wu-items-center wu-justify-center wu-gap-1 wu-h-10 wu-leading-none wu-tracking-tight`,e),...t}));Fp.displayName=y.Title.displayName;var Ip=(0,R.forwardRef)(({className:e,...t},n)=>(0,a.jsx)(y.Description,{ref:n,className:z(`wu-text-sm wu-text-muted-foreground`,e),...t}));Ip.displayName=y.Description.displayName;var Lp={gradientBackground:`_gradientBackground_1uc4j_1`},Rp=e=>{let{colors:t,size:n=.55,children:r,className:i,strokeWidth:o,centerOffset:s={x:0,y:0},...c}=e,l=(0,R.useRef)(null);return(0,R.useEffect)(()=>{let e=l.current;if(e){e.style.setProperty(`--width`,`${e.offsetWidth*n}px`),e.style.setProperty(`--height`,`${e.offsetHeight*n}px`),e.style.setProperty(`--colors`,t.join(`,`)),e.style.setProperty(`--stroke-width`,`-${o||2}px`),e.style.setProperty(`--spotlight-background`,`radial-gradient(100% var(--height) ellipse at 25% 70%, var(--colors))`);let r,i=t=>{r&&cancelAnimationFrame(r),r=requestAnimationFrame(()=>{let n=e.getBoundingClientRect(),r=t.clientX-n.left,i=t.clientY-n.top;r=Math.max(0,Math.min(r+s.x,n.width)),i=Math.max(0,Math.min(i+s.y,n.height));let a=`radial-gradient(
16
+ var(--width) var(--height) ellipse at ${r}px ${i}px,
17
+ var(--colors)
18
+ )`;e.style.setProperty(`--spotlight-background`,a)})};return window.addEventListener(`mousemove`,i),()=>{window.removeEventListener(`mousemove`,i),r&&cancelAnimationFrame(r)}}},[t,n,o,s]),(0,a.jsx)(`div`,{ref:l,className:z(Lp.gradientBackground,`wu-transform-gpu`,i),...c,children:r})},zp={wuModalBodyWrapper:`_wuModalBodyWrapper_uaelx_1`,"wu-modal-footer":`_wu-modal-footer_uaelx_5`,"wu-modal-content":`_wu-modal-content_uaelx_5`,"wu-modal-header":`_wu-modal-header_uaelx_9`},Bp=`calc(100vh - 64px)`,Vp={sm:`400px`,md:`600px`,lg:`1200px`},Hp=({Trigger:e,children:t,size:n=`md`,hideCloseButton:r,preventClickOutside:i,onOpenChange:o,open:s,dir:c,maxWidth:l,maxHeight:u,className:d,style:f,variant:p=`action`,allowExternalPortals:m,onOpenAutoFocus:h,onCloseAutoFocus:g,..._})=>{let v={action:[`#EEF3FBcc 32%`,`#1D50F4cc`],upgrade:[`#FDEDCCcc 32%`,`#FF9F00cc`],critical:[`#FFB6B6cc 32%`,`#CC0000cc`]},y=(0,R.useRef)(null),b=(0,R.useRef)(null);return(0,R.useEffect)(()=>()=>{y.current&&=(document.removeEventListener(`focusin`,y.current.focusin,!0),document.removeEventListener(`focusout`,y.current.focusout,!0),document.body.style.pointerEvents=``,null)},[]),(0,a.jsxs)(Dp,{modal:!0,onOpenChange:o,open:s,children:[e&&(0,a.jsx)(Op,{asChild:!0,children:e}),(0,a.jsx)(Mp,{ref:b,style:{width:`calc(100% - 64px)`,maxWidth:l||Vp[n],maxHeight:u||Bp,...f},hideCloseButton:r,onInteractOutside:e=>{if(i){e.preventDefault();return}m&&((e.detail?.originalEvent?.target)?.closest(`[data-wu-overlay]`)||e.preventDefault())},onFocusOutside:e=>m&&e.preventDefault(),onOpenAutoFocus:e=>{if(m){document.body.style.pointerEvents=`all`;let e=e=>!!b.current&&!b.current.contains(e),t=t=>{e(t.target)&&t.stopImmediatePropagation()},n=t=>{e(t.relatedTarget)&&t.stopImmediatePropagation()};y.current={focusin:t,focusout:n},document.addEventListener(`focusin`,t,!0),document.addEventListener(`focusout`,n,!0)}h?.(e)},onCloseAutoFocus:e=>{m&&(document.body.style.pointerEvents=``,y.current&&=(document.removeEventListener(`focusin`,y.current.focusin,!0),document.removeEventListener(`focusout`,y.current.focusout,!0),null)),g?.(e)},dir:c,"aria-describedby":void 0,"data-variant":p,className:z(`wu-group wu-rounded-[.88rem]`,zp.wuModalBodyWrapper,d),..._,children:(0,a.jsx)(Rp,{colors:v[p],strokeWidth:4,className:z(`wu-rounded-[1.1rem] wu-transform-gpu wu-flex wu-flex-col`,d),style:{maxHeight:u||Bp},children:t})})]})},Up=({children:e,className:t,...n})=>(0,a.jsx)(`div`,{className:z(`wu-flex wu-flex-col wu-gap-4 wu-p-4 rtl:wu-text-right wu-overflow-auto wu-bg-white`,`wu-p-8 wu-text-gray-lead`,zp[`wu-modal-content`],t),...n,children:e}),Wp=({children:e,className:t,...n})=>(0,a.jsx)(Np,{...n,"data-variant":`action`,className:z(`wu-text-lg wu-text-gray-lead wu-font-medium`,`wu-rounded-t-[.88rem] wu-px-4`,`group-data-[variant=action]:wu-bg-blue-sidebar group-data-[variant=action]:wu-text-blue-q`,`group-data-[variant=critical]:wu-bg-[#F9E0E0] group-data-[variant=critical]:wu-text-red-deep`,`group-data-[variant=upgrade]:wu-bg-[#FEF1D9] group-data-[variant=upgrade]:wu-text-yellow-deep`,zp[`wu-modal-header`],t),children:(0,a.jsx)(Fp,{className:`wu-font-normal wu-justify-start wu-text-2xl wu-h-14`,children:e})}),Gp=({children:e,className:t,...n})=>(0,a.jsx)(Pp,{...n,className:z(`wu-border-t wu-border-gray-40 wu-bg-white wu-min-h-16 wu-mx-4 wu-px-0`,`wu-mx-0 wu-rounded-b-[.88rem] wu-min-h-16 wu-p-4`,`group-data-[variant=upgrade]:wu-border-[#EED6A8]`,`group-data-[variant=action]:wu-border-[#BAC9F8]`,`group-data-[variant=critical]:wu-border-[#F0B3B3]`,zp[`wu-modal-footer`],t),children:e}),Kp=({children:e,className:t,...n})=>(0,a.jsx)(Ap,{asChild:!0,children:(0,a.jsx)(W,{className:t,ref:R.default.useRef(null),...n,children:e})}),qp=({placeholder:e=`Select...`,value:t,multiple:n=!1,accessorKey:r,variant:i=`flat`,dir:o=`ltr`,customTriggerChildren:s,id:c,disabled:l,selectAll:u,isCheckedAll:d,width:f,...p})=>{let[m,h]=(0,R.useState)(``),[g,_]=(0,R.useState)(e);(0,R.useEffect)(()=>{if(!t||Array.isArray(t)&&t.length===0){_(e),h(``);return}let i=r.label;n&&Array.isArray(t)?h(t.map(e=>e[i]).join(`, `)):!n&&!Array.isArray(t)&&h(t[i])},[t,r.label,n,e]);let v=()=>e&&!m?(0,a.jsx)(`p`,{className:`wu-text-xs wu-opacity-70`,children:g}):(0,a.jsx)(`span`,{className:z(`wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap`),style:{width:`${(f||0)-32}px`},children:d?u?.triggerText??m:m});return(0,a.jsx)(pi,{asChild:!0,dir:o,id:c,disabled:l,children:(0,a.jsxs)(`button`,{...p,disabled:l,className:z(`wu-flex wu-gap-2 wu-w-full wu-items-center wu-justify-between wu-py-1.5 wu-px-2 wu-text-xs wu-transition-colors wu-cursor-pointer wu-border-b wu-bg-white wu-border-gray-subtle wu-h-8`,`focus:wu-outline-none focus-visible:wu-border-blue-p/80 wu-rounded-t-sm`,`disabled:wu-cursor-not-allowed disabled:hover:wu-border-gray-subtle disabled:wu-bg-gray-10 disabled:wu-opacity-50`,`hover:wu-bg-gray-10 hover:wu-border-blue-p`,i===`outlined`&&`wu-border wu-border-gray-subtle`,`wu-group/wuSelect wu-select-trigger`,p.className),children:[s??v(),(0,a.jsx)(`span`,{className:`wm-arrow-drop-down group-data-[state=open]/wuSelect:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base`})]})})},Jp=({option:e,value:t,multiple:n=!1,onSelect:r,accessorKey:i,dir:o=`ltr`})=>{let[s,c]=(0,R.useState)(n?[]:``);(0,R.useEffect)(()=>{t&&c(n?t.map(e=>JSON.stringify(e[i.value])):JSON.stringify(t[i.value]))},[t,i.value,n]);let l=n?s.includes(JSON.stringify(e[i.value])):s===JSON.stringify(e[i.value]);return(0,a.jsxs)(xi,{onClick:t=>{e.disabled||(r(e),n&&t.preventDefault())},disabled:e.disabled,className:z(`wu-cursor-pointer wu-text-xs wu-py-2 wu-leading-4 wu-select-item wu-items-start`,l&&`wu-bg-gray-10`),dir:o,children:[n&&(0,a.jsx)(Xr,{checked:l}),(0,a.jsx)(Yp,{option:e,accessorKey:i})]})},Yp=({option:e,accessorKey:t})=>{let n=String(e[t.label]);return(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-w-full wu-gap-1 wu-text-xs wu-pl-2`,children:[e.icon,n,e.isAdmin&&(0,a.jsx)(`span`,{className:`wu-ml-auto wm-lock wu-text-sm wu-text-orange-deep`})]})},Xp=e=>{let{option:t,handleSelectAll:n,isCheckedAll:r,isPartialSelected:i,...o}=e;switch(`type`in t?t.type:`option`){case`all`:return(0,a.jsxs)(xi,{onSelect:e=>{e.stopPropagation(),e.preventDefault(),n?.()},className:z(`wu-cursor-pointer wu-text-xs wu-py-2 wu-leading-4 wu-select-item`),dir:o.dir,children:[(0,a.jsx)(Xr,{"data-partial":i,checked:r||i,partial:i}),(0,a.jsx)(Yp,{option:t,accessorKey:o.accessorKey})]});case`group`:return(0,a.jsxs)(mi,{dir:o.dir,children:[(0,a.jsx)(wi,{className:`wu-text-xs`,children:t.label}),t.options.map((e,t)=>{let n=e[o.accessorKey.value],r=n==null?`group-item-${t}`:String(n);return(0,R.createElement)(Jp,{...o,option:e,key:r})})]});case`divider`:return(0,a.jsx)(Ti,{className:`wu-mx-4`});default:return(0,a.jsx)(Jp,{...o,option:t})}},Zp=e=>{let t=0,n=0,r=[],i=[],a=e=>{e.type===`divider`?t++:e.type===`group`?(n++,e.options.forEach(e=>{a(e)})):(r.push(e),e.disabled||i.push(e))};return e.forEach(e=>{a(e)}),{separators:t,groups:n,enabledOptions:i,totalData:r.length,cleanData:r}},Qp=100,$p=400,em=({data:e,onSelect:t,multiple:n=!1,defaultValue:r,value:i,accessorKey:o,variant:s=`flat`,dir:c=`ltr`,placeholder:l,Label:u,virtualizedThreshold:d=Qp,maxHeight:f=$p,hasGroup:p=!1,Header:m,CustomTrigger:h,selectAll:g,disabled:_,labelPosition:v=`top`,onScroll:y,maxContentWidth:b,selectedToTop:x=!1,...S})=>{let[C,w]=(0,R.useState)(),T=(0,R.useRef)(null),[E,D]=(0,R.useState)(!1),[O,k]=(0,R.useState)(!1),{cleanData:A,enabledOptions:j}=Zp(e),M=(0,R.useMemo)(()=>n&&g?.enable&&e.length>0?[{type:`all`,[o.label]:g.label||`Select All`},...e]:e,[e,g,n]),N=(0,R.useCallback)(e=>{let r=e[o.value];if(n)w((n=[])=>{let i=n,a=i.some(e=>e[o.value]===r)?i.filter(e=>e[o.value]!==r):[...i,e];return t?.(a),a});else{let n=e;w(n),t?.(n)}},[n,o.value,t]);(0,R.useEffect)(()=>{if(r&&i){console.error(`defaultValue and value cannot be used simultaneously`);return}!r&&!i&&w(void 0),r!==void 0&&w(r),i!==void 0&&w(i)},[r,i]);let P=ci(x,M,C,o),F=P.length>d;(0,R.useEffect)(()=>{if(!n)return;let t=g?.includeDisabled?C?.length===e.length:C?.length===j.length;D(t),k(C?.length>0&&!t)},[C,g]);let I=(0,R.useCallback)(()=>{let n=E?[]:g?.includeDisabled?p?A:e:j;w(n),t?.(n)},[E,n,e,j,t,g]);return(0,a.jsxs)(`div`,{className:z(re(v),`wu-flex wu-select-container`),ref:T,dir:c,children:[(0,a.jsxs)(fi,{children:[(0,a.jsx)(qp,{...S,value:C,multiple:n,variant:s,dir:c,placeholder:l,accessorKey:o,customTriggerChildren:h,id:S.id,disabled:_,selectAll:g,isCheckedAll:E}),(0,a.jsxs)(bi,{className:`wu-min-w-[--radix-dropdown-menu-trigger-width] wu-max-w-[calc(100vw-32px)] wu-border-blue-p wu-select-content`,role:`listbox`,sideOffset:-1,align:`start`,id:S.id,style:{maxWidth:b},children:[m,F?(0,a.jsx)(li,{list:P,containerHeight:f,callback:(e,t)=>(0,a.jsx)(Xp,{option:t,accessorKey:o,multiple:n,onSelect:N,value:C,dir:c,handleSelectAll:I,isCheckedAll:E,isPartialSelected:O}),dir:c}):(0,a.jsx)(`div`,{onScroll:y,style:{maxHeight:f,height:`fit-content`,overflow:`auto`},className:`wu-select-list`,children:P.map((e,t)=>{let r=e,i=r[o.value],s=i==null?`__${`type`in r?r.type:`item`}__${t}`:String(i);return(0,a.jsx)(Xp,{option:r,accessorKey:o,multiple:n,onSelect:N,value:C,handleSelectAll:I,isCheckedAll:E,dir:c,isPartialSelected:O},s)})})]})]}),u&&(0,a.jsx)(K,{htmlFor:S.id,className:`wu-select-label`,children:u})]})},tm=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],nm=({value:e,onChange:t,min:n=(0,c.sub)(new Date,{years:5}),max:r=(0,c.add)(new Date,{years:1}),placeholder:i=`Select a month`,Label:o,labelPosition:s=`top`,disabled:u,id:d,readonly:f,disabledMonths:p=[],...m})=>{let[h,g]=(0,R.useState)(null),[_,v]=(0,R.useState)(``),[y,b]=(0,R.useState)({value:Math.min(new Date().getFullYear(),new Date(r).getFullYear()),label:Math.min(new Date().getFullYear(),new Date(r).getFullYear())}),x=(0,R.useMemo)(()=>{let e=new Date(n).getFullYear(),t=new Date(r).getFullYear();return Array.from({length:t-e+1},(e,n)=>({value:t-n,label:t-n}))},[n,r]);(0,R.useEffect)(()=>{if(e){let t=new Date(e),n=t.getFullYear(),r=t.getMonth();g({year:n,month:r}),v(`${tm[r]} ${n}`),b({value:n,label:n})}},[e]);let S=()=>{h&&t&&(t(new Date(h.year,h.month,15)),v(`${tm[h.month]} ${h.year}`))};return(0,a.jsxs)(`div`,{className:z(`wu-flex wu-flex-col wu-items-center`,re(s),s===`top`&&`wu-items-start`),children:[(0,a.jsxs)($e,{children:[(0,a.jsx)(st,{...m,disabled:u||f,id:d,dir:`ltr`,placeholder:i,formattedString:_}),(0,a.jsxs)(tt,{className:`wu-flex wu-flex-col wu-gap-4 wu-p-4 wu-bg-white wu-border-blue-p wu-month-picker-content`,align:`start`,sideOffset:-1,children:[(0,a.jsx)(`div`,{className:`wu-px-1 wu-mx-auto wu-w-full`,children:(0,a.jsx)(em,{data:x,accessorKey:{value:`value`,label:`label`},value:y,onSelect:e=>b(e),multiple:!1,maxHeight:224})}),(0,a.jsx)(rm,{year:y?.value,selectedMonth:h?.month,selectedYear:h?.year,onClick:(e,t)=>g({year:t,month:e}),disabledMonths:p}),(0,a.jsx)(`div`,{className:`wu-flex wu-justify-end wu-px-0.5`,children:(0,a.jsx)(l.PopoverClose,{asChild:!0,children:(0,a.jsx)(W,{onClick:S,children:`Apply`})})})]})]}),o&&(0,a.jsx)(K,{className:`wu-truncate wu-max-w-[120px] wu-min-w-fit wu-select-label`,children:o})]})},rm=({year:e,selectedMonth:t,selectedYear:n,onClick:r,disabledMonths:i=[]})=>{let o=new Date,s=o.getFullYear(),c=o.getMonth(),l=R.default.useMemo(()=>{let e=new Set;return i.forEach(t=>{let n=typeof t==`string`?new Date(t):t;e.add(`${n.getFullYear()}-${n.getMonth()}`)}),e},[i]);return(0,a.jsx)(`div`,{className:`wu-grid wu-grid-cols-3 wu-grid-rows-4 wu-w-fit wu-gap-[1px] wu-bg-[#d9d9d9] wu-border wu-border-[#d9d9d9] wu-month-picker-grid`,children:tm.map((i,o)=>{let u=e===s&&o===c,d=t===o&&n===e;return(0,a.jsx)(`button`,{disabled:l.has(`${e}-${o}`),onClick:()=>r(o,e),className:z(`wu-bg-white wu-flex wu-items-center wu-justify-center wu-w-[83px] wu-h-[53px] wu-text-xs wu-transition-colors`,`hover:wu-bg-gray-25 hover:wu-text-blue-q hover:wu-font-medium`,`focus:wu-outline-none focus-visible:wu-border focus-visible:wu-border-blue-p/50`,u&&`wu-border wu-border-blue-p`,d&&`wu-bg-blue-p wu-text-white hover:wu-bg-blue-p/80 hover:wu-text-white wu-font-medium`,`disabled:wu-bg-gray-20 disabled:wu-text-gray-subtle disabled:hover:wu-bg-gray-20 disabled:hover:wu-text-gray-subtle disabled:hover:wu-font-normal`,`wu-month-picker-month`),"data-value":`${tm[o]} ${e}`,"data-month":o,"data-year":e,children:i},i)})})},im=(e,t,n,r=96)=>{if(e.length===0||r<=0)return[[],[]];let[i,a]=R.default.useState([]),[o,s]=R.default.useState([]);return R.default.useEffect(()=>{let i=()=>{let i=(t.current?.clientWidth||0)-(n.current?.clientWidth||0),o=Math.floor(i/r);a(e.slice(0,o)),s(e.slice(o))};return i(),window.addEventListener(`resize`,i),()=>{window.removeEventListener(`resize`,i)}},[e,r]),[i,o]},am={wuPrimaryLink:`_wuPrimaryLink_1sy3v_1`,wuPrimaryPopoverContent:`_wuPrimaryPopoverContent_1sy3v_8`},om=e=>{let{Links:t,children:n,className:r,...i}=e,o=R.default.useMemo(()=>t.map((e,t)=>R.default.cloneElement(e,{className:z(am.wuPrimaryLink,e.props.className,`wu-primary-nav-link`),key:t})),[t]),s=R.default.useRef(null),c=R.default.useRef(null),[l,u]=im(o,s,c);return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(`header`,{className:z(`wu-flex wu-items-center wu-justify-between wu-gap-4 wu-px-2 wu-py-1 wu-bg-white wu-border-b`,r),...i,ref:s,children:[(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-gap-2`,children:[(0,a.jsx)(`nav`,{className:`wu-flex wu-items-center wu-justify-start wu-gap-4 wu-primary-nav-left`,children:l}),u.length>0&&(0,a.jsxs)($e,{children:[(0,a.jsx)(et,{className:`wu-p-1 wu-pb-0 wu-rounded-sm focus:wu-outline-none focus:wu-bg-gray-25`,"aria-label":`more`,children:(0,a.jsx)(`span`,{className:`wm-more-vert`})}),(0,a.jsx)(tt,{className:z(am.wuPrimaryPopoverContent,`wu-primary-nav-popover-left`),align:`start`,sideOffset:12,children:u})]})]}),n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`section`,{className:`wu-items-center wu-justify-end wu-hidden wu-gap-4 sm:wu-flex wu-primary-nav-right`,ref:c,children:n}),(0,a.jsxs)($e,{children:[(0,a.jsx)(et,{className:`sm:wu-hidden`,children:(0,a.jsx)(`span`,{className:`wu-text-lg wm-menu`})}),(0,a.jsx)(tt,{className:`wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-primary-nav-popover-right`,align:`end`,sideOffset:4,children:n})]})]})]})})},sm={wuSecondaryLink:`_wuSecondaryLink_1edl1_1`,wuSecondaryNav:`_wuSecondaryNav_1edl1_6`,wuSecondaryPopoverContent:`_wuSecondaryPopoverContent_1edl1_11`},cm=e=>{let{Links:t,children:n,className:r,...i}=e,o=(0,R.useMemo)(()=>t.map((e,t)=>R.default.cloneElement(e.link,{key:t,className:z(sm.wuSecondaryLink,e.link.props.className,`wu-secondary-nav-link-container`),children:(0,a.jsxs)(a.Fragment,{children:[R.default.cloneElement(e.imgOrIcon,{className:z(`wu-w-5 wu-h-5 wu-flex wu-items-center wu-justify-center wu-text-lg wu-leading-5`,e.imgOrIcon.props.className)}),(0,a.jsx)(`div`,{className:`wu-secondary-nav-link`,children:e.link.props.children})]})})),[t]),s=R.default.useRef(null),c=R.default.useRef(null),l=R.default.useRef(null),[u,d]=im(o,s,l);return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(`header`,{className:z(`wu-flex wu-items-center wu-justify-between wu-gap-4 wu-border-y wu-border-gray-25 wu-h-[50px]`,r),...i,ref:s,children:[(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-justify-start wu-gap-2`,children:[(0,a.jsx)(`nav`,{className:z(sm.wuSecondaryNav,`wu-flex wu-items-center wu-justify-start wu-w-full wu-h-full wu-secondary-nav-left`),ref:c,children:u}),d.length>0&&(0,a.jsxs)($e,{children:[(0,a.jsx)(et,{className:`wu-p-1 wu-pb-0 wu-rounded-sm focus:wu-outline-none focus:wu-bg-gray-25`,"aria-label":`more`,children:(0,a.jsx)(`span`,{className:`wm-more-vert`})}),(0,a.jsx)(tt,{className:z(sm.wuSecondaryNavPopover,`wu-secondary-nav-popover-left`),align:`start`,sideOffset:12,children:d})]})]}),n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`div`,{className:`wu-items-center wu-justify-end wu-hidden sm:wu-flex`,ref:l,children:n}),(0,a.jsxs)($e,{children:[(0,a.jsx)(et,{className:`sm:wu-hidden`,children:(0,a.jsx)(`span`,{className:`wu-text-lg wm-menu`})}),(0,a.jsx)(tt,{className:`wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-secondary-nav-popover-right`,align:`end`,sideOffset:12,children:n})]})]})]})})},lm=R.default.forwardRef(({totalRows:e,initialPage:t=0,initialPageSize:n=100,onPageChange:r,className:i,disabled:o=!1,...s},c)=>{let[l,u]=(0,R.useState)(t),[d,f]=(0,R.useState)(n);(0,R.useEffect)(()=>{u(t),f(n)},[t,n]);let p=Math.ceil(e/d),m=l*d+1,h=Math.min((l+1)*d,e),g=Array.from({length:p},(e,t)=>t),_=(0,R.useCallback)(e=>{e>=0&&e<p&&(u(e),r?.(e))},[p,r]);return(0,a.jsxs)(`div`,{className:z(`wu-flex wu-items-center wu-gap-[2px]`,i,`wu-pagination`),...s,role:`navigation`,children:[(0,a.jsx)(um,{label:`Previous page`,onClick:()=>_(l-1),disabled:l===0||o,icon:`wm-arrow-back-ios-new`,className:`hover:wu-bg-gray-20 rtl:wu-rotate-180 wu-prev-btn`}),(0,a.jsx)(rp,{name:`${m} - ${h}`,className:`wu-w-[96px] wu-min-w-[96px] wu-pagination-menu`,align:`end`,disabled:o,children:(0,a.jsx)($f,{style:{maxHeight:`224px`},dir:s.dir,children:g.length>100?(0,a.jsx)(li,{className:`wu-pagination-list`,containerHeight:224,list:g,callback:(t,n)=>(0,a.jsxs)(Yf,{onSelect:()=>_(n),className:z(`wu-py-2`,n===l&&`wu-bg-gray-20`,`wu-pagination-item`),children:[n*d+1,` -`,` `,Math.min((n+1)*d,e)]},t)}):g.map(t=>(0,a.jsxs)(Yf,{onSelect:()=>_(t),className:z(t===l&&`wu-bg-gray-20`,`wu-py-2 hover:wu-bg-gray-20`,`wu-pagination-item`),children:[t*d+1,` -`,` `,Math.min((t+1)*d,e)]},t))})}),(0,a.jsx)(um,{label:`Next page`,onClick:()=>_(l+1),disabled:l===p-1||o,icon:`wm-arrow-forward-ios`,className:`hover:wu-bg-gray-20 rtl:wu-rotate-180 wu-next-btn`})]})});lm.displayName=`WuPagination`;var um=({label:e,onClick:t,disabled:n,icon:r,className:i})=>(0,a.jsx)(W,{variant:`iconOnly`,onClick:t,disabled:n,className:z(`wu-w-8 wu-h-8 wu-rounded-xs wu-group disabled:wu-text-zinc-300 disabled:wu-bg-white wu-text-gray-lead focus:wu-bg-color-none`,i),"aria-label":e,children:(0,a.jsx)(`span`,{className:z(`wu-text-sm`,r)})}),dm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(x.Root,{className:z(`wu-grid wu-gap-2`,e),...t,ref:n}));dm.displayName=x.Root.displayName;var fm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(x.Item,{ref:n,className:z(`wu-group wu-aspect-square wu-h-4 wu-w-4 wu-rounded-full wu-border wu-border-gray-subtle wu-text-blue-p wu-ring-offset-white disabled:wu-cursor-not-allowed disabled:wu-opacity-50 hover:wu-border-blue-p hover:wu-bg-gray-20 data-[state=checked]:wu-border-blue-p hover:data-[state=checked]:wu-border-blue-q hover:data-[state=checked]:wu-bg-inherit focus:wu-outline-2 focus:wu-outline-offset-4 focus:wu-outline-blue-soft disabled:hover:wu-border-gray-subtle disabled:wu-hover:bg-gray-20 disabled:wu-bg-gray-20`,e),...t,children:(0,a.jsx)(x.Indicator,{className:`wu-flex wu-items-center wu-justify-center`,children:(0,a.jsx)(`div`,{className:`wu-w-2 wu-h-2 wu-rounded-full wu-bg-blue-p group-hover:group-data-[state=checked]:wu-bg-blue-q`})})}));fm.displayName=x.Item.displayName;var pm=R.default.forwardRef((e,t)=>{let{options:n,defaultValue:r,onChange:i,label:o,dir:s,...c}=e;return(0,a.jsxs)(dm,{defaultValue:r,required:c.required,disabled:c.disabled,onValueChange:i,id:c.id,dir:s,name:c.name,className:z(`w-fit`,c.className),ref:t,style:c.style,children:[(0,a.jsx)(ht,{htmlFor:c.id,className:`wu-text-sm wu-font-normal wu-text-gray-lead wu-leading-6 wu-radio-group-label`,children:o}),n.map(e=>(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-gap-2 wu-radio-item-container`,children:[(0,a.jsx)(fm,{value:e.value,id:e.value,disabled:e.disabled,required:e.required,"aria-label":e.value,className:`wu-peer wu-radio-item`}),(0,a.jsx)(ht,{htmlFor:e.value,className:z(e.required&&`after:wu-content-['*'] after:wu-mx-[2px] after:wu-text-rose-500`,`wu-radio-item-label`),children:e.label})]},e.value))]})});pm.displayName=`WuRadioGroup`;var mm=e=>{let{children:t,...n}=e;return(0,a.jsxs)($f,{...n,role:`complementary`,"aria-label":`ScrollArea`,children:[t,(0,a.jsx)(ep,{orientation:`horizontal`})]})},hm=R.forwardRef(({className:e,type:t,...n},r)=>(0,a.jsx)(`input`,{type:t,className:z(`wu-flex wu-h-8 wu-w-full wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-p-2 wu-text-sm wu-font-normal wu-text-gray-lead`,`file:wu-border-0 file:wu-bg-gray-40 file:wu-text-gray-notification file:wu-text-sm file:wu-font-normal file:wu-relative file:wu-bottom-[3px]`,`wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light`,`disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle`,`read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle`,`focus:wu-border-blue-p focus-visible:wu-outline-none wu-transition-colors hover:wu-border-gray-40`,e),ref:r,...n}));hm.displayName=`Input`;var gm=R.forwardRef(({className:e,orientation:t=`horizontal`,decorative:n=!0,...r},i)=>(0,a.jsx)(S.Root,{ref:i,decorative:n,orientation:t,className:z(`wu-shrink-0 wu-bg-gray-40`,t===`horizontal`?`wu-h-[1px] wu-w-full`:`wu-h-full wu-w-[1px]`,e),...r}));gm.displayName=S.Root.displayName;function _m({className:e,...t}){return(0,a.jsx)(`div`,{className:z(`animate-pulse rounded-md bg-muted`,e),...t})}var vm=768;function ym(){let[e,t]=R.useState(void 0);return R.useEffect(()=>{let e=window.matchMedia(`(max-width: ${vm-1}px)`),n=()=>{t(window.innerWidth<vm)};return e.addEventListener(`change`,n),t(window.innerWidth<vm),()=>e.removeEventListener(`change`,n)},[]),!!e}var bm=`sidebar_state`,xm=3600*24*7,Sm=`256px`,Cm=`256px`,wm=`3rem`,Tm=`b`,Em=R.createContext(null);function Dm(){let e=R.useContext(Em);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}var Om=R.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:o,...s},c)=>{let l=ym(),[u,d]=R.useState(!1),[f,p]=R.useState(l?!0:e),m=t??f,h=R.useCallback(e=>{let t=typeof e==`function`?e(m):e;n?n(t):p(t),document.cookie=`${bm}=${t}; path=/; max-age=${xm}`},[n,m]),g=R.useCallback(()=>l?d(e=>!e):h(e=>!e),[l,h,d]);R.useEffect(()=>{let e=e=>{e.key===Tm&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),g())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[g]);let _=m?`expanded`:`collapsed`,v=R.useMemo(()=>({state:_,open:m,setOpen:h,isMobile:l,openMobile:u,setOpenMobile:d,toggleSidebar:g}),[_,m,h,l,u,d,g]);return(0,a.jsx)(Em.Provider,{value:v,children:(0,a.jsx)(Ke,{delayDuration:0,children:(0,a.jsx)(`div`,{style:{"--sidebar-width":Sm,"--sidebar-width-icon":wm,...i},className:z(`wu-group/sidebar-wrapper wu-flex wu-min-h-[calc(100svh-48px)] wu-w-full`,r),ref:c,...s,children:o})})})});Om.displayName=`SidebarProvider`;var km=R.forwardRef(({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...o},s)=>{let{isMobile:c,state:l,openMobile:u,setOpenMobile:d}=Dm();return n===`none`?(0,a.jsx)(`div`,{className:z(`wu-flex wu-h-full wu-w-[--sidebar-width] wu-flex-col`,r),ref:s,...o,children:i}):c?(0,a.jsx)(Pi,{open:u,onOpenChange:d,...o,children:(0,a.jsx)(Bi,{"data-sidebar":`sidebar`,"data-mobile":`true`,className:`wu-w-[--sidebar-width] wu-bg-blue-sidebar wu-p-0 [&>button]:wu-hidden`,style:{"--sidebar-width":Cm},side:e,children:(0,a.jsx)(`div`,{className:`wu-flex wu-flex-col wu-w-full wu-h-full`,children:i})})}):(0,a.jsxs)(`div`,{ref:s,className:`wu-hidden wu-group wu-peer md:wu-block`,"data-state":l,"data-collapsible":l===`collapsed`?n:``,"data-variant":t,"data-side":e,children:[(0,a.jsx)(`div`,{className:z(`wu-relative wu-w-[--sidebar-width] wu-bg-transparent wu-transition-[width] wu-duration-150 wu-ease-linear`,`group-data-[collapsible=offcanvas]:wu-w-0`,`group-data-[side=right]:wu-rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:wu-w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]`:`group-data-[collapsible=icon]:wu-w-[--sidebar-width-icon]`)}),(0,a.jsx)(`div`,{className:z(`wu-fixed wu-inset-y-0 wu-z-20 wu-hidden wu-h-svh wu-w-[--sidebar-width] wu-transition-[left,right,width] wu-duration-150 wu-ease-linear md:wu-flex`,e===`left`?`wu-left-0 group-data-[collapsible=offcanvas]:wu-left-[calc(var(--sidebar-width)*-1)]`:`wu-right-0 group-data-[collapsible=offcanvas]:wu-right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`wu-p-2 group-data-[collapsible=icon]:wu-w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]`:`group-data-[collapsible=icon]:wu-w-[--sidebar-width-icon] group-data-[side=left]:wu-border-r group-data-[side=right]:wu-border-l`,r),...o,children:(0,a.jsx)(`div`,{"data-sidebar":`sidebar`,className:`wu-flex wu-h-full wu-w-full wu-flex-col wu-bg-[#eef3fb] group-data-[variant=floating]:wu-rounded-lg group-data-[variant=floating]:wu-border group-data-[variant=floating]:wu-border-sidebar-border group-data-[variant=floating]:wu-shadow`,children:i})})]})});km.displayName=`Sidebar`;var Am=R.forwardRef(({className:e,onClick:t,children:n,...r},i)=>{let{toggleSidebar:o}=Dm();return(0,a.jsxs)(rt,{ref:i,"data-sidebar":`trigger`,variant:`secondary`,className:z(`wu-h-8 wu-w-8 wu-min-w-0 wu-p-0 wu-text-2xl wu-font-light hover:wu-bg-blue-sidebarHover wu-text-blue-q`,e),onClick:e=>{t?.(e),o()},...r,children:[n,(0,a.jsx)(`span`,{className:`wu-sr-only`,children:`Toggle Sidebar`})]})});Am.displayName=`SidebarTrigger`;var jm=R.forwardRef(({className:e,...t},n)=>{let{toggleSidebar:r}=Dm();return(0,a.jsx)(`button`,{ref:n,"data-sidebar":`rail`,"aria-label":`Toggle Sidebar`,tabIndex:-1,onClick:r,title:`Toggle Sidebar`,className:z(`wu-absolute wu-inset-y-0 wu-z-20 wu-hidden wu-w-4 wu-translate-x-1/2 wu-transition-all wu-ease-linear after:wu-absolute after:wu-inset-y-0 after:wu-left-1/2 after:wu-w-[2px] group-data-[side=left]:wu-right-4 group-data-[side=right]:wu-left-0 sm:wu-flex`,`[[data-side=left]_&]:wu-cursor-w-resize [[data-side=right]_&]:wu-cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:wu-cursor-e-resize [[data-side=right][data-state=collapsed]_&]:wu-cursor-w-resize`,`group-data-[collapsible=offcanvas]:wu-translate-x-0 group-data-[collapsible=offcanvas]:after:wu-left-full`,`[[data-side=left][data-collapsible=offcanvas]_&]:wu-right-2`,`[[data-side=right][data-collapsible=offcanvas]_&]:wu-left-2`,e),...t})});jm.displayName=`SidebarRail`;var Mm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`main`,{ref:n,className:z(`wu-relative wu-flex wu-w-full wu-flex-1 wu-flex-col`,`md:peer-data-[variant=inset]:wu-m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:wu-ml-2 md:peer-data-[variant=inset]:wu-ml-0 md:peer-data-[variant=inset]:wu-rounded-xl md:peer-data-[variant=inset]:wu-shadow`,e),...t}));Mm.displayName=`SidebarInset`;var Nm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(hm,{ref:n,"data-sidebar":`input`,className:z(`wu-h-8 wu-w-full wu-shadow-none focus-visible:wu-ring-2`,e),...t}));Nm.displayName=`SidebarInput`;var Pm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`div`,{ref:n,"data-sidebar":`header`,className:z(`wu-flex wu-flex-col wu-gap-2 wu-p-2`,e),...t}));Pm.displayName=`SidebarHeader`;var Fm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`div`,{ref:n,"data-sidebar":`footer`,className:z(`wu-flex wu-flex-col wu-gap-2 wu-pb-2`,e),...t}));Fm.displayName=`SidebarFooter`;var Im=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(gm,{ref:n,"data-sidebar":`separator`,className:z(`wu-mx-2 wu-w-auto`,e),...t}));Im.displayName=`SidebarSeparator`;var Lm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`div`,{ref:n,"data-sidebar":`content`,className:z(`wu-flex wu-min-h-0 wu-flex-1 wu-flex-col wu-gap-2 wu-overflow-auto group-data-[collapsible=icon]:wu-overflow-hidden`,e),...t}));Lm.displayName=`SidebarContent`;var Rm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`div`,{ref:n,"data-sidebar":`group`,className:z(`wu-relative wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-p-2`,e),...t}));Rm.displayName=`SidebarGroup`;var zm=R.forwardRef(({className:e,asChild:t=!1,...n},r)=>(0,a.jsx)(t?d.Slot:`div`,{ref:r,"data-sidebar":`group-label`,className:z(`wu-flex wu-h-8 wu-shrink-0 wu-items-center wu-rounded-md wu-px-2 wu-text-xs wu-font-medium wu-outline-none wu-transition-[margin,opacity] wu-duration-150 wu-ease-linear focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0`,`group-data-[collapsible=icon]:wu-opacity-0`,e),...n}));zm.displayName=`SidebarGroupLabel`;var Bm=R.forwardRef(({className:e,asChild:t=!1,...n},r)=>(0,a.jsx)(t?d.Slot:`button`,{ref:r,"data-sidebar":`group-action`,className:z(`wu-absolute wu-right-3 wu-top-3.5 wu-flex wu-aspect-square wu-w-5 wu-items-center wu-justify-center wu-rounded-md wu-p-0 wu-outline-none wu-transition-transform focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0`,`after:wu-absolute after:wu-inset-2 after:md:wu-hidden`,`group-data-[collapsible=icon]:wu-hidden`,e),...n}));Bm.displayName=`SidebarGroupAction`;var Vm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`div`,{ref:n,"data-sidebar":`group-content`,className:z(`wu-w-full wu-text-sm`,e),...t}));Vm.displayName=`SidebarGroupContent`;var Hm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`ul`,{ref:n,"data-sidebar":`menu`,className:z(`wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-gap-1`,e),...t}));Hm.displayName=`SidebarMenu`;var Um=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`li`,{ref:n,"data-sidebar":`menu-item`,className:z(`wu-group/menu-item wu-relative`,e),...t}));Um.displayName=`SidebarMenuItem`;var Wm=(0,f.cva)(`wu-peer/menu-button wu-flex wu-w-full wu-items-center wu-gap-2 wu-overflow-hidden wu-rounded-md wu-p-2 wu-text-left wu-text-sm wu-outline-none wu-transition-[width,height,padding] focus-visible:wu-ring-2 disabled:wu-pointer-events-none disabled:wu-opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:wu-pr-8 aria-disabled:wu-pointer-events-none aria-disabled:wu-opacity-50 data-[active=true]:wu-font-medium group-data-[collapsible=icon]:!wu-size-8 group-data-[collapsible=icon]:!wu-p-2 [&>span:last-child]:wu-truncate [&>svg]:wu-size-4 [&>svg]:wu-shrink-0`,{variants:{variant:{default:``,outline:``},size:{default:`wu-h-8 wu-text-sm`,sm:`wu-h-7 wu-text-xs`,lg:`wu-h-12 wu-text-sm group-data-[collapsible=icon]:!wu-p-0`}},defaultVariants:{variant:`default`,size:`default`}}),Gm=R.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:i,className:o,...s},c)=>{let l=e?d.Slot:`button`,{isMobile:u,state:f}=Dm(),p=(0,a.jsx)(l,{ref:c,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:z(Wm({variant:n,size:r}),o),...s});return i?(typeof i==`string`&&(i={children:i}),(0,a.jsxs)(qe,{children:[(0,a.jsx)(Je,{asChild:!0,children:p}),(0,a.jsx)(Ye,{side:`right`,align:`center`,hidden:f!==`collapsed`||u,...i})]})):p});Gm.displayName=`SidebarMenuButton`;var Km=R.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},i)=>(0,a.jsx)(t?d.Slot:`button`,{ref:i,"data-sidebar":`menu-action`,className:z(`wu-absolute wu-right-1 wu-top-1.5 wu-flex wu-aspect-square wu-w-5 wu-items-center wu-justify-center wu-rounded-md wu-p-0 wu-outline-none wu-transition-transform focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0`,`after:wu-absolute after:wu-inset-2 after:md:wu-hidden`,`peer-data-[size=sm]/menu-button:wu-top-1`,`peer-data-[size=default]/menu-button:wu-top-1.5`,`peer-data-[size=lg]/menu-button:wu-top-2.5`,`group-data-[collapsible=icon]:wu-hidden`,n&&`group-focus-within/menu-item:wu-opacity-100 group-hover/menu-item:wu-opacity-100 data-[state=open]:wu-opacity-100 md:wu-opacity-0`,e),...r}));Km.displayName=`SidebarMenuAction`;var qm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`div`,{ref:n,"data-sidebar":`menu-badge`,className:z(`wu-pointer-events-none wu-absolute wu-right-1 wu-flex wu-h-5 wu-min-w-5 wu-select-none wu-items-center wu-justify-center wu-rounded-md wu-px-1 wu-text-xs wu-font-medium wu-tabular-nums`,``,`peer-data-[size=sm]/menu-button:wu-top-1`,`peer-data-[size=default]/menu-button:wu-top-1.5`,`peer-data-[size=lg]/menu-button:wu-top-2.5`,`group-data-[collapsible=icon]:wu-hidden`,e),...t}));qm.displayName=`SidebarMenuBadge`;var Jm=R.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{let i=R.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,a.jsxs)(`div`,{ref:r,"data-sidebar":`menu-skeleton`,className:z(`wu-flex wu-h-8 wu-items-center wu-gap-2 wu-rounded-md wu-px-2`,e),...n,children:[t&&(0,a.jsx)(_m,{className:`wu-rounded-md wu-size-4`,"data-sidebar":`menu-skeleton-icon`}),(0,a.jsx)(_m,{className:`wu-h-4 wu-max-w-[--skeleton-width] wu-flex-1`,"data-sidebar":`menu-skeleton-text`,style:{"--skeleton-width":i}})]})});Jm.displayName=`SidebarMenuSkeleton`;var Ym=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`ul`,{ref:n,"data-sidebar":`menu-sub`,className:z(`wu-mx-3.5 wu-flex wu-min-w-0 wu-translate-x-px wu-flex-col wu-gap-1 wu-border-l wu-px-2.5 wu-py-0.5`,`group-data-[collapsible=icon]:wu-hidden`,e),...t}));Ym.displayName=`SidebarMenuSub`;var Xm=R.forwardRef(({...e},t)=>(0,a.jsx)(`li`,{ref:t,...e}));Xm.displayName=`SidebarMenuSubItem`;var Zm=R.forwardRef(({asChild:e=!1,size:t=`md`,isActive:n,className:r,...i},o)=>(0,a.jsx)(e?d.Slot:`a`,{ref:o,"data-sidebar":`menu-sub-button`,"data-size":t,"data-active":n,className:z(`wu-flex wu-h-7 wu-min-w-0 wu-translate-x-px wu-items-center wu-gap-2 wu-overflow-hidden wu-rounded-md wu-px-2 wu-outline-none focus-visible:wu-ring-2 disabled:wu-pointer-events-none disabled:wu-opacity-50 aria-disabled:wu-pointer-events-none aria-disabled:wu-opacity-50 [&>span:last-child]:wu-truncate [&>svg]:wu-size-4 [&>svg]:wu-shrink-0`,`data-[active=true]:wu-bg-sidebar-accent data-[active=true]:wu-text-sidebar-accent-foreground`,t===`sm`&&`wu-text-xs`,t===`md`&&`wu-text-sm`,`group-data-[collapsible=icon]:wu-hidden`,r),...i}));Zm.displayName=`SidebarMenuSubButton`;function Qm(e){let{open:t,defaultOpen:r,onOpenChange:i,disabled:a}=e,[o,s]=mr({controlled:t,default:r,name:`Collapsible`,state:`open`}),{mounted:c,setMounted:l,transitionStatus:u}=pr(o,!0,!0),d=on(),[f,p]=n.useState(),m=f??d,h=q(e=>{let t=!o,n=Er(vr,e.nativeEvent);i(t,n),!n.isCanceled&&s(t)});return n.useMemo(()=>({disabled:a,handleTrigger:h,mounted:c,open:o,panelId:m,setMounted:l,setOpen:s,setPanelIdState:p,transitionStatus:u}),[a,h,c,o,m,l,s,p,u])}var $m=n.createContext(void 0);process.env.NODE_ENV!==`production`&&($m.displayName=`CollapsibleRootContext`);function eh(){let e=n.useContext($m);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?Et(15):`Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.`);return e}var th=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=sr.startingStyle]=`startingStyle`,e[e.endingStyle=sr.endingStyle]=`endingStyle`,e}({}),nh=function(e){return e.panelOpen=`data-panel-open`,e}({}),rh={[th.open]:``},ih={[th.closed]:``},ah={open(e){return e?{[nh.panelOpen]:``}:null}},oh={open(e){return e?rh:ih},...ur},sh=n.forwardRef(function(e,t){let{render:r,className:i,defaultOpen:o=!1,disabled:s=!1,onOpenChange:c,open:l,style:u,...d}=e,f=q(c),p=Qm({open:l,defaultOpen:o,onOpenChange:f,disabled:s}),m=n.useMemo(()=>({open:p.open,disabled:p.disabled,transitionStatus:p.transitionStatus}),[p.open,p.disabled,p.transitionStatus]),h=n.useMemo(()=>({...p,onOpenChange:f,state:m}),[p,f,m]),g=zn(`div`,e,{state:m,ref:t,props:d,stateAttributesMapping:oh});return(0,a.jsx)($m.Provider,{value:h,children:g})});process.env.NODE_ENV!==`production`&&(sh.displayName=`CollapsibleRoot`);var ch=n.createContext(void 0);process.env.NODE_ENV!==`production`&&(ch.displayName=`CompositeRootContext`);function lh(e=!1){let t=n.useContext(ch);if(t===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?Et(16):`Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.`);return t}function uh(e){let{focusableWhenDisabled:t,disabled:r,composite:i=!1,tabIndex:a=0,isNativeButton:o}=e,s=i&&t!==!1,c=i&&t===!1;return{props:n.useMemo(()=>{let e={onKeyDown(e){r&&t&&e.key!==`Tab`&&e.preventDefault()}};return i||(e.tabIndex=a,!o&&r&&(e.tabIndex=t?a:-1)),(o&&(t||s)||!o&&r)&&(e[`aria-disabled`]=r),o&&(!t||c)&&(e.disabled=r),e},[i,r,t,s,c,o,a])}}function dh(e={}){let{disabled:t=!1,focusableWhenDisabled:r,tabIndex:i=0,native:a=!0,composite:o}=e,s=n.useRef(null),c=lh(!0),l=o??c!==void 0,{props:u}=uh({focusableWhenDisabled:r,disabled:t,composite:l,tabIndex:i,isNativeButton:a});process.env.NODE_ENV!==`production`&&n.useEffect(()=>{if(!s.current)return;let e=fh(s.current);a?e||er(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${vt.captureOwnerStack?.()||``}`):e&&er(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${vt.captureOwnerStack?.()||``}`)},[a]);let d=n.useCallback(()=>{let e=s.current;fh(e)&&l&&t&&u.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,u.disabled,l]);return J(d,[d]),{getButtonProps:n.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:i,onKeyDown:o,onPointerDown:s,...c}=e;return Vt({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(Qt(e),o?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,i=e.currentTarget,s=fh(i),c=!a&&ph(i),u=r&&(a?s:!c),d=e.key===`Enter`,f=e.key===` `,p=i.getAttribute(`role`),m=p?.startsWith(`menuitem`)||p===`option`||p===`gridcell`;if(r&&l&&f){if(e.defaultPrevented&&m)return;e.preventDefault(),c||a&&s?(i.click(),e.preventBaseUIHandler()):u&&(n?.(e),e.preventBaseUIHandler());return}u&&(!a&&(f||d)&&e.preventDefault(),!a&&d&&n?.(e))},onKeyUp(e){if(!t){if(Qt(e),i?.(e),e.target===e.currentTarget&&a&&l&&fh(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!a&&!l&&e.key===` `&&n?.(e)}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},a?{type:`button`}:{role:`button`},u,c)},[t,u,l,a]),buttonRef:q(e=>{s.current=e,d()})}}function fh(e){return fn(e)&&e.tagName===`BUTTON`}function ph(e){return!!(e?.tagName===`A`&&e?.href)}var mh={...ah,...ur},hh=n.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=eh(),{className:s,disabled:c=o,id:l,render:u,nativeButton:d=!0,style:f,...p}=e,{getButtonProps:m,buttonRef:h}=dh({disabled:c,focusableWhenDisabled:!0,native:d});return zn(`button`,e,{state:a,ref:[t,h],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},p,m],stateAttributesMapping:mh})});process.env.NODE_ENV!==`production`&&(hh.displayName=`CollapsibleTrigger`);function gh(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function _h(e){let t=bt(vh,e).current;return t.next=e,J(t.effect),t}function vh(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var yh={height:void 0,width:void 0};function bh(e){let{externalRef:t,hiddenUntilFound:r,id:i,keepMounted:a,mounted:o,onOpenChange:s,open:c,setMounted:l,setOpen:u,transitionStatus:d}=e,f=n.useRef(null),p=n.useRef(null),[m,h]=n.useState(yh),g=n.useRef(yh),_=n.useRef(!1),v=n.useRef(c),y=n.useRef(!1),[b,x]=n.useState(!1),S=n.useRef(null),C=Tn(t,f),w=_h({mounted:o,open:c}),T=dr(f,!1,!1),E=!c&&!o,D=b?`idle`:d,O=c&&(v.current||y.current),k=!c&&o&&p.current===`css-animation`&&m.height===void 0&&m.width===void 0?g.current:m,A=r&&E&&p.current!==`css-animation`,j=q((e,t=!0)=>{t&&(g.current=e),h(e)}),M=q(()=>{S.current?.(),S.current=null}),N=q(e=>{M(),S.current=()=>{S.current=null,e()}}),P=q(()=>{c&&o&&p.current===`css-animation`&&(y.current=!0)});J(()=>{!b||d===`starting`||x(!1)},[b,d]),n.useEffect(()=>()=>{P(),M()},[P,M]),J(()=>{let e=f.current;if(!e)return;!c&&S.current&&M();let t=Sh(e,O);if(p.current=t,c&&d===`idle`&&v.current&&t===`css-animation`){g.current=xh(e);return}if(c&&d===`starting`){let n=_.current;if(_.current=!1,t===`none`){j(xh(e)),x(!0);return}if(t===`css-transition`){let t=Th(e);return j(xh(e)),n?(N(wh(e,`transition-duration`,`0s`)),x(!0),t):t}if(t===`css-animation`){if(j(xh(e)),!n){wh(e,`animation-name`,`none`)();return}let t=wh(e,`animation-name`,`none`),r=wh(e,`animation-duration`,`0s`);t(),N(r),x(!0);return}}if(!c&&o&&(d===`idle`||d===`starting`)){if(t===`none`){j(yh,!1),l(!1);return}t===`css-animation`&&(v.current=!1,y.current=!1),j(xh(e));return}if(d!==`ending`)return;if(t===`none`){l(!1);return}let n=xh(e);if(!((n.height??0)>0||(n.width??0)>0)){l(!1);return}j(n),t===`css-animation`&&wh(e,`animation-name`,`none`)()},[o,c,M,j,l,N,O,d]),fr({enabled:c&&o&&D===`idle`,open:!0,ref:f,onComplete(){c&&j(yh,!1)}}),n.useEffect(()=>{if(c||!o||D!==`ending`||!f.current)return;let e=new AbortController,t=-1;function n(){w.current.open||(l(!1),j(yh,!1))}return t=ir.request(()=>{e.signal.aborted||T(n,e.signal)}),()=>{ir.cancel(t),e.abort()}},[w,o,c,D,T,j,l]),J(()=>{let e=f.current;!e||!r||!E||e.setAttribute(`hidden`,`until-found`)},[E,r]),n.useEffect(function(){let e=f.current;if(!e)return;function t(e){_.current=!0,u(!0),s(!0,Er(_r,e))}return gh(e,`beforematch`,t)},[s,u]);let F=a||r||o||c;return{height:k.height,props:{...A?{[th.startingStyle]:``}:void 0,hidden:E,id:i},ref:C,shouldPreventOpenAnimation:O,shouldRender:F,transitionStatus:D,width:k.width}}function xh(e){return{height:e.scrollHeight,width:e.scrollWidth}}function Sh(e,t=!1){let n=un(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&Ch(n.animationDuration),i=Ch(n.transitionDuration);return r&&i?(process.env.NODE_ENV!==`production`&&Fn(`CSS transitions and CSS animations both detected on Collapsible or Accordion panel.`,`Only one of either animation type should be used.`),`css-transition`):i?`css-transition`:r?`css-animation`:`none`}function Ch(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function wh(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===``){e.style.removeProperty(t);return}e.style.setProperty(t,r,i)}}function Th(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{if(n===``){e.style.removeProperty(t);return}e.style.setProperty(t,n)})}let r=ir.request(n);return()=>{ir.cancel(r),n()}}var Eh=function(e){return e.collapsiblePanelHeight=`--collapsible-panel-height`,e.collapsiblePanelWidth=`--collapsible-panel-width`,e}({}),Dh=n.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,style:s,...c}=e;process.env.NODE_ENV!==`production`&&J(()=>{r&&i===!1&&Fn("The `keepMounted={false}` prop on `Collapsible.Panel` is ignored when `hiddenUntilFound` is enabled, since the panel must remain mounted while closed.")},[r,i]);let{mounted:l,onOpenChange:u,open:d,panelId:f,setMounted:p,setPanelIdState:m,setOpen:h,state:g,transitionStatus:_}=eh(),v=r??!1,y=i??!1;J(()=>{if(o)return m(o),()=>{m(void 0)}},[o,m]);let{height:b,props:x,ref:S,shouldPreventOpenAnimation:C,shouldRender:w,transitionStatus:T,width:E}=bh({externalRef:t,hiddenUntilFound:v,id:f,keepMounted:y,mounted:l,onOpenChange:u,open:d,setMounted:p,setOpen:h,transitionStatus:_}),D={...g,transitionStatus:T},O=Rn(s,D),k=zn(`div`,{...e,style:void 0},{state:D,ref:S,props:[x,{style:{[Eh.collapsiblePanelHeight]:b===void 0?`auto`:`${b}px`,[Eh.collapsiblePanelWidth]:E===void 0?`auto`:`${E}px`}},c,O?{style:O}:void 0,C?{style:{animationName:`none`}}:void 0],stateAttributesMapping:oh});return w?k:null});process.env.NODE_ENV!==`production`&&(Dh.displayName=`CollapsiblePanel`);var Oh=({children:e,Sidebar:t,className:n,defaultOpen:r=!0,open:i,onOpenChange:o,style:s})=>(0,a.jsxs)(Om,{defaultOpen:r,open:i,onOpenChange:o,children:[(0,a.jsxs)(km,{variant:`sidebar`,collapsible:`icon`,className:z(`wu-top-12 wu-h-[calc(100%-48px)] wu-shadow-sidebar wu-border-none`,n),style:s,role:`complementary`,children:[(0,a.jsx)(Pm,{className:`wu-py-2`,children:(0,a.jsx)(kh,{})}),t]}),(0,a.jsx)(Mm,{className:`wu-contain-inline-size`,children:e})]}),kh=e=>{let{state:t,isMobile:n,openMobile:r}=Dm();return(0,a.jsx)(Am,{...e,children:(0,a.jsx)(Tp,{showMenu:n?r:t===`expanded`})})},Ah=({className:e,children:t,...n})=>{let r=(0,R.useRef)(null),i=(0,R.useRef)(null),o=({currentTarget:e})=>{let{scrollTop:t,clientHeight:n,scrollHeight:a}=e;r.current&&r.current.classList.toggle(`wu-border-[#1b338014]`,t!==0),i.current&&i.current.classList.toggle(`wu-border-[#1b338014]`,t+n!==a)},s=`wu-w-[calc(100%-16px)] wu-mx-auto wu-border-transparent`;return(0,a.jsxs)(Lm,{...n,className:z(`wu-overflow-hidden wu-gap-0`,e),children:[(0,a.jsx)(`hr`,{className:s,ref:r}),(0,a.jsx)($f,{onScroll:o,className:`wu-gap-2`,thumbColor:`#b9c3dc`,railColor:`#00000000`,"data-testid":`scroll-area`,children:t}),(0,a.jsx)(`hr`,{className:s,ref:i})]})},jh=e=>(0,a.jsx)(Fm,{...e,children:e.children}),Mh=({label:e,children:t,...n})=>(0,a.jsxs)(Rm,{...n,className:`wu-p-0`,children:[(0,a.jsx)(`div`,{className:`wu-h-8`,children:(0,a.jsx)(zm,{className:`wu-items-end wu-px-4 wu-text-xs wu-font-normal wu-leading-4 wu-text-blue-q`,children:e})}),(0,a.jsx)(Vm,{children:(0,a.jsx)(Hm,{children:t})})]}),Nh=e=>(0,a.jsx)(Hm,{...e}),Ph=({Icon:e,children:t,className:n,isActive:r,...i})=>{let{state:o}=Dm(),[s,c]=R.default.useState(),l=ym(),u=R.default.isValidElement(t)?R.default.cloneElement(t,{children:(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-overflow-hidden wu-text-base wu-truncate wu-text-ellipsis`,children:[(0,a.jsx)(`div`,{className:`wu-relative wu-right-1`,children:e}),(0,a.jsx)(`span`,{className:z(`wu-text-sm wu-leading-4 wu-transition-opacity wu-duration-150`,o===`collapsed`&&!l&&`wu-opacity-0`),children:t.props?.children})]})}):t&&(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-overflow-hidden wu-text-base wu-truncate wu-text-ellipsis`,children:[(0,a.jsx)(`div`,{className:`wu-relative wu-right-1`,children:e}),(0,a.jsx)(`span`,{className:z(`wu-text-sm wu-leading-4 wu-transition-opacity wu-duration-150`,o===`collapsed`&&!l&&`wu-opacity-0`),children:t})]}),d=(0,R.useRef)(null);return R.default.useEffect(()=>{c(d.current?.textContent||``)},[]),(0,a.jsx)(Um,{...i,className:`wu-flex wu-items-center wu-gap-2 wu-px-2`,children:(0,a.jsx)(Gm,{className:z(`wu-flex wu-items-center wu-text-blue-q hover:wu-bg-blue-sidebarHover wu-cursor-pointer wu-h-8 wu-rounded-sm`,n,r&&`wu-bg-white wu-shadow-[4px_4px_16px_0_#1B338014] wu-font-medium wu-text-blue-p hover:wu-bg-white wu-cursor-default`),isActive:r,tooltip:s,asChild:R.default.isValidElement(t),ref:d,children:u})})},Fh=({Title:e,Icon:t,children:n,className:r,...i})=>{let{state:o}=Dm(),s=ym();return(0,a.jsxs)(sh,{children:[(0,a.jsx)(hh,{render:n=>{let r=`data-panel-open`in n;return(0,a.jsxs)(Ph,{Icon:t,...n,children:[e,(o===`expanded`||s)&&(0,a.jsx)(Pe,{icon:`wm-arrow-forward-ios`,className:z(`wu-absolute wu-right-4 wu-transition-transform wu-duration-300`,r&&`wu-rotate-90`,`wu-scale-75`)})]})}}),(0,a.jsx)(Dh,{className:z(o===`collapsed`?``:`wu-pl-2`,`wu-h-[var(--collapsible-panel-height)] wu-overflow-hidden`,`wu-transition-all wu-duration-300 wu-ease-in-out`,`data-[starting-style]:wu-h-0 data-[ending-style]:wu-h-0`,`[&[hidden]:not([hidden="until-found"])]:wu-hidden`,r),...i,children:n})]})},Ih=new Map([[-3,{top:-20,left:-4,zIndex:-1,opacity:0,transition:`all 0.3s ease-in-out, z-index 0s`,position:`absolute`}],[-2,{top:0,left:0,zIndex:1,opacity:1,transition:`all 0.3s ease-in-out, z-index 0s`,position:`absolute`}],[-1,{top:20,left:4,zIndex:2,opacity:1,transition:`all 0.3s ease-in-out, z-index 0s`,position:`absolute`}],[0,{top:40,left:8,zIndex:3,opacity:1,transition:`all 0.3s ease-in-out, z-index 0.10s`,position:`absolute`}],[1,{left:12,zIndex:4,opacity:1,transition:`all 0.3s ease-in-out, z-index 0.3s 0.10s`,position:`absolute`}],[2,{left:16,zIndex:5,opacity:1,transition:`all 0.3s ease-in-out, z-index 0.3s 0.10s`,position:`absolute`}],[3,{left:20,zIndex:-1,opacity:0,transition:`all 0.3s ease-in-out, z-index 0.3s 0.10s`,position:`absolute`}]]),Lh=(e,t,n=1)=>{let r=e.match(/hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*([\d.]+)\s*)?\)/);if(!r)throw Error(`Invalid HSL color format`);return`hsl(${parseFloat(r[1])} ${parseFloat(r[2])}% ${Math.max(0,parseFloat(r[3])+t)}% / ${n})`},Rh=({index:e,viewIndex:t,length:n,itemHeight:r})=>{let i=(e-t+n)%n,a;a=i===0?0:i===n-1&&n>=2?-1:i===n-2&&n>=3?-2:i===1?1:i===2?2:i===n-3&&n>=4?-3:3;let o=Ih.get(a)||{},s=a>0?r+28+(a-1)*20:o.top;return{position:a,styles:{...o,...a>0&&{top:`${s}px`},height:a>0?`32px`:r}}},zh={LIGHTNESS_STEP:8,BORDER_LIGHTNESS:10,CONTENT_LIGHTNESS:45,CONTENT_HEIGHT:`calc(100% - 2rem)`,FONT_SIZE_ACTIVE:`14px`,FONT_SIZE_INACTIVE:`12px`,HEADER_HEIGHT:`2rem`},Bh=({children:e,className:t,header:n,baseColor:r,position:i=0,style:o,...s})=>{let c=i<=0,l=i===0,u={border:l?`4px solid ${Lh(r,zh.BORDER_LIGHTNESS)}`:``,...o},d={backgroundColor:Lh(r,i*zh.LIGHTNESS_STEP),fontSize:l?zh.FONT_SIZE_ACTIVE:zh.FONT_SIZE_INACTIVE,transition:`all 0.3s ease`,position:`relative`,bottom:i<0?`4px`:`0px`,height:`32px`,padding:`4px 8px`},f={backgroundColor:Lh(r,45+i*6),height:zh.CONTENT_HEIGHT,position:`relative`,bottom:i<0?`4px`:`0px`};return(0,a.jsxs)(`div`,{className:z(`wu-font-normal wu-transition-all wu-rounded-lg wu-overflow-hidden wu-w-full wu-cursor-pointer hover:-wu-translate-y-2`,t),style:u,...s,children:[(0,a.jsx)(`div`,{style:d,className:`wu-text-white`,children:n}),c&&(0,a.jsx)(`div`,{className:`wu-p-2 wu-overflow-y-auto wu-text-sm`,style:f,children:e})]})},Vh=({children:e,Trigger:t,Header:n,styles:r={},classNames:i={},open:o,onOpenChange:s,itemHeight:c})=>{let l={height:c,...r.Trigger};return(0,a.jsxs)(Dp,{open:o,onOpenChange:s,children:[(0,a.jsx)(Op,{className:z(`wu-bg-gray-25 wu-z-0 wu-w-full wu-rounded-lg wu-rounded-tl-none wu-relative`,i.Trigger),style:l,children:(0,a.jsx)(`span`,{className:`wu-absolute wu-text-xs wu-font-medium wu-bg-gray-25 -wu-top-6 wu-left-0 wu-p-1 wu-rounded-t-lg`,children:t})}),(0,a.jsxs)(Mp,{className:z(`wu-top-[50%] wu-left-[50%] wu-bg-black/75 wu-backdrop-blur-[4px] wu-min-h-full wu-overflow-auto wu-shadow-none wu-max-w-none wu-border-none wu-text-white`,i.Content),hideCloseButton:!0,isStackedCard:!0,style:r.Content,children:[(0,a.jsx)(Fp,{}),(0,a.jsx)(y.DialogClose,{className:z(`wu-absolute wu-right-2 wu-top-2 wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-z-10`,i.CloseButton),style:r.CloseButton,"aria-label":`Close dialog`,children:(0,a.jsx)(Pe,{icon:`wm-close`,className:`wu-text-lg wu-m-4 wu-cursor-pointer`})}),n&&(0,a.jsx)(Np,{className:z(`wu-h-12 wu-p-2 wu-pl-4 wu-bg-white/25 wu-backdrop-blur-[24px]`,i.Header),style:r.Header,children:n}),e]})]})};function Hh(){let[,e]=n.useState({});return n.useCallback(()=>{e({})},[])}var Uh={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Wh={...Uh,position:`fixed`,top:0,left:0},Gh={...Uh,position:`absolute`},Kh=n.createContext(void 0);process.env.NODE_ENV!==`production`&&(Kh.displayName=`NumberFieldRootContext`);function qh(){let e=n.useContext(Kh);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?Et(43):`Base UI: NumberFieldRootContext is missing. NumberField parts must be placed within <NumberField.Root>.`);return e}var Jh={inputValue:()=>null,value:()=>null,...Nt},Yh=new Map;function Xh(e,t){let n=JSON.stringify({locale:e,options:t}),r=Yh.get(n);if(r)return r;let i=new Intl.NumberFormat(e,t);return Yh.set(n,i),i}function Zh(e,t,n){return e==null?``:Xh(t,n).format(e)}function Qh(e,t,n){return Zh(e,t,{...n,maximumFractionDigits:20})}var $h=[`零`,`〇`,`一`,`二`,`三`,`四`,`五`,`六`,`七`,`八`,`九`],eg={零:`0`,〇:`0`,一:`1`,二:`2`,三:`3`,四:`4`,五:`5`,六:`6`,七:`7`,八:`8`,九:`9`},tg=[`٠`,`١`,`٢`,`٣`,`٤`,`٥`,`٦`,`٧`,`٨`,`٩`],ng=[`۰`,`۱`,`۲`,`۳`,`۴`,`۵`,`۶`,`۷`,`۸`,`۹`],rg=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],ig=[`%`,`٪`,`%`,`﹪`],ag=[`‰`,`؉`],og=[`−`,`-`,`‒`,`–`,`—`,`﹣`],sg=[`+`,`﹢`],cg=RegExp(`[${tg.join(``)}]`,`g`),lg=RegExp(`[${ng.join(``)}]`,`g`),ug=RegExp(`[${rg.join(``)}]`,`g`),dg=RegExp(`[${$h.join(``)}]`,`g`),fg=RegExp(`[${ig.join(``)}]`),pg=RegExp(`[${ag.join(``)}]`),mg=/[٠١٢٣٤٥٦٧٨٩]/,hg=/[۰۱۲۳۴۵۶۷۸۹]/,gg=/[零〇一二三四五六七八九]/,_g=RegExp(`[${rg.join(``)}]`),vg=[`.`,`,`,`.`,`,`,`٫`,`٬`],yg=/\p{Zs}/u,bg=[`+`,...sg],xg=[`-`,...og],Sg=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),Cg=e=>e.replace(/[-\\\]^]/g,e=>`\\${e}`),wg=e=>`[${e.map(Cg).join(``)}]`,Tg=wg([`-`].concat(og)),Eg=wg([`+`].concat(sg)),Dg=new RegExp(Tg,`gu`),Og=new RegExp(Eg,`gu`),kg=new RegExp(Tg),Ag=new RegExp(Eg);function jg(e,t){let n=Xh(e,t).formatToParts(11111.1),r={};return n.forEach(e=>{r[e.type]=e.value}),Xh(e).formatToParts(.1).forEach(e=>{e.type===`decimal`&&(r[e.type]=e.value)}),r}function Mg(e,t,n){if(e==null)return null;let r=String(e).replace(/\p{Cf}/gu,``).trim();r=r.replace(Dg,`-`).replace(Og,`+`);let i=!1,a=r.match(/([+-])\s*$/);a&&(a[1]===`-`&&(i=!0),r=r.replace(/([+-])\s*$/,``));let o=r.match(/^\s*([+-])/);o&&(o[1]===`-`&&(i=!0),r=r.replace(/^\s*[+-]/,``));let s=t;s===void 0&&(mg.test(r)||hg.test(r)?s=`ar`:gg.test(r)&&(s=`zh`));let{group:c,decimal:l,currency:u}=jg(s,n),d=Xh(s,n).formatToParts(1).filter(e=>e.type===`unit`).map(e=>Sg(e.value)),f=d.length?new RegExp(d.join(`|`),`g`):null,p=null;c&&(p=/\p{Zs}/u.test(c)?/\p{Zs}/gu:c===`'`||c===`’`?/['’]/g:new RegExp(Sg(c),`g`));let m=[{regex:c?p:null,replacement:``},{regex:l?new RegExp(Sg(l),`g`):null,replacement:`.`},{regex:/./g,replacement:`.`},{regex:/,/g,replacement:``},{regex:/٫/g,replacement:`.`},{regex:/٬/g,replacement:``},{regex:u?new RegExp(Sg(u),`g`):null,replacement:``},{regex:f,replacement:``},{regex:cg,replacement:e=>String(tg.indexOf(e))},{regex:lg,replacement:e=>String(ng.indexOf(e))},{regex:ug,replacement:e=>String(rg.indexOf(e))},{regex:dg,replacement:e=>eg[e]}].reduce((e,{regex:t,replacement:n})=>t?e.replace(t,n):e,r),h=m.lastIndexOf(`.`);if(h!==-1&&(m=`${m.slice(0,h).replace(/\./g,``)}.${m.slice(h+1).replace(/\./g,``)}`),/^[-+]?Infinity$/i.test(r)||/[∞]/.test(r))return null;let g=(i?`-`:``)+m,_=parseFloat(g),v=n?.style,y=v===`unit`&&n?.unit===`percent`,b=fg.test(e)||v===`percent`;return pg.test(e)?_/=1e3:!y&&b&&(_/=100),Number.isNaN(_)?null:_}function Ng(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var Pg=1e-10;function Fg(e){let t=Xh(`en-US`).resolvedOptions(),n=e?.minimumFractionDigits??t.minimumFractionDigits??0;return{maximumFractionDigits:Math.max(e?.maximumFractionDigits??t.maximumFractionDigits??20,n),minimumFractionDigits:n}}function Ig(e,t){if(!Number.isFinite(e))return e;let n=Math.min(Math.max(t,0),20);return Number(e.toFixed(n))}function Lg(e,t){let{maximumFractionDigits:n}=Fg(t);return Ig(e,n)}function Rg(e,t,n,r=`directional`){if(n===0)return e;let i=Math.abs(n),a=Math.sign(n),o=i*Pg*a,s=r===`nearest`?n:i,c=(e-t+o)/s,l;return l=r===`nearest`?Math.round(c):a>0?Math.floor(c):Math.ceil(c),t+l*(r===`nearest`?n:i)}function zg(e,{step:t,minWithDefault:n,maxWithDefault:r,minWithZeroDefault:i,format:a,snapOnStep:o,small:s,clamp:c}){if(e===null)return e;let l=c?Ng(e,n,r):e;if(t!=null&&o){if(t===0)return Lg(l,a);let e=i;return!s&&n!==-(2**53-1)&&(e=n),Lg(Rg(l,e,t,s?`nearest`:`directional`),a)}return Lg(l,a)}var Bg=n.forwardRef(function(e,t){let{id:r,min:i,max:o,smallStep:s=.1,step:c=1,largeStep:l=10,required:u=!1,disabled:d=!1,readOnly:f=!1,form:p,name:m,defaultValue:h,value:g,onValueChange:_,onValueCommitted:v,allowWheelScrub:y=!1,snapOnStep:b=!1,allowOutOfRange:x=!1,format:S,locale:C,render:w,className:T,inputRef:E,style:D,...O}=e,{setDirty:k,validityData:A,disabled:j,setFilled:M,invalid:N,name:P,state:F,validation:I,shouldValidateOnChange:ee}=It(),L=j||d,te=P??m,R=c===`any`?1:c,[ne,z]=n.useState(!1),B=i??-(2**53-1),V=o??2**53-1,re=i??0,ie=S?.style,ae=n.useRef(null),oe=Tn(E,I.inputRef),se=pn({id:r}),[ce,le]=mr({controlled:g,default:h,name:`NumberField`,state:`value`}),H=ce??null,ue=_h(H);J(()=>{M(H!==null)},[M,H]);let de=Hh(),U=_h(S),fe=n.useRef(!1),pe=q((e,t)=>{fe.current=!1,v?.(e,t)}),me=n.useRef(!0),he=n.useRef(null),[ge,_e]=n.useState(()=>g===void 0?Zh(H,C,S):Vg(H,C,S)),[ve,ye]=n.useState(`numeric`),be=q(()=>{let{decimal:e,group:t,currency:n,literal:r}=jg(C,S),i=new Set;vg.forEach(e=>i.add(e)),e&&i.add(e),t&&(i.add(t),yg.test(t)&&i.add(` `));let a=ie===`percent`||ie===`unit`&&S?.unit===`percent`,o=ie===`percent`||ie===`unit`&&S?.unit===`permille`;return a&&ig.forEach(e=>i.add(e)),o&&ag.forEach(e=>i.add(e)),ie===`currency`&&n&&i.add(n),r&&(Array.from(r).forEach(e=>i.add(e)),yg.test(r)&&i.add(` `)),bg.forEach(e=>i.add(e)),B<0&&xg.forEach(e=>i.add(e)),i}),W=q(e=>e?.altKey?s:e?.shiftKey?l:R),xe=q((e,t)=>{let n=t.event,r=t.direction,i=t.reason,a=!x||!(i===`input-change`||i===`input-blur`||i===`input-paste`||i===`input-clear`||i===`none`),o=zg(e,{step:r?W(n)*r:void 0,format:U.current,minWithDefault:B,maxWithDefault:V,minWithZeroDefault:re,snapOnStep:b,small:n?.altKey??!1,clamp:a}),s=t.reason===`input-change`||t.reason===`input-clear`||t.reason===`input-blur`||t.reason===`input-paste`||t.reason===`none`,c=o!==H||s&&(e!==H||me.current===!1);if(c){if(he.current=o,_?.(o,t),t.isCanceled)return c;le(o),k(o!==A.initialValue),fe.current=!0}return me.current&&_e(Zh(o,C,S)),de(),c}),Se=q((e,{direction:t,currentValue:n,event:r,reason:a})=>{let o=n??ue.current;return xe(typeof o==`number`?o+e*t:Math.max(0,i??0),Er(a,r,void 0,{direction:t}))});J(function(){if(!me.current)return;let e=g===void 0?Zh(H,C,S):Vg(H,C,S);e!==ge&&_e(e)}),J(function(){if(!yn)return;let e=`text`;B>=0&&(e=`decimal`),ye(e)},[B,ie]),n.useEffect(function(){let e=ae.current;if(L||f||!y||!e)return;function t(e){e.ctrlKey||Cn(mn(ae.current))!==ae.current||(e.preventDefault(),me.current=!0,Se(W(e)??1,{direction:e.deltaY>0?-1:1,event:e,reason:`wheel`}))}return gh(e,`wheel`,t)},[y,Se,L,f,W]);let Ce=n.useMemo(()=>({...F,disabled:L,readOnly:f,required:u,value:H,inputValue:ge,scrubbing:ne}),[F,L,f,u,H,ge,ne]),we=n.useMemo(()=>({inputRef:ae,inputValue:ge,value:H,minWithDefault:B,maxWithDefault:V,disabled:L,readOnly:f,id:se,setValue:xe,incrementValue:Se,getStepAmount:W,allowInputSyncRef:me,formatOptionsRef:U,valueRef:ue,lastChangedValueRef:he,hasPendingCommitRef:fe,name:te,required:u,invalid:N,inputMode:ve,getAllowedNonNumericKeys:be,min:i,max:o,setInputValue:_e,locale:C,isScrubbing:ne,setIsScrubbing:z,state:Ce,onValueCommitted:pe}),[ae,ge,H,B,V,L,f,se,xe,Se,W,U,ue,te,u,N,ve,be,i,o,_e,C,ne,Ce,pe]),Te=zn(`div`,e,{ref:t,state:Ce,props:O,stateAttributesMapping:Jh});return(0,a.jsxs)(Kh.Provider,{value:we,children:[Te,(0,a.jsx)(`input`,{...I.getInputValidationProps({onFocus(){ae.current?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||L||f){e.preventBaseUIHandler?.();return}let t=e.currentTarget.valueAsNumber,n=Number.isNaN(t)?null:t,r=Er(_r,e.nativeEvent);k(n!==A.initialValue),xe(n,r),ee()&&I.commit(n)}}),ref:oe,type:`number`,form:p,name:te,value:H??``,min:i,max:o,step:c,disabled:L,required:u,"aria-hidden":!0,tabIndex:-1,style:te?Gh:Wh,suppressHydrationWarning:!0})]})});process.env.NODE_ENV!==`production`&&(Bg.displayName=`NumberFieldRoot`);function Vg(e,t,n){return n?.maximumFractionDigits!=null||n?.minimumFractionDigits!=null?Zh(e,t,n):Qh(e,t,n)}var Hg=n.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=qh();return zn(`div`,e,{ref:t,state:o,props:[{role:`group`},a],stateAttributesMapping:Jh})});process.env.NODE_ENV!==`production`&&(Hg.displayName=`NumberFieldGroup`);var Ug=0,Wg=class e extends Zn{static create(){return new e}start(e,t){this.clear(),this.currentId=setInterval(()=>{t()},e)}clear=()=>{this.currentId!==Ug&&(clearInterval(this.currentId),this.currentId=Ug)}};function Gg(){let e=bt(Wg.create).current;return Yn(e.disposeEffect),e}var Kg=60,qg=400,Jg=8,Yg=50,Xg=3;function Zg(e){return e===`touch`||e===`pen`}function Qg(e){let{disabled:t,readOnly:r=!1,tick:i,onStop:a,tickDelay:o=Kg,startDelay:s=qg,scrollDistance:c=Jg,elementRef:l}=e,u=Qn(),d=Gg(),f=Qn(),p=n.useRef(!1),m=n.useRef(0),h=n.useRef({x:0,y:0}),g=n.useRef(!1),_=n.useRef(!1),v=n.useRef(``),y=n.useRef(()=>{}),b=q(()=>{f.clear(),u.clear(),d.clear(),y.current(),m.current=0});function x(e){b();let t=l.current;if(!t)return;let n=un(t);function r(e){e.preventDefault()}if(y.current=gh(n,`contextmenu`,r),gh(n,`pointerup`,e=>{p.current=!1,b(),a?.(e)},{once:!0}),!i(e)){b();return}u.start(s,()=>{d.start(o,()=>{i(e)||b()})})}return n.useEffect(()=>()=>b(),[b]),{pointerHandlers:{onTouchStart(){g.current=!0},onTouchEnd(){g.current=!1},onPointerDown(e){let n=!e.button||e.button===0;e.defaultPrevented||!n||t||r||(v.current=e.pointerType,_.current=!1,p.current=!0,h.current={x:e.clientX,y:e.clientY},Zg(e.pointerType)?f.start(Yg,()=>{let t=m.current;m.current=0,p.current&&t<Xg?(x(e.nativeEvent),_.current=!0):(_.current=!1,b())}):(e.preventDefault(),x(e.nativeEvent)))},onPointerUp(e){Zg(e.pointerType)&&(p.current=!1)},onPointerMove(e){if(t||r||!Zg(e.pointerType)||!p.current)return;m.current!=null&&(m.current+=1);let{x:n,y:i}=h.current,a=n-e.clientX,o=i-e.clientY;a**2+o**2>c**2&&b()},onMouseEnter(e){e.defaultPrevented||t||r||!p.current||g.current||Zg(v.current)||x(e.nativeEvent)},onMouseLeave(){g.current||b()},onMouseUp(){g.current||b()}},shouldSkipClick:q(e=>e.defaultPrevented?!0:Zg(v.current)?_.current:e.detail!==0)}}function $g(e){return e===`touch`||e===`pen`}function e_(e){let{allowInputSyncRef:t,disabled:n,formatOptionsRef:r,getStepAmount:i,id:a,incrementValue:o,inputRef:s,inputValue:c,isIncrement:l,locale:u,readOnly:d,setValue:f,valueRef:p,lastChangedValueRef:m,onValueCommitted:h}=e,g=l?yr:br;function _(e){t.current=!0;let n=Mg(c,u,r.current);n!==null&&(p.current=n,f(n,Er(g,e,void 0,{direction:l?1:-1})))}let{pointerHandlers:v,shouldSkipClick:y}=Qg({disabled:n||d,elementRef:s,tickDelay:60,startDelay:400,scrollDistance:8,tick(e){return o(i(e)??1,{direction:l?1:-1,event:e,reason:g})},onStop(e){h(m.current??p.current,Dr(g,e))}});return{disabled:n,"aria-readonly":d||void 0,"aria-label":l?`Increase`:`Decrease`,"aria-controls":a,tabIndex:-1,style:{WebkitUserSelect:`none`,userSelect:`none`},...v,onClick(e){let t=n||d;if(e.defaultPrevented||t||y(e))return;_(e.nativeEvent);let r=i(e)??1,a=p.current;o(r,{direction:l?1:-1,event:e.nativeEvent,reason:g});let s=m.current??p.current;s!==a&&h(s,Dr(g,e.nativeEvent))},onPointerDown(e){let t=!e.button||e.button===0;e.defaultPrevented||d||!t||n||(_(e.nativeEvent),$g(e.pointerType)||s.current?.focus(),v.onPointerDown(e))}}}var t_=n.forwardRef(function(e,t){let{render:r,className:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{allowInputSyncRef:l,disabled:u,formatOptionsRef:d,getStepAmount:f,id:p,incrementValue:m,inputRef:h,inputValue:g,locale:_,maxWithDefault:v,readOnly:y,setValue:b,state:x,value:S,valueRef:C,lastChangedValueRef:w,onValueCommitted:T}=qh(),E=a||u||S!=null&&S>=v,D=e_({isIncrement:!0,inputRef:h,inputValue:g,disabled:E,readOnly:y,id:p,setValue:b,getStepAmount:f,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:d,valueRef:C,locale:_,lastChangedValueRef:w,onValueCommitted:T}),{getButtonProps:O,buttonRef:k}=dh({disabled:E,native:o,focusableWhenDisabled:!0}),A=n.useMemo(()=>({...x,disabled:E}),[x,E]);return zn(`button`,e,{ref:[t,k],state:A,props:[D,c,O],stateAttributesMapping:Jh})});process.env.NODE_ENV!==`production`&&(t_.displayName=`NumberFieldIncrement`);var n_=n.forwardRef(function(e,t){let{render:r,className:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{allowInputSyncRef:l,disabled:u,formatOptionsRef:d,getStepAmount:f,id:p,incrementValue:m,inputRef:h,inputValue:g,minWithDefault:_,readOnly:v,setValue:y,state:b,value:x,valueRef:S,locale:C,lastChangedValueRef:w,onValueCommitted:T}=qh(),E=a||u||x!=null&&x<=_,D=e_({isIncrement:!1,inputRef:h,inputValue:g,disabled:E,readOnly:v,id:p,setValue:y,getStepAmount:f,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:d,valueRef:S,locale:C,lastChangedValueRef:w,onValueCommitted:T}),{getButtonProps:O,buttonRef:k}=dh({disabled:E,native:o,focusableWhenDisabled:!0}),A=n.useMemo(()=>({...b,disabled:E}),[b,E]);return zn(`button`,e,{ref:[t,k],state:A,props:[D,c,O],stateAttributesMapping:Jh})});process.env.NODE_ENV!==`production`&&(n_.displayName=`NumberFieldDecrement`);function r_(e,t){let r=n.useRef(e),i=q(t);J(()=>{r.current!==e&&i(r.current)},[e,i]),J(()=>{r.current=e},[e])}var i_={...Nt,...Jh},a_=new Set([`Backspace`,`Delete`,`ArrowLeft`,`ArrowRight`,`Tab`,`Enter`,`Escape`]),o_=n.forwardRef(function(e,t){let{render:r,className:i,style:a,...o}=e,{allowInputSyncRef:s,disabled:c,formatOptionsRef:l,getAllowedNonNumericKeys:u,getStepAmount:d,id:f,incrementValue:p,inputMode:m,inputValue:h,max:g,min:_,name:v,readOnly:y,required:b,setValue:x,state:S,setInputValue:C,locale:w,inputRef:T,value:E,onValueCommitted:D,lastChangedValueRef:O,hasPendingCommitRef:k,valueRef:A}=qh(),{clearErrors:j}=Rt(),{validationMode:M,setTouched:N,setFocused:P,invalid:F,shouldValidateOnChange:I,validation:ee}=It(),{labelId:L}=cn(),te=n.useRef(!1),R=n.useRef(!1);return gr(T,f,E),r_(E,e=>{let t=I();if(j(v),t&&ee.commit(E),!(e===E||t)){if(R.current){R.current=!1;return}ee.commit(E,!0)}}),zn(`input`,e,{ref:[t,T],state:S,props:[{id:f,required:b,disabled:c,readOnly:y,inputMode:m,value:h,type:`text`,autoComplete:`off`,autoCorrect:`off`,spellCheck:`false`,"aria-roledescription":`Number field`,"aria-invalid":F||void 0,"aria-labelledby":L,suppressHydrationWarning:!0,onFocus(e){if(e.defaultPrevented||y||c||(P(!0),te.current))return;te.current=!0;let t=e.currentTarget,n=t.value.length;t.setSelectionRange(n,n)},onBlur(e){if(e.defaultPrevented||y||c)return;N(!0),P(!1);let t=!s.current,n=k.current;if(s.current=!0,h.trim()===``){x(null,Er(Sr,e.nativeEvent)),M===`onBlur`&&ee.commit(null),D(null,Dr(Sr,e.nativeEvent));return}let r=l.current,i=Mg(h,w,r);if(i===null)return;let a=r?.maximumFractionDigits!=null||r?.minimumFractionDigits!=null,o=r?.maximumFractionDigits,u=a&&typeof o==`number`?Number(i.toFixed(o)):i,d=Dr(Cr,e.nativeEvent),f=E!==u,p=t||f||n;M===`onBlur`&&ee.commit(u),f&&(R.current=!0,x(u,Er(Cr,e.nativeEvent))),p&&D(u,d);let m=Zh(u,w,r);!(!a&&i===E&&h===Qh(i,w,r))&&h!==m&&C(m)},onChange(e){if(e.nativeEvent.defaultPrevented)return;s.current=!1;let t=e.currentTarget.value;if(t.trim()===``){C(t),x(null,Er(Sr,e.nativeEvent));return}let n=u();if(!Array.from(t).every(e=>{let t=e>=`0`&&e<=`9`,r=mg.test(e),i=gg.test(e),a=hg.test(e),o=_g.test(e),s=kg.test(e);return t||r||i||a||o||s||n.has(e)}))return;let r=Mg(t,w,l.current);C(t),r!==null&&x(r,Er(xr,e.nativeEvent))},onKeyDown(e){if(e.defaultPrevented||y||c)return;let t=e.nativeEvent;s.current=!0;let n=u(),r=n.has(e.key),{decimal:i,currency:a,percentSign:o}=jg(w,l.current),f=e.currentTarget.selectionStart,m=e.currentTarget.selectionEnd,v=f===0&&m===h.length,b=e=>f!=null&&m!=null&&e>=f&&e<m;if(kg.test(e.key)&&Array.from(n).some(e=>kg.test(e||``))){let e=h.search(Dg),t=e!=null&&e!==-1&&b(e);r=!(kg.test(h)||Ag.test(h))||v||t}if(Ag.test(e.key)&&Array.from(n).some(e=>Ag.test(e||``))){let e=h.search(Og),t=e!=null&&e!==-1&&b(e);r=!(kg.test(h)||Ag.test(h))||v||t}[i,a,o].forEach(t=>{if(e.key===t){let e=b(h.indexOf(t));r=!h.includes(t)||v||e}});let S=e.key>=`0`&&e.key<=`9`,C=mg.test(e.key),T=gg.test(e.key),E=hg.test(e.key),k=_g.test(e.key),j=a_.has(e.key);if(e.which===229||e.altKey||e.ctrlKey||e.metaKey||r||S||C||k||T||E||j)return;let M=Mg(h,w,l.current),N=d(e)??1;wn(e);let P=Dr(Tr,t);e.key===`ArrowUp`?(p(N,{direction:1,currentValue:M,event:t,reason:Tr}),D(O.current??A.current,P)):e.key===`ArrowDown`?(p(N,{direction:-1,currentValue:M,event:t,reason:Tr}),D(O.current??A.current,P)):e.key===`Home`&&_!=null?(x(_,Er(Tr,t)),D(O.current??A.current,P)):e.key===`End`&&g!=null&&(x(g,Er(Tr,t)),D(O.current??A.current,P))},onPaste(e){if(e.defaultPrevented||y||c)return;e.preventDefault();let t=(e.clipboardData||window.Clipboard).getData(`text/plain`),n=Mg(t,w,l.current);n!==null&&(s.current=!1,x(n,Er(wr,e.nativeEvent)),C(t))}},ee.getValidationProps(),o],stateAttributesMapping:i_})});process.env.NODE_ENV!==`production`&&(o_.displayName=`NumberFieldInput`);var s_={wuStepper:`_wuStepper_apbnq_1`},c_=({onChange:e,Label:t,defaultValue:n=0,readonly:r,dir:i,step:o=1,min:s,max:c,value:l,className:u,labelPosition:d=`left`,disabled:f,resetInvalidValueOnBlur:p=!0,...m})=>{let h=R.useId(),[g,_]=R.useState(l===void 0?n||0:Number(l));R.useEffect(()=>{l!==void 0&&_(Number(l))},[l]);let v=t=>{_(t),e?.(t)},y=e=>{let t=Number(e.target.value);Number.isNaN(t)||_(t)},b=()=>{p&&(s!==void 0&&g<s?(_(s),e?.(s)):c!==void 0&&g>c&&(_(c),e?.(c)))};R.useEffect(()=>{l&&n&&console.warn(`As both value and defaultValue are passed, value will be used`)},[l,n]);let x={inc:r||c!==void 0&&g>=c||f,dec:r||s!==void 0&&g<=s||f},S=s!==void 0&&g<s||c!==void 0&&g>c,C=z(`wu-flex wu-items-center wu-justify-center wu-rounded-none wu-bg-gray-10 wu-w-8 wu-h-8 wu-text-blue-q wu-p-2 wu-absolute wu-top-0 hover:wu-bg-gray-20`,`disabled:wu-cursor-not-allowed disabled:wu-bg-black/10 disabled:wu-text-gray-subtle disabled:wu-outline-gray-subtle`);return(0,a.jsxs)(Bg,{id:h,value:g,step:o,readOnly:r,onValueChange:e=>typeof e==`number`&&v(e),dir:i,className:z(`wu-flex wu-stepper`,i===`rtl`&&d!==`top`&&`wu-gap-2`,s_.wuStepper,l_({labelPosition:d}),u),children:[t&&(0,a.jsx)(K,{htmlFor:h,className:`wu-input-label`,children:t}),(0,a.jsxs)(Hg,{className:`wu-flex wu-max-w-[97px] wu-relative`,children:[(0,a.jsx)(n_,{"aria-label":`decrement`,className:z(C,i===`rtl`?`wu-right-0`:`wu-left-0`,`wu-stepper-button`),disabled:x.dec,children:(0,a.jsx)(`span`,{className:`wu-text-base wm-minimize`})}),(0,a.jsx)(o_,{"aria-label":`stepper`,role:`spinbutton`,type:`text`,"aria-invalid":S||void 0,dir:i,className:z(`wu-flex wu-w-[97px] wu-h-8 wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-p-2 wu-text-sm wu-font-normal wu-text-gray-lead`,`wu-h-[33px] wu-text-center wu-text-blue-q wu-text-xs wu-rounded-t-sm `,`focus:wu-border-blue-p focus-visible:wu-outline-none wu-transition-colors hover:wu-border-gray-40`,`disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle`,`read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle`,S&&`wu-border-red-deep focus:wu-border-red-deep`,`wu-stepper-input`),readOnly:r,onChange:y,onBlur:b,disabled:f,min:s,max:c,step:o,value:g,...m}),(0,a.jsx)(t_,{"aria-label":`increment`,className:z(C,i===`rtl`?`wu-left-0`:`wu-right-0`,`wu-stepper-button`),disabled:x.inc,children:(0,a.jsx)(`span`,{className:`wu-text-base wm-add`})})]})]})},l_=(0,f.cva)(`wu-flex wu-w-fit`,{variants:{labelPosition:{left:`wu-flex-row wu-text-right wu-gap-2 wu-items-center`,top:`wu-flex-col`}}}),u_={container:`_container_1cpdq_1`,sidebar:`_sidebar_1cpdq_5`,content:`_content_1cpdq_13`,sourceWrapper:`_sourceWrapper_1cpdq_17`,menuItem:`_menuItem_1cpdq_21`,list:`_list_1cpdq_25`,listItem:`_listItem_1cpdq_29`,listItemActive:`_listItemActive_1cpdq_42`,label:`_label_1cpdq_46`,icon:`_icon_1cpdq_50`,sharedWrapper:`_sharedWrapper_1cpdq_54`,emptyState:`_emptyState_1cpdq_64`},d_=R.default.memo(({className:e,label:t=`Shared surveys`,...n})=>(0,a.jsxs)(`button`,{className:z(u_.sharedWrapper,e),"data-slot":`survey-select-shared`,"aria-label":t,...n,children:[(0,a.jsx)(`span`,{className:`wm-share`,"aria-hidden":`true`}),(0,a.jsx)(`span`,{children:t})]}));d_.displayName=`WuSharedSurvey`;var f_=(e,t=!1)=>{if(e)return(0,a.jsx)(`span`,{className:u_.icon,"aria-hidden":`true`,children:e});let n=t?`wm-folder-supervised`:`wm-folder`;return(0,a.jsx)(`span`,{className:z(u_.icon,n),"aria-hidden":`true`})},p_=R.default.memo(({children:e,icon:t,isActive:n,isShared:r,className:i,...o})=>(0,a.jsxs)(`button`,{className:z(u_.listItem,n&&u_.listItemActive,i),"aria-selected":n,"data-slot":`survey-select-item`,type:`button`,...o,children:[f_(t,r),(0,a.jsx)(`span`,{className:u_.label,children:e})]}));p_.displayName=`WuSurveyItem`;var m_=R.default.memo(({children:e,className:t,...n})=>(0,a.jsx)(`div`,{className:z(u_.list,t),...n,children:e}));m_.displayName=`WuSurveyList`;var h_=e=>{let{className:t,variant:n=`outlined`,...r}=e;return(0,a.jsx)(`div`,{className:u_.sourceWrapper,"data-slot":`survey-select-source`,children:(0,a.jsx)(wp,{variant:n,showGroupSeparator:!0,className:z(u_.source,t),...r})})};h_.displayName=`WuSurveySource`;var g_=R.default.memo(h_),__=R.default.memo(({Sidebar:e,children:t,className:n,...r})=>(0,a.jsxs)(`div`,{className:z(u_.container,n),role:`region`,"aria-label":`Survey selection interface`,"data-slot":`survey-select`,...r,children:[e&&(0,a.jsx)(`div`,{className:u_.sidebar,role:`complementary`,"aria-label":`Survey sidebar`,"data-slot":`survey-select-sidebar`,children:e}),(0,a.jsx)(`div`,{className:u_.content,"aria-label":`Survey content`,"data-slot":`survey-select-content`,children:t})]}));__.displayName=`WuSurveySelect`;var v_=(0,f.cva)(`wu-inline-flex wu-items-center wu-justify-center wu-text-sm wu-font-medium wu-ring-offset-background wu-transition-colors hover:wu-bg-muted hover:wu-text-muted-foreground focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-2 disabled:wu-cursor-not-allowed disabled:wu-opacity-80`,{variants:{variant:{default:`wu-bg-transparent`,outline:`wu-border wu-border-input wu-bg-transparent hover:wu-bg-accent hover:wu-text-accent-foreground`},size:{default:`wu-h-10 wu-px-3`,sm:`wu-h-9 wu-px-2.5`,lg:`wu-h-11 wu-px-5`}},defaultVariants:{variant:`default`,size:`default`}}),y_=R.forwardRef(({className:e,variant:t,size:n,...r},i)=>(0,a.jsx)(w.Root,{ref:i,className:z(v_({variant:t,size:n,className:e})),...r}));y_.displayName=w.Root.displayName;var b_=R.createContext({size:`default`,variant:`default`}),x_=R.forwardRef(({className:e,variant:t,size:n,children:r,...i},o)=>(0,a.jsx)(C.Root,{ref:o,className:z(`wu-flex wu-items-center wu-justify-center wu-gap-1`,e),...i,children:(0,a.jsx)(b_.Provider,{value:{variant:t,size:n},children:r})}));x_.displayName=C.Root.displayName;var S_=R.forwardRef(({className:e,children:t,variant:n,size:r,...i},o)=>{let s=R.useContext(b_);return(0,a.jsx)(C.Item,{ref:o,className:z(v_({variant:s.variant||n,size:s.size||r}),e),...i,children:t})});S_.displayName=C.Item.displayName;var C_=R.default.forwardRef((e,t)=>{let{options:n,value:r,disabled:i,dir:o,onChange:s}=e,c=e=>z(`wu-w-8 wu-h-8 wu-text-xl wu-leading-5 wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-p-0 wu-flex wu-items-center wu-justify-center`,i&&`wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead`,e===r&&`wu-text-white`,i&&r===e&&`wu-text-gray-lead`,`wu-switcher-icon-tab-item`);return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(x_,{ref:t,type:`single`,value:r,onValueChange:s,disabled:i,dir:o,className:z(`wu-relative wu-group wu-flex wu-flex-row wu-items-start wu-justify-start wu-gap-0 wu-w-16 wu-bg-gray-25 wu-rounded-full`,i&&`wu-cursor-not-allowed`,`wu-switcher-icon-tab-group`),children:[(0,a.jsx)(`div`,{role:`slider`,className:z(`wu-absolute wu-z-0 wu-w-8 wu-h-8 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out`,r===`opt1`&&``,r===`opt2`&&o!==`rtl`&&`wu-translate-x-full`,r===`opt2`&&o===`rtl`&&`-wu-translate-x-full`,i&&`wu-bg-gray-40`,`wu-switcher-icon-tab-slider`)}),(0,a.jsx)(S_,{value:`opt1`,className:c(`opt1`),children:n[0].label}),(0,a.jsx)(S_,{value:`opt2`,className:c(`opt2`),children:n[1].label})]})})});C_.displayName=`_IconTab`;var w_=R.default.forwardRef((e,t)=>{let{options:n,value:r,disabled:i,dir:o,size:s=`md`,onChange:c}=e,l=e=>z(`wu-w-1/2 wu-text-xs wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-font-normal`,i&&`wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead`,s===`sm`&&`wu-h-6 wu-min-w-20`,s===`md`&&`wu-h-8 wu-min-w-28`,s===`lg`&&`wu-h-10 wu-min-w-36`,e===r&&`wu-text-white wu-font-medium`,i&&r===e&&`wu-text-gray-lead`,`wu-switcher-tab-item`);return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(x_,{ref:t,type:`single`,value:r,onValueChange:c,disabled:i,dir:o,className:z(`wu-relative group wu-flex wu-flex-row wu-items-start wu-justify-start wu-gap-0 wu-w-fit wu-bg-gray-25 wu-rounded-full`,i&&`wu-cursor-not-allowed`,`wu-switcher-tab-group`),children:[(0,a.jsx)(`div`,{role:`slider`,className:z(`wu-absolute wu-z-0 wu-w-1/2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out `,s===`sm`&&`wu-h-6 wu-min-w-20`,s===`md`&&`wu-h-8 wu-min-w-28`,s===`lg`&&`wu-h-10 wu-min-w-36`,r===`opt1`&&``,r===`opt2`&&o!==`rtl`&&`wu-translate-x-full`,r===`opt2`&&o===`rtl`&&`-wu-translate-x-full`,i&&`wu-bg-gray-40`,`wu-switcher-tab-slider`)}),(0,a.jsx)(S_,{value:`opt1`,className:l(`opt1`),children:(0,a.jsx)(`div`,{className:`wu-min-w-16 wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap`,children:n[0].label})}),(0,a.jsx)(S_,{value:`opt2`,className:l(`opt2`),children:(0,a.jsx)(`div`,{className:`wu-min-w-16 wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap`,children:n[1].label})})]})})});w_.displayName=`_Tab`;var T_=R.default.forwardRef((e,t)=>{let{options:n,value:r,disabled:i,dir:o,onChange:s}=e,c=e=>z(`wu-p-0 wu-w-fit wu-text-xs wu-text-gray-lead wu-h-fit wu-font-normal`,i&&`wu-cursor-not-allowed data-[state=on]:wu-text-gray-subtle wu-text-gray-subtle`,e===r&&`wu-text-primary wu-font-medium`,i&&r===e&&`wu-text-gray-lead`,`wu-switcher-toggle-item`),l=z(`wu-w-fit wu-gap-2`,i&&`wu-cursor-not-allowed`,`wu-switcher-toggle-group`),u=z(`wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-3 wu-p-0 wu-border wu-rounded-full wu-cursor-pointer wu-border-blue-p focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2`,i&&`wu-border-gray-subtle wu-cursor-not-allowed`,`wu-switcher-toggle-button`),d=z(`wu-w-2 wu-h-2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out`,r===`opt1`&&o!==`rtl`&&`-wu-translate-x-[10px]`,r===`opt1`&&o===`rtl`&&`wu-translate-x-[10px]`,r===`opt2`&&o!==`rtl`&&`wu-translate-x-[10px]`,r===`opt2`&&o===`rtl`&&`-wu-translate-x-[10px]`,i&&`wu-hidden`,`wu-switcher-toggle-knob`);return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(x_,{ref:t,type:`single`,value:r,disabled:i,dir:o,className:l,onValueChange:s,children:[(0,a.jsx)(S_,{value:`opt1`,className:c(`opt1`),children:(0,a.jsx)(`div`,{className:`wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap wu-text-right wu-switcher-toggle-item-label`,children:n[0].label})}),(0,a.jsx)(`button`,{onClick:()=>s(r===`opt1`?`opt2`:`opt1`),className:u,disabled:i,"aria-label":`knob`,dir:o,children:(0,a.jsx)(`div`,{className:d,role:`knob`,dir:o})}),(0,a.jsx)(S_,{value:`opt2`,className:c(`opt2`),children:(0,a.jsx)(`div`,{className:`wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap wu-switcher-toggle-item-label`,children:n[1].label})})]})})});T_.displayName=`_Toggle`;var E_=R.default.forwardRef((e,t)=>{let{type:n,options:r,value:i,disabled:o,dir:s,size:c,onChange:l,toggle:u=!0,...d}=e,[f,p]=R.default.useState(),m=e=>{let t=f;e===``?u&&(t=f===`opt1`?`opt2`:`opt1`):t=e;let n=t===`opt1`?r[0].value:r[1].value;l&&l(n),p(t)};if(R.default.useEffect(()=>{if(!Array.isArray(r)||r.length<2)throw Error(`Options are not sufficient`);p(i===r[0].value?`opt1`:`opt2`)},[r,i]),!Array.isArray(r)||r.length<2)return(0,a.jsx)(a.Fragment,{});switch(n){case`toggle`:return(0,a.jsx)(T_,{...d,ref:t,options:r,value:f||`opt1`,onChange:m,disabled:o,dir:s});case`iconTab`:return(0,a.jsx)(C_,{ref:t,options:r,value:f||`opt1`,onChange:m,disabled:o,dir:s});default:return(0,a.jsx)(w_,{ref:t,options:r,value:f||`opt1`,onChange:m,disabled:o,dir:s,size:c})}});E_.displayName=`WuSwitcher`;var D_=T.Root,O_=R.forwardRef(({className:e,children:t,...n},r)=>(0,a.jsx)(T.List,{className:z(`wu-relative wu-flex`,e),...n,ref:r,children:t}));O_.displayName=T.List.displayName;var k_=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(T.Trigger,{ref:n,className:z(`wu-relative wu-inline-flex wu-items-center wu-whitespace-nowrap wu-text-xs wu-px-4 wu-py-2 wu-text-gray-600 wu-transition-colors wu-duration-200 data-[state=active]:wu-text-blue-p`,`data-[orientation=horizontal]:wu-justify-center`,e),...t}));k_.displayName=T.Trigger.displayName;var A_=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(T.Content,{ref:n,className:e,...t}));A_.displayName=T.Content.displayName;var j_=({items:e,enableAnimation:t})=>(0,a.jsx)(`div`,{className:z(`wu-w-full wu-h-full wu-flex-1 wu-overflow-auto`,t&&`wu-relative wu-overflow-hidden`,`wu-tab-content-container`),children:e.map(e=>(0,a.jsx)(A_,{value:e.value,forceMount:t||void 0,className:z(`wu-w-full wu-h-full wu-overflow-y-auto`,t&&`wu-duration-700 wu-ease-in-out wu-transition-all data-[state=inactive]:wu-absolute data-[state=inactive]:wu-inset-0 data-[state=inactive]:wu-opacity-0 data-[state=inactive]:wu-z-0 data-[state=active]:wu-relative data-[state=active]:wu-opacity-100 data-[state=active]:wu-z-10`,`wu-tab-content`),children:e.Content},e.value))}),M_=e=>{let[t,n]=(0,R.useState)(!1),[r,i]=(0,R.useState)(!1),a=()=>{let t=e.current;t&&(n(t.scrollLeft>0),i(t.scrollLeft+t.clientWidth<t.scrollWidth))};return(0,R.useEffect)(()=>{let t=e.current;return a(),t&&t.addEventListener(`scroll`,a),window.addEventListener(`resize`,a),()=>{t&&t.removeEventListener(`scroll`,a),window.removeEventListener(`resize`,a)}},[e]),{showLeftArrow:t,showRightArrow:r,scrollByTab:t=>{let n=e.current;if(n){let e=(t===`right`?n.clientWidth:-n.clientWidth)*.8;n.scrollBy({left:e,behavior:`smooth`})}}}},N_=(e,t)=>{let[n,r]=(0,R.useState)({width:0,left:0,height:0,top:0}),i=t===`vertical`;return(0,R.useEffect)(()=>{let t=e.current;if(t){let e=()=>{let e=t.querySelector(`[data-state="active"]`);e&&r({width:i?2:e.offsetWidth,left:i?0:e.offsetLeft,height:i?e.offsetHeight:1,top:i?e.offsetTop:0})},n=new MutationObserver(e);return n.observe(t,{attributes:!0,subtree:!0}),e(),()=>{n.disconnect()}}},[e,i]),n},P_=({items:e,value:t,defaultValue:n,onValueChange:r,enableAnimation:i=!1,className:o,dir:s=`ltr`,position:c=`top`})=>{let l=R.default.useRef(null),u=N_(l,`horizontal`),{showLeftArrow:d,showRightArrow:f,scrollByTab:p}=M_(l),[m,h]=R.default.useState(!1),g=()=>p(`left`),_=()=>p(`right`),v=e=>(0,a.jsx)(`div`,{"data-testid":`gradient-overlay-${e}`,className:z(`wu-absolute wu-top-0 wu-h-full wu-w-20 wu-z-10 wu-pointer-events-none`,e===`left`?`wu-left-0 wu-bg-gradient-to-r wu-from-white wu-to-transparent`:`wu-right-0 wu-bg-gradient-to-l wu-from-white wu-to-transparent`)}),y=(e,t,n)=>{let r=t===`left`;return(0,a.jsx)(`button`,{onClick:e,className:z(`wu-absolute wu-z-20 wu-flex wu-items-center wu-justify-center wu-px-1 wu-py-1 wu-transition-all wu-duration-300 wu-h-8`,r?`wu-left-0`:`wu-right-0`,n&&`wu-translate-x-0 wu-opacity-100`,!n&&[r?`-wu-translate-x-full`:`wu-translate-x-full`,`wu-opacity-0`]),"aria-label":r?`scroll-left`:`scroll-right`,children:(0,a.jsx)(`span`,{className:z(`wu-text-blue-p wu-text-lg`,r?`wm-keyboard-arrow-left`:`wm-keyboard-arrow-right`)})})};return(0,a.jsxs)(D_,{defaultValue:n||e[0]?.value,value:t,onValueChange:r,orientation:`horizontal`,dir:s,className:z(`wu-relative wu-flex wu-flex-col wu-w-full wu-h-full`,c===`bottom`?`wu-flex-col-reverse`:`wu-flex-col`,o),role:`tabs`,children:[(0,a.jsxs)(`div`,{className:`wu-relative wu-flex wu-overflow-hidden wu-shrink-0 wu-border-b wu-border-gray-200`,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),"aria-label":`tablistWrapper`,children:[d&&m&&v(`left`),y(g,`left`,d&&m),(0,a.jsxs)(O_,{ref:l,className:z(`wu-relative wu-flex wu-w-full wu-overflow-x-auto wu-flex-row`,`[&::-webkit-scrollbar]:wu-hidden [-ms-overflow-style:none] [scrollbar-width:none]`,`wu-tablist`),children:[e.map(e=>(0,a.jsx)(k_,{value:e.value,children:e.Trigger},e.value)),(0,a.jsx)(`span`,{className:`wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator wu-bottom-0`,style:{width:u.width,left:u.left,height:1.25,bottom:c===`bottom`?void 0:0,top:c===`bottom`?0:void 0}})]}),f&&m&&v(`right`),y(_,`right`,f&&m)]}),(0,a.jsx)(j_,{items:e,enableAnimation:i})]})},F_=e=>{let[t,n]=(0,R.useState)(!1),[r,i]=(0,R.useState)(!1),a=()=>{let t=e.current;t&&(n(t.scrollTop>0),i(t.scrollTop+t.clientHeight<t.scrollHeight))};return(0,R.useEffect)(()=>{let t=e.current;if(t)return a(),t.addEventListener(`scroll`,a),window.addEventListener(`resize`,a),()=>{t.removeEventListener(`scroll`,a),window.removeEventListener(`resize`,a)}},[e]),{showTopArrow:t,showBottomArrow:r,scrollByTab:t=>{let n=e.current;if(n){let e=(t===`down`?n.clientHeight:-n.clientHeight)*.8;n.scrollBy({top:e,behavior:`smooth`})}}}},I_=({items:e,value:t,defaultValue:n,onValueChange:r,enableAnimation:i=!1,className:o,dir:s=`ltr`,position:c=`left`})=>{let l=R.default.useRef(null),u=N_(l,`vertical`),{showTopArrow:d,showBottomArrow:f,scrollByTab:p}=F_(l),[m,h]=R.default.useState(!1),g=()=>p(`up`),_=()=>p(`down`),v=e=>(0,a.jsx)(`div`,{className:z(`wu-absolute wu-left-0 wu-w-full wu-h-12 wu-z-10 wu-pointer-events-none`,e===`top`?`wu-top-0 wu-bg-gradient-to-b wu-from-white wu-to-transparent`:`wu-bottom-0 wu-bg-gradient-to-t wu-from-white wu-to-transparent`)}),y=(e,t,n)=>{let r=t===`up`;return(0,a.jsx)(`button`,{onClick:e,className:z(`wu-absolute wu-z-20 wu-flex wu-items-center wu-justify-center wu-px-1 wu-py-1 wu-transition-all wu-duration-300 wu-w-full`,r?`-wu-top-1`:`-wu-bottom-1`,n&&`wu-translate-y-0 wu-opacity-100`,!n&&[r?`-wu-translate-y-full`:`wu-translate-y-full`,`wu-opacity-0`]),"aria-label":r?`scroll-up`:`scroll-down`,children:(0,a.jsx)(`span`,{className:z(`wu-text-blue-p wu-text-lg`,r?`wm-keyboard-arrow-up`:`wm-keyboard-arrow-down`)})})};return(0,a.jsxs)(D_,{defaultValue:n||e[0]?.value,value:t,onValueChange:r,orientation:`vertical`,dir:s,className:z(`wu-relative wu-h-full wu-w-full wu-flex`,c===`left`?`wu-flex-row`:`wu-flex-row-reverse`,o),role:`tabs`,children:[(0,a.jsxs)(`div`,{className:`wu-relative wu-flex wu-overflow-hidden wu-shrink-0`,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),"aria-label":`tablistWrapper`,children:[d&&m&&v(`top`),y(g,`up`,d&&m),(0,a.jsxs)(O_,{ref:l,className:z(`wu-relative wu-flex wu-h-full wu-overflow-y-auto wu-flex-col`,`[&::-webkit-scrollbar]:wu-hidden [-ms-overflow-style:none] [scrollbar-width:none]`,`wu-tablist`),children:[e.map(e=>(0,a.jsx)(k_,{value:e.value,children:e.Trigger},e.value)),(0,a.jsx)(`span`,{className:`wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator`,style:{width:2,left:c===`left`?0:void 0,right:c===`right`?0:void 0,height:u.height,top:u.top}})]}),f&&m&&v(`bottom`),y(_,`down`,f&&m)]}),(0,a.jsx)(j_,{items:e,enableAnimation:i})]})},L_=({...e})=>e.orientation===`vertical`?(0,a.jsx)(I_,{...e}):(0,a.jsx)(P_,{...e}),R_=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`table`,{ref:n,className:z(`wu-w-full wu-caption-bottom wu-text-sm`,e),...t}));R_.displayName=`Table`;var z_=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`thead`,{ref:n,className:z(`[&_tr]:wu-border-b`,e),...t}));z_.displayName=`TableHeader`;var B_=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`tbody`,{ref:n,className:z(``,e),...t}));B_.displayName=`TableBody`;var V_=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`tfoot`,{ref:n,className:z(`wu-border-t wu-bg-muted/50 wu-font-medium [&>tr]:last:wu-border-b-0`,e),...t}));V_.displayName=`TableFooter`;var H_=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`tr`,{ref:n,className:z(`wu-border-b wu-transition-colors wu-hover:wu-bg-muted/50 data-[state=selected]:wu-bg-muted`,e),...t}));H_.displayName=`TableRow`;var U_=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`th`,{ref:n,className:z(`wu-px-4 wu-text-left wu-align-middle wu-font-medium wu-text-muted-foreground [&:has([role=checkbox])]:wu-pr-0`,e),...t}));U_.displayName=`TableHead`;var W_=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`td`,{ref:n,className:z(`wu-p-4 wu-align-middle [&:has([role=checkbox])]:wu-pr-0`,e),...t}));W_.displayName=`TableCell`;var G_=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`caption`,{ref:n,className:z(`wu-mt-4 wu-text-sm wu-text-gray-subtle wu-font-normal`,e),...t}));G_.displayName=`TableCaption`;function K_(){let e=(0,R.useRef)(null),[t,n]=(0,R.useState)(!1),[r,i]=(0,R.useState)(!1),a=(0,R.useCallback)(()=>{let t=e.current;t&&(n(t.scrollLeft>12),i(t.scrollLeft<t.scrollWidth-t.clientWidth-1))},[]);return(0,R.useEffect)(()=>{a()},[a]),{scrollContainerRef:e,isScrolledLeft:t,isScrolledRight:r,handleScroll:a}}var q_=`expander`;function J_(e,t){return e?[{id:q_,accessorKey:q_,header:``,cell:({row:e})=>{let t=e.getIsExpanded();return(0,a.jsx)(`button`,{type:`button`,className:`wu-inline-flex wu-h-full wu-w-full wu-items-center wu-justify-center wu-text-[10px]`,onClick:()=>e.toggleExpanded(),"aria-label":t?`Collapse row`:`Expand row`,children:(0,a.jsx)(`span`,{className:z(`wm-arrow-forward-ios wu-transition-all`,t?`wu-rotate-90`:``)})})},enableSorting:!1,enableColumnFilter:!1,enableGlobalFilter:!1,enableHiding:!1,size:48},...t]:t}function Y_(e,t){return t.map(e=>e.columnDef?.expandableRowContent).find(e=>e)?.call(null,e)}function X_(e){let t=new Map,n=0;for(let r=0;r<e.length;r++){let i=e[r];if(i.columnDef.sticky!==`left`)continue;let a=e[r+1];t.set(i.id,{sticky:`left`,offset:n,isStickyEdge:!a||a.columnDef.sticky!==`left`}),n+=i.getSize()}let r=0;for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.columnDef.sticky!==`right`)continue;let a=e[n-1];t.set(i.id,{sticky:`right`,offset:r,isStickyEdge:!a||a.columnDef.sticky!==`right`}),r+=i.getSize()}return t}function Z_(e,t,n,r){return t?e===`left`&&n?(0,a.jsx)(`div`,{style:{position:`absolute`,top:0,right:-12,bottom:0,width:12,background:`linear-gradient(to right, rgba(115,115,115,0.12), transparent)`,pointerEvents:`none`}}):e===`right`&&r?(0,a.jsx)(`div`,{style:{position:`absolute`,top:0,left:-12,bottom:0,width:12,background:`linear-gradient(to left, rgba(115,115,115,0.12), transparent)`,pointerEvents:`none`}}):null:null}function Q_(e,t,n){return e===!0&&(!t||n>t)}function $_(e,t){let n=(0,E.flexRender)(t.cell,e.getContext());return e.column.id===`actions`?(0,a.jsx)(`div`,{className:`wu-opacity-0 wu-transition-opacity wu-duration-150 wu-ease-in-out group-hover:wu-opacity-100`,children:n}):n}var ev=({columns:e,rowSelection:t})=>{let n=t?.isEnabled??!1,r=t?.size??48,{onRowSelect:i,rowUniqueKey:o,isRowDisabled:s,hideSelectAll:c}=t||{},l=(0,R.useCallback)(e=>t=>{i?.(t?e:[])},[i]);return{finalColumns:(0,R.useMemo)(()=>n?[{id:`select`,header:({table:e})=>{let t=l(e.getRowModel().rows.map(e=>e.original).filter(e=>!s?.(e)));return c?(0,a.jsx)(`div`,{}):(0,a.jsx)(Xr,{checked:e.getIsSomeRowsSelected()||e.getIsAllRowsSelected(),partial:e.getIsSomeRowsSelected()&&!e.getIsAllRowsSelected(),onChange:n=>{e.toggleAllRowsSelected(!!n),t(!!n)},"aria-label":`Select all`,"data-testid":e.getIsSomeRowsSelected()&&!e.getIsAllRowsSelected()?`select-partial`:`select-all`})},cell:({row:e})=>{let t=s?.(e.original)??!1;return(0,a.jsx)(Xr,{checked:e.getIsSelected(),disabled:t,onChange:n=>{t||e.toggleSelected(!!n)},"aria-label":String(e.original[o])})},filterable:!1,accessorKey:`select`,size:r},...e]:e,[e,n,l,s,c])}};function tv({data:e,columns:t,rowSelection:n,isRowExpandable:r}){let[i,a]=(0,R.useState)({}),{finalColumns:o}=ev({columns:t,rowSelection:n}),s=(0,R.useMemo)(()=>{if(!n?.isEnabled)return{};let t={};for(let r of n.selectedRows){let i=e.findIndex(e=>e[n.rowUniqueKey]===r[n.rowUniqueKey]);i!==-1&&(t[i]=!0)}return t},[e,n]);return{finalColumns:o,rowSelectionState:s,sortableColumns:(0,R.useMemo)(()=>o.filter(e=>e.enableSorting).map(e=>e.accessorKey),[o]),selectedRowCount:n?.selectedRows?.length??0,columnsWithExpand:(0,R.useMemo)(()=>J_(r,o),[o,r]),expanded:i,setExpanded:a,handleRowSelectionChange:t=>{let r=typeof t==`function`?t(s):t,i=[],a=n?.isRowDisabled;for(let t in r){if(!r[t])continue;let n=e[Number(t)];n&&(a?.(n)||i.push(n))}n?.onRowSelect(i)}}}var nv=e=>z(`wu-group wu-border-b wu-border-black/[12%] [--wu-row-overlay:transparent]`,`data-[state=selected]:[--wu-row-overlay:rgb(var(--wu-blue-p)/0.08)]`,!e&&[`hover:[--wu-row-overlay:rgba(0,0,0,0.02)]`,`data-[state=selected]:hover:[--wu-row-overlay:rgb(var(--wu-blue-p)/0.16)]`]),rv=(e=`default`,t)=>z(`wu-py-0 wu-font-light wu-text-xs wu-bg-white`,`[background-image:linear-gradient(var(--wu-row-overlay),var(--wu-row-overlay))]`,e===`compact`?`wu-h-8`:`wu-h-10`,t===`right`&&`wu-text-right`,t===`center`&&`wu-text-center`,t===`left`&&`wu-text-left`),iv=(e=`default`)=>e===`compact`?`wu-h-8`:`wu-h-10`,av=e=>z({"wu-text-right":e===`right`,"wu-text-center":e===`center`,"wu-text-left":e===`left`}),ov=e=>z({"wu-justify-end":e===`right`,"wu-justify-center":e===`center`}),sv=(e,t)=>z(`wu-absolute -wu-bottom-[13px] wu-left-0 wm-arrow-drop-up wu-text-xl`,e&&`wu-hidden`,!t&&`-wu-bottom-[10px]`),cv=(e,t)=>z(`wu-absolute -wu-top-[15px] wu-left-0 wm-arrow-drop-down wu-text-xl`,e&&`wu-hidden`,!t&&`-wu-top-[11px]`),lv=({table:e,size:t,NoDataContent:n,isLoading:r,CustomLoader:i,isRowDisabled:o,isRowExpandable:s,isScrolledLeft:c,isScrolledRight:l})=>{let u=e.getVisibleLeafColumns(),d=u.length,f=e.getRowModel().rows,p=X_(u);return r?(0,a.jsx)(B_,{children:(0,a.jsx)(H_,{children:(0,a.jsx)(W_,{colSpan:d,className:`wu-text-center wu-h-[35vh] wu-loader-container`,children:i??(0,a.jsx)(ve,{className:`wu-w-full`})})})}):f.length?(0,a.jsx)(B_,{children:f.flatMap((n,r)=>{let i=o?.(n.original)??!1,u=n.getIsSelected(),f=n.getIsExpanded(),m=(0,a.jsx)(H_,{"data-disabled":i,"data-state":u&&`selected`,className:nv(i),"data-expanded":f,children:n.getVisibleCells().map((e,n)=>{let r=e.column.columnDef,i=p.get(e.column.id);return(0,a.jsxs)(W_,{className:z(rv(t,r.cellAlign),i&&`wu-sticky wu-z-[1]`),style:{width:`${e.column.getSize()}px`,...i&&{[i.sticky]:i.offset}},children:[$_(e,r),Z_(i?.sticky,i?.isStickyEdge??!1,c,l)]},`${e.id}-${n}`)})},`${n.id}-${r}`),h=s&&f?Y_(n,e.getVisibleLeafColumns()):null;return h?[m,(0,a.jsx)(H_,{"data-expanded":`true`,"data-state":u&&`selected`,children:(0,a.jsx)(W_,{colSpan:d,children:h})},`${n.id}-expanded-${r}`)]:[m]})}):(0,a.jsx)(B_,{children:(0,a.jsx)(H_,{children:(0,a.jsx)(W_,{colSpan:d,children:n})})})},uv=({table:e,sortableColumns:t,manual:n=!1,onSort:r,size:i,isRowSelected:o,HeaderAction:s,isStickyHeader:c,asVirtualContent:l=!1,isRowExpandable:u,isScrolledLeft:d,isScrolledRight:f})=>{let p=i===`compact`?`wu-h-8`:`wu-h-10`,m=e.getVisibleLeafColumns(),h=X_(m),g=e=>{let{id:i,columnDef:o,getIsSorted:s,toggleSorting:c}=e.column,l=o.headerAlign,u=(0,E.flexRender)(o.header,e.getContext());if(!t.includes(i))return u;let d=s(),f=d===`asc`,p=d===`desc`;return(0,a.jsxs)(`button`,{onClick:()=>{n?r?.({id:i,desc:e.column.getIsSorted()===`asc`}):c(e.column.getIsSorted()===`asc`)},"aria-label":`Sort by ${typeof o.header==`string`?o.header:i}`,className:z(`wu-flex wu-items-center wu-gap-1 wu-w-full`,ov(l)),children:[u,(0,a.jsxs)(`div`,{className:`wu-relative wu-flex-shrink-0 wu-w-4`,children:[(0,a.jsx)(`span`,{className:cv(f,!!d)}),(0,a.jsx)(`span`,{className:sv(p,!!d)})]})]})},_=e=>{let t=e.column.id===`actions`,n=h.get(e.column.id),r=n?{[n.sticky]:n.offset}:{};return t?(0,a.jsx)(U_,{colSpan:e.colSpan,className:z(`wu-text-xs wu-font-medium`,n&&`wu-sticky wu-z-[2] wu-bg-[#EEEEEE]`),style:{width:`${e.getSize()}px`,...r},children:Z_(n?.sticky,n?.isStickyEdge??!1,d,f)},e.id):(0,a.jsxs)(U_,{colSpan:e.colSpan,className:z(`wu-text-xs wu-font-medium wu-bg-[#EEEEEE]`,n?`wu-sticky wu-z-[2]`:`wu-relative wu-z-0`,av(e.column.columnDef.headerAlign)),style:{width:`${e.getSize()}px`,...r},children:[g(e),Z_(n?.sticky,n?.isStickyEdge??!1,d,f)]},e.id)},v=()=>e.getHeaderGroups().map(e=>(0,a.jsx)(H_,{className:`wu-relative`,children:e.headers.map(_)},e.id)),y=()=>(0,a.jsxs)(`div`,{className:z(`wu-flex wu-items-center wu-border-b wu-border-t wu-bg-gray-20`,p),children:[(0,a.jsx)(`div`,{className:z(`wu-flex wu-items-center wu-px-4`),style:{width:m[0]?.getSize(),marginLeft:u?48:void 0},children:(0,a.jsx)(Xr,{checked:e.getIsSomeRowsSelected()||e.getIsAllRowsSelected(),partial:e.getIsSomeRowsSelected()&&!e.getIsAllRowsSelected(),onChange:t=>e.toggleAllRowsSelected(!!t),"aria-label":`Select all`,"data-testid":`select-all-header-checkbox`})}),(0,a.jsx)(`div`,{className:`wu-flex-1 wu-flex wu-pr-4`,children:s})]}),b=o&&s;return l?(0,a.jsxs)(H_,{className:`wu-relative`,children:[(e.getHeaderGroups()[0]?.headers??[]).map(_),b&&(0,a.jsx)(U_,{colSpan:m.length,className:`wu-p-0 wu-absolute wu-top-0 wu-left-0 wu-right-0 wu-z-10`,children:y()})]}):(0,a.jsxs)(z_,{className:z(`wu-border-t wu-border-black/[12%] wu-bg-gray-20 wu-relative`,c&&`wu-sticky wu-top-[-.5px] wu-z-10`,p),children:[v(),b&&(0,a.jsx)(`div`,{className:z(`wu-absolute wu-top-[-1px] wu-left-0 wu-right-0 wu-flex wu-items-center wu-border-b wu-border-t wu-bg-gray-20 wu-z-10`,p),children:y()})]})},dv=R.default.forwardRef((e,t)=>(0,a.jsx)(B_,{...e,ref:t}));dv.displayName=`TableBodyComponent`;var fv=({table:e,size:t,isRowDisabled:n,containerHeight:r=600,sortableColumns:i,HeaderAction:o,isRowSelected:s,manual:c=!1,onSort:l,tableLayout:u=`auto`,isScrolledLeft:d,isScrolledRight:f,isRowExpandable:p,hideHeader:m=!1})=>{let h=e.getRowModel().rows,g=e.getVisibleLeafColumns(),v=X_(g),y=[];for(let e of h)y.push({type:`row`,row:e}),p&&e.getIsExpanded()&&y.push({type:`expanded`,row:e});return(0,a.jsx)(`div`,{className:`wu-w-full`,children:(0,a.jsx)(_.TableVirtuoso,{style:{height:r},totalCount:y.length,fixedHeaderContent:m?void 0:()=>(0,a.jsx)(uv,{table:e,sortableColumns:i,manual:c,onSort:l,size:t,isRowSelected:s,HeaderAction:o,asVirtualContent:!0,isScrolledLeft:d,isScrolledRight:f}),itemContent:n=>{let r=y[n];if(!r)return null;if(r.type===`expanded`){let t=Y_(r.row,e.getVisibleLeafColumns());return(0,a.jsx)(W_,{colSpan:g.length,children:t})}let i=r.row;return(0,a.jsx)(a.Fragment,{children:i.getVisibleCells().map((e,n)=>{let r=e.column.columnDef,i=v.get(e.column.id);return(0,a.jsxs)(W_,{className:z(rv(t,r.cellAlign),i&&`wu-sticky wu-z-[1]`),style:i?{[i.sticky]:i.offset}:void 0,children:[$_(e,r),Z_(i?.sticky,i?.isStickyEdge??!1,d,f)]},`${e.id}-${n}`)})})},components:{Table:({style:e,...t})=>(0,a.jsxs)(`table`,{...t,style:{...e,width:`100%`,borderCollapse:`collapse`,tableLayout:u},children:[(0,a.jsx)(`colgroup`,{children:g.map(e=>(0,a.jsx)(`col`,{style:{width:`${e.getSize()}px`}},e.id))}),t.children]}),TableBody:dv,TableHead:e=>(0,a.jsx)(z_,{...e,className:z(`wu-border-t wu-border-black/[12%] wu-bg-gray-20`,iv(t),e.className)}),TableRow:({...e})=>{let t=y[e[`data-index`]],r=t?.row,i=r?n?.(r.original)??!1:!1,o=r?.getIsSelected()??!1;return(0,a.jsx)(H_,{...e,"data-disabled":i,"data-state":o&&`selected`,"data-expanded":t?.type===`expanded`?`true`:void 0,className:nv(i)})}}})})},pv=(0,f.cva)(``,{variants:{variant:{striped:`[&_tr:nth-child(even):not([data-expanded])_td]:wu-bg-zinc-50 [&_tr:nth-child(odd)[data-expanded]:not([data-state="selected"])_td]:wu-bg-zinc-50`,unstyled:``,bordered:`wu-border-collapse wu-border wu-border-black/[12%] [&_th]:wu-border [&_td]:wu-border`}}}),mv=({data:e,columns:t,isLoading:n=!1,variant:r=`unstyled`,sort:i,size:o,rowSelection:s,HeaderAction:c,NoDataContent:l,stickyHeader:u=!1,CustomLoader:d,caption:f,virtualization:p,isRowExpandable:m,hideHeader:h=!1,tableLayout:g=`fixed`,style:_,className:v,...y})=>{let[b,x]=R.default.useState(()=>i?.defaultSort??null),{scrollContainerRef:S,isScrolledLeft:C,isScrolledRight:w,handleScroll:T}=K_(),{rowSelectionState:D,sortableColumns:O,selectedRowCount:k,columnsWithExpand:A,expanded:j,setExpanded:M,handleRowSelectionChange:N}=tv({data:e,columns:t,rowSelection:s,isRowExpandable:m}),P=(0,E.useReactTable)({data:e,columns:A,getCoreRowModel:(0,E.getCoreRowModel)(),getPaginationRowModel:(0,E.getPaginationRowModel)(),getExpandedRowModel:m?(0,E.getExpandedRowModel)():void 0,manualPagination:!0,manualSorting:!0,manualFiltering:!0,enableRowSelection:s?.isRowDisabled?e=>!s.isRowDisabled(e.original):!0,enableExpanding:!!m,state:{sorting:b?[{id:b.id,desc:b.desc}]:[],...s?.isEnabled?{rowSelection:D}:{},...m?{expanded:j}:{}},onRowSelectionChange:N,...m?{onExpandedChange:M}:{}}),F=Q_(p?.enabled,p?.threshold,e.length),I=p?.maxHeight??600;return(0,a.jsx)(`div`,{className:z(`wu-text-gray-lead wu-table-container wu-relative`,!F&&u&&`wu-h-full`),children:F?(0,a.jsxs)(`div`,{ref:S,onScroll:T,className:z(`wu-overflow-x-auto wu-w-full`,pv({variant:r})),children:[f&&(0,a.jsx)(G_,{className:`wu-font-light`,children:f}),n?(0,a.jsx)(`div`,{className:`wu-text-center wu-h-[35vh] wu-flex wu-items-center wu-justify-center`,children:d??(0,a.jsx)(ve,{className:`wu-w-full`})}):P.getRowModel().rows?.length?(0,a.jsx)(fv,{table:P,size:o,isRowDisabled:s?.isRowDisabled,containerHeight:I,sortableColumns:O,HeaderAction:c,isRowSelected:k>0,manual:!0,onSort:e=>{x(e),i?.onSort(e)},tableLayout:g,isScrolledLeft:C,isScrolledRight:w,hideHeader:h}):(0,a.jsx)(`div`,{className:`wu-p-4 wu-text-center`,children:l})]}):(0,a.jsx)(`div`,{ref:S,onScroll:T,className:z(`wu-overflow-x-auto wu-w-full`,u&&`wu-overflow-y-auto wu-h-full`),children:(0,a.jsxs)(R_,{...y,className:z(`wu-w-full`,pv({variant:r}),v),style:{tableLayout:g,..._},children:[f&&(0,a.jsx)(G_,{className:`wu-font-light`,children:f}),!h&&(0,a.jsx)(uv,{table:P,sortableColumns:O,manual:!0,onSort:e=>{x(e),i?.onSort(e)},size:o,HeaderAction:c,isRowSelected:k>0,isStickyHeader:u,isRowExpandable:m,isScrolledLeft:C,isScrolledRight:w}),(0,a.jsx)(lv,{table:P,size:o,NoDataContent:l,CustomLoader:d,isLoading:n,isRowDisabled:s?.isRowDisabled,isRowExpandable:m,isScrolledLeft:C,isScrolledRight:w})]})})})},hv=({data:e,columns:t,variant:n=`unstyled`,size:r=`default`,sort:i,filterText:o,pagination:s,stickyHeader:c,HeaderAction:l,CustomLoader:u,NoDataContent:d,isLoading:f,caption:p,rowSelection:m,isRowExpandable:h,hideHeader:g=!1,virtualization:_,tableLayout:v=`fixed`,style:y,className:b,...x})=>{let[S,C]=R.default.useState(()=>i?.defaultSort?[{id:i.defaultSort.id,desc:i.defaultSort.desc}]:[]),[w,T]=(0,R.useState)([]),[D,O]=(0,R.useState)(s?.pageIndex??0),{scrollContainerRef:k,isScrolledLeft:A,isScrolledRight:j,handleScroll:M}=K_(),{finalColumns:N,rowSelectionState:P,sortableColumns:F,selectedRowCount:I,columnsWithExpand:ee,expanded:L,setExpanded:te,handleRowSelectionChange:ne}=tv({data:e,columns:t,rowSelection:m,isRowExpandable:h}),B=(0,R.useMemo)(()=>N.filter(e=>e.filterable).map(e=>e.accessorKey),[N]),V=(0,E.useReactTable)({data:e,columns:ee,getCoreRowModel:(0,E.getCoreRowModel)(),getFilteredRowModel:(0,E.getFilteredRowModel)(),getSortedRowModel:(0,E.getSortedRowModel)(),getPaginationRowModel:s?(0,E.getPaginationRowModel)():void 0,getExpandedRowModel:h?(0,E.getExpandedRowModel)():void 0,enableRowSelection:m?.isRowDisabled?e=>!m.isRowDisabled(e.original):!0,enableExpanding:!!h,state:{sorting:S,columnFilters:w,...s?{pagination:s}:{},...m?.isEnabled?{rowSelection:P}:{},...h?{expanded:L}:{}},onSortingChange:C,onColumnFiltersChange:T,onRowSelectionChange:ne,...h?{onExpandedChange:te}:{}});(0,R.useEffect)(()=>{B.forEach(e=>{V.getColumn(e)?.setFilterValue(o)})},[o,B,V]),(0,R.useEffect)(()=>{s&&s?.pageIndex!==D&&(m?.onRowSelect([]),V.resetRowSelection(),O(s.pageIndex))},[s?.pageIndex]);let re=Q_(_?.enabled,_?.threshold,e.length),ie=_?.maxHeight??600;return(0,a.jsx)(`div`,{className:z(`wu-text-gray-lead wu-table-container wu-relative`,!re&&c&&`wu-h-full`),children:re?(0,a.jsxs)(`div`,{ref:k,onScroll:M,className:z(`wu-overflow-x-auto wu-w-full`,pv({variant:n})),children:[p&&(0,a.jsx)(G_,{children:p}),f?(0,a.jsx)(`div`,{className:`wu-text-center wu-h-[35vh] wu-flex wu-items-center wu-justify-center`,children:u??(0,a.jsx)(ve,{className:`wu-w-full`})}):V.getRowModel().rows?.length?(0,a.jsx)(fv,{table:V,size:r,isRowDisabled:m?.isRowDisabled,containerHeight:ie,sortableColumns:F,HeaderAction:l,isRowSelected:I>0,tableLayout:v,isScrolledLeft:A,isScrolledRight:j,isRowExpandable:h,hideHeader:g}):(0,a.jsx)(`div`,{className:`wu-p-4 wu-text-center`,children:d})]}):(0,a.jsx)(`div`,{ref:k,onScroll:M,className:z(`wu-overflow-x-auto wu-w-full`,c&&`wu-overflow-y-auto wu-h-full`),children:(0,a.jsxs)(R_,{...x,className:z(`wu-table-${v}`,`wu-w-full`,pv({variant:n}),b),style:{tableLayout:v,...y},children:[p&&(0,a.jsx)(G_,{children:p}),!g&&(0,a.jsx)(uv,{table:V,sortableColumns:F,size:r,HeaderAction:l,isRowSelected:I>0,isStickyHeader:c,isRowExpandable:h,isScrolledLeft:A,isScrolledRight:j}),(0,a.jsx)(lv,{table:V,size:r,NoDataContent:d,CustomLoader:u,isLoading:f,isRowDisabled:m?.isRowDisabled,isRowExpandable:h,isScrolledLeft:A,isScrolledRight:j})]})})})},gv=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`textarea`,{className:z(`wu-flex wu-w-full wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-text-gray-lead wu-p-2 wu-text-sm wu-font-normal wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light focus-visible:wu-outline-none disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle focus:wu-border-blue-p wu-transition-colors hover:wu-border-gray-40 `,e),ref:n,...t}));gv.displayName=`Textarea`;var _v=R.default.forwardRef((e,t)=>{let{Label:n,id:r=V(),variant:i=`flat`,readonly:o,maxLength:s,labelPosition:c=`top`,...l}=e,u=e=>{l.onChange&&l.onChange(e)};return(0,a.jsxs)(`div`,{className:z(re(c),`wu-flex wu-textarea-container`),dir:l.dir,children:[(0,a.jsx)(gv,{...l,ref:t,id:r,className:z(`wu-peer wu-rounded-t-sm`,i===`outlined`?`wu-border wu-border-gray-subtle`:``,l.className),onChange:u,readOnly:o,maxLength:s}),n&&(0,a.jsx)(K,{htmlFor:r,className:`wu-textarea-label`,children:n})]})});_v.displayName=`WuTextarea`;function vv(e){return typeof e==`string`&&e.includes(`T`)?(0,c.format)((0,c.parseISO)(e),`HH:mm`):typeof e==`string`&&/^\d{2}:\d{2}:\d{2}$/.test(e)?(0,c.format)((0,c.parse)(e,`HH:mm:ss`,new Date),`HH:mm`):typeof e==`string`&&/^\d{2}:\d{2}$/.test(e)?e:`00:00`}var yv=[`12`,...Array.from({length:11},(e,t)=>String(t+1).padStart(2,`0`))],bv=Array.from({length:60},(e,t)=>String(t).padStart(2,`0`)),xv=[`am`,`pm`];function Sv(e){return Array(50).fill(e).flat()}function Cv(e,t){let n=e.indexOf(t);return[...e.slice(n),...e.slice(0,n)]}function wv(e,t){let n=Number(e);return t===`pm`&&n<12&&(n+=12),t===`am`&&n===12&&(n=0),String(n).padStart(2,`0`)}function Tv(e){let t=Number(e),n=t>=12?`pm`:`am`,r=t%12==0?12:t%12;return{hour:String(r),meridiem:n}}var Ev=({value:e,isSelected:t,onClick:n})=>(0,a.jsx)(`div`,{onClick:n,className:z(`wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-text-center wu-snap-start wu-rounded-[2px] wu-cursor-pointer hover:wu-bg-blue-p hover:wu-text-white`,t&&`wu-bg-blue-p/15 wu-text-blue-p`),children:e}),Dv=({values:e,selectedValue:t,scrollRef:n,onSelect:r,repeatItems:i=!0,className:o})=>(0,a.jsx)(`div`,{ref:n,className:z(`wu-overflow-y-scroll wu-w-8 wu-snap-y wu-snap-mandatory [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]`,o),role:`presentation`,children:(i?Sv(e):e).map((e,n)=>(0,a.jsx)(Ev,{value:e,isSelected:e===t,onClick:()=>r(e)},`${e}-${n}`))});function Ov(e,t,n,r){return{rotatedHours:(0,R.useMemo)(()=>e?Cv(yv,t.padStart(2,`0`)):yv,[e]),rotatedMinutes:(0,R.useMemo)(()=>e?Cv(bv,n.padStart(2,`0`)):bv,[e]),rotatedMeridiem:(0,R.useMemo)(()=>e?Cv(xv,r):xv,[e])}}function kv(e,t,n){(0,R.useEffect)(()=>{function r(e){if(e){let t=e.scrollHeight/50;e.scrollTop=25*t;let n=()=>{let{scrollTop:n}=e,r=Math.round(n/t);(r<=1||r>=48)&&(e.scrollTop=25*t)};return e.addEventListener(`scroll`,n),()=>{e.removeEventListener(`scroll`,n)}}}if(!e)return;let i=r(t.current),a=r(n.current);return()=>{i?.(),a?.()}},[e,t,n])}var Av=({className:e,time:t,Label:n,labelPosition:r,dir:i,...o})=>{let[s,c]=(0,R.useState)(!1),[l,u]=(0,R.useState)(``),d=(0,R.useRef)(null),f=(0,R.useRef)(null),p=(0,R.useRef)(null),m=(0,R.useRef)(null),[h,g]=(0,R.useState)(`12`),[_,v]=(0,R.useState)(`00`),[y,b]=(0,R.useState)(`am`);R.default.useEffect(()=>{if(!t){u(``),g(`12`),v(`00`),b(`am`),d.current&&(d.current.value=``);return}let e=vv(t);u(e);let[n,r]=e.split(`:`),{hour:i,meridiem:a}=Tv(n);g(i),v(r),b(a),d.current&&(d.current.value=e)},[t]),R.default.useEffect(()=>{let e=e=>{f.current&&!f.current.contains(e.target)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),kv(s,p,m);let{rotatedHours:x,rotatedMinutes:S,rotatedMeridiem:C}=Ov(s,h,_,y),w=(0,R.useCallback)((e,t,n)=>{let r=e??h,i=t??_,a=n??y;g(r),v(i),b(a),u(`${wv(r,a)}:${i}`)},[h,_,y]);return(0,a.jsxs)(`div`,{className:z(`wu-flex wu-gap-1 wu-relative wu-w-fit wu-flex-col`,(r===`right`||r===`left`)&&`wu-items-center`,r===`left`&&`wu-flex-row`,r===`right`&&`wu-flex-row-reverse`,`wu-input-wrapper`),dir:i,children:[n&&(0,a.jsx)(K,{htmlFor:`time-picker`,className:`wu-timepicker-label`,children:n}),(0,a.jsxs)(`div`,{className:z(`relative inline-block`),ref:f,dir:i,children:[(0,a.jsx)(Mr,{ref:d,type:`time`,value:l,variant:`flat`,role:`textbox`,onChange:e=>{u(e.target.value);let[t,n]=e.target.value.split(`:`),{hour:r,meridiem:i}=Tv(t);g(r),v(n),b(i)},className:`wu-w-[136px] wu-h-8 wu-pr-6 wu-border wu-border-lead/40 wu-text-gray-lead wu-timepicker-input`,style:{WebkitAppearance:`none`,MozAppearance:`textfield`},Icon:(0,a.jsx)(Pe,{icon:`wm-schedule`,className:z(`wu-text-base`,o.disabled&&`wu-text-lead/50 wu-pointer-events-none wu-opacity-50`),onClick:()=>c(e=>!e),"data-testid":`wu-timepicker-icon`}),iconPosition:`right`,dir:i,...o}),(0,a.jsx)(`style`,{children:`
19
+ input[type="time"]::-webkit-calendar-picker-indicator { display: none; }
20
+ `}),s&&(0,a.jsxs)(`div`,{className:z(`wu-absolute wu-w-[136px] wu-h-[228px] wu-flex wu-bg-white wu-border wu-shadow wu-z-50 wu-text-xs wu-gap-1 wu-p-1 wu-border-blue-p wu-text-lead`,e),children:[(0,a.jsx)(Dv,{values:x,selectedValue:h.padStart(2,`0`),scrollRef:p,onSelect:e=>w(e,_),className:`wu-time-hour-picker`}),(0,a.jsx)(Dv,{values:S,selectedValue:_.padStart(2,`0`),scrollRef:m,onSelect:e=>w(h,e),className:`wu-time-minute-picker`}),(0,a.jsx)(Dv,{values:C,selectedValue:y,onSelect:e=>w(void 0,void 0,e),className:`wu-time-meridiem-picker`,repeatItems:!1})]})]})]})};Av.displayName=`WuTimePicker`;var jv=1,Mv=1e6,Nv=0;function Pv(){return Nv=(Nv+1)%(2**53-1),Nv.toString()}var Fv=new Map,Iv=e=>{if(Fv.has(e))return;let t=setTimeout(()=>{Fv.delete(e),Bv({type:`REMOVE_TOAST`,toastId:e})},Mv);Fv.set(e,t)},Lv=(e,t)=>{switch(t.type){case`ADD_TOAST`:return{...e,toasts:[t.toast,...e.toasts].slice(0,jv)};case`UPDATE_TOAST`:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case`DISMISS_TOAST`:{let{toastId:n}=t;return n?Iv(n):e.toasts.forEach(e=>{Iv(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||n===void 0?{...e,open:!1}:e)}}case`REMOVE_TOAST`:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},Rv=[],zv={toasts:[]};function Bv(e){zv=Lv(zv,e),Rv.forEach(e=>{e(zv)})}function Vv({...e}){let t=Pv(),n=e=>Bv({type:`UPDATE_TOAST`,toast:{...e,id:t}}),r=()=>Bv({type:`DISMISS_TOAST`,toastId:t});return Bv({type:`ADD_TOAST`,toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:n}}function Hv(){let[e,t]=(0,R.useState)(zv);return(0,R.useEffect)(()=>(Rv.push(t),()=>{let e=Rv.indexOf(t);e>-1&&Rv.splice(e,1)}),[e]),{...e,toast:Vv,dismiss:e=>Bv({type:`DISMISS_TOAST`,toastId:e})}}var Uv=()=>({showToast:({message:e,variant:t,duration:n,position:r})=>Vv({description:e,variant:t,duration:n,position:r})}),Wv=D.Provider,Gv=(0,f.cva)(`wu-fixed wu-z-[100] wu-flex wu-max-h-screen wu-w-full wu-flex-col-reverse wu-px-4 wu-py-2 sm:wu-flex-col md:wu-max-w-[720px] wu-w-fit wu-toast-container`,{variants:{position:{topRight:`wu-right-0 wu-top-0`,top:`wu-top-0 wu-left-1/2 wu--translate-x-1/2`,topLeft:`wu-left-0 wu-top-0`,bottom:`wu-bottom-0 wu-left-1/2 wu--translate-x-1/2`,bottomRight:`wu-right-0 wu-bottom-0`,bottomLeft:`wu-left-0 wu-bottom-0`}},defaultVariants:{position:`top`}}),Kv=R.forwardRef(({className:e,position:t,...n},r)=>(0,a.jsx)(D.Viewport,{ref:r,className:z(Gv({position:t}),e),...n}));Kv.displayName=D.Viewport.displayName;var qv=(0,f.cva)(`group wu-pointer-events-auto wu-text-xs wu-font-normal wu-relative wu-flex wu-w-full wu-min-h-12 wu-items-center wu-justify-between wu-overflow-hidden wu-px-4 wu-pr-0 wu-py-2 wu-shadow-sm wu-transition-all data-[swipe=cancel]:wu-translate-y-0 data-[swipe=end]:wu-translate-y-[var(--radix-toast-swipe-end-y)] data-[swipe=move]:wu-translate-y-[var(--radix-toast-swipe-move-y)] data-[swipe=move]:wu-transition-none data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[swipe=end]:wu-animate-out data-[state=closed]:wu-fade-out-80`,{variants:{variant:{default:`wu-border wu-bg-white wu-text-text`,success:`wu-text-green-deep wu-bg-green-soft`,error:`wu-text-red-deep wu-bg-red-soft`,warning:`wu-text-yellow-deep wu-bg-yellow-soft`,info:`wu-text-blue-deep wu-bg-blue-soft`},position:{topRight:`data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full`,top:`data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full`,topLeft:`data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full`,bottom:`data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full`,bottomRight:`data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full`,bottomLeft:`data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full`}},defaultVariants:{variant:`success`,position:`top`}}),Jv=R.forwardRef(({className:e,variant:t,position:n,...r},i)=>(0,a.jsx)(D.Root,{ref:i,className:z(qv({variant:t,position:n}),e),...r}));Jv.displayName=D.Root.displayName;var Yv=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(D.Action,{ref:n,className:z(`wu-inline-flex wu-h-8 wu-shrink-0 wu-items-center wu-justify-center wu-border wu-bg-transparent wu-px-3 wu-text-sm wu-font-medium wu-ring-offset-background wu-transition-colors hover:wu-bg-secondary focus:wu-outline-none focus:wu-ring-2 focus:wu-ring-ring focus:wu-ring-offset-2 disabled:wu-cursor-not-allowed disabled:wu-opacity-50 group-[.destructive]:wu-border-muted/40 group-[.destructive]:hover:wu-border-destructive/30 group-[.destructive]:hover:wu-bg-destructive group-[.destructive]:hover:wu-text-destructive-foreground group-[.destructive]:focus:wu-ring-destructive`,e),...t}));Yv.displayName=D.Action.displayName;var Xv=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(D.Close,{ref:n,className:z(`wu-relative wu-right-4 wu-bottom-2 wu-rounded-sm wu-w-4 wu-h-4 wu-p-1 wu-text-foreground/50 wu-opacity-100 wu-transition-opacity hover:wu-text-foreground focus:wu-opacity-100 focus:wu-outline-none group-hover:wu-opacity-100 group-[.destructive]:wu-text-red-300 group-[.destructive]:hover:wu-text-red-50 group-[.destructive]:focus:wu-ring-red-400 group-[.destructive]:focus:wu-ring-offset-red-600`,e),"toast-close":``,"aria-label":`Close toast`,...t,children:(0,a.jsx)(`span`,{className:`wm-close wu-text-base`})}));Xv.displayName=D.Close.displayName;var Zv=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(D.Title,{ref:n,className:z(`wu-text-sm wu-font-semibold`,e),...t}));Zv.displayName=D.Title.displayName;var Qv=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(D.Description,{ref:n,className:z(`wu-text-sm wu-opacity-90`,e),...t}));Qv.displayName=D.Description.displayName;function $v(){let{toasts:e}=Hv(),t=e.reduce((e,t)=>{let n=t.position||`top`;return e[n]||(e[n]=[]),e[n].push(t),e},{});return(0,a.jsx)(Wv,{children:Object.entries(t).map(([e,t])=>(0,a.jsx)(Kv,{position:e,children:t.map(function({id:e,title:t,description:n,action:r,variant:i,position:o,...s}){let c={success:`wm-check-circle`,info:`wm-info`,warning:`wm-error`,error:`wm-cancel`};return(0,a.jsxs)(Jv,{variant:i||`success`,position:o,...s,children:[(0,a.jsxs)(`div`,{className:`wu-grid wu-gap-1`,children:[t&&(0,a.jsx)(Zv,{children:t}),n&&(0,a.jsxs)(Qv,{className:`wu-flex wu-items-center wu-gap-3 wu-pr-6`,children:[(0,a.jsx)(Pe,{icon:c[i||`success`],className:`wu-text-xl`}),n]})]}),r,(0,a.jsx)(Xv,{})]},e)})},e))})}var ey=()=>(0,a.jsx)($v,{}),ty=R.forwardRef(({className:e,dir:t,...n},r)=>(0,a.jsx)(O.Root,{className:z(`wu-bg-gray-40 wu-inline-flex wu-h-2 wu-w-8 wu-shrink-0 wu-cursor-pointer wu-items-center wu-rounded-full wu-transition-colors focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-[5px] focus-visible:wu-ring-offset-background disabled:wu-cursor-not-allowed disabled:wu-opacity-50 data-[state=unchecked]:wu-bg-gray-25 wu-group`,`hover:wu-bg-gray-subtle hover:data-[state=unchecked]:wu-bg-gray-subtle`,e),...n,ref:r,children:(0,a.jsx)(O.Thumb,{className:z(`wu-block wu-h-4 wu-w-4 wu-rounded-full wu-bg-gray-subtle wu-shadow-lg wu-ring-0 wu-transition-all data-[state=checked]:wu-bg-blue-p`,`group-hover:data-[state=unchecked]:wu-bg-gray-lead`,t===`rtl`&&`-wu-translate-x-4 data-[state=unchecked]:wu-translate-x-0`,t!==`rtl`&&`wu-translate-x-4 data-[state=unchecked]:wu-translate-x-0`,`wu-toggle-thumb`)})}));ty.displayName=O.Root.displayName;var ny=R.default.forwardRef((e,t)=>{let{Label:n,labelPosition:r=`right`,onChange:i,className:o,dir:s,disabled:c,id:l=V(),...u}=e;return R.default.useEffect(()=>{let{checked:e,defaultChecked:t}=u;e!==void 0&&t!==void 0&&console.error("WuToggle: Both `checked` and `defaultChecked` props are set. Use only one of them.")},[u.checked,u.defaultChecked]),(0,a.jsxs)(`div`,{className:z(ry({labelPosition:r}),`wu-toggle-container`),dir:s,children:[(0,a.jsx)(ty,{...u,id:l,disabled:c,ref:t,onCheckedChange:i,className:z(`wu-peer`,o),dir:s}),(0,a.jsx)(K,{htmlFor:l,className:`wu-toggle-label`,children:n})]})});ny.displayName=`WuToggle`;var ry=(0,f.cva)(`wu-flex wu-items-center wu-gap-3 wu-w-fit`,{variants:{labelPosition:{right:`wu-flex-row`,left:`wu-flex-row-reverse`,top:`wu-flex-col-reverse wu-items-baseline`}}}),iy=(0,R.createContext)(null),ay=()=>{let e=(0,R.useContext)(iy);if(!e)throw Error(`useTranslation must be used within a WuTranslationProvider`);return e.useTranslation()},oy=()=>{let e=(0,R.useContext)(iy);if(!e)throw Error(`useLoadTranslationsFunction must be used within a WuTranslationProvider`);return e},sy=({children:e})=>{let[t,n]=(0,R.useState)({}),[r,i]=(0,R.useState)({}),o={loadTranslations:(0,R.useCallback)(async(e,t)=>{try{n(await(await fetch(e)).json())}catch(e){console.error(`Failed to load translations:`,e),t&&n(t)}t&&i(t)},[]),setFallbackTranslations:(0,R.useCallback)(e=>{i(e)},[]),useTranslation:(0,R.useCallback)(()=>({t:(e,n)=>t[e]?t[e]:r[e]?r[e]:n||e}),[t,r])};return(0,a.jsx)(iy.Provider,{value:o,children:e})},cy={qualitative:{"--wu-qualitative-1":`#4C5B94`,"--wu-qualitative-2":`#5B7AAE`,"--wu-qualitative-3":`#409EB5`,"--wu-qualitative-4":`#40B59E`,"--wu-qualitative-5":`#60C790`,"--wu-qualitative-6":`#9AD69A`,"--wu-qualitative-7":`#B3BD56`,"--wu-qualitative-8":`#DD8F40`,"--wu-qualitative-9":`#CE6550`,"--wu-qualitative-10":`#AE4C3D`,"--wu-qualitative-11":`#8F3328`,"--wu-qualitative-12":`#985D75`,"--wu-qualitative-13":`#B181A8`,"--wu-qualitative-14":`#C5A0C2`,"--wu-qualitative-15":`#DAC2E0`,"--wu-qualitative-16":`#E3D9E8`},blueSequential:{"--wu-blue-sequential-1":`#EBF8FF`,"--wu-blue-sequential-2":`#D7EFFF`,"--wu-blue-sequential-3":`#C2DEFF`,"--wu-blue-sequential-4":`#AAD0FF`,"--wu-blue-sequential-5":`#94C1F3`,"--wu-blue-sequential-6":`#7DB2E7`,"--wu-blue-sequential-7":`#67A3DB`,"--wu-blue-sequential-8":`#5194CF`,"--wu-blue-sequential-9":`#3B85C3`,"--wu-blue-sequential-10":`#2576B7`,"--wu-blue-sequential-11":`#256CAC`,"--wu-blue-sequential-12":`#1A60A6`,"--wu-blue-sequential-13":`#184994`,"--wu-blue-sequential-14":`#1C337F`,"--wu-blue-sequential-15":`#0D2163`,"--wu-blue-sequential-16":`#00083D`},greenSequential:{"--wu-green-sequential-1":`#E0F9ED`,"--wu-green-sequential-2":`#C4F3DC`,"--wu-green-sequential-3":`#A8ECCC`,"--wu-green-sequential-4":`#8DE5BD`,"--wu-green-sequential-5":`#78DDB1`,"--wu-green-sequential-6":`#62D3A3`,"--wu-green-sequential-7":`#4CC996`,"--wu-green-sequential-8":`#3ABF8A`,"--wu-green-sequential-9":`#35AF7F`,"--wu-green-sequential-10":`#329D75`,"--wu-green-sequential-11":`#308A6A`,"--wu-green-sequential-12":`#2D7A60`,"--wu-green-sequential-13":`#286A55`,"--wu-green-sequential-14":`#255C4B`,"--wu-green-sequential-15":`#1F4B3E`,"--wu-green-sequential-16":`#1B3D34`},redSequential:{"--wu-red-sequential-1":`#FEE9EC`,"--wu-red-sequential-2":`#FFD2D8`,"--wu-red-sequential-3":`#FFBBC4`,"--wu-red-sequential-4":`#FFA6B3`,"--wu-red-sequential-5":`#FB97A5`,"--wu-red-sequential-6":`#F78998`,"--wu-red-sequential-7":`#F37C8C`,"--wu-red-sequential-8":`#EE6F80`,"--wu-red-sequential-9":`#E76172`,"--wu-red-sequential-10":`#E15466`,"--wu-red-sequential-11":`#DA465B`,"--wu-red-sequential-12":`#D33B50`,"--wu-red-sequential-13":`#BC3548`,"--wu-red-sequential-14":`#A73343`,"--wu-red-sequential-15":`#91313E`,"--wu-red-sequential-16":`#7D2D38`},orangeSequential:{"--wu-orange-sequential-1":`#FDEDE5`,"--wu-orange-sequential-2":`#FCDFCF`,"--wu-orange-sequential-3":`#FBCFBA`,"--wu-orange-sequential-4":`#FAC5AB`,"--wu-orange-sequential-5":`#F7B694`,"--wu-orange-sequential-6":`#F6AB85`,"--wu-orange-sequential-7":`#F79D70`,"--wu-orange-sequential-8":`#F6915F`,"--wu-orange-sequential-9":`#EF8450`,"--wu-orange-sequential-10":`#E37944`,"--wu-orange-sequential-11":`#DB713C`,"--wu-orange-sequential-12":`#D06530`,"--wu-orange-sequential-13":`#C95E29`,"--wu-orange-sequential-14":`#BD521C`,"--wu-orange-sequential-15":`#B24610`,"--wu-orange-sequential-16":`#AA3F08`},divergent:{"--wu-red-divergent-1":`#661200`,"--wu-red-divergent-2":`#A11C00`,"--wu-red-divergent-3":`#D2300E`,"--wu-red-divergent-4":`#DF4828`,"--wu-red-divergent-5":`#EB6A4A`,"--wu-red-divergent-6":`#F4896C`,"--wu-red-divergent-7":`#FFC4B3`,"--wu-red-divergent-8":`#FFE2D9`,"--wu-divergent-neutral":`#F5F5F5`,"--wu-blue-divergent-1":`#DBD9E9`,"--wu-blue-divergent-2":`#B7B5D4`,"--wu-blue-divergent-3":`#9392BF`,"--wu-blue-divergent-4":`#7070AA`,"--wu-blue-divergent-5":`#4A5195`,"--wu-blue-divergent-6":`#1B3380`,"--wu-blue-divergent-7":`#182D72`,"--wu-blue-divergent-8":`#122254`},nps:{"--wu-nps-detractor":`#F85271`,"--wu-nps-passive":`#F1DA7E`,"--wu-nps-promoter":`#42BD84`},sentiment:{"--wu-sentiment-negative":`#F85271`,"--wu-sentiment-slightly-negative":`#F69A79`,"--wu-sentiment-neutral":`#F1DA7E`,"--wu-sentiment-slightly-positive":`#94D08B`,"--wu-sentiment-positive":`#42BD84`,"--wu-sentiment-no-sentiment":`#E0E0E0`}},ly={},uy=e=>{ly=e},dy=e=>ly[e]??e,fy=(0,R.createContext)(null),py=()=>{let e=(0,R.useContext)(fy);if(!e)throw Error(`[WuTranslateProvider] Must be used within a provider.`);return e},my=e=>e.name===`AbortError`,hy=({children:e,defaultLocale:t=`en`,baseApi:n=`https://admin2.questionpro.com/cs/api/gad/translate`,keys:r=`/wick-ui-i18n.json`})=>{let[i,o]=(0,R.useState)(t),[s,c]=(0,R.useState)({}),[l,u]=(0,R.useState)(!0),d=(0,R.useRef)(!1),f=(0,R.useCallback)(e=>{d.current=!0,o(e)},[]);(0,R.useEffect)(()=>{d.current||o(t)},[t]),(0,R.useEffect)(()=>{let e=new AbortController;return(async()=>{u(!0);try{let t=await fetch(r,{signal:e.signal});if(!t.ok)throw Error(`Failed to fetch translation keys`);let a=await t.json();if(i===`en`){uy(a),c(a);return}try{let t=await fetch(n,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({keys:a,code:i}),signal:e.signal});if(!t.ok)throw Error(`Failed to fetch translations`);let{data:r}=await t.json();uy(r),c(r)}catch(e){if(my(e))return;console.error(`[WuTranslateProvider] Translation fetch failed:`,e),uy(a),c(a)}}catch(e){if(my(e))return;console.error(`[WuTranslateProvider] Keys fetch failed:`,e),uy({}),c({})}finally{e.signal.aborted||u(!1)}})(),()=>{e.abort()}},[i,n,r]);let p=(0,R.useMemo)(()=>({dictionary:s,locale:i,setLocale:f,isLoading:l}),[s,i,l,f]);return(0,a.jsx)(fy.Provider,{value:p,children:e})},gy=R.default.memo(({__i18nKey:e})=>{let{dictionary:t}=py();return(0,a.jsx)(a.Fragment,{children:t[e]??e})});gy.displayName=`WuTranslate`,typeof window<`u`&&(window.wickUiVersion=`1.49.0`,window.wickUiIcon=`9.1.0`,window.wickUiEditor=`0.14.1`),e.CHART_COLOR_SYSTEM=cy,e.WuAccordion=le,e.WuActivityLog=me,e.WuAppHeader=Qe,e.WuAppHeaderAccount=Te,e.WuAppHeaderBar=We,e.WuAppHeaderHelp=Ee,e.WuAppHeaderMenu=Ue,e.WuAppHeaderSearch=Ge,e.WuButton=W,e.WuCalender=at,e.WuCard=Kr,e.WuCardFooter=Jr,e.WuCardHeader=qr,e.WuCheckbox=Xr,e.WuChip=$r,e.WuCombobox=Mi,e.WuCopyToClipboard=Ni,e.WuDataTable=mv,e.WuDatePicker=_t,e.WuDateRangePicker=Gr,e.WuDisplay=Ne,e.WuDrawer=Ki,e.WuDrawerClose=qi,e.WuDrilldown=cp,e.WuFooter=mp,e.WuFormGroup=gt,e.WuHeading=je,e.WuHelpButton=hp,e.WuIcon=Pe,e.WuInput=Mr,e.WuInputError=ft,e.WuInputHint=pt,e.WuLabel=K,e.WuListbox=wp,e.WuLoader=ve,e.WuMenu=rp,e.WuMenuCheckboxItem=Jf,e.WuMenuIcon=Tp,e.WuMenuItem=Yf,e.WuMenuItemGroup=Xf,e.WuMenuRadioItem=Zf,e.WuMenuSeparatorItem=Qf,e.WuModal=Hp,e.WuModalClose=Kp,e.WuModalContent=Up,e.WuModalFooter=Gp,e.WuModalHeader=Wp,e.WuMonthPicker=nm,e.WuPagination=lm,e.WuPopover=Ir,e.WuPopoverClose=Lr,e.WuPrimaryNavbar=om,e.WuRadioGroup=pm,e.WuScrollArea=mm,e.WuSecondaryNavbar=cm,e.WuSelect=em,e.WuSharedSurvey=d_,e.WuSidebar=Oh,e.WuSidebarCollapsibleMenu=Fh,e.WuSidebarContent=Ah,e.WuSidebarFooter=jh,e.WuSidebarGroup=Mh,e.WuSidebarItem=Ph,e.WuSidebarMenu=Nh,e.WuSidebarTrigger=kh,e.WuSpotlight=Rp,e.WuStackedCard=Bh,e.WuStackedCardOverlay=Vh,e.WuStepper=c_,e.WuSubMenu=tp,e.WuSubtext=Me,e.WuSurveyItem=p_,e.WuSurveyList=m_,e.WuSurveySelect=__,e.WuSurveySource=g_,e.WuSwitcher=E_,e.WuTab=L_,e.WuTable=hv,e.WuText=Ae,e.WuTextarea=_v,e.WuTimePicker=Av,e.WuToast=ey,e.WuToggle=ny,e.WuTooltip=Xe,e.WuTranslate=gy,e.WuTranslateProvider=hy,e.WuTranslationContext=iy,e.WuTranslationProvider=sy,e.WuTruncatedLabel=Ze,e.WuVirtualScroll=li,e.calculatePosition=Rh,Object.defineProperty(e,`useContext`,{enumerable:!0,get:function(){return n.useContext}}),e.useTranslation=ay,e.useTranslationsContext=oy,e.useWickuiTranslate=py,e.useWuShowToast=Uv,e.useWuSidebar=Dm,e.wt=dy});