@amateescu/portal-ui-components 0.0.35-beta0 → 0.0.37-beta1

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 (270) hide show
  1. package/README.md +113 -0
  2. package/dist/{Button-DG4uye8X.js → Button-BM72-1G6.js} +107 -106
  3. package/dist/ButtonBase-D6nf3ymf.js +990 -0
  4. package/dist/{CircularProgress-DpvktFBW.js → CircularProgress-BlQFR6DW.js} +107 -80
  5. package/dist/Clear-BauR3cPE.js +8 -0
  6. package/dist/DefaultPropsProvider-BtPfTrMq.js +3449 -0
  7. package/dist/UserInfoDropdown-D9EyQloN.js +65 -0
  8. package/dist/assets/PassportConfirmationModal.css +1 -0
  9. package/dist/assets/PassportErrorModal.css +1 -0
  10. package/dist/assets/PassportInactivityModal.css +1 -0
  11. package/dist/assets/PassportInfoModal.css +1 -0
  12. package/dist/assets/PassportKpiCard.css +1 -0
  13. package/dist/assets/PassportTabHeader.css +1 -0
  14. package/dist/assets/UserInfoDropdown.css +1 -1
  15. package/dist/assets/index.css +1 -0
  16. package/dist/components/DebouncedPassportInput/DebouncedPassportInput.d.ts +3 -0
  17. package/dist/components/DebouncedPassportInput/DebouncedPassportInput.d.ts.map +1 -0
  18. package/dist/components/DebouncedPassportInput/DebouncedPassportInput.js +31 -0
  19. package/dist/components/DebouncedPassportInput/DebouncedPassportInput.stories.d.ts +23 -0
  20. package/dist/components/DebouncedPassportInput/DebouncedPassportInput.stories.d.ts.map +1 -0
  21. package/dist/components/DebouncedPassportInput/DebouncedPassportInput.types.d.ts +8 -0
  22. package/dist/components/DebouncedPassportInput/DebouncedPassportInput.types.d.ts.map +1 -0
  23. package/dist/components/LoadingAnimation/LoadingAnimation.d.ts +1 -0
  24. package/dist/components/LoadingAnimation/LoadingAnimation.d.ts.map +1 -0
  25. package/dist/components/LoadingAnimation/LoadingAnimation.js +66 -6
  26. package/dist/components/LoadingAnimation/LoadingAnimation.stories.d.ts +1 -0
  27. package/dist/components/LoadingAnimation/LoadingAnimation.stories.d.ts.map +1 -0
  28. package/dist/components/Login/Login.d.ts +2 -1
  29. package/dist/components/Login/Login.d.ts.map +1 -0
  30. package/dist/components/Login/Login.js +43 -8885
  31. package/dist/components/Login/Login.stories.d.ts +3 -2
  32. package/dist/components/Login/Login.stories.d.ts.map +1 -0
  33. package/dist/components/Login/Login.types.d.ts +1 -0
  34. package/dist/components/Login/Login.types.d.ts.map +1 -0
  35. package/dist/components/PassportAutocomplete/PassportAutocomplete.d.ts +3 -0
  36. package/dist/components/PassportAutocomplete/PassportAutocomplete.d.ts.map +1 -0
  37. package/dist/components/PassportAutocomplete/PassportAutocomplete.js +41 -0
  38. package/dist/components/{InfoModal/InfoModal.stories.d.ts → PassportAutocomplete/PassportAutocomplete.stories.d.ts} +4 -0
  39. package/dist/components/PassportAutocomplete/PassportAutocomplete.stories.d.ts.map +1 -0
  40. package/dist/components/PassportAutocomplete/PassportAutocomplete.types.d.ts +14 -0
  41. package/dist/components/PassportAutocomplete/PassportAutocomplete.types.d.ts.map +1 -0
  42. package/dist/components/PassportButton/PassportButton.d.ts +4 -0
  43. package/dist/components/PassportButton/PassportButton.d.ts.map +1 -0
  44. package/dist/components/{CustomButton/CustomButton.js → PassportButton/PassportButton.js} +10 -6
  45. package/dist/components/{CustomButton/CustomButton.stories.d.ts → PassportButton/PassportButton.stories.d.ts} +2 -1
  46. package/dist/components/PassportButton/PassportButton.stories.d.ts.map +1 -0
  47. package/dist/components/PassportButton/PassportButton.types.d.ts +9 -0
  48. package/dist/components/PassportButton/PassportButton.types.d.ts.map +1 -0
  49. package/dist/components/PassportConfirmationModal/PassportConfirmationModal.d.ts +9 -0
  50. package/dist/components/PassportConfirmationModal/PassportConfirmationModal.d.ts.map +1 -0
  51. package/dist/components/PassportConfirmationModal/PassportConfirmationModal.js +108 -0
  52. package/dist/components/{ErrorModal/ErrorModal.stories.d.ts → PassportConfirmationModal/PassportConfirmationModal.stories.d.ts} +1 -0
  53. package/dist/components/PassportConfirmationModal/PassportConfirmationModal.stories.d.ts.map +1 -0
  54. package/dist/components/PassportDatePicker/PassportDatePicker.d.ts +3 -0
  55. package/dist/components/PassportDatePicker/PassportDatePicker.d.ts.map +1 -0
  56. package/dist/components/PassportDatePicker/PassportDatePicker.js +1514 -0
  57. package/dist/components/PassportDatePicker/PassportDatePicker.stories.d.ts +25 -0
  58. package/dist/components/PassportDatePicker/PassportDatePicker.stories.d.ts.map +1 -0
  59. package/dist/components/PassportDatePicker/PassportDatePicker.types.d.ts +15 -0
  60. package/dist/components/PassportDatePicker/PassportDatePicker.types.d.ts.map +1 -0
  61. package/dist/components/PassportDateTimePicker/PassportDateTimePicker.d.ts +3 -0
  62. package/dist/components/PassportDateTimePicker/PassportDateTimePicker.d.ts.map +1 -0
  63. package/dist/components/PassportDateTimePicker/PassportDateTimePicker.js +5419 -0
  64. package/dist/components/PassportDateTimePicker/PassportDateTimePicker.stories.d.ts +30 -0
  65. package/dist/components/PassportDateTimePicker/PassportDateTimePicker.stories.d.ts.map +1 -0
  66. package/dist/components/PassportDateTimePicker/PassportDateTimePicker.types.d.ts +16 -0
  67. package/dist/components/PassportDateTimePicker/PassportDateTimePicker.types.d.ts.map +1 -0
  68. package/dist/components/PassportDropdown/PassportDropdown.d.ts +3 -0
  69. package/dist/components/PassportDropdown/PassportDropdown.d.ts.map +1 -0
  70. package/dist/components/PassportDropdown/PassportDropdown.js +37 -0
  71. package/dist/components/PassportDropdown/PassportDropdown.stories.d.ts +25 -0
  72. package/dist/components/PassportDropdown/PassportDropdown.stories.d.ts.map +1 -0
  73. package/dist/components/PassportDropdown/PassportDropdown.types.d.ts +14 -0
  74. package/dist/components/PassportDropdown/PassportDropdown.types.d.ts.map +1 -0
  75. package/dist/components/PassportErrorModal/PassportErrorModal.d.ts +8 -0
  76. package/dist/components/PassportErrorModal/PassportErrorModal.d.ts.map +1 -0
  77. package/dist/components/PassportErrorModal/PassportErrorModal.js +68 -0
  78. package/dist/components/{ConfirmationModal/ConfirmationModal.stories.d.ts → PassportErrorModal/PassportErrorModal.stories.d.ts} +1 -0
  79. package/dist/components/PassportErrorModal/PassportErrorModal.stories.d.ts.map +1 -0
  80. package/dist/components/PassportFooter/PassportFooter.d.ts +3 -0
  81. package/dist/components/PassportFooter/PassportFooter.d.ts.map +1 -0
  82. package/dist/components/PassportFooter/PassportFooter.js +56 -0
  83. package/dist/components/{CustomFooter/CustomFooter.stories.d.ts → PassportFooter/PassportFooter.stories.d.ts} +1 -0
  84. package/dist/components/PassportFooter/PassportFooter.stories.d.ts.map +1 -0
  85. package/dist/components/{CustomFooter/CustomFooter.types.d.ts → PassportFooter/PassportFooter.types.d.ts} +3 -2
  86. package/dist/components/PassportFooter/PassportFooter.types.d.ts.map +1 -0
  87. package/dist/components/PassportInactivityModal/PassportInactivityModal.d.ts +12 -0
  88. package/dist/components/PassportInactivityModal/PassportInactivityModal.d.ts.map +1 -0
  89. package/dist/components/PassportInactivityModal/PassportInactivityModal.js +53 -0
  90. package/dist/components/PassportInactivityModal/PassportInactivityModal.stories.d.ts +41 -0
  91. package/dist/components/PassportInactivityModal/PassportInactivityModal.stories.d.ts.map +1 -0
  92. package/dist/components/PassportInfoModal/PassportInfoModal.d.ts +3 -0
  93. package/dist/components/PassportInfoModal/PassportInfoModal.d.ts.map +1 -0
  94. package/dist/components/PassportInfoModal/PassportInfoModal.js +68 -0
  95. package/dist/components/PassportInfoModal/PassportInfoModal.stories.d.ts +29 -0
  96. package/dist/components/PassportInfoModal/PassportInfoModal.stories.d.ts.map +1 -0
  97. package/dist/components/PassportInfoModal/PassportInfoModal.types.d.ts +7 -0
  98. package/dist/components/PassportInfoModal/PassportInfoModal.types.d.ts.map +1 -0
  99. package/dist/components/PassportInput/PassportInput.d.ts +3 -0
  100. package/dist/components/PassportInput/PassportInput.d.ts.map +1 -0
  101. package/dist/components/PassportInput/PassportInput.js +51 -0
  102. package/dist/components/PassportInput/PassportInput.stories.d.ts +24 -0
  103. package/dist/components/PassportInput/PassportInput.stories.d.ts.map +1 -0
  104. package/dist/components/PassportInput/PassportInput.types.d.ts +9 -0
  105. package/dist/components/PassportInput/PassportInput.types.d.ts.map +1 -0
  106. package/dist/components/PassportInput/PassportInput.types.js +1 -0
  107. package/dist/components/PassportKpiCard/PassportKpiCard.d.ts +3 -0
  108. package/dist/components/PassportKpiCard/PassportKpiCard.d.ts.map +1 -0
  109. package/dist/components/PassportKpiCard/PassportKpiCard.js +44 -0
  110. package/dist/components/{KpiCard/KpiCard.stories.d.ts → PassportKpiCard/PassportKpiCard.stories.d.ts} +3 -2
  111. package/dist/components/PassportKpiCard/PassportKpiCard.stories.d.ts.map +1 -0
  112. package/dist/components/PassportKpiCard/PassportKpiCard.types.d.ts +11 -0
  113. package/dist/components/PassportKpiCard/PassportKpiCard.types.d.ts.map +1 -0
  114. package/dist/components/PassportKpiCard/PassportKpiCard.types.js +1 -0
  115. package/dist/components/PassportKpiWrapper/PassportKpiWrapper.d.ts +3 -0
  116. package/dist/components/PassportKpiWrapper/PassportKpiWrapper.d.ts.map +1 -0
  117. package/dist/components/PassportKpiWrapper/PassportKpiWrapper.js +22 -0
  118. package/dist/components/{KpiWrapper/KpiWrapper.stories.d.ts → PassportKpiWrapper/PassportKpiWrapper.stories.d.ts} +6 -5
  119. package/dist/components/PassportKpiWrapper/PassportKpiWrapper.stories.d.ts.map +1 -0
  120. package/dist/components/{KpiWrapper/KpiWrapper.types.d.ts → PassportKpiWrapper/PassportKpiWrapper.types.d.ts} +2 -1
  121. package/dist/components/PassportKpiWrapper/PassportKpiWrapper.types.d.ts.map +1 -0
  122. package/dist/components/PassportKpiWrapper/PassportKpiWrapper.types.js +1 -0
  123. package/dist/components/PassportMultiSelect/PassportMultiSelect.d.ts +3 -0
  124. package/dist/components/PassportMultiSelect/PassportMultiSelect.d.ts.map +1 -0
  125. package/dist/components/PassportMultiSelect/PassportMultiSelect.js +72 -0
  126. package/dist/components/PassportMultiSelect/PassportMultiSelect.stories.d.ts +24 -0
  127. package/dist/components/PassportMultiSelect/PassportMultiSelect.stories.d.ts.map +1 -0
  128. package/dist/components/PassportMultiSelect/PassportMultiSelect.types.d.ts +12 -0
  129. package/dist/components/PassportMultiSelect/PassportMultiSelect.types.d.ts.map +1 -0
  130. package/dist/components/PassportMultiSelect/PassportMultiSelect.types.js +1 -0
  131. package/dist/components/PassportPagination/PassportPagination.d.ts +3 -0
  132. package/dist/components/PassportPagination/PassportPagination.d.ts.map +1 -0
  133. package/dist/components/{CustomPagination/CustomPagination.js → PassportPagination/PassportPagination.js} +215 -218
  134. package/dist/components/{CustomPagination/CustomPagination.stories.d.ts → PassportPagination/PassportPagination.stories.d.ts} +3 -2
  135. package/dist/components/PassportPagination/PassportPagination.stories.d.ts.map +1 -0
  136. package/dist/components/{CustomPagination/CustomPagination.types.d.ts → PassportPagination/PassportPagination.types.d.ts} +2 -1
  137. package/dist/components/PassportPagination/PassportPagination.types.d.ts.map +1 -0
  138. package/dist/components/PassportPagination/PassportPagination.types.js +1 -0
  139. package/dist/components/PassportTabHeader/PassportTabHeader.d.ts +7 -0
  140. package/dist/components/PassportTabHeader/PassportTabHeader.d.ts.map +1 -0
  141. package/dist/components/PassportTabHeader/PassportTabHeader.js +14 -0
  142. package/dist/components/PassportTabHeader/PassportTabHeader.stories.d.ts +21 -0
  143. package/dist/components/PassportTabHeader/PassportTabHeader.stories.d.ts.map +1 -0
  144. package/dist/components/PassportTextField/PassportTextField.d.ts +3 -0
  145. package/dist/components/PassportTextField/PassportTextField.d.ts.map +1 -0
  146. package/dist/components/PassportTextField/PassportTextField.js +23 -0
  147. package/dist/components/PassportTextField/PassportTextField.stories.d.ts +22 -0
  148. package/dist/components/PassportTextField/PassportTextField.stories.d.ts.map +1 -0
  149. package/dist/components/SideMenu/SideMenu.d.ts +1 -0
  150. package/dist/components/SideMenu/SideMenu.d.ts.map +1 -0
  151. package/dist/components/SideMenu/SideMenu.js +89 -41
  152. package/dist/components/SideMenu/SideMenu.stories.d.ts +1 -0
  153. package/dist/components/SideMenu/SideMenu.stories.d.ts.map +1 -0
  154. package/dist/components/SideMenu/SideMenu.types.d.ts +3 -1
  155. package/dist/components/SideMenu/SideMenu.types.d.ts.map +1 -0
  156. package/dist/components/TotalDataGrid/TotalDataGrid.d.ts +1 -0
  157. package/dist/components/TotalDataGrid/TotalDataGrid.d.ts.map +1 -0
  158. package/dist/components/TotalDataGrid/TotalDataGrid.js +3 -3
  159. package/dist/components/TotalDataGrid/TotalDataGrid.stories.d.ts +1 -0
  160. package/dist/components/TotalDataGrid/TotalDataGrid.stories.d.ts.map +1 -0
  161. package/dist/components/TotalDataGrid/TotalDataGrid.types.d.ts +1 -0
  162. package/dist/components/TotalDataGrid/TotalDataGrid.types.d.ts.map +1 -0
  163. package/dist/components/UserInfoDropdown/UserInfoDropdown.d.ts +1 -0
  164. package/dist/components/UserInfoDropdown/UserInfoDropdown.d.ts.map +1 -0
  165. package/dist/components/UserInfoDropdown/UserInfoDropdown.js +3 -2
  166. package/dist/components/UserInfoDropdown/UserInfoDropdown.stories.d.ts +6 -5
  167. package/dist/components/UserInfoDropdown/UserInfoDropdown.stories.d.ts.map +1 -0
  168. package/dist/components/UserInfoDropdown/UserInfoDropdown.types.d.ts +9 -3
  169. package/dist/components/UserInfoDropdown/UserInfoDropdown.types.d.ts.map +1 -0
  170. package/dist/components/index.d.ts +19 -8
  171. package/dist/components/index.d.ts.map +1 -0
  172. package/dist/components/index.js +47 -28
  173. package/dist/createSimplePaletteValueFilter-Bz8RuRaa.js +23 -0
  174. package/dist/{createSvgIcon-DNSRtm3a.js → createSvgIcon-B-eIQ7rU.js} +118 -124
  175. package/dist/extendSxProp-QNe1Nf_s.js +51 -0
  176. package/dist/main.d.ts +1 -0
  177. package/dist/main.d.ts.map +1 -0
  178. package/dist/main.js +65 -46
  179. package/dist/mock.d.ts +1 -0
  180. package/dist/mock.d.ts.map +1 -0
  181. package/dist/portal-utils/chunkArray.d.ts +1 -0
  182. package/dist/portal-utils/chunkArray.d.ts.map +1 -0
  183. package/dist/portal-utils/cn.d.ts +4 -1
  184. package/dist/portal-utils/cn.d.ts.map +1 -0
  185. package/dist/portal-utils/cn.js +1 -1
  186. package/dist/portal-utils/formatters.d.ts +1 -0
  187. package/dist/portal-utils/formatters.d.ts.map +1 -0
  188. package/dist/portal-utils/formatters.js +291 -334
  189. package/dist/portal-utils/index.d.ts +2 -1
  190. package/dist/portal-utils/index.d.ts.map +1 -0
  191. package/dist/portal-utils/loggerService.d.ts +1 -0
  192. package/dist/portal-utils/loggerService.d.ts.map +1 -0
  193. package/dist/portal-utils/pageCount.d.ts +1 -0
  194. package/dist/portal-utils/pageCount.d.ts.map +1 -0
  195. package/dist/types/BusinessDayRange.d.ts +1 -0
  196. package/dist/types/BusinessDayRange.d.ts.map +1 -0
  197. package/dist/types/Column.d.ts +1 -0
  198. package/dist/types/Column.d.ts.map +1 -0
  199. package/dist/types/CultureStore.d.ts +1 -0
  200. package/dist/types/CultureStore.d.ts.map +1 -0
  201. package/dist/types/CustomSvg.d.ts +1 -0
  202. package/dist/types/CustomSvg.d.ts.map +1 -0
  203. package/dist/types/LoginRequest.d.ts +1 -0
  204. package/dist/types/LoginRequest.d.ts.map +1 -0
  205. package/dist/types/index.d.ts +1 -0
  206. package/dist/types/index.d.ts.map +1 -0
  207. package/dist/useMobilePicker-hk2kq6ev.js +19662 -0
  208. package/dist/useSlot-CXnK24LX.js +189 -0
  209. package/package.json +39 -38
  210. package/dist/Box-C-zPAMZN.js +0 -102
  211. package/dist/ButtonBase-DrxMtoTW.js +0 -966
  212. package/dist/EllipsisOutlined-DfCu6q_b.js +0 -2467
  213. package/dist/InvencoGVR-qnTq-d6S.js +0 -5
  214. package/dist/PurePanel-DvQTygSo.js +0 -2209
  215. package/dist/Skeleton-Bh0A9xju.js +0 -565
  216. package/dist/UserInfoDropdown-CWTcdnqL.js +0 -3755
  217. package/dist/VModalIcon-D7L4bQLO.js +0 -5
  218. package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
  219. package/dist/assets/ConfirmationModal.css +0 -1
  220. package/dist/assets/ErrorModal.css +0 -1
  221. package/dist/assets/KpiCard.css +0 -1
  222. package/dist/assets/globals.css +0 -1
  223. package/dist/components/ConfirmationModal/ConfirmationModal.d.ts +0 -2
  224. package/dist/components/ConfirmationModal/ConfirmationModal.js +0 -51
  225. package/dist/components/ConfirmationModal/ConfirmationModal.stories.js +0 -36
  226. package/dist/components/ConfirmationModal/ConfirmationModal.types.d.ts +0 -11
  227. package/dist/components/CustomButton/CustomButton.d.ts +0 -3
  228. package/dist/components/CustomButton/CustomButton.stories.js +0 -42
  229. package/dist/components/CustomButton/CustomeButton.types.d.ts +0 -8
  230. package/dist/components/CustomFooter/CustomFooter.d.ts +0 -2
  231. package/dist/components/CustomFooter/CustomFooter.js +0 -32
  232. package/dist/components/CustomFooter/CustomFooter.stories.js +0 -40
  233. package/dist/components/CustomPagination/CustomPagination.d.ts +0 -3
  234. package/dist/components/CustomPagination/CustomPagination.stories.js +0 -25
  235. package/dist/components/ErrorModal/ErrorModal.d.ts +0 -2
  236. package/dist/components/ErrorModal/ErrorModal.js +0 -40
  237. package/dist/components/ErrorModal/ErrorModal.stories.js +0 -33
  238. package/dist/components/ErrorModal/ErrorModal.types.d.ts +0 -8
  239. package/dist/components/InfoModal/InfoModal.d.ts +0 -2
  240. package/dist/components/InfoModal/InfoModal.js +0 -44
  241. package/dist/components/InfoModal/InfoModal.stories.js +0 -33
  242. package/dist/components/InfoModal/InfoModal.types.d.ts +0 -8
  243. package/dist/components/KpiCard/KpiCard.d.ts +0 -2
  244. package/dist/components/KpiCard/KpiCard.js +0 -2439
  245. package/dist/components/KpiCard/KpiCard.stories.js +0 -26
  246. package/dist/components/KpiCard/KpiCard.types.d.ts +0 -8
  247. package/dist/components/KpiWrapper/KpiWrapper.d.ts +0 -2
  248. package/dist/components/KpiWrapper/KpiWrapper.js +0 -11
  249. package/dist/components/KpiWrapper/KpiWrapper.stories.js +0 -56
  250. package/dist/components/LoadingAnimation/LoadingAnimation.stories.js +0 -14
  251. package/dist/components/Login/Login.stories.js +0 -24212
  252. package/dist/components/SideMenu/SideMenu.stories.js +0 -81
  253. package/dist/components/TotalDataGrid/TotalDataGrid.stories.js +0 -23
  254. package/dist/components/UserInfoDropdown/UserInfoDropdown.stories.js +0 -36
  255. package/dist/context-dCWAMvX5.js +0 -7320
  256. package/dist/createSimplePaletteValueFilter-CwLqlaaZ.js +0 -3457
  257. package/dist/index-B00P9-H3.js +0 -1681
  258. package/dist/index-BBBjHj3B.js +0 -411
  259. package/dist/objectWithoutPropertiesLoose-BTau6TOn.js +0 -33
  260. package/dist/useSlot-B4sbbhYz.js +0 -188
  261. /package/dist/assets/{CustomFooter.css → PassportFooter.css} +0 -0
  262. /package/dist/assets/{KpiWrapper.css → PassportKpiWrapper.css} +0 -0
  263. /package/dist/components/{ConfirmationModal/ConfirmationModal.types.js → DebouncedPassportInput/DebouncedPassportInput.types.js} +0 -0
  264. /package/dist/components/{CustomButton/CustomeButton.types.js → PassportAutocomplete/PassportAutocomplete.types.js} +0 -0
  265. /package/dist/components/{CustomFooter/CustomFooter.types.js → PassportButton/PassportButton.types.js} +0 -0
  266. /package/dist/components/{CustomPagination/CustomPagination.types.js → PassportDatePicker/PassportDatePicker.types.js} +0 -0
  267. /package/dist/components/{ErrorModal/ErrorModal.types.js → PassportDateTimePicker/PassportDateTimePicker.types.js} +0 -0
  268. /package/dist/components/{InfoModal/InfoModal.types.js → PassportDropdown/PassportDropdown.types.js} +0 -0
  269. /package/dist/components/{KpiCard/KpiCard.types.js → PassportFooter/PassportFooter.types.js} +0 -0
  270. /package/dist/components/{KpiWrapper/KpiWrapper.types.js → PassportInfoModal/PassportInfoModal.types.js} +0 -0
@@ -1,2467 +0,0 @@
1
- import { a6 as Tr, a7 as Lr, a8 as Ar, a9 as $r, a3 as $n, a4 as zn, n as ur, e as T, ag as Gn, h as zr, x as Vr, M as Zn, K as $t, H as ba, p as ke, c as Oe, w as Jt, _ as O, k as Lt, ah as st, q as cr, a2 as fr, ai as pa, aj as Qn, a5 as Wr, l as Nt, ak as Yn, N as Ca, P as Fr, j as ut, i as fe, al as wa, am as Hr, r as fn, s as Dn, o as vr, I as Ma } from "./context-dCWAMvX5.js";
2
- import * as a from "react";
3
- import je, { useState as Jn, useMemo as Xn, useCallback as At, forwardRef as Ra, useRef as xn, useImperativeHandle as Sa } from "react";
4
- import { _ as ae } from "./objectWithoutPropertiesLoose-BTau6TOn.js";
5
- import { r as Br } from "./index-BBBjHj3B.js";
6
- var er = /* @__PURE__ */ a.createContext(null);
7
- function Ea(e) {
8
- var n = e.children, t = e.onBatchResize, r = a.useRef(0), i = a.useRef([]), o = a.useContext(er), s = a.useCallback(function(l, u, c) {
9
- r.current += 1;
10
- var b = r.current;
11
- i.current.push({
12
- size: l,
13
- element: u,
14
- data: c
15
- }), Promise.resolve().then(function() {
16
- b === r.current && (t == null || t(i.current), i.current = []);
17
- }), o == null || o(l, u, c);
18
- }, [t, o]);
19
- return /* @__PURE__ */ a.createElement(er.Provider, {
20
- value: s
21
- }, n);
22
- }
23
- var Ur = function() {
24
- if (typeof Map < "u")
25
- return Map;
26
- function e(n, t) {
27
- var r = -1;
28
- return n.some(function(i, o) {
29
- return i[0] === t ? (r = o, !0) : !1;
30
- }), r;
31
- }
32
- return (
33
- /** @class */
34
- function() {
35
- function n() {
36
- this.__entries__ = [];
37
- }
38
- return Object.defineProperty(n.prototype, "size", {
39
- /**
40
- * @returns {boolean}
41
- */
42
- get: function() {
43
- return this.__entries__.length;
44
- },
45
- enumerable: !0,
46
- configurable: !0
47
- }), n.prototype.get = function(t) {
48
- var r = e(this.__entries__, t), i = this.__entries__[r];
49
- return i && i[1];
50
- }, n.prototype.set = function(t, r) {
51
- var i = e(this.__entries__, t);
52
- ~i ? this.__entries__[i][1] = r : this.__entries__.push([t, r]);
53
- }, n.prototype.delete = function(t) {
54
- var r = this.__entries__, i = e(r, t);
55
- ~i && r.splice(i, 1);
56
- }, n.prototype.has = function(t) {
57
- return !!~e(this.__entries__, t);
58
- }, n.prototype.clear = function() {
59
- this.__entries__.splice(0);
60
- }, n.prototype.forEach = function(t, r) {
61
- r === void 0 && (r = null);
62
- for (var i = 0, o = this.__entries__; i < o.length; i++) {
63
- var s = o[i];
64
- t.call(r, s[1], s[0]);
65
- }
66
- }, n;
67
- }()
68
- );
69
- }(), tr = typeof window < "u" && typeof document < "u" && window.document === document, Kn = function() {
70
- return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
71
- }(), Pa = function() {
72
- return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(Kn) : function(e) {
73
- return setTimeout(function() {
74
- return e(Date.now());
75
- }, 1e3 / 60);
76
- };
77
- }(), Na = 2;
78
- function _a(e, n) {
79
- var t = !1, r = !1, i = 0;
80
- function o() {
81
- t && (t = !1, e()), r && l();
82
- }
83
- function s() {
84
- Pa(o);
85
- }
86
- function l() {
87
- var u = Date.now();
88
- if (t) {
89
- if (u - i < Na)
90
- return;
91
- r = !0;
92
- } else
93
- t = !0, r = !1, setTimeout(s, n);
94
- i = u;
95
- }
96
- return l;
97
- }
98
- var Ia = 20, xa = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], Da = typeof MutationObserver < "u", ka = (
99
- /** @class */
100
- function() {
101
- function e() {
102
- this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = _a(this.refresh.bind(this), Ia);
103
- }
104
- return e.prototype.addObserver = function(n) {
105
- ~this.observers_.indexOf(n) || this.observers_.push(n), this.connected_ || this.connect_();
106
- }, e.prototype.removeObserver = function(n) {
107
- var t = this.observers_, r = t.indexOf(n);
108
- ~r && t.splice(r, 1), !t.length && this.connected_ && this.disconnect_();
109
- }, e.prototype.refresh = function() {
110
- var n = this.updateObservers_();
111
- n && this.refresh();
112
- }, e.prototype.updateObservers_ = function() {
113
- var n = this.observers_.filter(function(t) {
114
- return t.gatherActive(), t.hasActive();
115
- });
116
- return n.forEach(function(t) {
117
- return t.broadcastActive();
118
- }), n.length > 0;
119
- }, e.prototype.connect_ = function() {
120
- !tr || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), Da ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
121
- attributes: !0,
122
- childList: !0,
123
- characterData: !0,
124
- subtree: !0
125
- })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
126
- }, e.prototype.disconnect_ = function() {
127
- !tr || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
128
- }, e.prototype.onTransitionEnd_ = function(n) {
129
- var t = n.propertyName, r = t === void 0 ? "" : t, i = xa.some(function(o) {
130
- return !!~r.indexOf(o);
131
- });
132
- i && this.refresh();
133
- }, e.getInstance = function() {
134
- return this.instance_ || (this.instance_ = new e()), this.instance_;
135
- }, e.instance_ = null, e;
136
- }()
137
- ), jr = function(e, n) {
138
- for (var t = 0, r = Object.keys(n); t < r.length; t++) {
139
- var i = r[t];
140
- Object.defineProperty(e, i, {
141
- value: n[i],
142
- enumerable: !1,
143
- writable: !1,
144
- configurable: !0
145
- });
146
- }
147
- return e;
148
- }, cn = function(e) {
149
- var n = e && e.ownerDocument && e.ownerDocument.defaultView;
150
- return n || Kn;
151
- }, qr = Vn(0, 0, 0, 0);
152
- function Tn(e) {
153
- return parseFloat(e) || 0;
154
- }
155
- function wr(e) {
156
- for (var n = [], t = 1; t < arguments.length; t++)
157
- n[t - 1] = arguments[t];
158
- return n.reduce(function(r, i) {
159
- var o = e["border-" + i + "-width"];
160
- return r + Tn(o);
161
- }, 0);
162
- }
163
- function Oa(e) {
164
- for (var n = ["top", "right", "bottom", "left"], t = {}, r = 0, i = n; r < i.length; r++) {
165
- var o = i[r], s = e["padding-" + o];
166
- t[o] = Tn(s);
167
- }
168
- return t;
169
- }
170
- function Ka(e) {
171
- var n = e.getBBox();
172
- return Vn(0, 0, n.width, n.height);
173
- }
174
- function Ta(e) {
175
- var n = e.clientWidth, t = e.clientHeight;
176
- if (!n && !t)
177
- return qr;
178
- var r = cn(e).getComputedStyle(e), i = Oa(r), o = i.left + i.right, s = i.top + i.bottom, l = Tn(r.width), u = Tn(r.height);
179
- if (r.boxSizing === "border-box" && (Math.round(l + o) !== n && (l -= wr(r, "left", "right") + o), Math.round(u + s) !== t && (u -= wr(r, "top", "bottom") + s)), !Aa(e)) {
180
- var c = Math.round(l + o) - n, b = Math.round(u + s) - t;
181
- Math.abs(c) !== 1 && (l -= c), Math.abs(b) !== 1 && (u -= b);
182
- }
183
- return Vn(i.left, i.top, l, u);
184
- }
185
- var La = /* @__PURE__ */ function() {
186
- return typeof SVGGraphicsElement < "u" ? function(e) {
187
- return e instanceof cn(e).SVGGraphicsElement;
188
- } : function(e) {
189
- return e instanceof cn(e).SVGElement && typeof e.getBBox == "function";
190
- };
191
- }();
192
- function Aa(e) {
193
- return e === cn(e).document.documentElement;
194
- }
195
- function $a(e) {
196
- return tr ? La(e) ? Ka(e) : Ta(e) : qr;
197
- }
198
- function za(e) {
199
- var n = e.x, t = e.y, r = e.width, i = e.height, o = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, s = Object.create(o.prototype);
200
- return jr(s, {
201
- x: n,
202
- y: t,
203
- width: r,
204
- height: i,
205
- top: t,
206
- right: n + r,
207
- bottom: i + t,
208
- left: n
209
- }), s;
210
- }
211
- function Vn(e, n, t, r) {
212
- return { x: e, y: n, width: t, height: r };
213
- }
214
- var Va = (
215
- /** @class */
216
- function() {
217
- function e(n) {
218
- this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = Vn(0, 0, 0, 0), this.target = n;
219
- }
220
- return e.prototype.isActive = function() {
221
- var n = $a(this.target);
222
- return this.contentRect_ = n, n.width !== this.broadcastWidth || n.height !== this.broadcastHeight;
223
- }, e.prototype.broadcastRect = function() {
224
- var n = this.contentRect_;
225
- return this.broadcastWidth = n.width, this.broadcastHeight = n.height, n;
226
- }, e;
227
- }()
228
- ), Wa = (
229
- /** @class */
230
- /* @__PURE__ */ function() {
231
- function e(n, t) {
232
- var r = za(t);
233
- jr(this, { target: n, contentRect: r });
234
- }
235
- return e;
236
- }()
237
- ), Fa = (
238
- /** @class */
239
- function() {
240
- function e(n, t, r) {
241
- if (this.activeObservations_ = [], this.observations_ = new Ur(), typeof n != "function")
242
- throw new TypeError("The callback provided as parameter 1 is not a function.");
243
- this.callback_ = n, this.controller_ = t, this.callbackCtx_ = r;
244
- }
245
- return e.prototype.observe = function(n) {
246
- if (!arguments.length)
247
- throw new TypeError("1 argument required, but only 0 present.");
248
- if (!(typeof Element > "u" || !(Element instanceof Object))) {
249
- if (!(n instanceof cn(n).Element))
250
- throw new TypeError('parameter 1 is not of type "Element".');
251
- var t = this.observations_;
252
- t.has(n) || (t.set(n, new Va(n)), this.controller_.addObserver(this), this.controller_.refresh());
253
- }
254
- }, e.prototype.unobserve = function(n) {
255
- if (!arguments.length)
256
- throw new TypeError("1 argument required, but only 0 present.");
257
- if (!(typeof Element > "u" || !(Element instanceof Object))) {
258
- if (!(n instanceof cn(n).Element))
259
- throw new TypeError('parameter 1 is not of type "Element".');
260
- var t = this.observations_;
261
- t.has(n) && (t.delete(n), t.size || this.controller_.removeObserver(this));
262
- }
263
- }, e.prototype.disconnect = function() {
264
- this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
265
- }, e.prototype.gatherActive = function() {
266
- var n = this;
267
- this.clearActive(), this.observations_.forEach(function(t) {
268
- t.isActive() && n.activeObservations_.push(t);
269
- });
270
- }, e.prototype.broadcastActive = function() {
271
- if (this.hasActive()) {
272
- var n = this.callbackCtx_, t = this.activeObservations_.map(function(r) {
273
- return new Wa(r.target, r.broadcastRect());
274
- });
275
- this.callback_.call(n, t, n), this.clearActive();
276
- }
277
- }, e.prototype.clearActive = function() {
278
- this.activeObservations_.splice(0);
279
- }, e.prototype.hasActive = function() {
280
- return this.activeObservations_.length > 0;
281
- }, e;
282
- }()
283
- ), Gr = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new Ur(), Jr = (
284
- /** @class */
285
- /* @__PURE__ */ function() {
286
- function e(n) {
287
- if (!(this instanceof e))
288
- throw new TypeError("Cannot call a class as a function.");
289
- if (!arguments.length)
290
- throw new TypeError("1 argument required, but only 0 present.");
291
- var t = ka.getInstance(), r = new Fa(n, t, this);
292
- Gr.set(this, r);
293
- }
294
- return e;
295
- }()
296
- );
297
- [
298
- "observe",
299
- "unobserve",
300
- "disconnect"
301
- ].forEach(function(e) {
302
- Jr.prototype[e] = function() {
303
- var n;
304
- return (n = Gr.get(this))[e].apply(n, arguments);
305
- };
306
- });
307
- var Ha = function() {
308
- return typeof Kn.ResizeObserver < "u" ? Kn.ResizeObserver : Jr;
309
- }(), Et = /* @__PURE__ */ new Map();
310
- function Zr(e) {
311
- e.forEach(function(n) {
312
- var t, r = n.target;
313
- (t = Et.get(r)) === null || t === void 0 || t.forEach(function(i) {
314
- return i(r);
315
- });
316
- });
317
- }
318
- var Qr = new Ha(Zr);
319
- process.env.NODE_ENV;
320
- process.env.NODE_ENV;
321
- function Ba(e, n) {
322
- Et.has(e) || (Et.set(e, /* @__PURE__ */ new Set()), Qr.observe(e)), Et.get(e).add(n);
323
- }
324
- function Ua(e, n) {
325
- Et.has(e) && (Et.get(e).delete(n), Et.get(e).size || (Qr.unobserve(e), Et.delete(e)));
326
- }
327
- var ja = /* @__PURE__ */ function(e) {
328
- Tr(t, e);
329
- var n = Lr(t);
330
- function t() {
331
- return Ar(this, t), n.apply(this, arguments);
332
- }
333
- return $r(t, [{
334
- key: "render",
335
- value: function() {
336
- return this.props.children;
337
- }
338
- }]), t;
339
- }(a.Component);
340
- function qa(e, n) {
341
- var t = e.children, r = e.disabled, i = a.useRef(null), o = a.useRef(null), s = a.useContext(er), l = typeof t == "function", u = l ? t(i) : t, c = a.useRef({
342
- width: -1,
343
- height: -1,
344
- offsetWidth: -1,
345
- offsetHeight: -1
346
- }), b = !l && /* @__PURE__ */ a.isValidElement(u) && $n(u), f = b ? zn(u) : null, d = ur(f, i), m = function() {
347
- var M;
348
- return Gn(i.current) || // Support `nativeElement` format
349
- (i.current && zr(i.current) === "object" ? Gn((M = i.current) === null || M === void 0 ? void 0 : M.nativeElement) : null) || Gn(o.current);
350
- };
351
- a.useImperativeHandle(n, function() {
352
- return m();
353
- });
354
- var h = a.useRef(e);
355
- h.current = e;
356
- var R = a.useCallback(function(g) {
357
- var M = h.current, S = M.onResize, y = M.data, w = g.getBoundingClientRect(), C = w.width, v = w.height, E = g.offsetWidth, D = g.offsetHeight, K = Math.floor(C), U = Math.floor(v);
358
- if (c.current.width !== K || c.current.height !== U || c.current.offsetWidth !== E || c.current.offsetHeight !== D) {
359
- var z = {
360
- width: K,
361
- height: U,
362
- offsetWidth: E,
363
- offsetHeight: D
364
- };
365
- c.current = z;
366
- var F = E === Math.round(C) ? C : E, A = D === Math.round(v) ? v : D, j = T(T({}, z), {}, {
367
- offsetWidth: F,
368
- offsetHeight: A
369
- });
370
- s == null || s(j, g, y), S && Promise.resolve().then(function() {
371
- S(j, g);
372
- });
373
- }
374
- }, []);
375
- return a.useEffect(function() {
376
- var g = m();
377
- return g && !r && Ba(g, R), function() {
378
- return Ua(g, R);
379
- };
380
- }, [i.current, r]), /* @__PURE__ */ a.createElement(ja, {
381
- ref: o
382
- }, b ? /* @__PURE__ */ a.cloneElement(u, {
383
- ref: d
384
- }) : u);
385
- }
386
- var Yr = /* @__PURE__ */ a.forwardRef(qa);
387
- process.env.NODE_ENV !== "production" && (Yr.displayName = "SingleObserver");
388
- var Ga = "rc-observer-key";
389
- function Ja(e, n) {
390
- var t = e.children, r = typeof t == "function" ? [t] : Vr(t);
391
- return process.env.NODE_ENV !== "production" && (r.length > 1 ? Zn(!1, "Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead.") : r.length === 0 && Zn(!1, "`children` of ResizeObserver is empty. Nothing is in observe.")), r.map(function(i, o) {
392
- var s = (i == null ? void 0 : i.key) || "".concat(Ga, "-").concat(o);
393
- return /* @__PURE__ */ a.createElement(Yr, ae({}, e, {
394
- key: s,
395
- ref: o === 0 ? n : void 0
396
- }), i);
397
- });
398
- }
399
- var vn = /* @__PURE__ */ a.forwardRef(Ja);
400
- process.env.NODE_ENV !== "production" && (vn.displayName = "ResizeObserver");
401
- vn.Collection = Ea;
402
- const Za = new $t("antSlideUpIn", {
403
- "0%": {
404
- transform: "scaleY(0.8)",
405
- transformOrigin: "0% 0%",
406
- opacity: 0
407
- },
408
- "100%": {
409
- transform: "scaleY(1)",
410
- transformOrigin: "0% 0%",
411
- opacity: 1
412
- }
413
- }), Qa = new $t("antSlideUpOut", {
414
- "0%": {
415
- transform: "scaleY(1)",
416
- transformOrigin: "0% 0%",
417
- opacity: 1
418
- },
419
- "100%": {
420
- transform: "scaleY(0.8)",
421
- transformOrigin: "0% 0%",
422
- opacity: 0
423
- }
424
- }), Ya = new $t("antSlideDownIn", {
425
- "0%": {
426
- transform: "scaleY(0.8)",
427
- transformOrigin: "100% 100%",
428
- opacity: 0
429
- },
430
- "100%": {
431
- transform: "scaleY(1)",
432
- transformOrigin: "100% 100%",
433
- opacity: 1
434
- }
435
- }), Xa = new $t("antSlideDownOut", {
436
- "0%": {
437
- transform: "scaleY(1)",
438
- transformOrigin: "100% 100%",
439
- opacity: 1
440
- },
441
- "100%": {
442
- transform: "scaleY(0.8)",
443
- transformOrigin: "100% 100%",
444
- opacity: 0
445
- }
446
- }), ei = new $t("antSlideLeftIn", {
447
- "0%": {
448
- transform: "scaleX(0.8)",
449
- transformOrigin: "0% 0%",
450
- opacity: 0
451
- },
452
- "100%": {
453
- transform: "scaleX(1)",
454
- transformOrigin: "0% 0%",
455
- opacity: 1
456
- }
457
- }), ti = new $t("antSlideLeftOut", {
458
- "0%": {
459
- transform: "scaleX(1)",
460
- transformOrigin: "0% 0%",
461
- opacity: 1
462
- },
463
- "100%": {
464
- transform: "scaleX(0.8)",
465
- transformOrigin: "0% 0%",
466
- opacity: 0
467
- }
468
- }), ni = new $t("antSlideRightIn", {
469
- "0%": {
470
- transform: "scaleX(0.8)",
471
- transformOrigin: "100% 0%",
472
- opacity: 0
473
- },
474
- "100%": {
475
- transform: "scaleX(1)",
476
- transformOrigin: "100% 0%",
477
- opacity: 1
478
- }
479
- }), ri = new $t("antSlideRightOut", {
480
- "0%": {
481
- transform: "scaleX(1)",
482
- transformOrigin: "100% 0%",
483
- opacity: 1
484
- },
485
- "100%": {
486
- transform: "scaleX(0.8)",
487
- transformOrigin: "100% 0%",
488
- opacity: 0
489
- }
490
- }), ai = {
491
- "slide-up": {
492
- inKeyframes: Za,
493
- outKeyframes: Qa
494
- },
495
- "slide-down": {
496
- inKeyframes: Ya,
497
- outKeyframes: Xa
498
- },
499
- "slide-left": {
500
- inKeyframes: ei,
501
- outKeyframes: ti
502
- },
503
- "slide-right": {
504
- inKeyframes: ni,
505
- outKeyframes: ri
506
- }
507
- }, Ro = (e, n) => {
508
- const {
509
- antCls: t
510
- } = e, r = `${t}-${n}`, {
511
- inKeyframes: i,
512
- outKeyframes: o
513
- } = ai[n];
514
- return [ba(r, i, o, e.motionDurationMid), {
515
- [`
516
- ${r}-enter,
517
- ${r}-appear
518
- `]: {
519
- transform: "scale(0)",
520
- transformOrigin: "0% 0%",
521
- opacity: 0,
522
- animationTimingFunction: e.motionEaseOutQuint,
523
- "&-prepare": {
524
- transform: "scale(1)"
525
- }
526
- },
527
- [`${r}-leave`]: {
528
- animationTimingFunction: e.motionEaseInQuint
529
- }
530
- }];
531
- }, ii = function() {
532
- if (typeof navigator > "u" || typeof window > "u")
533
- return !1;
534
- var e = navigator.userAgent || navigator.vendor || window.opera;
535
- return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e == null ? void 0 : e.substr(0, 4));
536
- };
537
- var oi = ["prefixCls", "invalidate", "item", "renderItem", "responsive", "responsiveDisabled", "registerSize", "itemKey", "className", "style", "children", "display", "order", "component"], on = void 0;
538
- function si(e, n) {
539
- var t = e.prefixCls, r = e.invalidate, i = e.item, o = e.renderItem, s = e.responsive, l = e.responsiveDisabled, u = e.registerSize, c = e.itemKey, b = e.className, f = e.style, d = e.children, m = e.display, h = e.order, R = e.component, g = R === void 0 ? "div" : R, M = ke(e, oi), S = s && !m;
540
- function y(D) {
541
- u(c, D);
542
- }
543
- a.useEffect(function() {
544
- return function() {
545
- y(null);
546
- };
547
- }, []);
548
- var w = o && i !== on ? o(i, {
549
- index: h
550
- }) : d, C;
551
- r || (C = {
552
- opacity: S ? 0 : 1,
553
- height: S ? 0 : on,
554
- overflowY: S ? "hidden" : on,
555
- order: s ? h : on,
556
- pointerEvents: S ? "none" : on,
557
- position: S ? "absolute" : on
558
- });
559
- var v = {};
560
- S && (v["aria-hidden"] = !0);
561
- var E = /* @__PURE__ */ a.createElement(g, ae({
562
- className: Oe(!r && t, b),
563
- style: T(T({}, C), f)
564
- }, v, M, {
565
- ref: n
566
- }), w);
567
- return s && (E = /* @__PURE__ */ a.createElement(vn, {
568
- onResize: function(K) {
569
- var U = K.offsetWidth;
570
- y(U);
571
- },
572
- disabled: l
573
- }, E)), E;
574
- }
575
- var wn = /* @__PURE__ */ a.forwardRef(si);
576
- wn.displayName = "Item";
577
- function li(e) {
578
- if (typeof MessageChannel > "u")
579
- Jt(e);
580
- else {
581
- var n = new MessageChannel();
582
- n.port1.onmessage = function() {
583
- return e();
584
- }, n.port2.postMessage(void 0);
585
- }
586
- }
587
- function ui() {
588
- var e = a.useRef(null), n = function(r) {
589
- e.current || (e.current = [], li(function() {
590
- Br.unstable_batchedUpdates(function() {
591
- e.current.forEach(function(i) {
592
- i();
593
- }), e.current = null;
594
- });
595
- })), e.current.push(r);
596
- };
597
- return n;
598
- }
599
- function gn(e, n) {
600
- var t = a.useState(n), r = O(t, 2), i = r[0], o = r[1], s = Lt(function(l) {
601
- e(function() {
602
- o(l);
603
- });
604
- });
605
- return [i, s];
606
- }
607
- var Ln = /* @__PURE__ */ je.createContext(null), ci = ["component"], fi = ["className"], vi = ["className"], di = function(n, t) {
608
- var r = a.useContext(Ln);
609
- if (!r) {
610
- var i = n.component, o = i === void 0 ? "div" : i, s = ke(n, ci);
611
- return /* @__PURE__ */ a.createElement(o, ae({}, s, {
612
- ref: t
613
- }));
614
- }
615
- var l = r.className, u = ke(r, fi), c = n.className, b = ke(n, vi);
616
- return /* @__PURE__ */ a.createElement(Ln.Provider, {
617
- value: null
618
- }, /* @__PURE__ */ a.createElement(wn, ae({
619
- ref: t,
620
- className: Oe(l, c)
621
- }, u, b)));
622
- }, Xr = /* @__PURE__ */ a.forwardRef(di);
623
- Xr.displayName = "RawItem";
624
- var mi = ["prefixCls", "data", "renderItem", "renderRawItem", "itemKey", "itemWidth", "ssr", "style", "className", "maxCount", "renderRest", "renderRawRest", "suffix", "component", "itemComponent", "onVisibleChange"], ea = "responsive", ta = "invalidate";
625
- function hi(e) {
626
- return "+ ".concat(e.length, " ...");
627
- }
628
- function gi(e, n) {
629
- var t = e.prefixCls, r = t === void 0 ? "rc-overflow" : t, i = e.data, o = i === void 0 ? [] : i, s = e.renderItem, l = e.renderRawItem, u = e.itemKey, c = e.itemWidth, b = c === void 0 ? 10 : c, f = e.ssr, d = e.style, m = e.className, h = e.maxCount, R = e.renderRest, g = e.renderRawRest, M = e.suffix, S = e.component, y = S === void 0 ? "div" : S, w = e.itemComponent, C = e.onVisibleChange, v = ke(e, mi), E = f === "full", D = ui(), K = gn(D, null), U = O(K, 2), z = U[0], F = U[1], A = z || 0, j = gn(D, /* @__PURE__ */ new Map()), Z = O(j, 2), $ = Z[0], V = Z[1], N = gn(D, 0), q = O(N, 2), Q = q[0], ne = q[1], k = gn(D, 0), me = O(k, 2), Me = me[0], Y = me[1], G = gn(D, 0), he = O(G, 2), H = he[0], X = he[1], ie = Jn(null), ge = O(ie, 2), ve = ge[0], Ie = ge[1], ye = Jn(null), le = O(ye, 2), xe = le[0], He = le[1], Re = a.useMemo(function() {
630
- return xe === null && E ? Number.MAX_SAFE_INTEGER : xe || 0;
631
- }, [xe, z]), be = Jn(!1), We = O(be, 2), Se = We[0], qe = We[1], tt = "".concat(r, "-item"), W = Math.max(Q, Me), Ne = h === ea, J = o.length && Ne, nt = h === ta, Ae = J || typeof h == "number" && o.length > h, pe = Xn(function() {
632
- var _ = o;
633
- return J ? z === null && E ? _ = o : _ = o.slice(0, Math.min(o.length, A / b)) : typeof h == "number" && (_ = o.slice(0, h)), _;
634
- }, [o, b, z, h, J]), Ge = Xn(function() {
635
- return J ? o.slice(Re + 1) : o.slice(pe.length);
636
- }, [o, pe, J, Re]), $e = At(function(_, x) {
637
- var I;
638
- return typeof u == "function" ? u(_) : (I = u && (_ == null ? void 0 : _[u])) !== null && I !== void 0 ? I : x;
639
- }, [u]), Ee = At(s || function(_) {
640
- return _;
641
- }, [s]);
642
- function Ke(_, x, I) {
643
- xe === _ && (x === void 0 || x === ve) || (He(_), I || (qe(_ < o.length - 1), C == null || C(_)), x !== void 0 && Ie(x));
644
- }
645
- function Pe(_, x) {
646
- F(x.clientWidth);
647
- }
648
- function Ce(_, x) {
649
- V(function(I) {
650
- var L = new Map(I);
651
- return x === null ? L.delete(_) : L.set(_, x), L;
652
- });
653
- }
654
- function oe(_, x) {
655
- Y(x), ne(Me);
656
- }
657
- function ee(_, x) {
658
- X(x);
659
- }
660
- function ze(_) {
661
- return $.get($e(pe[_], _));
662
- }
663
- st(function() {
664
- if (A && typeof W == "number" && pe) {
665
- var _ = H, x = pe.length, I = x - 1;
666
- if (!x) {
667
- Ke(0, null);
668
- return;
669
- }
670
- for (var L = 0; L < x; L += 1) {
671
- var se = ze(L);
672
- if (E && (se = se || 0), se === void 0) {
673
- Ke(L - 1, void 0, !0);
674
- break;
675
- }
676
- if (_ += se, // Only one means `totalWidth` is the final width
677
- I === 0 && _ <= A || // Last two width will be the final width
678
- L === I - 1 && _ + ze(I) <= A) {
679
- Ke(I, null);
680
- break;
681
- } else if (_ + W > A) {
682
- Ke(L - 1, _ - se - H + Me);
683
- break;
684
- }
685
- }
686
- M && ze(0) + H > A && Ie(null);
687
- }
688
- }, [A, $, Me, H, $e, pe]);
689
- var _t = Se && !!Ge.length, vt = {};
690
- ve !== null && J && (vt = {
691
- position: "absolute",
692
- left: ve,
693
- top: 0
694
- });
695
- var Ze = {
696
- prefixCls: tt,
697
- responsive: J,
698
- component: w,
699
- invalidate: nt
700
- }, zt = l ? function(_, x) {
701
- var I = $e(_, x);
702
- return /* @__PURE__ */ a.createElement(Ln.Provider, {
703
- key: I,
704
- value: T(T({}, Ze), {}, {
705
- order: x,
706
- item: _,
707
- itemKey: I,
708
- registerSize: Ce,
709
- display: x <= Re
710
- })
711
- }, l(_, x));
712
- } : function(_, x) {
713
- var I = $e(_, x);
714
- return /* @__PURE__ */ a.createElement(wn, ae({}, Ze, {
715
- order: x,
716
- key: I,
717
- item: _,
718
- renderItem: Ee,
719
- itemKey: I,
720
- registerSize: Ce,
721
- display: x <= Re
722
- }));
723
- }, rt = {
724
- order: _t ? Re : Number.MAX_SAFE_INTEGER,
725
- className: "".concat(tt, "-rest"),
726
- registerSize: oe,
727
- display: _t
728
- }, Fe = R || hi, _e = g ? /* @__PURE__ */ a.createElement(Ln.Provider, {
729
- value: T(T({}, Ze), rt)
730
- }, g(Ge)) : /* @__PURE__ */ a.createElement(wn, ae({}, Ze, rt), typeof Fe == "function" ? Fe(Ge) : Fe), ce = /* @__PURE__ */ a.createElement(y, ae({
731
- className: Oe(!nt && r, m),
732
- style: d,
733
- ref: n
734
- }, v), pe.map(zt), Ae ? _e : null, M && /* @__PURE__ */ a.createElement(wn, ae({}, Ze, {
735
- responsive: Ne,
736
- responsiveDisabled: !J,
737
- order: Re,
738
- className: "".concat(tt, "-suffix"),
739
- registerSize: ee,
740
- display: !0,
741
- style: vt
742
- }), M));
743
- return Ne ? /* @__PURE__ */ a.createElement(vn, {
744
- onResize: Pe,
745
- disabled: !J
746
- }, ce) : ce;
747
- }
748
- var Pt = /* @__PURE__ */ a.forwardRef(gi);
749
- Pt.displayName = "Overflow";
750
- Pt.Item = Xr;
751
- Pt.RESPONSIVE = ea;
752
- Pt.INVALIDATE = ta;
753
- function yi(e) {
754
- var n = e.prefixCls, t = e.align, r = e.arrow, i = e.arrowPos, o = r || {}, s = o.className, l = o.content, u = i.x, c = u === void 0 ? 0 : u, b = i.y, f = b === void 0 ? 0 : b, d = a.useRef();
755
- if (!t || !t.points)
756
- return null;
757
- var m = {
758
- position: "absolute"
759
- };
760
- if (t.autoArrow !== !1) {
761
- var h = t.points[0], R = t.points[1], g = h[0], M = h[1], S = R[0], y = R[1];
762
- g === S || !["t", "b"].includes(g) ? m.top = f : g === "t" ? m.top = 0 : m.bottom = 0, M === y || !["l", "r"].includes(M) ? m.left = c : M === "l" ? m.left = 0 : m.right = 0;
763
- }
764
- return /* @__PURE__ */ a.createElement("div", {
765
- ref: d,
766
- className: Oe("".concat(n, "-arrow"), s),
767
- style: m
768
- }, l);
769
- }
770
- function bi(e) {
771
- var n = e.prefixCls, t = e.open, r = e.zIndex, i = e.mask, o = e.motion;
772
- return i ? /* @__PURE__ */ a.createElement(cr, ae({}, o, {
773
- motionAppear: !0,
774
- visible: t,
775
- removeOnLeave: !0
776
- }), function(s) {
777
- var l = s.className;
778
- return /* @__PURE__ */ a.createElement("div", {
779
- style: {
780
- zIndex: r
781
- },
782
- className: Oe("".concat(n, "-mask"), l)
783
- });
784
- }) : null;
785
- }
786
- var na = /* @__PURE__ */ a.memo(function(e) {
787
- var n = e.children;
788
- return n;
789
- }, function(e, n) {
790
- return n.cache;
791
- });
792
- process.env.NODE_ENV !== "production" && (na.displayName = "PopupContent");
793
- var ra = /* @__PURE__ */ a.forwardRef(function(e, n) {
794
- var t = e.popup, r = e.className, i = e.prefixCls, o = e.style, s = e.target, l = e.onVisibleChanged, u = e.open, c = e.keepDom, b = e.fresh, f = e.onClick, d = e.mask, m = e.arrow, h = e.arrowPos, R = e.align, g = e.motion, M = e.maskMotion, S = e.forceRender, y = e.getPopupContainer, w = e.autoDestroy, C = e.portal, v = e.zIndex, E = e.onMouseEnter, D = e.onMouseLeave, K = e.onPointerEnter, U = e.onPointerDownCapture, z = e.ready, F = e.offsetX, A = e.offsetY, j = e.offsetR, Z = e.offsetB, $ = e.onAlign, V = e.onPrepare, N = e.stretch, q = e.targetWidth, Q = e.targetHeight, ne = typeof t == "function" ? t() : t, k = u || c, me = (y == null ? void 0 : y.length) > 0, Me = a.useState(!y || !me), Y = O(Me, 2), G = Y[0], he = Y[1];
795
- if (st(function() {
796
- !G && me && s && he(!0);
797
- }, [G, me, s]), !G)
798
- return null;
799
- var H = "auto", X = {
800
- left: "-1000vw",
801
- top: "-1000vh",
802
- right: H,
803
- bottom: H
804
- };
805
- if (z || !u) {
806
- var ie, ge = R.points, ve = R.dynamicInset || ((ie = R._experimental) === null || ie === void 0 ? void 0 : ie.dynamicInset), Ie = ve && ge[0][1] === "r", ye = ve && ge[0][0] === "b";
807
- Ie ? (X.right = j, X.left = H) : (X.left = F, X.right = H), ye ? (X.bottom = Z, X.top = H) : (X.top = A, X.bottom = H);
808
- }
809
- var le = {};
810
- return N && (N.includes("height") && Q ? le.height = Q : N.includes("minHeight") && Q && (le.minHeight = Q), N.includes("width") && q ? le.width = q : N.includes("minWidth") && q && (le.minWidth = q)), u || (le.pointerEvents = "none"), /* @__PURE__ */ a.createElement(C, {
811
- open: S || k,
812
- getContainer: y && function() {
813
- return y(s);
814
- },
815
- autoDestroy: w
816
- }, /* @__PURE__ */ a.createElement(bi, {
817
- prefixCls: i,
818
- open: u,
819
- zIndex: v,
820
- mask: d,
821
- motion: M
822
- }), /* @__PURE__ */ a.createElement(vn, {
823
- onResize: $,
824
- disabled: !u
825
- }, function(xe) {
826
- return /* @__PURE__ */ a.createElement(cr, ae({
827
- motionAppear: !0,
828
- motionEnter: !0,
829
- motionLeave: !0,
830
- removeOnLeave: !1,
831
- forceRender: S,
832
- leavedClassName: "".concat(i, "-hidden")
833
- }, g, {
834
- onAppearPrepare: V,
835
- onEnterPrepare: V,
836
- visible: u,
837
- onVisibleChanged: function(Re) {
838
- var be;
839
- g == null || (be = g.onVisibleChanged) === null || be === void 0 || be.call(g, Re), l(Re);
840
- }
841
- }), function(He, Re) {
842
- var be = He.className, We = He.style, Se = Oe(i, be, r);
843
- return /* @__PURE__ */ a.createElement("div", {
844
- ref: fr(xe, n, Re),
845
- className: Se,
846
- style: T(T(T(T({
847
- "--arrow-x": "".concat(h.x || 0, "px"),
848
- "--arrow-y": "".concat(h.y || 0, "px")
849
- }, X), le), We), {}, {
850
- boxSizing: "border-box",
851
- zIndex: v
852
- }, o),
853
- onMouseEnter: E,
854
- onMouseLeave: D,
855
- onPointerEnter: K,
856
- onClick: f,
857
- onPointerDownCapture: U
858
- }, m && /* @__PURE__ */ a.createElement(yi, {
859
- prefixCls: i,
860
- arrow: m,
861
- arrowPos: h,
862
- align: R
863
- }), /* @__PURE__ */ a.createElement(na, {
864
- cache: !u && !b
865
- }, ne));
866
- });
867
- }));
868
- });
869
- process.env.NODE_ENV !== "production" && (ra.displayName = "Popup");
870
- var aa = /* @__PURE__ */ a.forwardRef(function(e, n) {
871
- var t = e.children, r = e.getTriggerDOMNode, i = $n(t), o = a.useCallback(function(l) {
872
- pa(n, r ? r(l) : l);
873
- }, [r]), s = ur(o, zn(t));
874
- return i ? /* @__PURE__ */ a.cloneElement(t, {
875
- ref: s
876
- }) : t;
877
- });
878
- process.env.NODE_ENV !== "production" && (aa.displayName = "TriggerWrapper");
879
- var Mr = /* @__PURE__ */ a.createContext(null);
880
- function Rr(e) {
881
- return e ? Array.isArray(e) ? e : [e] : [];
882
- }
883
- function pi(e, n, t, r) {
884
- return a.useMemo(function() {
885
- var i = Rr(t ?? n), o = Rr(r ?? n), s = new Set(i), l = new Set(o);
886
- return e && (s.has("hover") && (s.delete("hover"), s.add("click")), l.has("hover") && (l.delete("hover"), l.add("click"))), [s, l];
887
- }, [e, n, t, r]);
888
- }
889
- function Ci() {
890
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], t = arguments.length > 2 ? arguments[2] : void 0;
891
- return t ? e[0] === n[0] : e[0] === n[0] && e[1] === n[1];
892
- }
893
- function wi(e, n, t, r) {
894
- for (var i = t.points, o = Object.keys(e), s = 0; s < o.length; s += 1) {
895
- var l, u = o[s];
896
- if (Ci((l = e[u]) === null || l === void 0 ? void 0 : l.points, i, r))
897
- return "".concat(n, "-placement-").concat(u);
898
- }
899
- return "";
900
- }
901
- function Sr(e, n, t, r) {
902
- return n || (t ? {
903
- motionName: "".concat(e, "-").concat(t)
904
- } : r ? {
905
- motionName: r
906
- } : null);
907
- }
908
- function Sn(e) {
909
- return e.ownerDocument.defaultView;
910
- }
911
- function nr(e) {
912
- for (var n = [], t = e == null ? void 0 : e.parentElement, r = ["hidden", "scroll", "clip", "auto"]; t; ) {
913
- var i = Sn(t).getComputedStyle(t), o = i.overflowX, s = i.overflowY, l = i.overflow;
914
- [o, s, l].some(function(u) {
915
- return r.includes(u);
916
- }) && n.push(t), t = t.parentElement;
917
- }
918
- return n;
919
- }
920
- function Mn(e) {
921
- var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
922
- return Number.isNaN(e) ? n : e;
923
- }
924
- function yn(e) {
925
- return Mn(parseFloat(e), 0);
926
- }
927
- function Er(e, n) {
928
- var t = T({}, e);
929
- return (n || []).forEach(function(r) {
930
- if (!(r instanceof HTMLBodyElement || r instanceof HTMLHtmlElement)) {
931
- var i = Sn(r).getComputedStyle(r), o = i.overflow, s = i.overflowClipMargin, l = i.borderTopWidth, u = i.borderBottomWidth, c = i.borderLeftWidth, b = i.borderRightWidth, f = r.getBoundingClientRect(), d = r.offsetHeight, m = r.clientHeight, h = r.offsetWidth, R = r.clientWidth, g = yn(l), M = yn(u), S = yn(c), y = yn(b), w = Mn(Math.round(f.width / h * 1e3) / 1e3), C = Mn(Math.round(f.height / d * 1e3) / 1e3), v = (h - R - S - y) * w, E = (d - m - g - M) * C, D = g * C, K = M * C, U = S * w, z = y * w, F = 0, A = 0;
932
- if (o === "clip") {
933
- var j = yn(s);
934
- F = j * w, A = j * C;
935
- }
936
- var Z = f.x + U - F, $ = f.y + D - A, V = Z + f.width + 2 * F - U - z - v, N = $ + f.height + 2 * A - D - K - E;
937
- t.left = Math.max(t.left, Z), t.top = Math.max(t.top, $), t.right = Math.min(t.right, V), t.bottom = Math.min(t.bottom, N);
938
- }
939
- }), t;
940
- }
941
- function Pr(e) {
942
- var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, t = "".concat(n), r = t.match(/^(.*)\%$/);
943
- return r ? e * (parseFloat(r[1]) / 100) : parseFloat(t);
944
- }
945
- function Nr(e, n) {
946
- var t = n || [], r = O(t, 2), i = r[0], o = r[1];
947
- return [Pr(e.width, i), Pr(e.height, o)];
948
- }
949
- function _r() {
950
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
951
- return [e[0], e[1]];
952
- }
953
- function sn(e, n) {
954
- var t = n[0], r = n[1], i, o;
955
- return t === "t" ? o = e.y : t === "b" ? o = e.y + e.height : o = e.y + e.height / 2, r === "l" ? i = e.x : r === "r" ? i = e.x + e.width : i = e.x + e.width / 2, {
956
- x: i,
957
- y: o
958
- };
959
- }
960
- function Tt(e, n) {
961
- var t = {
962
- t: "b",
963
- b: "t",
964
- l: "r",
965
- r: "l"
966
- };
967
- return e.map(function(r, i) {
968
- return i === n ? t[r] || "c" : r;
969
- }).join("");
970
- }
971
- function Mi(e, n, t, r, i, o, s) {
972
- var l = a.useState({
973
- ready: !1,
974
- offsetX: 0,
975
- offsetY: 0,
976
- offsetR: 0,
977
- offsetB: 0,
978
- arrowX: 0,
979
- arrowY: 0,
980
- scaleX: 1,
981
- scaleY: 1,
982
- align: i[r] || {}
983
- }), u = O(l, 2), c = u[0], b = u[1], f = a.useRef(0), d = a.useMemo(function() {
984
- return n ? nr(n) : [];
985
- }, [n]), m = a.useRef({}), h = function() {
986
- m.current = {};
987
- };
988
- e || h();
989
- var R = Lt(function() {
990
- if (n && t && e) {
991
- let et = function(hn, St) {
992
- var qt = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ne, Pn = k.x + hn, Nn = k.y + St, Un = Pn + ye, jn = Nn + Ie, p = Math.max(Pn, qt.left), P = Math.max(Nn, qt.top), ue = Math.min(Un, qt.right), we = Math.min(jn, qt.bottom);
993
- return Math.max(0, (ue - p) * (we - P));
994
- }, an = function() {
995
- at = k.y + L, it = at + Ie, yt = k.x + I, Ye = yt + ye;
996
- };
997
- var S, y, w, C, v = n, E = v.ownerDocument, D = Sn(v), K = D.getComputedStyle(v), U = K.position, z = v.style.left, F = v.style.top, A = v.style.right, j = v.style.bottom, Z = v.style.overflow, $ = T(T({}, i[r]), o), V = E.createElement("div");
998
- (S = v.parentElement) === null || S === void 0 || S.appendChild(V), V.style.left = "".concat(v.offsetLeft, "px"), V.style.top = "".concat(v.offsetTop, "px"), V.style.position = U, V.style.height = "".concat(v.offsetHeight, "px"), V.style.width = "".concat(v.offsetWidth, "px"), v.style.left = "0", v.style.top = "0", v.style.right = "auto", v.style.bottom = "auto", v.style.overflow = "hidden";
999
- var N;
1000
- if (Array.isArray(t))
1001
- N = {
1002
- x: t[0],
1003
- y: t[1],
1004
- width: 0,
1005
- height: 0
1006
- };
1007
- else {
1008
- var q, Q, ne = t.getBoundingClientRect();
1009
- ne.x = (q = ne.x) !== null && q !== void 0 ? q : ne.left, ne.y = (Q = ne.y) !== null && Q !== void 0 ? Q : ne.top, N = {
1010
- x: ne.x,
1011
- y: ne.y,
1012
- width: ne.width,
1013
- height: ne.height
1014
- };
1015
- }
1016
- var k = v.getBoundingClientRect(), me = D.getComputedStyle(v), Me = me.height, Y = me.width;
1017
- k.x = (y = k.x) !== null && y !== void 0 ? y : k.left, k.y = (w = k.y) !== null && w !== void 0 ? w : k.top;
1018
- var G = E.documentElement, he = G.clientWidth, H = G.clientHeight, X = G.scrollWidth, ie = G.scrollHeight, ge = G.scrollTop, ve = G.scrollLeft, Ie = k.height, ye = k.width, le = N.height, xe = N.width, He = {
1019
- left: 0,
1020
- top: 0,
1021
- right: he,
1022
- bottom: H
1023
- }, Re = {
1024
- left: -ve,
1025
- top: -ge,
1026
- right: X - ve,
1027
- bottom: ie - ge
1028
- }, be = $.htmlRegion, We = "visible", Se = "visibleFirst";
1029
- be !== "scroll" && be !== Se && (be = We);
1030
- var qe = be === Se, tt = Er(Re, d), W = Er(He, d), Ne = be === We ? W : tt, J = qe ? W : Ne;
1031
- v.style.left = "auto", v.style.top = "auto", v.style.right = "0", v.style.bottom = "0";
1032
- var nt = v.getBoundingClientRect();
1033
- v.style.left = z, v.style.top = F, v.style.right = A, v.style.bottom = j, v.style.overflow = Z, (C = v.parentElement) === null || C === void 0 || C.removeChild(V);
1034
- var Ae = Mn(Math.round(ye / parseFloat(Y) * 1e3) / 1e3), pe = Mn(Math.round(Ie / parseFloat(Me) * 1e3) / 1e3);
1035
- if (Ae === 0 || pe === 0 || Qn(t) && !Wr(t))
1036
- return;
1037
- var Ge = $.offset, $e = $.targetOffset, Ee = Nr(k, Ge), Ke = O(Ee, 2), Pe = Ke[0], Ce = Ke[1], oe = Nr(N, $e), ee = O(oe, 2), ze = ee[0], _t = ee[1];
1038
- N.x -= ze, N.y -= _t;
1039
- var vt = $.points || [], Ze = O(vt, 2), zt = Ze[0], rt = Ze[1], Fe = _r(rt), _e = _r(zt), ce = sn(N, Fe), _ = sn(k, _e), x = T({}, $), I = ce.x - _.x + Pe, L = ce.y - _.y + Ce, se = et(I, L), dt = et(I, L, W), Be = sn(N, ["t", "l"]), Vt = sn(k, ["t", "l"]), Wt = sn(N, ["b", "r"]), It = sn(k, ["b", "r"]), mt = $.overflow || {}, Zt = mt.adjustX, ht = mt.adjustY, xt = mt.shiftX, gt = mt.shiftY, Qe = function(St) {
1040
- return typeof St == "boolean" ? St : St >= 0;
1041
- }, at, it, yt, Ye;
1042
- an();
1043
- var Qt = Qe(ht), Te = _e[0] === Fe[0];
1044
- if (Qt && _e[0] === "t" && (it > J.bottom || m.current.bt)) {
1045
- var bt = L;
1046
- Te ? bt -= Ie - le : bt = Be.y - It.y - Ce;
1047
- var Yt = et(I, bt), dn = et(I, bt, W);
1048
- // Of course use larger one
1049
- Yt > se || Yt === se && (!qe || // Choose recommend one
1050
- dn >= dt) ? (m.current.bt = !0, L = bt, Ce = -Ce, x.points = [Tt(_e, 0), Tt(Fe, 0)]) : m.current.bt = !1;
1051
- }
1052
- if (Qt && _e[0] === "b" && (at < J.top || m.current.tb)) {
1053
- var pt = L;
1054
- Te ? pt += Ie - le : pt = Wt.y - Vt.y - Ce;
1055
- var Ft = et(I, pt), Ct = et(I, pt, W);
1056
- // Of course use larger one
1057
- Ft > se || Ft === se && (!qe || // Choose recommend one
1058
- Ct >= dt) ? (m.current.tb = !0, L = pt, Ce = -Ce, x.points = [Tt(_e, 0), Tt(Fe, 0)]) : m.current.tb = !1;
1059
- }
1060
- var Dt = Qe(Zt), Xt = _e[1] === Fe[1];
1061
- if (Dt && _e[1] === "l" && (Ye > J.right || m.current.rl)) {
1062
- var wt = I;
1063
- Xt ? wt -= ye - xe : wt = Be.x - It.x - Pe;
1064
- var Mt = et(wt, L), kt = et(wt, L, W);
1065
- // Of course use larger one
1066
- Mt > se || Mt === se && (!qe || // Choose recommend one
1067
- kt >= dt) ? (m.current.rl = !0, I = wt, Pe = -Pe, x.points = [Tt(_e, 1), Tt(Fe, 1)]) : m.current.rl = !1;
1068
- }
1069
- if (Dt && _e[1] === "r" && (yt < J.left || m.current.lr)) {
1070
- var Xe = I;
1071
- Xt ? Xe += ye - xe : Xe = Wt.x - Vt.x - Pe;
1072
- var Ht = et(Xe, L), Ot = et(Xe, L, W);
1073
- // Of course use larger one
1074
- Ht > se || Ht === se && (!qe || // Choose recommend one
1075
- Ot >= dt) ? (m.current.lr = !0, I = Xe, Pe = -Pe, x.points = [Tt(_e, 1), Tt(Fe, 1)]) : m.current.lr = !1;
1076
- }
1077
- an();
1078
- var Je = xt === !0 ? 0 : xt;
1079
- typeof Je == "number" && (yt < W.left && (I -= yt - W.left - Pe, N.x + xe < W.left + Je && (I += N.x - W.left + xe - Je)), Ye > W.right && (I -= Ye - W.right - Pe, N.x > W.right - Je && (I += N.x - W.right + Je)));
1080
- var ot = gt === !0 ? 0 : gt;
1081
- typeof ot == "number" && (at < W.top && (L -= at - W.top - Ce, N.y + le < W.top + ot && (L += N.y - W.top + le - ot)), it > W.bottom && (L -= it - W.bottom - Ce, N.y > W.bottom - ot && (L += N.y - W.bottom + ot)));
1082
- var ct = k.x + I, ft = ct + ye, Bt = k.y + L, mn = Bt + Ie, en = N.x, re = en + xe, B = N.y, te = B + le, Le = Math.max(ct, en), De = Math.min(ft, re), Kt = (Le + De) / 2, Ut = Kt - ct, tn = Math.max(Bt, B), nn = Math.min(mn, te), rn = (tn + nn) / 2, Rt = rn - Bt;
1083
- s == null || s(n, x);
1084
- var Ue = nt.right - k.x - (I + k.width), jt = nt.bottom - k.y - (L + k.height);
1085
- Ae === 1 && (I = Math.round(I), Ue = Math.round(Ue)), pe === 1 && (L = Math.round(L), jt = Math.round(jt));
1086
- var Bn = {
1087
- ready: !0,
1088
- offsetX: I / Ae,
1089
- offsetY: L / pe,
1090
- offsetR: Ue / Ae,
1091
- offsetB: jt / pe,
1092
- arrowX: Ut / Ae,
1093
- arrowY: Rt / pe,
1094
- scaleX: Ae,
1095
- scaleY: pe,
1096
- align: x
1097
- };
1098
- b(Bn);
1099
- }
1100
- }), g = function() {
1101
- f.current += 1;
1102
- var y = f.current;
1103
- Promise.resolve().then(function() {
1104
- f.current === y && R();
1105
- });
1106
- }, M = function() {
1107
- b(function(y) {
1108
- return T(T({}, y), {}, {
1109
- ready: !1
1110
- });
1111
- });
1112
- };
1113
- return st(M, [r]), st(function() {
1114
- e || M();
1115
- }, [e]), [c.ready, c.offsetX, c.offsetY, c.offsetR, c.offsetB, c.arrowX, c.arrowY, c.scaleX, c.scaleY, c.align, g];
1116
- }
1117
- function Ri(e, n, t, r, i) {
1118
- st(function() {
1119
- if (e && n && t) {
1120
- let f = function() {
1121
- r(), i();
1122
- };
1123
- var o = n, s = t, l = nr(o), u = nr(s), c = Sn(s), b = new Set([c].concat(Nt(l), Nt(u)));
1124
- return b.forEach(function(d) {
1125
- d.addEventListener("scroll", f, {
1126
- passive: !0
1127
- });
1128
- }), c.addEventListener("resize", f, {
1129
- passive: !0
1130
- }), r(), function() {
1131
- b.forEach(function(d) {
1132
- d.removeEventListener("scroll", f), c.removeEventListener("resize", f);
1133
- });
1134
- };
1135
- }
1136
- }, [e, n, t]);
1137
- }
1138
- function Si(e, n, t, r, i, o, s, l) {
1139
- var u = a.useRef(e);
1140
- u.current = e;
1141
- var c = a.useRef(!1);
1142
- a.useEffect(function() {
1143
- if (n && r && (!i || o)) {
1144
- var f = function() {
1145
- c.current = !1;
1146
- }, d = function(w) {
1147
- var C;
1148
- u.current && !s(((C = w.composedPath) === null || C === void 0 || (C = C.call(w)) === null || C === void 0 ? void 0 : C[0]) || w.target) && !c.current && l(!1);
1149
- }, m = Sn(r);
1150
- m.addEventListener("pointerdown", f, !0), m.addEventListener("mousedown", d, !0), m.addEventListener("contextmenu", d, !0);
1151
- var h = Yn(t);
1152
- if (h && (h.addEventListener("mousedown", d, !0), h.addEventListener("contextmenu", d, !0)), process.env.NODE_ENV !== "production") {
1153
- var R, g, M = t == null || (R = t.getRootNode) === null || R === void 0 ? void 0 : R.call(t), S = (g = r.getRootNode) === null || g === void 0 ? void 0 : g.call(r);
1154
- Zn(M === S, "trigger element and popup element should in same shadow root.");
1155
- }
1156
- return function() {
1157
- m.removeEventListener("pointerdown", f, !0), m.removeEventListener("mousedown", d, !0), m.removeEventListener("contextmenu", d, !0), h && (h.removeEventListener("mousedown", d, !0), h.removeEventListener("contextmenu", d, !0));
1158
- };
1159
- }
1160
- }, [n, t, r, i, o]);
1161
- function b() {
1162
- c.current = !0;
1163
- }
1164
- return b;
1165
- }
1166
- var Ei = ["prefixCls", "children", "action", "showAction", "hideAction", "popupVisible", "defaultPopupVisible", "onPopupVisibleChange", "afterPopupVisibleChange", "mouseEnterDelay", "mouseLeaveDelay", "focusDelay", "blurDelay", "mask", "maskClosable", "getPopupContainer", "forceRender", "autoDestroy", "destroyPopupOnHide", "popup", "popupClassName", "popupStyle", "popupPlacement", "builtinPlacements", "popupAlign", "zIndex", "stretch", "getPopupClassNameFromAlign", "fresh", "alignPoint", "onPopupClick", "onPopupAlign", "arrow", "popupMotion", "maskMotion", "popupTransitionName", "popupAnimation", "maskTransitionName", "maskAnimation", "className", "getTriggerDOMNode"];
1167
- function Pi() {
1168
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Fr, n = /* @__PURE__ */ a.forwardRef(function(t, r) {
1169
- var i = t.prefixCls, o = i === void 0 ? "rc-trigger-popup" : i, s = t.children, l = t.action, u = l === void 0 ? "hover" : l, c = t.showAction, b = t.hideAction, f = t.popupVisible, d = t.defaultPopupVisible, m = t.onPopupVisibleChange, h = t.afterPopupVisibleChange, R = t.mouseEnterDelay, g = t.mouseLeaveDelay, M = g === void 0 ? 0.1 : g, S = t.focusDelay, y = t.blurDelay, w = t.mask, C = t.maskClosable, v = C === void 0 ? !0 : C, E = t.getPopupContainer, D = t.forceRender, K = t.autoDestroy, U = t.destroyPopupOnHide, z = t.popup, F = t.popupClassName, A = t.popupStyle, j = t.popupPlacement, Z = t.builtinPlacements, $ = Z === void 0 ? {} : Z, V = t.popupAlign, N = t.zIndex, q = t.stretch, Q = t.getPopupClassNameFromAlign, ne = t.fresh, k = t.alignPoint, me = t.onPopupClick, Me = t.onPopupAlign, Y = t.arrow, G = t.popupMotion, he = t.maskMotion, H = t.popupTransitionName, X = t.popupAnimation, ie = t.maskTransitionName, ge = t.maskAnimation, ve = t.className, Ie = t.getTriggerDOMNode, ye = ke(t, Ei), le = K || U || !1, xe = a.useState(!1), He = O(xe, 2), Re = He[0], be = He[1];
1170
- st(function() {
1171
- be(ii());
1172
- }, []);
1173
- var We = a.useRef({}), Se = a.useContext(Mr), qe = a.useMemo(function() {
1174
- return {
1175
- registerSubPopup: function(P, ue) {
1176
- We.current[P] = ue, Se == null || Se.registerSubPopup(P, ue);
1177
- }
1178
- };
1179
- }, [Se]), tt = Ca(), W = a.useState(null), Ne = O(W, 2), J = Ne[0], nt = Ne[1], Ae = a.useRef(null), pe = Lt(function(p) {
1180
- Ae.current = p, Qn(p) && J !== p && nt(p), Se == null || Se.registerSubPopup(tt, p);
1181
- }), Ge = a.useState(null), $e = O(Ge, 2), Ee = $e[0], Ke = $e[1], Pe = a.useRef(null), Ce = Lt(function(p) {
1182
- Qn(p) && Ee !== p && (Ke(p), Pe.current = p);
1183
- }), oe = a.Children.only(s), ee = (oe == null ? void 0 : oe.props) || {}, ze = {}, _t = Lt(function(p) {
1184
- var P, ue, we = Ee;
1185
- return (we == null ? void 0 : we.contains(p)) || ((P = Yn(we)) === null || P === void 0 ? void 0 : P.host) === p || p === we || (J == null ? void 0 : J.contains(p)) || ((ue = Yn(J)) === null || ue === void 0 ? void 0 : ue.host) === p || p === J || Object.values(We.current).some(function(de) {
1186
- return (de == null ? void 0 : de.contains(p)) || p === de;
1187
- });
1188
- }), vt = Sr(o, G, X, H), Ze = Sr(o, he, ge, ie), zt = a.useState(d || !1), rt = O(zt, 2), Fe = rt[0], _e = rt[1], ce = f ?? Fe, _ = Lt(function(p) {
1189
- f === void 0 && _e(p);
1190
- });
1191
- st(function() {
1192
- _e(f || !1);
1193
- }, [f]);
1194
- var x = a.useRef(ce);
1195
- x.current = ce;
1196
- var I = a.useRef([]);
1197
- I.current = [];
1198
- var L = Lt(function(p) {
1199
- var P;
1200
- _(p), ((P = I.current[I.current.length - 1]) !== null && P !== void 0 ? P : ce) !== p && (I.current.push(p), m == null || m(p));
1201
- }), se = a.useRef(), dt = function() {
1202
- clearTimeout(se.current);
1203
- }, Be = function(P) {
1204
- var ue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
1205
- dt(), ue === 0 ? L(P) : se.current = setTimeout(function() {
1206
- L(P);
1207
- }, ue * 1e3);
1208
- };
1209
- a.useEffect(function() {
1210
- return dt;
1211
- }, []);
1212
- var Vt = a.useState(!1), Wt = O(Vt, 2), It = Wt[0], mt = Wt[1];
1213
- st(function(p) {
1214
- (!p || ce) && mt(!0);
1215
- }, [ce]);
1216
- var Zt = a.useState(null), ht = O(Zt, 2), xt = ht[0], gt = ht[1], Qe = a.useState(null), at = O(Qe, 2), it = at[0], yt = at[1], Ye = function(P) {
1217
- yt([P.clientX, P.clientY]);
1218
- }, Qt = Mi(ce, J, k && it !== null ? it : Ee, j, $, V, Me), Te = O(Qt, 11), bt = Te[0], Yt = Te[1], dn = Te[2], pt = Te[3], Ft = Te[4], Ct = Te[5], Dt = Te[6], Xt = Te[7], wt = Te[8], Mt = Te[9], kt = Te[10], Xe = pi(Re, u, c, b), Ht = O(Xe, 2), Ot = Ht[0], Je = Ht[1], ot = Ot.has("click"), ct = Je.has("click") || Je.has("contextMenu"), ft = Lt(function() {
1219
- It || kt();
1220
- }), Bt = function() {
1221
- x.current && k && ct && Be(!1);
1222
- };
1223
- Ri(ce, Ee, J, ft, Bt), st(function() {
1224
- ft();
1225
- }, [it, j]), st(function() {
1226
- ce && !($ != null && $[j]) && ft();
1227
- }, [JSON.stringify(V)]);
1228
- var mn = a.useMemo(function() {
1229
- var p = wi($, o, Mt, k);
1230
- return Oe(p, Q == null ? void 0 : Q(Mt));
1231
- }, [Mt, Q, $, o, k]);
1232
- a.useImperativeHandle(r, function() {
1233
- return {
1234
- nativeElement: Pe.current,
1235
- popupElement: Ae.current,
1236
- forceAlign: ft
1237
- };
1238
- });
1239
- var en = a.useState(0), re = O(en, 2), B = re[0], te = re[1], Le = a.useState(0), De = O(Le, 2), Kt = De[0], Ut = De[1], tn = function() {
1240
- if (q && Ee) {
1241
- var P = Ee.getBoundingClientRect();
1242
- te(P.width), Ut(P.height);
1243
- }
1244
- }, nn = function() {
1245
- tn(), ft();
1246
- }, rn = function(P) {
1247
- mt(!1), kt(), h == null || h(P);
1248
- }, Rt = function() {
1249
- return new Promise(function(P) {
1250
- tn(), gt(function() {
1251
- return P;
1252
- });
1253
- });
1254
- };
1255
- st(function() {
1256
- xt && (kt(), xt(), gt(null));
1257
- }, [xt]);
1258
- function Ue(p, P, ue, we) {
1259
- ze[p] = function(de) {
1260
- var _n;
1261
- we == null || we(de), Be(P, ue);
1262
- for (var qn = arguments.length, Cr = new Array(qn > 1 ? qn - 1 : 0), In = 1; In < qn; In++)
1263
- Cr[In - 1] = arguments[In];
1264
- (_n = ee[p]) === null || _n === void 0 || _n.call.apply(_n, [ee, de].concat(Cr));
1265
- };
1266
- }
1267
- (ot || ct) && (ze.onClick = function(p) {
1268
- var P;
1269
- x.current && ct ? Be(!1) : !x.current && ot && (Ye(p), Be(!0));
1270
- for (var ue = arguments.length, we = new Array(ue > 1 ? ue - 1 : 0), de = 1; de < ue; de++)
1271
- we[de - 1] = arguments[de];
1272
- (P = ee.onClick) === null || P === void 0 || P.call.apply(P, [ee, p].concat(we));
1273
- });
1274
- var jt = Si(ce, ct, Ee, J, w, v, _t, Be), Bn = Ot.has("hover"), et = Je.has("hover"), an, hn;
1275
- Bn && (Ue("onMouseEnter", !0, R, function(p) {
1276
- Ye(p);
1277
- }), Ue("onPointerEnter", !0, R, function(p) {
1278
- Ye(p);
1279
- }), an = function(P) {
1280
- (ce || It) && J !== null && J !== void 0 && J.contains(P.target) && Be(!0, R);
1281
- }, k && (ze.onMouseMove = function(p) {
1282
- var P;
1283
- (P = ee.onMouseMove) === null || P === void 0 || P.call(ee, p);
1284
- })), et && (Ue("onMouseLeave", !1, M), Ue("onPointerLeave", !1, M), hn = function() {
1285
- Be(!1, M);
1286
- }), Ot.has("focus") && Ue("onFocus", !0, S), Je.has("focus") && Ue("onBlur", !1, y), Ot.has("contextMenu") && (ze.onContextMenu = function(p) {
1287
- var P;
1288
- x.current && Je.has("contextMenu") ? Be(!1) : (Ye(p), Be(!0)), p.preventDefault();
1289
- for (var ue = arguments.length, we = new Array(ue > 1 ? ue - 1 : 0), de = 1; de < ue; de++)
1290
- we[de - 1] = arguments[de];
1291
- (P = ee.onContextMenu) === null || P === void 0 || P.call.apply(P, [ee, p].concat(we));
1292
- }), ve && (ze.className = Oe(ee.className, ve));
1293
- var St = T(T({}, ee), ze), qt = {}, Pn = ["onContextMenu", "onClick", "onMouseDown", "onTouchStart", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur"];
1294
- Pn.forEach(function(p) {
1295
- ye[p] && (qt[p] = function() {
1296
- for (var P, ue = arguments.length, we = new Array(ue), de = 0; de < ue; de++)
1297
- we[de] = arguments[de];
1298
- (P = St[p]) === null || P === void 0 || P.call.apply(P, [St].concat(we)), ye[p].apply(ye, we);
1299
- });
1300
- });
1301
- var Nn = /* @__PURE__ */ a.cloneElement(oe, T(T({}, St), qt)), Un = {
1302
- x: Ct,
1303
- y: Dt
1304
- }, jn = Y ? T({}, Y !== !0 ? Y : {}) : null;
1305
- return /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(vn, {
1306
- disabled: !ce,
1307
- ref: Ce,
1308
- onResize: nn
1309
- }, /* @__PURE__ */ a.createElement(aa, {
1310
- getTriggerDOMNode: Ie
1311
- }, Nn)), /* @__PURE__ */ a.createElement(Mr.Provider, {
1312
- value: qe
1313
- }, /* @__PURE__ */ a.createElement(ra, {
1314
- portal: e,
1315
- ref: pe,
1316
- prefixCls: o,
1317
- popup: z,
1318
- className: Oe(F, mn),
1319
- style: A,
1320
- target: Ee,
1321
- onMouseEnter: an,
1322
- onMouseLeave: hn,
1323
- onPointerEnter: an,
1324
- zIndex: N,
1325
- open: ce,
1326
- keepDom: It,
1327
- fresh: ne,
1328
- onClick: me,
1329
- onPointerDownCapture: jt,
1330
- mask: w,
1331
- motion: vt,
1332
- maskMotion: Ze,
1333
- onVisibleChanged: rn,
1334
- onPrepare: Rt,
1335
- forceRender: D,
1336
- autoDestroy: le,
1337
- getPopupContainer: E,
1338
- align: Mt,
1339
- arrow: jn,
1340
- arrowPos: Un,
1341
- ready: bt,
1342
- offsetX: Yt,
1343
- offsetY: dn,
1344
- offsetR: pt,
1345
- offsetB: Ft,
1346
- onAlign: ft,
1347
- stretch: q,
1348
- targetWidth: B / Xt,
1349
- targetHeight: Kt / wt
1350
- })));
1351
- });
1352
- return process.env.NODE_ENV !== "production" && (n.displayName = "Trigger"), n;
1353
- }
1354
- const ia = Pi(Fr);
1355
- var Ni = ut.ESC, _i = ut.TAB;
1356
- function Ii(e) {
1357
- var n = e.visible, t = e.triggerRef, r = e.onVisibleChange, i = e.autoFocus, o = e.overlayRef, s = a.useRef(!1), l = function() {
1358
- if (n) {
1359
- var f, d;
1360
- (f = t.current) === null || f === void 0 || (d = f.focus) === null || d === void 0 || d.call(f), r == null || r(!1);
1361
- }
1362
- }, u = function() {
1363
- var f;
1364
- return (f = o.current) !== null && f !== void 0 && f.focus ? (o.current.focus(), s.current = !0, !0) : !1;
1365
- }, c = function(f) {
1366
- switch (f.keyCode) {
1367
- case Ni:
1368
- l();
1369
- break;
1370
- case _i: {
1371
- var d = !1;
1372
- s.current || (d = u()), d ? f.preventDefault() : l();
1373
- break;
1374
- }
1375
- }
1376
- };
1377
- a.useEffect(function() {
1378
- return n ? (window.addEventListener("keydown", c), i && Jt(u, 3), function() {
1379
- window.removeEventListener("keydown", c), s.current = !1;
1380
- }) : function() {
1381
- s.current = !1;
1382
- };
1383
- }, [n]);
1384
- }
1385
- var xi = /* @__PURE__ */ Ra(function(e, n) {
1386
- var t = e.overlay, r = e.arrow, i = e.prefixCls, o = Xn(function() {
1387
- var l;
1388
- return typeof t == "function" ? l = t() : l = t, l;
1389
- }, [t]), s = fr(n, zn(o));
1390
- return /* @__PURE__ */ je.createElement(je.Fragment, null, r && /* @__PURE__ */ je.createElement("div", {
1391
- className: "".concat(i, "-arrow")
1392
- }), /* @__PURE__ */ je.cloneElement(o, {
1393
- ref: $n(o) ? s : void 0
1394
- }));
1395
- }), ln = {
1396
- adjustX: 1,
1397
- adjustY: 1
1398
- }, un = [0, 0], Di = {
1399
- topLeft: {
1400
- points: ["bl", "tl"],
1401
- overflow: ln,
1402
- offset: [0, -4],
1403
- targetOffset: un
1404
- },
1405
- top: {
1406
- points: ["bc", "tc"],
1407
- overflow: ln,
1408
- offset: [0, -4],
1409
- targetOffset: un
1410
- },
1411
- topRight: {
1412
- points: ["br", "tr"],
1413
- overflow: ln,
1414
- offset: [0, -4],
1415
- targetOffset: un
1416
- },
1417
- bottomLeft: {
1418
- points: ["tl", "bl"],
1419
- overflow: ln,
1420
- offset: [0, 4],
1421
- targetOffset: un
1422
- },
1423
- bottom: {
1424
- points: ["tc", "bc"],
1425
- overflow: ln,
1426
- offset: [0, 4],
1427
- targetOffset: un
1428
- },
1429
- bottomRight: {
1430
- points: ["tr", "br"],
1431
- overflow: ln,
1432
- offset: [0, 4],
1433
- targetOffset: un
1434
- }
1435
- }, ki = ["arrow", "prefixCls", "transitionName", "animation", "align", "placement", "placements", "getPopupContainer", "showAction", "hideAction", "overlayClassName", "overlayStyle", "visible", "trigger", "autoFocus", "overlay", "children", "onVisibleChange"];
1436
- function Oi(e, n) {
1437
- var t, r = e.arrow, i = r === void 0 ? !1 : r, o = e.prefixCls, s = o === void 0 ? "rc-dropdown" : o, l = e.transitionName, u = e.animation, c = e.align, b = e.placement, f = b === void 0 ? "bottomLeft" : b, d = e.placements, m = d === void 0 ? Di : d, h = e.getPopupContainer, R = e.showAction, g = e.hideAction, M = e.overlayClassName, S = e.overlayStyle, y = e.visible, w = e.trigger, C = w === void 0 ? ["hover"] : w, v = e.autoFocus, E = e.overlay, D = e.children, K = e.onVisibleChange, U = ke(e, ki), z = je.useState(), F = O(z, 2), A = F[0], j = F[1], Z = "visible" in e ? y : A, $ = je.useRef(null), V = je.useRef(null), N = je.useRef(null);
1438
- je.useImperativeHandle(n, function() {
1439
- return $.current;
1440
- });
1441
- var q = function(H) {
1442
- j(H), K == null || K(H);
1443
- };
1444
- Ii({
1445
- visible: Z,
1446
- triggerRef: N,
1447
- onVisibleChange: q,
1448
- autoFocus: v,
1449
- overlayRef: V
1450
- });
1451
- var Q = function(H) {
1452
- var X = e.onOverlayClick;
1453
- j(!1), X && X(H);
1454
- }, ne = function() {
1455
- return /* @__PURE__ */ je.createElement(xi, {
1456
- ref: V,
1457
- overlay: E,
1458
- prefixCls: s,
1459
- arrow: i
1460
- });
1461
- }, k = function() {
1462
- return typeof E == "function" ? ne : ne();
1463
- }, me = function() {
1464
- var H = e.minOverlayWidthMatchTrigger, X = e.alignPoint;
1465
- return "minOverlayWidthMatchTrigger" in e ? H : !X;
1466
- }, Me = function() {
1467
- var H = e.openClassName;
1468
- return H !== void 0 ? H : "".concat(s, "-open");
1469
- }, Y = /* @__PURE__ */ je.cloneElement(D, {
1470
- className: Oe((t = D.props) === null || t === void 0 ? void 0 : t.className, Z && Me()),
1471
- ref: $n(D) ? fr(N, zn(D)) : void 0
1472
- }), G = g;
1473
- return !G && C.indexOf("contextMenu") !== -1 && (G = ["click"]), /* @__PURE__ */ je.createElement(ia, ae({
1474
- builtinPlacements: m
1475
- }, U, {
1476
- prefixCls: s,
1477
- ref: $,
1478
- popupClassName: Oe(M, fe({}, "".concat(s, "-show-arrow"), i)),
1479
- popupStyle: S,
1480
- action: C,
1481
- showAction: R,
1482
- hideAction: G,
1483
- popupPlacement: f,
1484
- popupAlign: c,
1485
- popupTransitionName: l,
1486
- popupAnimation: u,
1487
- popupVisible: Z,
1488
- stretch: me() ? "minWidth" : "",
1489
- popup: k(),
1490
- onPopupVisibleChange: q,
1491
- onPopupClick: Q,
1492
- getPopupContainer: h
1493
- }), Y);
1494
- }
1495
- const So = /* @__PURE__ */ je.forwardRef(Oi);
1496
- var oa = /* @__PURE__ */ a.createContext(null);
1497
- function sa(e, n) {
1498
- return e === void 0 ? null : "".concat(e, "-").concat(n);
1499
- }
1500
- function la(e) {
1501
- var n = a.useContext(oa);
1502
- return sa(n, e);
1503
- }
1504
- var Ki = ["children", "locked"], lt = /* @__PURE__ */ a.createContext(null);
1505
- function Ti(e, n) {
1506
- var t = T({}, e);
1507
- return Object.keys(n).forEach(function(r) {
1508
- var i = n[r];
1509
- i !== void 0 && (t[r] = i);
1510
- }), t;
1511
- }
1512
- function Rn(e) {
1513
- var n = e.children, t = e.locked, r = ke(e, Ki), i = a.useContext(lt), o = wa(function() {
1514
- return Ti(i, r);
1515
- }, [i, r], function(s, l) {
1516
- return !t && (s[0] !== l[0] || !Hr(s[1], l[1], !0));
1517
- });
1518
- return /* @__PURE__ */ a.createElement(lt.Provider, {
1519
- value: o
1520
- }, n);
1521
- }
1522
- var Li = [], ua = /* @__PURE__ */ a.createContext(null);
1523
- function Wn() {
1524
- return a.useContext(ua);
1525
- }
1526
- var ca = /* @__PURE__ */ a.createContext(Li);
1527
- function En(e) {
1528
- var n = a.useContext(ca);
1529
- return a.useMemo(function() {
1530
- return e !== void 0 ? [].concat(Nt(n), [e]) : n;
1531
- }, [n, e]);
1532
- }
1533
- var fa = /* @__PURE__ */ a.createContext(null), dr = /* @__PURE__ */ a.createContext({});
1534
- function Ir(e) {
1535
- var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
1536
- if (Wr(e)) {
1537
- var t = e.nodeName.toLowerCase(), r = (
1538
- // Focusable element
1539
- ["input", "select", "textarea", "button"].includes(t) || // Editable element
1540
- e.isContentEditable || // Anchor with href element
1541
- t === "a" && !!e.getAttribute("href")
1542
- ), i = e.getAttribute("tabindex"), o = Number(i), s = null;
1543
- return i && !Number.isNaN(o) ? s = o : r && s === null && (s = 0), r && e.disabled && (s = null), s !== null && (s >= 0 || n && s < 0);
1544
- }
1545
- return !1;
1546
- }
1547
- function Ai(e) {
1548
- var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, t = Nt(e.querySelectorAll("*")).filter(function(r) {
1549
- return Ir(r, n);
1550
- });
1551
- return Ir(e, n) && t.unshift(e), t;
1552
- }
1553
- var rr = ut.LEFT, ar = ut.RIGHT, ir = ut.UP, kn = ut.DOWN, On = ut.ENTER, va = ut.ESC, bn = ut.HOME, pn = ut.END, xr = [ir, kn, rr, ar];
1554
- function $i(e, n, t, r) {
1555
- var i, o = "prev", s = "next", l = "children", u = "parent";
1556
- if (e === "inline" && r === On)
1557
- return {
1558
- inlineTrigger: !0
1559
- };
1560
- var c = fe(fe({}, ir, o), kn, s), b = fe(fe(fe(fe({}, rr, t ? s : o), ar, t ? o : s), kn, l), On, l), f = fe(fe(fe(fe(fe(fe({}, ir, o), kn, s), On, l), va, u), rr, t ? l : u), ar, t ? u : l), d = {
1561
- inline: c,
1562
- horizontal: b,
1563
- vertical: f,
1564
- inlineSub: c,
1565
- horizontalSub: f,
1566
- verticalSub: f
1567
- }, m = (i = d["".concat(e).concat(n ? "" : "Sub")]) === null || i === void 0 ? void 0 : i[r];
1568
- switch (m) {
1569
- case o:
1570
- return {
1571
- offset: -1,
1572
- sibling: !0
1573
- };
1574
- case s:
1575
- return {
1576
- offset: 1,
1577
- sibling: !0
1578
- };
1579
- case u:
1580
- return {
1581
- offset: -1,
1582
- sibling: !1
1583
- };
1584
- case l:
1585
- return {
1586
- offset: 1,
1587
- sibling: !1
1588
- };
1589
- default:
1590
- return null;
1591
- }
1592
- }
1593
- function zi(e) {
1594
- for (var n = e; n; ) {
1595
- if (n.getAttribute("data-menu-list"))
1596
- return n;
1597
- n = n.parentElement;
1598
- }
1599
- return null;
1600
- }
1601
- function Vi(e, n) {
1602
- for (var t = e || document.activeElement; t; ) {
1603
- if (n.has(t))
1604
- return t;
1605
- t = t.parentElement;
1606
- }
1607
- return null;
1608
- }
1609
- function mr(e, n) {
1610
- var t = Ai(e, !0);
1611
- return t.filter(function(r) {
1612
- return n.has(r);
1613
- });
1614
- }
1615
- function Dr(e, n, t) {
1616
- var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 1;
1617
- if (!e)
1618
- return null;
1619
- var i = mr(e, n), o = i.length, s = i.findIndex(function(l) {
1620
- return t === l;
1621
- });
1622
- return r < 0 ? s === -1 ? s = o - 1 : s -= 1 : r > 0 && (s += 1), s = (s + o) % o, i[s];
1623
- }
1624
- var or = function(n, t) {
1625
- var r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
1626
- return n.forEach(function(s) {
1627
- var l = document.querySelector("[data-menu-id='".concat(sa(t, s), "']"));
1628
- l && (r.add(l), o.set(l, s), i.set(s, l));
1629
- }), {
1630
- elements: r,
1631
- key2element: i,
1632
- element2key: o
1633
- };
1634
- };
1635
- function Wi(e, n, t, r, i, o, s, l, u, c) {
1636
- var b = a.useRef(), f = a.useRef();
1637
- f.current = n;
1638
- var d = function() {
1639
- Jt.cancel(b.current);
1640
- };
1641
- return a.useEffect(function() {
1642
- return function() {
1643
- d();
1644
- };
1645
- }, []), function(m) {
1646
- var h = m.which;
1647
- if ([].concat(xr, [On, va, bn, pn]).includes(h)) {
1648
- var R = o(), g = or(R, r), M = g, S = M.elements, y = M.key2element, w = M.element2key, C = y.get(n), v = Vi(C, S), E = w.get(v), D = $i(e, s(E, !0).length === 1, t, h);
1649
- if (!D && h !== bn && h !== pn)
1650
- return;
1651
- (xr.includes(h) || [bn, pn].includes(h)) && m.preventDefault();
1652
- var K = function(V) {
1653
- if (V) {
1654
- var N = V, q = V.querySelector("a");
1655
- q != null && q.getAttribute("href") && (N = q);
1656
- var Q = w.get(V);
1657
- l(Q), d(), b.current = Jt(function() {
1658
- f.current === Q && N.focus();
1659
- });
1660
- }
1661
- };
1662
- if ([bn, pn].includes(h) || D.sibling || !v) {
1663
- var U;
1664
- !v || e === "inline" ? U = i.current : U = zi(v);
1665
- var z, F = mr(U, S);
1666
- h === bn ? z = F[0] : h === pn ? z = F[F.length - 1] : z = Dr(U, S, v, D.offset), K(z);
1667
- } else if (D.inlineTrigger)
1668
- u(E);
1669
- else if (D.offset > 0)
1670
- u(E, !0), d(), b.current = Jt(function() {
1671
- g = or(R, r);
1672
- var $ = v.getAttribute("aria-controls"), V = document.getElementById($), N = Dr(V, g.elements);
1673
- K(N);
1674
- }, 5);
1675
- else if (D.offset < 0) {
1676
- var A = s(E, !0), j = A[A.length - 2], Z = y.get(j);
1677
- u(j, !1), K(Z);
1678
- }
1679
- }
1680
- c == null || c(m);
1681
- };
1682
- }
1683
- function Fi(e) {
1684
- Promise.resolve().then(e);
1685
- }
1686
- var hr = "__RC_UTIL_PATH_SPLIT__", kr = function(n) {
1687
- return n.join(hr);
1688
- }, Hi = function(n) {
1689
- return n.split(hr);
1690
- }, sr = "rc-menu-more";
1691
- function Bi() {
1692
- var e = a.useState({}), n = O(e, 2), t = n[1], r = xn(/* @__PURE__ */ new Map()), i = xn(/* @__PURE__ */ new Map()), o = a.useState([]), s = O(o, 2), l = s[0], u = s[1], c = xn(0), b = xn(!1), f = function() {
1693
- b.current || t({});
1694
- }, d = At(function(y, w) {
1695
- process.env.NODE_ENV !== "production" && fn(!r.current.has(y), "Duplicated key '".concat(y, "' used in Menu by path [").concat(w.join(" > "), "]"));
1696
- var C = kr(w);
1697
- i.current.set(C, y), r.current.set(y, C), c.current += 1;
1698
- var v = c.current;
1699
- Fi(function() {
1700
- v === c.current && f();
1701
- });
1702
- }, []), m = At(function(y, w) {
1703
- var C = kr(w);
1704
- i.current.delete(C), r.current.delete(y);
1705
- }, []), h = At(function(y) {
1706
- u(y);
1707
- }, []), R = At(function(y, w) {
1708
- var C = r.current.get(y) || "", v = Hi(C);
1709
- return w && l.includes(v[0]) && v.unshift(sr), v;
1710
- }, [l]), g = At(function(y, w) {
1711
- return y.filter(function(C) {
1712
- return C !== void 0;
1713
- }).some(function(C) {
1714
- var v = R(C, !0);
1715
- return v.includes(w);
1716
- });
1717
- }, [R]), M = function() {
1718
- var w = Nt(r.current.keys());
1719
- return l.length && w.push(sr), w;
1720
- }, S = At(function(y) {
1721
- var w = "".concat(r.current.get(y)).concat(hr), C = /* @__PURE__ */ new Set();
1722
- return Nt(i.current.keys()).forEach(function(v) {
1723
- v.startsWith(w) && C.add(i.current.get(v));
1724
- }), C;
1725
- }, []);
1726
- return a.useEffect(function() {
1727
- return function() {
1728
- b.current = !0;
1729
- };
1730
- }, []), {
1731
- // Register
1732
- registerPath: d,
1733
- unregisterPath: m,
1734
- refreshOverflowKeys: h,
1735
- // Util
1736
- isSubPathKey: g,
1737
- getKeyPath: R,
1738
- getKeys: M,
1739
- getSubPathKeys: S
1740
- };
1741
- }
1742
- function Cn(e) {
1743
- var n = a.useRef(e);
1744
- n.current = e;
1745
- var t = a.useCallback(function() {
1746
- for (var r, i = arguments.length, o = new Array(i), s = 0; s < i; s++)
1747
- o[s] = arguments[s];
1748
- return (r = n.current) === null || r === void 0 ? void 0 : r.call.apply(r, [n].concat(o));
1749
- }, []);
1750
- return e ? t : void 0;
1751
- }
1752
- var Ui = Math.random().toFixed(5).toString().slice(2), Or = 0;
1753
- function ji(e) {
1754
- var n = Dn(e, {
1755
- value: e
1756
- }), t = O(n, 2), r = t[0], i = t[1];
1757
- return a.useEffect(function() {
1758
- Or += 1;
1759
- var o = process.env.NODE_ENV === "test" ? "test" : "".concat(Ui, "-").concat(Or);
1760
- i("rc-menu-uuid-".concat(o));
1761
- }, []), r;
1762
- }
1763
- function da(e, n, t, r) {
1764
- var i = a.useContext(lt), o = i.activeKey, s = i.onActive, l = i.onInactive, u = {
1765
- active: o === e
1766
- };
1767
- return n || (u.onMouseEnter = function(c) {
1768
- t == null || t({
1769
- key: e,
1770
- domEvent: c
1771
- }), s(e);
1772
- }, u.onMouseLeave = function(c) {
1773
- r == null || r({
1774
- key: e,
1775
- domEvent: c
1776
- }), l(e);
1777
- }), u;
1778
- }
1779
- function ma(e) {
1780
- var n = a.useContext(lt), t = n.mode, r = n.rtl, i = n.inlineIndent;
1781
- if (t !== "inline")
1782
- return null;
1783
- var o = e;
1784
- return r ? {
1785
- paddingRight: o * i
1786
- } : {
1787
- paddingLeft: o * i
1788
- };
1789
- }
1790
- function ha(e) {
1791
- var n = e.icon, t = e.props, r = e.children, i;
1792
- return n === null || n === !1 ? null : (typeof n == "function" ? i = /* @__PURE__ */ a.createElement(n, T({}, t)) : typeof n != "boolean" && (i = n), i || r || null);
1793
- }
1794
- var qi = ["item"];
1795
- function An(e) {
1796
- var n = e.item, t = ke(e, qi);
1797
- return Object.defineProperty(t, "item", {
1798
- get: function() {
1799
- return fn(!1, "`info.item` is deprecated since we will move to function component that not provides React Node instance in future."), n;
1800
- }
1801
- }), t;
1802
- }
1803
- var Gi = ["title", "attribute", "elementRef"], Ji = ["style", "className", "eventKey", "warnKey", "disabled", "itemIcon", "children", "role", "onMouseEnter", "onMouseLeave", "onClick", "onKeyDown", "onFocus"], Zi = ["active"], Qi = /* @__PURE__ */ function(e) {
1804
- Tr(t, e);
1805
- var n = Lr(t);
1806
- function t() {
1807
- return Ar(this, t), n.apply(this, arguments);
1808
- }
1809
- return $r(t, [{
1810
- key: "render",
1811
- value: function() {
1812
- var i = this.props, o = i.title, s = i.attribute, l = i.elementRef, u = ke(i, Gi), c = vr(u, ["eventKey", "popupClassName", "popupOffset", "onTitleClick"]);
1813
- return fn(!s, "`attribute` of Menu.Item is deprecated. Please pass attribute directly."), /* @__PURE__ */ a.createElement(Pt.Item, ae({}, s, {
1814
- title: typeof o == "string" ? o : void 0
1815
- }, c, {
1816
- ref: l
1817
- }));
1818
- }
1819
- }]), t;
1820
- }(a.Component), Yi = /* @__PURE__ */ a.forwardRef(function(e, n) {
1821
- var t = e.style, r = e.className, i = e.eventKey, o = e.warnKey, s = e.disabled, l = e.itemIcon, u = e.children, c = e.role, b = e.onMouseEnter, f = e.onMouseLeave, d = e.onClick, m = e.onKeyDown, h = e.onFocus, R = ke(e, Ji), g = la(i), M = a.useContext(lt), S = M.prefixCls, y = M.onItemClick, w = M.disabled, C = M.overflowDisabled, v = M.itemIcon, E = M.selectedKeys, D = M.onActive, K = a.useContext(dr), U = K._internalRenderMenuItem, z = "".concat(S, "-item"), F = a.useRef(), A = a.useRef(), j = w || s, Z = ur(n, A), $ = En(i);
1822
- process.env.NODE_ENV !== "production" && o && fn(!1, "MenuItem should not leave undefined `key`.");
1823
- var V = function(ie) {
1824
- return {
1825
- key: i,
1826
- // Note: For legacy code is reversed which not like other antd component
1827
- keyPath: Nt($).reverse(),
1828
- item: F.current,
1829
- domEvent: ie
1830
- };
1831
- }, N = l || v, q = da(i, j, b, f), Q = q.active, ne = ke(q, Zi), k = E.includes(i), me = ma($.length), Me = function(ie) {
1832
- if (!j) {
1833
- var ge = V(ie);
1834
- d == null || d(An(ge)), y(ge);
1835
- }
1836
- }, Y = function(ie) {
1837
- if (m == null || m(ie), ie.which === ut.ENTER) {
1838
- var ge = V(ie);
1839
- d == null || d(An(ge)), y(ge);
1840
- }
1841
- }, G = function(ie) {
1842
- D(i), h == null || h(ie);
1843
- }, he = {};
1844
- e.role === "option" && (he["aria-selected"] = k);
1845
- var H = /* @__PURE__ */ a.createElement(Qi, ae({
1846
- ref: F,
1847
- elementRef: Z,
1848
- role: c === null ? "none" : c || "menuitem",
1849
- tabIndex: s ? null : -1,
1850
- "data-menu-id": C && g ? null : g
1851
- }, vr(R, ["extra"]), ne, he, {
1852
- component: "li",
1853
- "aria-disabled": s,
1854
- style: T(T({}, me), t),
1855
- className: Oe(z, fe(fe(fe({}, "".concat(z, "-active"), Q), "".concat(z, "-selected"), k), "".concat(z, "-disabled"), j), r),
1856
- onClick: Me,
1857
- onKeyDown: Y,
1858
- onFocus: G
1859
- }), u, /* @__PURE__ */ a.createElement(ha, {
1860
- props: T(T({}, e), {}, {
1861
- isSelected: k
1862
- }),
1863
- icon: N
1864
- }));
1865
- return U && (H = U(H, e, {
1866
- selected: k
1867
- })), H;
1868
- });
1869
- function Xi(e, n) {
1870
- var t = e.eventKey, r = Wn(), i = En(t);
1871
- return a.useEffect(function() {
1872
- if (r)
1873
- return r.registerPath(t, i), function() {
1874
- r.unregisterPath(t, i);
1875
- };
1876
- }, [i]), r ? null : /* @__PURE__ */ a.createElement(Yi, ae({}, e, {
1877
- ref: n
1878
- }));
1879
- }
1880
- const gr = /* @__PURE__ */ a.forwardRef(Xi);
1881
- var eo = ["className", "children"], to = function(n, t) {
1882
- var r = n.className, i = n.children, o = ke(n, eo), s = a.useContext(lt), l = s.prefixCls, u = s.mode, c = s.rtl;
1883
- return /* @__PURE__ */ a.createElement("ul", ae({
1884
- className: Oe(l, c && "".concat(l, "-rtl"), "".concat(l, "-sub"), "".concat(l, "-").concat(u === "inline" ? "inline" : "vertical"), r),
1885
- role: "menu"
1886
- }, o, {
1887
- "data-menu-list": !0,
1888
- ref: t
1889
- }), i);
1890
- }, yr = /* @__PURE__ */ a.forwardRef(to);
1891
- yr.displayName = "SubMenuList";
1892
- function br(e, n) {
1893
- return Vr(e).map(function(t, r) {
1894
- if (/* @__PURE__ */ a.isValidElement(t)) {
1895
- var i, o, s = t.key, l = (i = (o = t.props) === null || o === void 0 ? void 0 : o.eventKey) !== null && i !== void 0 ? i : s, u = l == null;
1896
- u && (l = "tmp_key-".concat([].concat(Nt(n), [r]).join("-")));
1897
- var c = {
1898
- key: l,
1899
- eventKey: l
1900
- };
1901
- return process.env.NODE_ENV !== "production" && u && (c.warnKey = !0), /* @__PURE__ */ a.cloneElement(t, c);
1902
- }
1903
- return t;
1904
- });
1905
- }
1906
- var Ve = {
1907
- adjustX: 1,
1908
- adjustY: 1
1909
- }, no = {
1910
- topLeft: {
1911
- points: ["bl", "tl"],
1912
- overflow: Ve
1913
- },
1914
- topRight: {
1915
- points: ["br", "tr"],
1916
- overflow: Ve
1917
- },
1918
- bottomLeft: {
1919
- points: ["tl", "bl"],
1920
- overflow: Ve
1921
- },
1922
- bottomRight: {
1923
- points: ["tr", "br"],
1924
- overflow: Ve
1925
- },
1926
- leftTop: {
1927
- points: ["tr", "tl"],
1928
- overflow: Ve
1929
- },
1930
- leftBottom: {
1931
- points: ["br", "bl"],
1932
- overflow: Ve
1933
- },
1934
- rightTop: {
1935
- points: ["tl", "tr"],
1936
- overflow: Ve
1937
- },
1938
- rightBottom: {
1939
- points: ["bl", "br"],
1940
- overflow: Ve
1941
- }
1942
- }, ro = {
1943
- topLeft: {
1944
- points: ["bl", "tl"],
1945
- overflow: Ve
1946
- },
1947
- topRight: {
1948
- points: ["br", "tr"],
1949
- overflow: Ve
1950
- },
1951
- bottomLeft: {
1952
- points: ["tl", "bl"],
1953
- overflow: Ve
1954
- },
1955
- bottomRight: {
1956
- points: ["tr", "br"],
1957
- overflow: Ve
1958
- },
1959
- rightTop: {
1960
- points: ["tr", "tl"],
1961
- overflow: Ve
1962
- },
1963
- rightBottom: {
1964
- points: ["br", "bl"],
1965
- overflow: Ve
1966
- },
1967
- leftTop: {
1968
- points: ["tl", "tr"],
1969
- overflow: Ve
1970
- },
1971
- leftBottom: {
1972
- points: ["bl", "br"],
1973
- overflow: Ve
1974
- }
1975
- };
1976
- function ga(e, n, t) {
1977
- if (n)
1978
- return n;
1979
- if (t)
1980
- return t[e] || t.other;
1981
- }
1982
- var ao = {
1983
- horizontal: "bottomLeft",
1984
- vertical: "rightTop",
1985
- "vertical-left": "rightTop",
1986
- "vertical-right": "leftTop"
1987
- };
1988
- function io(e) {
1989
- var n = e.prefixCls, t = e.visible, r = e.children, i = e.popup, o = e.popupStyle, s = e.popupClassName, l = e.popupOffset, u = e.disabled, c = e.mode, b = e.onVisibleChange, f = a.useContext(lt), d = f.getPopupContainer, m = f.rtl, h = f.subMenuOpenDelay, R = f.subMenuCloseDelay, g = f.builtinPlacements, M = f.triggerSubMenuAction, S = f.forceSubMenuRender, y = f.rootClassName, w = f.motion, C = f.defaultMotions, v = a.useState(!1), E = O(v, 2), D = E[0], K = E[1], U = m ? T(T({}, ro), g) : T(T({}, no), g), z = ao[c], F = ga(c, w, C), A = a.useRef(F);
1990
- c !== "inline" && (A.current = F);
1991
- var j = T(T({}, A.current), {}, {
1992
- leavedClassName: "".concat(n, "-hidden"),
1993
- removeOnLeave: !1,
1994
- motionAppear: !0
1995
- }), Z = a.useRef();
1996
- return a.useEffect(function() {
1997
- return Z.current = Jt(function() {
1998
- K(t);
1999
- }), function() {
2000
- Jt.cancel(Z.current);
2001
- };
2002
- }, [t]), /* @__PURE__ */ a.createElement(ia, {
2003
- prefixCls: n,
2004
- popupClassName: Oe("".concat(n, "-popup"), fe({}, "".concat(n, "-rtl"), m), s, y),
2005
- stretch: c === "horizontal" ? "minWidth" : null,
2006
- getPopupContainer: d,
2007
- builtinPlacements: U,
2008
- popupPlacement: z,
2009
- popupVisible: D,
2010
- popup: i,
2011
- popupStyle: o,
2012
- popupAlign: l && {
2013
- offset: l
2014
- },
2015
- action: u ? [] : [M],
2016
- mouseEnterDelay: h,
2017
- mouseLeaveDelay: R,
2018
- onPopupVisibleChange: b,
2019
- forceRender: S,
2020
- popupMotion: j,
2021
- fresh: !0
2022
- }, r);
2023
- }
2024
- function oo(e) {
2025
- var n = e.id, t = e.open, r = e.keyPath, i = e.children, o = "inline", s = a.useContext(lt), l = s.prefixCls, u = s.forceSubMenuRender, c = s.motion, b = s.defaultMotions, f = s.mode, d = a.useRef(!1);
2026
- d.current = f === o;
2027
- var m = a.useState(!d.current), h = O(m, 2), R = h[0], g = h[1], M = d.current ? t : !1;
2028
- a.useEffect(function() {
2029
- d.current && g(!1);
2030
- }, [f]);
2031
- var S = T({}, ga(o, c, b));
2032
- r.length > 1 && (S.motionAppear = !1);
2033
- var y = S.onVisibleChanged;
2034
- return S.onVisibleChanged = function(w) {
2035
- return !d.current && !w && g(!0), y == null ? void 0 : y(w);
2036
- }, R ? null : /* @__PURE__ */ a.createElement(Rn, {
2037
- mode: o,
2038
- locked: !d.current
2039
- }, /* @__PURE__ */ a.createElement(cr, ae({
2040
- visible: M
2041
- }, S, {
2042
- forceRender: u,
2043
- removeOnLeave: !1,
2044
- leavedClassName: "".concat(l, "-hidden")
2045
- }), function(w) {
2046
- var C = w.className, v = w.style;
2047
- return /* @__PURE__ */ a.createElement(yr, {
2048
- id: n,
2049
- className: C,
2050
- style: v
2051
- }, i);
2052
- }));
2053
- }
2054
- var so = ["style", "className", "title", "eventKey", "warnKey", "disabled", "internalPopupClose", "children", "itemIcon", "expandIcon", "popupClassName", "popupOffset", "popupStyle", "onClick", "onMouseEnter", "onMouseLeave", "onTitleClick", "onTitleMouseEnter", "onTitleMouseLeave"], lo = ["active"], uo = /* @__PURE__ */ a.forwardRef(function(e, n) {
2055
- var t = e.style, r = e.className, i = e.title, o = e.eventKey, s = e.warnKey, l = e.disabled, u = e.internalPopupClose, c = e.children, b = e.itemIcon, f = e.expandIcon, d = e.popupClassName, m = e.popupOffset, h = e.popupStyle, R = e.onClick, g = e.onMouseEnter, M = e.onMouseLeave, S = e.onTitleClick, y = e.onTitleMouseEnter, w = e.onTitleMouseLeave, C = ke(e, so), v = la(o), E = a.useContext(lt), D = E.prefixCls, K = E.mode, U = E.openKeys, z = E.disabled, F = E.overflowDisabled, A = E.activeKey, j = E.selectedKeys, Z = E.itemIcon, $ = E.expandIcon, V = E.onItemClick, N = E.onOpenChange, q = E.onActive, Q = a.useContext(dr), ne = Q._internalRenderSubMenuItem, k = a.useContext(fa), me = k.isSubPathKey, Me = En(), Y = "".concat(D, "-submenu"), G = z || l, he = a.useRef(), H = a.useRef();
2056
- process.env.NODE_ENV !== "production" && s && fn(!1, "SubMenu should not leave undefined `key`.");
2057
- var X = b ?? Z, ie = f ?? $, ge = U.includes(o), ve = !F && ge, Ie = me(j, o), ye = da(o, G, y, w), le = ye.active, xe = ke(ye, lo), He = a.useState(!1), Re = O(He, 2), be = Re[0], We = Re[1], Se = function(ee) {
2058
- G || We(ee);
2059
- }, qe = function(ee) {
2060
- Se(!0), g == null || g({
2061
- key: o,
2062
- domEvent: ee
2063
- });
2064
- }, tt = function(ee) {
2065
- Se(!1), M == null || M({
2066
- key: o,
2067
- domEvent: ee
2068
- });
2069
- }, W = a.useMemo(function() {
2070
- return le || (K !== "inline" ? be || me([A], o) : !1);
2071
- }, [K, le, A, be, o, me]), Ne = ma(Me.length), J = function(ee) {
2072
- G || (S == null || S({
2073
- key: o,
2074
- domEvent: ee
2075
- }), K === "inline" && N(o, !ge));
2076
- }, nt = Cn(function(oe) {
2077
- R == null || R(An(oe)), V(oe);
2078
- }), Ae = function(ee) {
2079
- K !== "inline" && N(o, ee);
2080
- }, pe = function() {
2081
- q(o);
2082
- }, Ge = v && "".concat(v, "-popup"), $e = a.useMemo(function() {
2083
- return /* @__PURE__ */ a.createElement(ha, {
2084
- icon: K !== "horizontal" ? ie : void 0,
2085
- props: T(T({}, e), {}, {
2086
- isOpen: ve,
2087
- // [Legacy] Not sure why need this mark
2088
- isSubMenu: !0
2089
- })
2090
- }, /* @__PURE__ */ a.createElement("i", {
2091
- className: "".concat(Y, "-arrow")
2092
- }));
2093
- }, [K, ie, e, ve, Y]), Ee = /* @__PURE__ */ a.createElement("div", ae({
2094
- role: "menuitem",
2095
- style: Ne,
2096
- className: "".concat(Y, "-title"),
2097
- tabIndex: G ? null : -1,
2098
- ref: he,
2099
- title: typeof i == "string" ? i : null,
2100
- "data-menu-id": F && v ? null : v,
2101
- "aria-expanded": ve,
2102
- "aria-haspopup": !0,
2103
- "aria-controls": Ge,
2104
- "aria-disabled": G,
2105
- onClick: J,
2106
- onFocus: pe
2107
- }, xe), i, $e), Ke = a.useRef(K);
2108
- if (K !== "inline" && Me.length > 1 ? Ke.current = "vertical" : Ke.current = K, !F) {
2109
- var Pe = Ke.current;
2110
- Ee = /* @__PURE__ */ a.createElement(io, {
2111
- mode: Pe,
2112
- prefixCls: Y,
2113
- visible: !u && ve && K !== "inline",
2114
- popupClassName: d,
2115
- popupOffset: m,
2116
- popupStyle: h,
2117
- popup: /* @__PURE__ */ a.createElement(
2118
- Rn,
2119
- {
2120
- mode: Pe === "horizontal" ? "vertical" : Pe
2121
- },
2122
- /* @__PURE__ */ a.createElement(yr, {
2123
- id: Ge,
2124
- ref: H
2125
- }, c)
2126
- ),
2127
- disabled: G,
2128
- onVisibleChange: Ae
2129
- }, Ee);
2130
- }
2131
- var Ce = /* @__PURE__ */ a.createElement(Pt.Item, ae({
2132
- ref: n,
2133
- role: "none"
2134
- }, C, {
2135
- component: "li",
2136
- style: t,
2137
- className: Oe(Y, "".concat(Y, "-").concat(K), r, fe(fe(fe(fe({}, "".concat(Y, "-open"), ve), "".concat(Y, "-active"), W), "".concat(Y, "-selected"), Ie), "".concat(Y, "-disabled"), G)),
2138
- onMouseEnter: qe,
2139
- onMouseLeave: tt
2140
- }), Ee, !F && /* @__PURE__ */ a.createElement(oo, {
2141
- id: Ge,
2142
- open: ve,
2143
- keyPath: Me
2144
- }, c));
2145
- return ne && (Ce = ne(Ce, e, {
2146
- selected: Ie,
2147
- active: W,
2148
- open: ve,
2149
- disabled: G
2150
- })), /* @__PURE__ */ a.createElement(Rn, {
2151
- onItemClick: nt,
2152
- mode: K === "horizontal" ? "vertical" : K,
2153
- itemIcon: X,
2154
- expandIcon: ie
2155
- }, Ce);
2156
- }), Fn = /* @__PURE__ */ a.forwardRef(function(e, n) {
2157
- var t = e.eventKey, r = e.children, i = En(t), o = br(r, i), s = Wn();
2158
- a.useEffect(function() {
2159
- if (s)
2160
- return s.registerPath(t, i), function() {
2161
- s.unregisterPath(t, i);
2162
- };
2163
- }, [i]);
2164
- var l;
2165
- return s ? l = o : l = /* @__PURE__ */ a.createElement(uo, ae({
2166
- ref: n
2167
- }, e), o), /* @__PURE__ */ a.createElement(ca.Provider, {
2168
- value: i
2169
- }, l);
2170
- });
2171
- process.env.NODE_ENV !== "production" && (Fn.displayName = "SubMenu");
2172
- function ya(e) {
2173
- var n = e.className, t = e.style, r = a.useContext(lt), i = r.prefixCls, o = Wn();
2174
- return o ? null : /* @__PURE__ */ a.createElement("li", {
2175
- role: "separator",
2176
- className: Oe("".concat(i, "-item-divider"), n),
2177
- style: t
2178
- });
2179
- }
2180
- var co = ["className", "title", "eventKey", "children"], fo = /* @__PURE__ */ a.forwardRef(function(e, n) {
2181
- var t = e.className, r = e.title;
2182
- e.eventKey;
2183
- var i = e.children, o = ke(e, co), s = a.useContext(lt), l = s.prefixCls, u = "".concat(l, "-item-group");
2184
- return /* @__PURE__ */ a.createElement("li", ae({
2185
- ref: n,
2186
- role: "presentation"
2187
- }, o, {
2188
- onClick: function(b) {
2189
- return b.stopPropagation();
2190
- },
2191
- className: Oe(u, t)
2192
- }), /* @__PURE__ */ a.createElement("div", {
2193
- role: "presentation",
2194
- className: "".concat(u, "-title"),
2195
- title: typeof r == "string" ? r : void 0
2196
- }, r), /* @__PURE__ */ a.createElement("ul", {
2197
- role: "group",
2198
- className: "".concat(u, "-list")
2199
- }, i));
2200
- }), pr = /* @__PURE__ */ a.forwardRef(function(e, n) {
2201
- var t = e.eventKey, r = e.children, i = En(t), o = br(r, i), s = Wn();
2202
- return s ? o : /* @__PURE__ */ a.createElement(fo, ae({
2203
- ref: n
2204
- }, vr(e, ["warnKey"])), o);
2205
- });
2206
- process.env.NODE_ENV !== "production" && (pr.displayName = "MenuItemGroup");
2207
- var vo = ["label", "children", "key", "type", "extra"];
2208
- function lr(e, n, t) {
2209
- var r = n.item, i = n.group, o = n.submenu, s = n.divider;
2210
- return (e || []).map(function(l, u) {
2211
- if (l && zr(l) === "object") {
2212
- var c = l, b = c.label, f = c.children, d = c.key, m = c.type, h = c.extra, R = ke(c, vo), g = d ?? "tmp-".concat(u);
2213
- return f || m === "group" ? m === "group" ? /* @__PURE__ */ a.createElement(i, ae({
2214
- key: g
2215
- }, R, {
2216
- title: b
2217
- }), lr(f, n, t)) : /* @__PURE__ */ a.createElement(o, ae({
2218
- key: g
2219
- }, R, {
2220
- title: b
2221
- }), lr(f, n, t)) : m === "divider" ? /* @__PURE__ */ a.createElement(s, ae({
2222
- key: g
2223
- }, R)) : /* @__PURE__ */ a.createElement(r, ae({
2224
- key: g
2225
- }, R, {
2226
- extra: h
2227
- }), b, (!!h || h === 0) && /* @__PURE__ */ a.createElement("span", {
2228
- className: "".concat(t, "-item-extra")
2229
- }, h));
2230
- }
2231
- return null;
2232
- }).filter(function(l) {
2233
- return l;
2234
- });
2235
- }
2236
- function Kr(e, n, t, r, i) {
2237
- var o = e, s = T({
2238
- divider: ya,
2239
- item: gr,
2240
- group: pr,
2241
- submenu: Fn
2242
- }, r);
2243
- return n && (o = lr(n, s, i)), br(o, t);
2244
- }
2245
- var mo = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items", "children", "direction", "id", "mode", "inlineCollapsed", "disabled", "disabledOverflow", "subMenuOpenDelay", "subMenuCloseDelay", "forceSubMenuRender", "defaultOpenKeys", "openKeys", "activeKey", "defaultActiveFirst", "selectable", "multiple", "defaultSelectedKeys", "selectedKeys", "onSelect", "onDeselect", "inlineIndent", "motion", "defaultMotions", "triggerSubMenuAction", "builtinPlacements", "itemIcon", "expandIcon", "overflowedIndicator", "overflowedIndicatorPopupClassName", "getPopupContainer", "onClick", "onOpenChange", "onKeyDown", "openAnimation", "openTransitionName", "_internalRenderMenuItem", "_internalRenderSubMenuItem", "_internalComponents"], Gt = [], ho = /* @__PURE__ */ a.forwardRef(function(e, n) {
2246
- var t, r = e, i = r.prefixCls, o = i === void 0 ? "rc-menu" : i, s = r.rootClassName, l = r.style, u = r.className, c = r.tabIndex, b = c === void 0 ? 0 : c, f = r.items, d = r.children, m = r.direction, h = r.id, R = r.mode, g = R === void 0 ? "vertical" : R, M = r.inlineCollapsed, S = r.disabled, y = r.disabledOverflow, w = r.subMenuOpenDelay, C = w === void 0 ? 0.1 : w, v = r.subMenuCloseDelay, E = v === void 0 ? 0.1 : v, D = r.forceSubMenuRender, K = r.defaultOpenKeys, U = r.openKeys, z = r.activeKey, F = r.defaultActiveFirst, A = r.selectable, j = A === void 0 ? !0 : A, Z = r.multiple, $ = Z === void 0 ? !1 : Z, V = r.defaultSelectedKeys, N = r.selectedKeys, q = r.onSelect, Q = r.onDeselect, ne = r.inlineIndent, k = ne === void 0 ? 24 : ne, me = r.motion, Me = r.defaultMotions, Y = r.triggerSubMenuAction, G = Y === void 0 ? "hover" : Y, he = r.builtinPlacements, H = r.itemIcon, X = r.expandIcon, ie = r.overflowedIndicator, ge = ie === void 0 ? "..." : ie, ve = r.overflowedIndicatorPopupClassName, Ie = r.getPopupContainer, ye = r.onClick, le = r.onOpenChange, xe = r.onKeyDown, He = r.openAnimation, Re = r.openTransitionName, be = r._internalRenderMenuItem, We = r._internalRenderSubMenuItem, Se = r._internalComponents, qe = ke(r, mo), tt = a.useMemo(function() {
2247
- return [Kr(d, f, Gt, Se, o), Kr(d, f, Gt, {}, o)];
2248
- }, [d, f, Se]), W = O(tt, 2), Ne = W[0], J = W[1], nt = a.useState(!1), Ae = O(nt, 2), pe = Ae[0], Ge = Ae[1], $e = a.useRef(), Ee = ji(h), Ke = m === "rtl";
2249
- process.env.NODE_ENV !== "production" && fn(!He && !Re, "`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");
2250
- var Pe = Dn(K, {
2251
- value: U,
2252
- postState: function(B) {
2253
- return B || Gt;
2254
- }
2255
- }), Ce = O(Pe, 2), oe = Ce[0], ee = Ce[1], ze = function(B) {
2256
- var te = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
2257
- function Le() {
2258
- ee(B), le == null || le(B);
2259
- }
2260
- te ? Br.flushSync(Le) : Le();
2261
- }, _t = a.useState(oe), vt = O(_t, 2), Ze = vt[0], zt = vt[1], rt = a.useRef(!1), Fe = a.useMemo(function() {
2262
- return (g === "inline" || g === "vertical") && M ? ["vertical", M] : [g, !1];
2263
- }, [g, M]), _e = O(Fe, 2), ce = _e[0], _ = _e[1], x = ce === "inline", I = a.useState(ce), L = O(I, 2), se = L[0], dt = L[1], Be = a.useState(_), Vt = O(Be, 2), Wt = Vt[0], It = Vt[1];
2264
- a.useEffect(function() {
2265
- dt(ce), It(_), rt.current && (x ? ee(Ze) : ze(Gt));
2266
- }, [ce, _]);
2267
- var mt = a.useState(0), Zt = O(mt, 2), ht = Zt[0], xt = Zt[1], gt = ht >= Ne.length - 1 || se !== "horizontal" || y;
2268
- a.useEffect(function() {
2269
- x && zt(oe);
2270
- }, [oe]), a.useEffect(function() {
2271
- return rt.current = !0, function() {
2272
- rt.current = !1;
2273
- };
2274
- }, []);
2275
- var Qe = Bi(), at = Qe.registerPath, it = Qe.unregisterPath, yt = Qe.refreshOverflowKeys, Ye = Qe.isSubPathKey, Qt = Qe.getKeyPath, Te = Qe.getKeys, bt = Qe.getSubPathKeys, Yt = a.useMemo(function() {
2276
- return {
2277
- registerPath: at,
2278
- unregisterPath: it
2279
- };
2280
- }, [at, it]), dn = a.useMemo(function() {
2281
- return {
2282
- isSubPathKey: Ye
2283
- };
2284
- }, [Ye]);
2285
- a.useEffect(function() {
2286
- yt(gt ? Gt : Ne.slice(ht + 1).map(function(re) {
2287
- return re.key;
2288
- }));
2289
- }, [ht, gt]);
2290
- var pt = Dn(z || F && ((t = Ne[0]) === null || t === void 0 ? void 0 : t.key), {
2291
- value: z
2292
- }), Ft = O(pt, 2), Ct = Ft[0], Dt = Ft[1], Xt = Cn(function(re) {
2293
- Dt(re);
2294
- }), wt = Cn(function() {
2295
- Dt(void 0);
2296
- });
2297
- Sa(n, function() {
2298
- return {
2299
- list: $e.current,
2300
- focus: function(B) {
2301
- var te, Le = Te(), De = or(Le, Ee), Kt = De.elements, Ut = De.key2element, tn = De.element2key, nn = mr($e.current, Kt), rn = Ct ?? (nn[0] ? tn.get(nn[0]) : (te = Ne.find(function(jt) {
2302
- return !jt.props.disabled;
2303
- })) === null || te === void 0 ? void 0 : te.key), Rt = Ut.get(rn);
2304
- if (rn && Rt) {
2305
- var Ue;
2306
- Rt == null || (Ue = Rt.focus) === null || Ue === void 0 || Ue.call(Rt, B);
2307
- }
2308
- }
2309
- };
2310
- });
2311
- var Mt = Dn(V || [], {
2312
- value: N,
2313
- // Legacy convert key to array
2314
- postState: function(B) {
2315
- return Array.isArray(B) ? B : B == null ? Gt : [B];
2316
- }
2317
- }), kt = O(Mt, 2), Xe = kt[0], Ht = kt[1], Ot = function(B) {
2318
- if (j) {
2319
- var te = B.key, Le = Xe.includes(te), De;
2320
- $ ? Le ? De = Xe.filter(function(Ut) {
2321
- return Ut !== te;
2322
- }) : De = [].concat(Nt(Xe), [te]) : De = [te], Ht(De);
2323
- var Kt = T(T({}, B), {}, {
2324
- selectedKeys: De
2325
- });
2326
- Le ? Q == null || Q(Kt) : q == null || q(Kt);
2327
- }
2328
- !$ && oe.length && se !== "inline" && ze(Gt);
2329
- }, Je = Cn(function(re) {
2330
- ye == null || ye(An(re)), Ot(re);
2331
- }), ot = Cn(function(re, B) {
2332
- var te = oe.filter(function(De) {
2333
- return De !== re;
2334
- });
2335
- if (B)
2336
- te.push(re);
2337
- else if (se !== "inline") {
2338
- var Le = bt(re);
2339
- te = te.filter(function(De) {
2340
- return !Le.has(De);
2341
- });
2342
- }
2343
- Hr(oe, te, !0) || ze(te, !0);
2344
- }), ct = function(B, te) {
2345
- var Le = te ?? !oe.includes(B);
2346
- ot(B, Le);
2347
- }, ft = Wi(se, Ct, Ke, Ee, $e, Te, Qt, Dt, ct, xe);
2348
- a.useEffect(function() {
2349
- Ge(!0);
2350
- }, []);
2351
- var Bt = a.useMemo(function() {
2352
- return {
2353
- _internalRenderMenuItem: be,
2354
- _internalRenderSubMenuItem: We
2355
- };
2356
- }, [be, We]), mn = se !== "horizontal" || y ? Ne : (
2357
- // Need wrap for overflow dropdown that do not response for open
2358
- Ne.map(function(re, B) {
2359
- return (
2360
- // Always wrap provider to avoid sub node re-mount
2361
- /* @__PURE__ */ a.createElement(Rn, {
2362
- key: re.key,
2363
- overflowDisabled: B > ht
2364
- }, re)
2365
- );
2366
- })
2367
- ), en = /* @__PURE__ */ a.createElement(Pt, ae({
2368
- id: h,
2369
- ref: $e,
2370
- prefixCls: "".concat(o, "-overflow"),
2371
- component: "ul",
2372
- itemComponent: gr,
2373
- className: Oe(o, "".concat(o, "-root"), "".concat(o, "-").concat(se), u, fe(fe({}, "".concat(o, "-inline-collapsed"), Wt), "".concat(o, "-rtl"), Ke), s),
2374
- dir: m,
2375
- style: l,
2376
- role: "menu",
2377
- tabIndex: b,
2378
- data: mn,
2379
- renderRawItem: function(B) {
2380
- return B;
2381
- },
2382
- renderRawRest: function(B) {
2383
- var te = B.length, Le = te ? Ne.slice(-te) : null;
2384
- return /* @__PURE__ */ a.createElement(Fn, {
2385
- eventKey: sr,
2386
- title: ge,
2387
- disabled: gt,
2388
- internalPopupClose: te === 0,
2389
- popupClassName: ve
2390
- }, Le);
2391
- },
2392
- maxCount: se !== "horizontal" || y ? Pt.INVALIDATE : Pt.RESPONSIVE,
2393
- ssr: "full",
2394
- "data-menu-list": !0,
2395
- onVisibleChange: function(B) {
2396
- xt(B);
2397
- },
2398
- onKeyDown: ft
2399
- }, qe));
2400
- return /* @__PURE__ */ a.createElement(dr.Provider, {
2401
- value: Bt
2402
- }, /* @__PURE__ */ a.createElement(oa.Provider, {
2403
- value: Ee
2404
- }, /* @__PURE__ */ a.createElement(Rn, {
2405
- prefixCls: o,
2406
- rootClassName: s,
2407
- mode: se,
2408
- openKeys: oe,
2409
- rtl: Ke,
2410
- disabled: S,
2411
- motion: pe ? me : null,
2412
- defaultMotions: pe ? Me : null,
2413
- activeKey: Ct,
2414
- onActive: Xt,
2415
- onInactive: wt,
2416
- selectedKeys: Xe,
2417
- inlineIndent: k,
2418
- subMenuOpenDelay: C,
2419
- subMenuCloseDelay: E,
2420
- forceSubMenuRender: D,
2421
- builtinPlacements: he,
2422
- triggerSubMenuAction: G,
2423
- getPopupContainer: Ie,
2424
- itemIcon: H,
2425
- expandIcon: X,
2426
- onItemClick: Je,
2427
- onOpenChange: ot
2428
- }, /* @__PURE__ */ a.createElement(fa.Provider, {
2429
- value: dn
2430
- }, en), /* @__PURE__ */ a.createElement("div", {
2431
- style: {
2432
- display: "none"
2433
- },
2434
- "aria-hidden": !0
2435
- }, /* @__PURE__ */ a.createElement(ua.Provider, {
2436
- value: Yt
2437
- }, J)))));
2438
- }), Hn = ho;
2439
- Hn.Item = gr;
2440
- Hn.SubMenu = Fn;
2441
- Hn.ItemGroup = pr;
2442
- Hn.Divider = ya;
2443
- var go = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, name: "ellipsis", theme: "outlined" }, yo = function(n, t) {
2444
- return /* @__PURE__ */ a.createElement(Ma, ae({}, n, {
2445
- ref: t,
2446
- icon: go
2447
- }));
2448
- }, bo = /* @__PURE__ */ a.forwardRef(yo);
2449
- process.env.NODE_ENV !== "production" && (bo.displayName = "EllipsisOutlined");
2450
- export {
2451
- So as D,
2452
- Hn as E,
2453
- gr as M,
2454
- vn as R,
2455
- Fn as S,
2456
- ia as T,
2457
- Ro as a,
2458
- bo as b,
2459
- ya as c,
2460
- pr as d,
2461
- Qa as e,
2462
- Ya as f,
2463
- Za as g,
2464
- ii as i,
2465
- Xa as s,
2466
- En as u
2467
- };