@bioturing/components 0.14.1 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/dist/components/Badge/component.js +21 -0
  2. package/dist/components/Badge/component.js.map +1 -0
  3. package/dist/components/Badge/style.css +1 -0
  4. package/dist/components/Breadcrumb/component.js +46 -0
  5. package/dist/components/Breadcrumb/component.js.map +1 -0
  6. package/dist/components/Breadcrumb/style.css +1 -0
  7. package/dist/components/Breadcrumb/useItemRender.js +27 -0
  8. package/dist/components/Breadcrumb/useItemRender.js.map +1 -0
  9. package/dist/components/Button/component.js +9 -0
  10. package/dist/components/Button/component.js.map +1 -0
  11. package/dist/components/Button/style.css +1 -0
  12. package/dist/components/Checkbox/component.js +11 -0
  13. package/dist/components/Checkbox/component.js.map +1 -0
  14. package/dist/components/Checkbox/style.css +1 -0
  15. package/dist/components/CodeBlock/component.js +127 -0
  16. package/dist/components/CodeBlock/component.js.map +1 -0
  17. package/dist/components/CodeBlock/style.css +1 -0
  18. package/dist/components/DSRoot/component.js +21 -0
  19. package/dist/components/DSRoot/component.js.map +1 -0
  20. package/dist/components/DSRoot/context.js +9 -0
  21. package/dist/components/DSRoot/context.js.map +1 -0
  22. package/dist/components/DSRoot/style.css +1 -0
  23. package/dist/components/DropdownMenu/component.js +103 -0
  24. package/dist/components/DropdownMenu/component.js.map +1 -0
  25. package/dist/components/DropdownMenu/style.css +1 -0
  26. package/dist/components/Empty/component.js +48 -0
  27. package/dist/components/Empty/component.js.map +1 -0
  28. package/dist/components/Empty/style.css +1 -0
  29. package/dist/components/Field/component.js +30 -0
  30. package/dist/components/Field/component.js.map +1 -0
  31. package/dist/components/Field/style.css +1 -0
  32. package/dist/components/Form/component.js +23 -0
  33. package/dist/components/Form/component.js.map +1 -0
  34. package/dist/components/Form/item.js +30 -0
  35. package/dist/components/Form/item.js.map +1 -0
  36. package/dist/components/Form/style.css +1 -0
  37. package/dist/components/IconButton/component.js +49 -0
  38. package/dist/components/IconButton/component.js.map +1 -0
  39. package/dist/components/IconButton/style.css +1 -0
  40. package/dist/components/Input/component.js +25 -0
  41. package/dist/components/Input/component.js.map +1 -0
  42. package/dist/components/Modal/Modal.js +161 -0
  43. package/dist/components/Modal/Modal.js.map +1 -0
  44. package/dist/components/Modal/ModalProvider.js +70 -0
  45. package/dist/components/Modal/ModalProvider.js.map +1 -0
  46. package/dist/components/Modal/ModalService.js +25 -0
  47. package/dist/components/Modal/ModalService.js.map +1 -0
  48. package/dist/components/Modal/constants.js +5 -0
  49. package/dist/components/Modal/constants.js.map +1 -0
  50. package/dist/components/Modal/functions.js +27 -0
  51. package/dist/components/Modal/functions.js.map +1 -0
  52. package/dist/components/Modal/index.js +20 -0
  53. package/dist/components/Modal/index.js.map +1 -0
  54. package/dist/components/Modal/style.css +1 -0
  55. package/dist/components/Popover/component.js +12 -0
  56. package/dist/components/Popover/component.js.map +1 -0
  57. package/dist/components/PopupPanel/component.js +190 -0
  58. package/dist/components/PopupPanel/component.js.map +1 -0
  59. package/dist/components/PopupPanel/constants.js +5 -0
  60. package/dist/components/PopupPanel/constants.js.map +1 -0
  61. package/dist/components/PopupPanel/style.css +1 -0
  62. package/dist/components/Radio/component.js +22 -0
  63. package/dist/components/Radio/component.js.map +1 -0
  64. package/dist/components/Radio/style.css +1 -0
  65. package/dist/components/ScrollArea/component.js +40 -0
  66. package/dist/components/ScrollArea/component.js.map +1 -0
  67. package/dist/components/ScrollArea/style.css +1 -0
  68. package/dist/components/Segmented/component.js +9 -0
  69. package/dist/components/Segmented/component.js.map +1 -0
  70. package/dist/components/Segmented/style.css +1 -0
  71. package/dist/components/Select/component.js +135 -0
  72. package/dist/components/Select/component.js.map +1 -0
  73. package/dist/components/Select/style.css +1 -0
  74. package/dist/components/Slider/component.js +23 -0
  75. package/dist/components/Slider/component.js.map +1 -0
  76. package/dist/components/Spin/component.js +12 -0
  77. package/dist/components/Spin/component.js.map +1 -0
  78. package/dist/components/Spin/style.css +1 -0
  79. package/dist/components/Splitter/component.js +40 -0
  80. package/dist/components/Splitter/component.js.map +1 -0
  81. package/dist/components/Splitter/style.css +1 -0
  82. package/dist/components/Stack/Stack.js +37 -0
  83. package/dist/components/Stack/Stack.js.map +1 -0
  84. package/dist/components/Stack/StackChild.js +57 -0
  85. package/dist/components/Stack/StackChild.js.map +1 -0
  86. package/dist/components/Stack/index.js +9 -0
  87. package/dist/components/Stack/index.js.map +1 -0
  88. package/dist/components/Stack/style.css +1 -0
  89. package/dist/components/Switch/component.js +9 -0
  90. package/dist/components/Switch/component.js.map +1 -0
  91. package/dist/components/Switch/style.css +1 -0
  92. package/dist/components/Table/component.js +68 -0
  93. package/dist/components/Table/component.js.map +1 -0
  94. package/dist/components/Table/style.css +1 -0
  95. package/dist/components/Tag/component.js +30 -0
  96. package/dist/components/Tag/component.js.map +1 -0
  97. package/dist/components/Tag/style.css +1 -0
  98. package/dist/components/ThemeProvider/component.js +41 -0
  99. package/dist/components/ThemeProvider/component.js.map +1 -0
  100. package/dist/components/ThemeProvider/style.css +1 -0
  101. package/dist/components/Toast/component.js +101 -0
  102. package/dist/components/Toast/component.js.map +1 -0
  103. package/dist/components/Toast/function.js +25 -0
  104. package/dist/components/Toast/function.js.map +1 -0
  105. package/dist/components/Toast/style.css +1 -0
  106. package/dist/components/Tooltip/component.js +26 -0
  107. package/dist/components/Tooltip/component.js.map +1 -0
  108. package/dist/components/Tooltip/style.css +1 -0
  109. package/dist/components/Tour/component.js +35 -0
  110. package/dist/components/Tour/component.js.map +1 -0
  111. package/dist/components/Tour/style.css +1 -0
  112. package/dist/components/Transition/component.js +44 -0
  113. package/dist/components/Transition/component.js.map +1 -0
  114. package/dist/components/Tree/components.js +67 -0
  115. package/dist/components/Tree/components.js.map +1 -0
  116. package/dist/components/Tree/helpers.js +53 -0
  117. package/dist/components/Tree/helpers.js.map +1 -0
  118. package/dist/components/Tree/useTreeCommon.js +86 -0
  119. package/dist/components/Tree/useTreeCommon.js.map +1 -0
  120. package/dist/components/Tree/useUniqueKeysTree.js +142 -0
  121. package/dist/components/Tree/useUniqueKeysTree.js.map +1 -0
  122. package/dist/components/Truncate/component.js +93 -0
  123. package/dist/components/Truncate/component.js.map +1 -0
  124. package/dist/components/Truncate/helpers.js +36 -0
  125. package/dist/components/Truncate/helpers.js.map +1 -0
  126. package/dist/components/Truncate/style.css +1 -0
  127. package/dist/components/Upload/component.js +39 -0
  128. package/dist/components/Upload/component.js.map +1 -0
  129. package/dist/components/Upload/dragger.js +23 -0
  130. package/dist/components/Upload/dragger.js.map +1 -0
  131. package/dist/components/Upload/hooks.js +18 -0
  132. package/dist/components/Upload/hooks.js.map +1 -0
  133. package/dist/components/Upload/item.js +84 -0
  134. package/dist/components/Upload/item.js.map +1 -0
  135. package/dist/components/Upload/utils.js +7 -0
  136. package/dist/components/Upload/utils.js.map +1 -0
  137. package/dist/components/VerticalCollapsiblePanel/component.js +125 -0
  138. package/dist/components/VerticalCollapsiblePanel/component.js.map +1 -0
  139. package/dist/components/VerticalCollapsiblePanel/style.css +1 -0
  140. package/dist/components/hooks/antd.js +22 -0
  141. package/dist/components/hooks/antd.js.map +1 -0
  142. package/dist/components/hooks/base-ui.js +47 -0
  143. package/dist/components/hooks/base-ui.js.map +1 -0
  144. package/dist/components/hooks/useCharts.js +28 -0
  145. package/dist/components/hooks/useCharts.js.map +1 -0
  146. package/dist/components/hooks/useControlledState.js +15 -0
  147. package/dist/components/hooks/useControlledState.js.map +1 -0
  148. package/dist/components/utils/WithAntdTokens.js +24 -0
  149. package/dist/components/utils/WithAntdTokens.js.map +1 -0
  150. package/dist/components/utils/antdUtils.js +58 -0
  151. package/dist/components/utils/antdUtils.js.map +1 -0
  152. package/dist/components/utils/cn.js +27 -0
  153. package/dist/components/utils/cn.js.map +1 -0
  154. package/dist/components/utils/isTracebackError.js +10 -0
  155. package/dist/components/utils/isTracebackError.js.map +1 -0
  156. package/dist/components/utils/reactToString.js +23 -0
  157. package/dist/components/utils/reactToString.js.map +1 -0
  158. package/dist/index.d.ts +2497 -2
  159. package/dist/index.js +188 -3376
  160. package/dist/index.js.map +1 -0
  161. package/dist/metadata.js +513 -0
  162. package/dist/metadata.js.map +1 -0
  163. package/dist/tailwind.css +1 -4
  164. package/dist/tailwind.d.ts +1 -0
  165. package/dist/tokens/and-theme/tokens.js +351 -0
  166. package/dist/tokens/and-theme/tokens.js.map +1 -0
  167. package/dist/tokens/charts/index.js +18 -0
  168. package/dist/tokens/charts/index.js.map +1 -0
  169. package/dist/tokens/charts/tokens.js +208 -0
  170. package/dist/tokens/charts/tokens.js.map +1 -0
  171. package/dist/tokens/utils.js +37 -0
  172. package/dist/tokens/utils.js.map +1 -0
  173. package/package.json +10 -108
  174. package/dist/Badge.js +0 -41
  175. package/dist/Breadcrumb.js +0 -92
  176. package/dist/Checkbox.js +0 -12
  177. package/dist/CodeBlock.js +0 -641
  178. package/dist/Collapse.js +0 -49
  179. package/dist/DSRoot.js +0 -1181
  180. package/dist/DropdownMenu.js +0 -211
  181. package/dist/Empty.js +0 -53
  182. package/dist/Field.js +0 -66
  183. package/dist/Form.js +0 -125
  184. package/dist/IconButton.js +0 -82
  185. package/dist/Input.js +0 -48
  186. package/dist/Modal.js +0 -430
  187. package/dist/Popover.js +0 -10
  188. package/dist/PopupPanel.css +0 -116
  189. package/dist/PopupPanel.js +0 -333
  190. package/dist/Radio.js +0 -24
  191. package/dist/ScrollArea.js +0 -50
  192. package/dist/Segmented.js +0 -10
  193. package/dist/Select.js +0 -157
  194. package/dist/Slider.js +0 -39
  195. package/dist/Spin.js +0 -33
  196. package/dist/Splitter.js +0 -47
  197. package/dist/Switch.js +0 -10
  198. package/dist/Table.js +0 -126
  199. package/dist/Tag.js +0 -24
  200. package/dist/ThemeProvider.js +0 -403
  201. package/dist/Toast.js +0 -1154
  202. package/dist/Tooltip.js +0 -36
  203. package/dist/Tour.js +0 -54
  204. package/dist/Tree.js +0 -318
  205. package/dist/Truncate.js +0 -160
  206. package/dist/Upload.js +0 -460
  207. package/dist/VerticalCollapsiblePanel.js +0 -413
  208. package/dist/components/Badge/component.d.ts +0 -3
  209. package/dist/components/Badge/index.d.ts +0 -1
  210. package/dist/components/Breadcrumb/component.d.ts +0 -5
  211. package/dist/components/Breadcrumb/index.d.ts +0 -2
  212. package/dist/components/Breadcrumb/types.d.ts +0 -18
  213. package/dist/components/Breadcrumb/useItemRender.d.ts +0 -6
  214. package/dist/components/Button/component.d.ts +0 -7
  215. package/dist/components/Button/index.d.ts +0 -1
  216. package/dist/components/Checkbox/component.d.ts +0 -10
  217. package/dist/components/Checkbox/index.d.ts +0 -1
  218. package/dist/components/CodeBlock/component.d.ts +0 -2
  219. package/dist/components/CodeBlock/index.d.ts +0 -2
  220. package/dist/components/CodeBlock/types.d.ts +0 -47
  221. package/dist/components/Collapse/component.d.ts +0 -13
  222. package/dist/components/Collapse/index.d.ts +0 -1
  223. package/dist/components/DSRoot/component.d.ts +0 -13
  224. package/dist/components/DSRoot/context.d.ts +0 -7
  225. package/dist/components/DSRoot/index.d.ts +0 -1
  226. package/dist/components/DropdownMenu/component.d.ts +0 -30
  227. package/dist/components/DropdownMenu/index.d.ts +0 -2
  228. package/dist/components/Empty/component.d.ts +0 -12
  229. package/dist/components/Empty/index.d.ts +0 -1
  230. package/dist/components/Field/component.d.ts +0 -41
  231. package/dist/components/Field/index.d.ts +0 -1
  232. package/dist/components/Form/component.d.ts +0 -18
  233. package/dist/components/Form/index.d.ts +0 -1
  234. package/dist/components/Form/item.d.ts +0 -5
  235. package/dist/components/IconButton/component.d.ts +0 -29
  236. package/dist/components/IconButton/index.d.ts +0 -1
  237. package/dist/components/Input/component.d.ts +0 -30
  238. package/dist/components/Input/index.d.ts +0 -1
  239. package/dist/components/Modal/Modal.d.ts +0 -84
  240. package/dist/components/Modal/ModalProvider.d.ts +0 -5
  241. package/dist/components/Modal/ModalService.d.ts +0 -33
  242. package/dist/components/Modal/constants.d.ts +0 -9
  243. package/dist/components/Modal/functions.d.ts +0 -27
  244. package/dist/components/Modal/index.d.ts +0 -14
  245. package/dist/components/Popover/component.d.ts +0 -9
  246. package/dist/components/Popover/index.d.ts +0 -1
  247. package/dist/components/PopupPanel/component.d.ts +0 -61
  248. package/dist/components/PopupPanel/constants.d.ts +0 -7
  249. package/dist/components/PopupPanel/index.d.ts +0 -1
  250. package/dist/components/Radio/component.d.ts +0 -7
  251. package/dist/components/Radio/index.d.ts +0 -2
  252. package/dist/components/Radio/interface.d.ts +0 -5
  253. package/dist/components/ScrollArea/component.d.ts +0 -10
  254. package/dist/components/ScrollArea/index.d.ts +0 -1
  255. package/dist/components/Segmented/component.d.ts +0 -9
  256. package/dist/components/Segmented/index.d.ts +0 -1
  257. package/dist/components/Select/component.d.ts +0 -23
  258. package/dist/components/Select/index.d.ts +0 -1
  259. package/dist/components/Slider/component.d.ts +0 -5
  260. package/dist/components/Slider/index.d.ts +0 -1
  261. package/dist/components/Spin/component.d.ts +0 -3
  262. package/dist/components/Spin/index.d.ts +0 -1
  263. package/dist/components/Splitter/component.d.ts +0 -12
  264. package/dist/components/Splitter/index.d.ts +0 -1
  265. package/dist/components/Switch/component.d.ts +0 -8
  266. package/dist/components/Switch/index.d.ts +0 -1
  267. package/dist/components/Table/component.d.ts +0 -19
  268. package/dist/components/Table/index.d.ts +0 -1
  269. package/dist/components/Tag/component.d.ts +0 -11
  270. package/dist/components/Tag/index.d.ts +0 -1
  271. package/dist/components/ThemeProvider/component.d.ts +0 -6
  272. package/dist/components/ThemeProvider/index.d.ts +0 -1
  273. package/dist/components/Toast/component.d.ts +0 -14
  274. package/dist/components/Toast/function.d.ts +0 -10
  275. package/dist/components/Toast/index.d.ts +0 -3
  276. package/dist/components/Toast/types.d.ts +0 -3
  277. package/dist/components/Tooltip/component.d.ts +0 -9
  278. package/dist/components/Tooltip/index.d.ts +0 -1
  279. package/dist/components/Tour/component.d.ts +0 -7
  280. package/dist/components/Tour/index.d.ts +0 -1
  281. package/dist/components/Transition/component.d.ts +0 -17
  282. package/dist/components/Transition/index.d.ts +0 -1
  283. package/dist/components/Tree/components.d.ts +0 -13
  284. package/dist/components/Tree/helpers.d.ts +0 -4
  285. package/dist/components/Tree/index.d.ts +0 -4
  286. package/dist/components/Tree/types.d.ts +0 -55
  287. package/dist/components/Tree/useTreeCommon.d.ts +0 -178
  288. package/dist/components/Tree/useUniqueKeysTree.d.ts +0 -33
  289. package/dist/components/Truncate/component.d.ts +0 -12
  290. package/dist/components/Truncate/helpers.d.ts +0 -5
  291. package/dist/components/Truncate/index.d.ts +0 -1
  292. package/dist/components/Upload/component.d.ts +0 -16
  293. package/dist/components/Upload/dragger.d.ts +0 -13
  294. package/dist/components/Upload/hooks.d.ts +0 -5
  295. package/dist/components/Upload/index.d.ts +0 -3
  296. package/dist/components/Upload/item.d.ts +0 -11
  297. package/dist/components/Upload/utils.d.ts +0 -1
  298. package/dist/components/VerticalCollapsiblePanel/component.d.ts +0 -64
  299. package/dist/components/VerticalCollapsiblePanel/index.d.ts +0 -1
  300. package/dist/components/hooks/antd.d.ts +0 -11
  301. package/dist/components/hooks/base-ui.d.ts +0 -7
  302. package/dist/components/hooks/index.d.ts +0 -4
  303. package/dist/components/hooks/useCharts.d.ts +0 -22
  304. package/dist/components/hooks/useControlledState.d.ts +0 -1
  305. package/dist/components/index.d.ts +0 -40
  306. package/dist/components/utils/WithAntdTokens.d.ts +0 -7
  307. package/dist/components/utils/antdUtils.d.ts +0 -15
  308. package/dist/components/utils/client.d.ts +0 -2
  309. package/dist/components/utils/cn.d.ts +0 -4
  310. package/dist/components/utils/index.d.ts +0 -3
  311. package/dist/components/utils/isTracebackError.d.ts +0 -1
  312. package/dist/components/utils/main.d.ts +0 -3
  313. package/dist/components/utils/reactToString.d.ts +0 -2
  314. package/dist/components/utils/types.d.ts +0 -9
  315. package/dist/hooks.js +0 -961
  316. package/dist/index.css +0 -116
  317. package/dist/style.css +0 -1392
  318. package/dist/style.js +0 -0
  319. package/dist/tailwind.js +0 -0
  320. package/dist/tokens/and-theme/index.d.ts +0 -1
  321. package/dist/tokens/and-theme/tokens.d.ts +0 -5
  322. package/dist/tokens/charts/index.d.ts +0 -6
  323. package/dist/tokens/charts/tokens.d.ts +0 -455
  324. package/dist/tokens/index.d.ts +0 -2
  325. package/dist/tokens/utils.d.ts +0 -16
  326. package/dist/utils.js +0 -120
package/dist/index.js CHANGED
@@ -1,3376 +1,188 @@
1
- import * as __WEBPACK_EXTERNAL_MODULE_antd__ from "antd";
2
- import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
3
- import * as __WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__ from "@bioturing/assets";
4
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_select_005d200f__ from "antd/es/select";
5
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_checkbox_80658bc3__ from "antd/es/checkbox";
6
- import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
7
- import * as __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__ from "@floating-ui/react";
8
- import * as __WEBPACK_EXTERNAL_MODULE_tailwind_merge_e05e3e95__ from "tailwind-merge";
9
- import * as __WEBPACK_EXTERNAL_MODULE_es_toolkit_82663681__ from "es-toolkit";
10
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_app_useApp_90d95086__ from "antd/es/app/useApp";
11
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_modal_52965d33__ from "antd/es/modal";
12
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_config_provider_6a57beb3__ from "antd/es/config-provider";
13
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_theme_useToken_e8911485__ from "antd/es/theme/useToken";
14
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_modal_context_bc73863f__ from "antd/es/modal/context";
15
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_modal_components_NormalCancelBtn_54ff398c__ from "antd/es/modal/components/NormalCancelBtn";
16
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_modal_components_NormalOkBtn_897b50c4__ from "antd/es/modal/components/NormalOkBtn";
17
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_modal_locale_f16c0933__ from "antd/es/modal/locale";
18
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_locale_31079002__ from "antd/es/locale";
19
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_switch_101feb97__ from "antd/es/switch";
20
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_segmented_6dbdbe23__ from "antd/es/segmented";
21
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_table_8c9fc42b__ from "antd/es/table";
22
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_empty_5eb61431__ from "antd/es/empty";
23
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_tag_1ccabaea__ from "antd/es/tag";
24
- import * as __WEBPACK_EXTERNAL_MODULE__ant_design_cssinjs_c619260f__ from "@ant-design/cssinjs";
25
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_splitter_Splitter_9b2d5564__ from "antd/es/splitter/Splitter";
26
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_splitter_Panel_2a8c0f35__ from "antd/es/splitter/Panel";
27
- import * as __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_menu_54c0c798__ from "@base-ui-components/react/menu";
28
- import * as __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_utils_d48cdb94__ from "@base-ui-components/react/utils";
29
- import * as __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__ from "@base-ui-components/react";
30
- import * as __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_use_render_2fb9dc6d__ from "@base-ui-components/react/use-render";
31
- import * as __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_merge_props_04b69945__ from "@base-ui-components/react/merge-props";
32
- import * as __WEBPACK_EXTERNAL_MODULE_react_dom_7136dc57__ from "react-dom";
33
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_upload_29096ddd__ from "antd/es/upload";
34
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_button_8f463bb4__ from "antd/es/button";
35
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_flex_86593150__ from "antd/es/flex";
36
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_progress_da1757d8__ from "antd/es/progress";
37
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_popover_ff5d0161__ from "antd/es/popover";
38
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_slider_a2f2f6f0__ from "antd/es/slider";
39
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_tooltip_1091cc47__ from "antd/es/tooltip";
40
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_breadcrumb_524ec91e__ from "antd/es/breadcrumb";
41
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_breadcrumb_useItemRender_afeae2fe__ from "antd/es/breadcrumb/useItemRender";
42
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_tree_05ca9855__ from "antd/es/tree";
43
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_spin_c7b761a0__ from "antd/es/spin";
44
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_form_ErrorList_c62fef91__ from "antd/es/form/ErrorList";
45
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_form_Form_38f624ac__ from "antd/es/form/Form";
46
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_form_FormList_8c66a51b__ from "antd/es/form/FormList";
47
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_form_context_0a1516eb__ from "antd/es/form/context";
48
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_form_hooks_useFormInstance_2ae86589__ from "antd/es/form/hooks/useFormInstance";
49
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_form_FormItem_940c64da__ from "antd/es/form/FormItem";
50
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_tour_6998cb50__ from "antd/es/tour";
51
- import * as __WEBPACK_EXTERNAL_MODULE_prism_react_renderer_be33806e__ from "prism-react-renderer";
52
- import * as __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_popover_cdb87929__ from "@base-ui-components/react/popover";
53
- import * as __WEBPACK_EXTERNAL_MODULE_react_use_resizable_ad29d4b1__ from "react-use-resizable";
54
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_badge_f5f828f9__ from "antd/es/badge";
55
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_radio_e6b5c17a__ from "antd/es/radio";
56
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_app_App_698582f4__ from "antd/es/app/App";
57
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_theme_57fdaa32__ from "antd/es/theme";
58
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_grid_ec1d1712__ from "antd/es/grid";
59
- "use client";
60
- function useControlledState(value, onChange, defaultValue) {
61
- const [internalState, setInternalState] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(defaultValue);
62
- const isControlled = void 0 !== value;
63
- const setState = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((next)=>{
64
- const nextValue = "function" == typeof next ? next(value) : next;
65
- if ("function" == typeof onChange) onChange(nextValue);
66
- if (!isControlled) setInternalState(next);
67
- }, [
68
- value,
69
- onChange,
70
- isControlled
71
- ]);
72
- const state = isControlled ? value : internalState;
73
- return [
74
- state,
75
- setState
76
- ];
77
- }
78
- function cx(...args) {
79
- const classes = [];
80
- for (const arg of args)if (arg) {
81
- if ("string" == typeof arg || "number" == typeof arg) classes.push(String(arg));
82
- else if (Array.isArray(arg)) classes.push(...cx(...arg));
83
- else if ("object" == typeof arg) {
84
- for (const [key, value] of Object.entries(arg))if (value) classes.push(key);
85
- }
86
- }
87
- return classes;
88
- }
89
- function clsx(...args) {
90
- return cx(...args).join(" ");
91
- }
92
- function cn(...args) {
93
- return (0, __WEBPACK_EXTERNAL_MODULE_tailwind_merge_e05e3e95__.twMerge)(cx(...args));
94
- }
95
- var constants_PopupPanelSize = /*#__PURE__*/ function(PopupPanelSize) {
96
- PopupPanelSize["xsmall"] = "320px";
97
- PopupPanelSize["small"] = "400px";
98
- PopupPanelSize["medium"] = "480px";
99
- PopupPanelSize["large"] = "640px";
100
- PopupPanelSize["xlarge"] = "840px";
101
- return PopupPanelSize;
102
- }({});
103
- const MainSelectInner = ({ mode, className, open: openProp, defaultOpen, onOpenChange, popupClassName, onDropdownVisibleChange, enhancePositioner, getPopupContainer, popupSize, popupRender, dropdownRender, classNames, styles = {}, ...rest }, ref)=>{
104
- var _classNames_popup;
105
- const portalNode = (0, __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.useFloatingPortalNode)({});
106
- const isMultiple = "multiple" === mode || "tags" === mode;
107
- const [open, setOpen] = useControlledState(openProp, onOpenChange || onDropdownVisibleChange, defaultOpen);
108
- const { floatingStyles, refs } = (0, __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.useFloating)({
109
- placement: "bottom-start",
110
- transform: false,
111
- open: enhancePositioner && open,
112
- middleware: [
113
- (0, __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.offset)({
114
- mainAxis: 4
115
- }),
116
- (0, __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.autoPlacement)({
117
- allowedPlacements: [
118
- "bottom-start",
119
- "bottom-end",
120
- "bottom",
121
- "top-start",
122
- "top-end",
123
- "top"
124
- ]
125
- }),
126
- (0, __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.shift)({
127
- padding: 8
128
- }),
129
- (0, __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.size)({
130
- padding: 8,
131
- apply ({ availableHeight, availableWidth, elements }) {
132
- elements.floating.style.setProperty("--available-width", availableWidth + "px");
133
- elements.floating.style.setProperty("--available-height", availableHeight + "px");
134
- }
135
- })
136
- ],
137
- whileElementsMounted: __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.autoUpdate
138
- });
139
- const dsPopupClassName = clsx("ds-select-popup", isMultiple && "ds-select-multiple", (null == classNames ? void 0 : null == (_classNames_popup = classNames.popup) ? void 0 : _classNames_popup.root) || popupClassName, enhancePositioner && "ds-select-popup-enhanced");
140
- const popupWidth = popupSize && "string" == typeof popupSize && popupSize in constants_PopupPanelSize ? constants_PopupPanelSize[popupSize] : "number" == typeof popupSize ? popupSize + "px" : popupSize || "fit-content";
141
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_select_005d200f__["default"], {
142
- ref: (node)=>{
143
- if (ref) if ("function" == typeof ref) ref(node);
144
- else ref.current = node;
145
- if (!node) return;
146
- refs.setReference(null == node ? void 0 : node.nativeElement);
147
- },
148
- suffixIcon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.CaretDown, {
149
- weight: "bold"
150
- }),
151
- open: open,
152
- onOpenChange: setOpen,
153
- popupClassName: dsPopupClassName,
154
- classNames: {
155
- popup: {
156
- root: dsPopupClassName
157
- },
158
- ...classNames
159
- },
160
- ...isMultiple ? {
161
- menuItemSelectedIcon: ({ isSelected })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
162
- className: "ant-select-checkbox-indicator",
163
- children: isSelected ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_checkbox_80658bc3__["default"], {
164
- checked: true
165
- }) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_checkbox_80658bc3__["default"], {
166
- checked: false
167
- })
168
- })
169
- } : {},
170
- mode: mode,
171
- className: clsx("ds-select", className),
172
- styles: enhancePositioner ? (0, __WEBPACK_EXTERNAL_MODULE_es_toolkit_82663681__.toMerged)(styles, {
173
- popup: {
174
- root: {
175
- transition: "none",
176
- ...floatingStyles,
177
- "--ds-select-popup-width": popupWidth
178
- }
179
- }
180
- }) : styles,
181
- getPopupContainer: getPopupContainer || (enhancePositioner ? ()=>portalNode || document.body : void 0),
182
- popupRender: (menu)=>{
183
- const renderMenu = ()=>popupRender ? popupRender(menu) : dropdownRender ? dropdownRender(menu) : menu;
184
- if (!enhancePositioner) return renderMenu();
185
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
186
- children: [
187
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.FloatingOverlay, {
188
- lockScroll: true,
189
- onClick: ()=>setOpen(false)
190
- }),
191
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
192
- ref: (node)=>{
193
- if (!node) return;
194
- const popupEl = node.closest(".ds-select-dropdown");
195
- refs.setFloating(popupEl);
196
- },
197
- children: renderMenu()
198
- })
199
- ]
200
- });
201
- },
202
- ...rest
203
- });
204
- };
205
- const MainSelect = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(MainSelectInner);
206
- const Select = Object.assign(MainSelect, {
207
- Option: __WEBPACK_EXTERNAL_MODULE_antd_es_select_005d200f__["default"].Option,
208
- OptGroup: __WEBPACK_EXTERNAL_MODULE_antd_es_select_005d200f__["default"].OptGroup
209
- });
210
- "use client";
211
- const useGetPrefixCls = ()=>{
212
- const { getPrefixCls } = (0, __WEBPACK_EXTERNAL_MODULE_react__.useContext)(__WEBPACK_EXTERNAL_MODULE_antd_es_config_provider_6a57beb3__["default"].ConfigContext);
213
- return {
214
- getPrefixCls
215
- };
216
- };
217
- const useAntdCssVarClassname = ()=>{
218
- var _token_;
219
- const token = (0, __WEBPACK_EXTERNAL_MODULE_antd_es_theme_useToken_e8911485__["default"])();
220
- return null == (_token_ = token[4]) ? void 0 : _token_.key;
221
- };
222
- const useCls = ()=>{
223
- const { getPrefixCls } = (0, __WEBPACK_EXTERNAL_MODULE_react__.useContext)(__WEBPACK_EXTERNAL_MODULE_antd_es_config_provider_6a57beb3__["default"].ConfigContext);
224
- return (...args)=>cx(...args).map((cls)=>getPrefixCls(cls)).join(" ");
225
- };
226
- function splitCamelCase(text) {
227
- const result = [];
228
- let currentWord = "";
229
- for (const char of text)if (char >= "A" && char <= "Z") {
230
- if (currentWord) result.push(currentWord);
231
- currentWord = char.toLowerCase();
232
- } else currentWord += char;
233
- if (currentWord) result.push(currentWord);
234
- return result.length > 0 ? result : [
235
- text
236
- ];
237
- }
238
- const parseAntdPlacement = (placement = "bottomLeft")=>{
239
- const [position1, position2] = splitCamelCase(placement);
240
- let primaryPlacement;
241
- let align = "center";
242
- if ("top" === position1 || "bottom" === position1) {
243
- primaryPlacement = position1;
244
- if (position2) switch(position2){
245
- case "left":
246
- align = "start";
247
- break;
248
- case "right":
249
- align = "end";
250
- break;
251
- }
252
- } else if ("left" === position1 || "right" === position1) {
253
- primaryPlacement = position1;
254
- if (position2) switch(position2){
255
- case "top":
256
- align = "start";
257
- break;
258
- case "bottom":
259
- align = "end";
260
- break;
261
- }
262
- } else primaryPlacement = "bottom";
263
- return {
264
- placement: primaryPlacement,
265
- align
266
- };
267
- };
268
- "use client";
269
- const IconButtonImpl = (props, ref)=>{
270
- const { label, size = "medium", negativeMargin = true, children, className, tooltipProps = {}, as, href, target, rel, download, hrefLang, referrerPolicy, ...rest } = props;
271
- const cls = useCls();
272
- const antdCssVarClassname = useAntdCssVarClassname();
273
- const buttonClasses = [
274
- cls("icon-button"),
275
- cls(`icon-button-${size}`),
276
- cls(negativeMargin ? "icon-button-negative-margin" : ""),
277
- antdCssVarClassname,
278
- className
279
- ].filter(Boolean).join(" ");
280
- const Component = as || (href ? "a" : "button");
281
- const anchorProps = "a" === Component ? {
282
- ...void 0 !== target && {
283
- target
284
- },
285
- ...void 0 !== rel && {
286
- rel
287
- },
288
- ...void 0 !== download && {
289
- download
290
- },
291
- ...void 0 !== hrefLang && {
292
- hrefLang
293
- },
294
- ...void 0 !== referrerPolicy && {
295
- referrerPolicy
296
- }
297
- } : {};
298
- const elementProps = {
299
- ref,
300
- className: buttonClasses,
301
- ..."button" === Component && {
302
- type: "button"
303
- },
304
- ...href && {
305
- href
306
- },
307
- ...anchorProps,
308
- ...rest
309
- };
310
- const element = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Component, {
311
- ...elementProps,
312
- children: children
313
- });
314
- return label ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Tooltip, {
315
- title: label,
316
- arrow: false,
317
- ...tooltipProps,
318
- children: element
319
- }) : element;
320
- };
321
- const IconButton = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(IconButtonImpl);
322
- var constants_ModalSize = /*#__PURE__*/ function(ModalSize) {
323
- ModalSize["xsmall"] = "400px";
324
- ModalSize["small"] = "520px";
325
- ModalSize["medium"] = "640px";
326
- ModalSize["large"] = "840px";
327
- ModalSize["xlarge"] = "1024px";
328
- ModalSize["xxlarge"] = "1280px";
329
- ModalSize["fullscreen"] = "100%";
330
- return ModalSize;
331
- }({});
332
- "use client";
333
- const Modal = ({ open: externalOpen, closeIcon, children, size: sizeProp, footer, width, style, styles, classNames, okButtonProps, cancelButtonProps, loading, onOk, onCancel, okText, okType = "primary", confirmLoading, cancelText = "Close", hideOkButton = false, hideCancelButton = false, contentPadding, title, afterTitle, beforeCloseButton, afterCloseButton, defaultFixedHeaderFooter = false, centered = true, type = "default", defaultOpen = true, background: backgroundProp, bodyScrollable = true, ...rest })=>{
334
- const defaultCloseIcon = void 0 === closeIcon ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.X, {
335
- size: 16,
336
- weight: "bold"
337
- }) : closeIcon;
338
- const defaultModalSize = "default" === type ? "medium" : "xsmall";
339
- const size = sizeProp || defaultModalSize;
340
- const modalWidth = width || constants_ModalSize[size];
341
- const background = backgroundProp || (size && size in constants_ModalSize && parseInt(constants_ModalSize[size]) <= parseInt(constants_ModalSize.medium) ? "elevated" : "container");
342
- const modalStyle = {
343
- "--ds-modal-bg": `var(--ds-color-bg-${background})`,
344
- ...style,
345
- ..."fullscreen" === size ? {
346
- top: 0,
347
- maxWidth: "100%",
348
- height: "100%"
349
- } : {}
350
- };
351
- const modalStyles = {
352
- ...styles,
353
- body: {
354
- ...void 0 !== contentPadding ? {
355
- "--ds-modal-content-padding": false === contentPadding || 0 === contentPadding ? "0" : "number" == typeof contentPadding ? `${contentPadding}px` : contentPadding
356
- } : {},
357
- ...null == styles ? void 0 : styles.body
358
- }
359
- };
360
- const [isContentOverflow, setIsContentOverflow] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
361
- const cls = useCls();
362
- const resizeObserverRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
363
- const modalInnerRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((node)=>{
364
- if (!node) return;
365
- const modalBody = node.querySelector("." + cls("modal-body"));
366
- if (!(modalBody instanceof HTMLElement)) return;
367
- const resizeObserver = new ResizeObserver(()=>{
368
- const hasOverflow = modalBody.scrollHeight > modalBody.clientHeight;
369
- setIsContentOverflow(hasOverflow);
370
- });
371
- resizeObserverRef.current = resizeObserver;
372
- resizeObserver.observe(modalBody);
373
- const hasOverflow = modalBody.scrollHeight > modalBody.clientHeight;
374
- setIsContentOverflow(hasOverflow);
375
- }, [
376
- cls
377
- ]);
378
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>()=>{
379
- if (resizeObserverRef.current) {
380
- resizeObserverRef.current.disconnect();
381
- resizeObserverRef.current = null;
382
- }
383
- }, []);
384
- const [locale] = (0, __WEBPACK_EXTERNAL_MODULE_antd_es_locale_31079002__.useLocale)("Modal", (0, __WEBPACK_EXTERNAL_MODULE_antd_es_modal_locale_f16c0933__.getConfirmLocale)());
385
- const okTextLocale = okText || (null == locale ? void 0 : locale.okText);
386
- const cancelTextLocale = cancelText || (null == locale ? void 0 : locale.cancelText);
387
- const modalOkButtonProps = {
388
- loading: loading,
389
- ...okButtonProps
390
- };
391
- const modalCancelButtonProps = {
392
- ...cancelButtonProps
393
- };
394
- const [internalOpen, setInternalOpen] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(defaultOpen);
395
- const uncontrolledOpen = void 0 === externalOpen;
396
- const open = uncontrolledOpen ? internalOpen : externalOpen;
397
- const defaultFooter = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_modal_context_bc73863f__.ModalContextProvider, {
398
- value: {
399
- okButtonProps: modalOkButtonProps,
400
- cancelButtonProps: modalCancelButtonProps,
401
- onCancel,
402
- onOk,
403
- okType,
404
- confirmLoading,
405
- okTextLocale,
406
- cancelTextLocale
407
- },
408
- children: hideOkButton ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_modal_components_NormalCancelBtn_54ff398c__["default"], {}) : hideCancelButton ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_modal_components_NormalOkBtn_897b50c4__["default"], {}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
409
- children: [
410
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_modal_components_NormalCancelBtn_54ff398c__["default"], {}),
411
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_modal_components_NormalOkBtn_897b50c4__["default"], {})
412
- ]
413
- })
414
- });
415
- const renderTitle = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
416
- children: [
417
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_antd__.Flex, {
418
- align: "center",
419
- gap: 8,
420
- className: cls("modal-title-wrapper"),
421
- children: [
422
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
423
- className: cls("grow", "truncate"),
424
- children: title
425
- }),
426
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
427
- className: "flex items-center gap-2",
428
- children: [
429
- beforeCloseButton,
430
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(IconButton, {
431
- onClick: (e)=>null == onCancel ? void 0 : onCancel(e),
432
- children: defaultCloseIcon
433
- }),
434
- afterCloseButton
435
- ]
436
- })
437
- ]
438
- }),
439
- afterTitle ? afterTitle : null
440
- ]
441
- });
442
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_modal_52965d33__["default"], {
443
- closeIcon: false,
444
- open: open,
445
- width: modalWidth,
446
- style: modalStyle,
447
- title: renderTitle(),
448
- classNames: {
449
- ...classNames,
450
- wrapper: cls("modal-wrap", "fullscreen" == size && "modal-fullscreen", isContentOverflow && "modal-content-overflow", false === bodyScrollable && "modal-no-body-scroll", (defaultFixedHeaderFooter || isContentOverflow || "fullscreen" == size) && "modal-fixed")
451
- },
452
- styles: modalStyles,
453
- modalRender: (modal)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
454
- ref: modalInnerRef,
455
- className: cls("modal-inner"),
456
- children: modal
457
- }),
458
- okButtonProps: modalOkButtonProps,
459
- cancelButtonProps: modalCancelButtonProps,
460
- onOk: (e)=>{
461
- if (uncontrolledOpen) setInternalOpen(false);
462
- null == onOk || onOk(e);
463
- },
464
- onCancel: (e)=>{
465
- if (uncontrolledOpen) setInternalOpen(false);
466
- null == onCancel || onCancel(e);
467
- },
468
- okText: okText,
469
- cancelText: cancelText,
470
- okType: "primary",
471
- confirmLoading: confirmLoading,
472
- footer: void 0 === footer ? hideOkButton && hideCancelButton ? null : defaultFooter : footer,
473
- centered: centered,
474
- ...rest,
475
- children: children
476
- });
477
- };
478
- function _define_property(obj, key, value) {
479
- if (key in obj) Object.defineProperty(obj, key, {
480
- value: value,
481
- enumerable: true,
482
- configurable: true,
483
- writable: true
484
- });
485
- else obj[key] = value;
486
- return obj;
487
- }
488
- class ModalManager {
489
- subscribe(listener) {
490
- this.listeners.push(listener);
491
- return ()=>{
492
- this.listeners = this.listeners.filter((l)=>l !== listener);
493
- };
494
- }
495
- emit(event) {
496
- this.listeners.forEach((l)=>l(event));
497
- }
498
- generateId() {
499
- this.counter += 1;
500
- return `modal_${this.counter}_${Date.now()}`;
501
- }
502
- constructor(){
503
- _define_property(this, "listeners", []);
504
- _define_property(this, "counter", 0);
505
- }
506
- }
507
- const modalManager = new ModalManager();
508
- function createModal(config) {
509
- const trigger = document.activeElement instanceof HTMLElement ? document.activeElement : void 0;
510
- const { type = "default", ...restConfig } = config;
511
- const id = modalManager.generateId();
512
- modalManager.emit({
513
- type: "add",
514
- payload: {
515
- id,
516
- type,
517
- trigger,
518
- ...restConfig
519
- }
520
- });
521
- return {
522
- update: (cfg)=>modalManager.emit({
523
- type: "update",
524
- payload: {
525
- id,
526
- config: cfg
527
- }
528
- }),
529
- destroy: ()=>modalManager.emit({
530
- type: "destroy",
531
- payload: {
532
- id
533
- }
534
- })
535
- };
536
- }
537
- const functions_confirm = (config)=>createModal({
538
- ...config,
539
- type: "confirm"
540
- });
541
- const functions_info = (config)=>createModal({
542
- ...config,
543
- type: "info"
544
- });
545
- const success = (config)=>createModal({
546
- ...config,
547
- type: "success"
548
- });
549
- const functions_error = (config)=>createModal({
550
- ...config,
551
- type: "error"
552
- });
553
- const warning = (config)=>createModal({
554
- ...config,
555
- type: "warning"
556
- });
557
- const functions_open = (config)=>createModal({
558
- ...config,
559
- type: "default"
560
- });
561
- const destroyAll = ()=>modalManager.emit({
562
- type: "destroyAll"
563
- });
564
- "use client";
565
- const ModalProvider = ({ children })=>{
566
- const [modals, setModals] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)([]);
567
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
568
- const unsubscribe = modalManager.subscribe((event)=>{
569
- setModals((prev)=>{
570
- switch(event.type){
571
- case "add":
572
- return [
573
- ...prev,
574
- event.payload
575
- ];
576
- case "update":
577
- return prev.map((m)=>{
578
- if (m.id === event.payload.id) {
579
- const cfg = event.payload.config;
580
- const merged = "function" == typeof cfg ? cfg(m) : {
581
- ...m,
582
- ...cfg
583
- };
584
- return {
585
- ...m,
586
- ...merged
587
- };
588
- }
589
- return m;
590
- });
591
- case "destroy":
592
- return prev.filter((m)=>m.id !== event.payload.id);
593
- case "destroyAll":
594
- return [];
595
- default:
596
- return prev;
597
- }
598
- });
599
- });
600
- return unsubscribe;
601
- }, []);
602
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
603
- children: [
604
- children,
605
- modals.map((modal)=>{
606
- const { id, content, children, onOk, onCancel, trigger, ...modalProps } = modal;
607
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.createElement)(Modal, {
608
- ...modalProps,
609
- key: id,
610
- open: modalProps.open,
611
- onOk: (e)=>{
612
- null == onOk || onOk(e);
613
- modalManager.emit({
614
- type: "update",
615
- payload: {
616
- id,
617
- config: {
618
- open: false
619
- }
620
- }
621
- });
622
- },
623
- onCancel: (e)=>{
624
- null == onCancel || onCancel(e);
625
- modalManager.emit({
626
- type: "update",
627
- payload: {
628
- id,
629
- config: {
630
- open: false
631
- }
632
- }
633
- });
634
- },
635
- afterClose: ()=>{
636
- modalManager.emit({
637
- type: "destroy",
638
- payload: {
639
- id
640
- }
641
- });
642
- if (trigger instanceof HTMLElement) trigger.focus();
643
- }
644
- }, content || children);
645
- })
646
- ]
647
- });
648
- };
649
- "use client";
650
- const useModal = ()=>(0, __WEBPACK_EXTERNAL_MODULE_antd_es_app_useApp_90d95086__["default"])().modal;
651
- const Modal_Modal = Object.assign(Modal, {
652
- Provider: ModalProvider,
653
- open: functions_open,
654
- info: functions_info,
655
- success: success,
656
- error: functions_error,
657
- warning: warning,
658
- confirm: functions_confirm,
659
- destroyAll: destroyAll,
660
- useModal
661
- });
662
- const MainSwitchInner = ({ ...rest }, ref)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_switch_101feb97__["default"], {
663
- ref: ref,
664
- ...rest
665
- });
666
- const MainSwitch = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(MainSwitchInner);
667
- const Switch = MainSwitch;
668
- const MainCheckboxInner = (props, ref)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Checkbox, {
669
- ref: ref,
670
- ...props
671
- });
672
- const MainCheckbox = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(MainCheckboxInner);
673
- const Checkbox = Object.assign(MainCheckbox, {
674
- Group: __WEBPACK_EXTERNAL_MODULE_antd__.Checkbox.Group
675
- });
676
- const MainSegmentedInner = ({ className, ...rest }, ref)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_segmented_6dbdbe23__["default"], {
677
- ref: ref,
678
- ...rest
679
- });
680
- const MainSegmented = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(MainSegmentedInner);
681
- const Segmented = MainSegmented;
682
- const EmptyIcon = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("svg", {
683
- xmlns: "http://www.w3.org/2000/svg",
684
- width: "1em",
685
- height: "1em",
686
- fill: "none",
687
- viewBox: "0 0 32 32",
688
- ...props,
689
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", {
690
- stroke: "currentColor",
691
- strokeLinecap: "round",
692
- strokeLinejoin: "round",
693
- strokeOpacity: "0.3",
694
- strokeWidth: "0.05em",
695
- d: "m4 26 3.773-11.316A1 1 0 0 1 8.72 14H29a1 1 0 0 1 .949 1.316L26.386 26zm0 0V8a1 1 0 0 1 1-1h6.666a1 1 0 0 1 .6.2L16 10h9a1 1 0 0 1 1 1v3"
696
- })
697
- });
698
- const Empty = ({ image, size = "medium", className, ...rest })=>{
699
- const cls = useCls();
700
- const emptyImage = image || /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(EmptyIcon, {
701
- className: cls("empty-icon")
702
- });
703
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_empty_5eb61431__["default"], {
704
- image: emptyImage,
705
- className: clsx(cls("empty", `empty-${size}`), className),
706
- ...rest
707
- });
708
- };
709
- const Empty_component = Empty;
710
- const InternalTable = ({ columns, locale, emptyDescription, loading, scroll = {}, ...rest })=>{
711
- const cls = useCls();
712
- const modifiedColumns = columns ? columns.map((column)=>({
713
- sortIcon: ({ sortOrder })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
714
- className: cls("table-column-sort-icon", sortOrder ? `table-column-sort-icon-${sortOrder}` : "table-column-sort-icon-none"),
715
- children: sortOrder ? "ascend" === sortOrder ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.CaretUp, {
716
- weight: "fill"
717
- }) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.CaretDown, {
718
- weight: "fill"
719
- }) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
720
- children: [
721
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.CaretUp, {
722
- weight: "fill"
723
- }),
724
- " ",
725
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.CaretDown, {
726
- weight: "fill"
727
- })
728
- ]
729
- })
730
- }),
731
- filterIcon: (_filtered)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
732
- className: cls("table-column-filter-icon"),
733
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.Funnel, {
734
- weight: "fill"
735
- })
736
- }),
737
- ...column
738
- })) : void 0;
739
- const modifiedLocale = {
740
- emptyText: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Empty_component, {
741
- description: emptyDescription
742
- }),
743
- ...locale
744
- };
745
- let spinProps;
746
- if ("boolean" == typeof loading) spinProps = {
747
- spinning: loading,
748
- indicator: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
749
- className: cls("spin-loader")
750
- })
751
- };
752
- else if ("object" == typeof loading) spinProps = {
753
- spinning: true,
754
- indicator: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
755
- className: cls("spin-loader")
756
- }),
757
- ...loading
758
- };
759
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_table_8c9fc42b__["default"], {
760
- columns: modifiedColumns,
761
- loading: spinProps,
762
- locale: modifiedLocale,
763
- scroll: {
764
- x: "fit-content",
765
- ...scroll
766
- },
767
- ...rest
768
- });
769
- };
770
- const Table = Object.assign(InternalTable, {
771
- Column: __WEBPACK_EXTERNAL_MODULE_antd_es_table_8c9fc42b__["default"].Column,
772
- ColumnGroup: __WEBPACK_EXTERNAL_MODULE_antd_es_table_8c9fc42b__["default"].ColumnGroup,
773
- SELECTION_COLUMN: __WEBPACK_EXTERNAL_MODULE_antd_es_table_8c9fc42b__["default"].SELECTION_COLUMN,
774
- EXPAND_COLUMN: __WEBPACK_EXTERNAL_MODULE_antd_es_table_8c9fc42b__["default"].EXPAND_COLUMN,
775
- SELECTION_ALL: __WEBPACK_EXTERNAL_MODULE_antd_es_table_8c9fc42b__["default"].SELECTION_ALL,
776
- SELECTION_INVERT: __WEBPACK_EXTERNAL_MODULE_antd_es_table_8c9fc42b__["default"].SELECTION_INVERT,
777
- SELECTION_NONE: __WEBPACK_EXTERNAL_MODULE_antd_es_table_8c9fc42b__["default"].SELECTION_NONE,
778
- Summary: __WEBPACK_EXTERNAL_MODULE_antd_es_table_8c9fc42b__["default"].Summary
779
- });
780
- "use client";
781
- const InternalTag = ({ className, active = false, color, style, closeIcon, closable, ...rest })=>{
782
- const renderedCloseIcon = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.X, {
783
- weight: "bold"
784
- });
785
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_tag_1ccabaea__["default"], {
786
- className: className,
787
- color: color,
788
- style: style,
789
- closable: closable,
790
- closeIcon: closable ? closeIcon || renderedCloseIcon : void 0,
791
- ...active ? {
792
- "data-active": "true"
793
- } : {},
794
- ...rest
795
- });
796
- };
797
- const component_Tag = Object.assign(InternalTag, {
798
- CheckableTag: __WEBPACK_EXTERNAL_MODULE_antd_es_tag_1ccabaea__["default"].CheckableTag
799
- });
800
- const getTokensByTheme = (originTokens, theme)=>{
801
- const tokens = {};
802
- Object.entries(originTokens).forEach(([key, value])=>{
803
- if (value && "object" == typeof value && "light" in value && "dark" in value) {
804
- const tokenValue = value;
805
- tokens[key] = tokenValue[theme];
806
- } else if ("string" == typeof value) tokens[key] = value;
807
- });
808
- return tokens;
809
- };
810
- const getColorsByTheme = (colorsOrTokens, theme)=>{
811
- if (Array.isArray(colorsOrTokens)) return colorsOrTokens.map((color)=>color[theme]);
812
- return Object.values(getTokensByTheme(colorsOrTokens, theme));
813
- };
814
- function resolveColorTokens(colors) {
815
- const resolved = {};
816
- const raw = colors;
817
- const resolve = (key)=>{
818
- if (resolved[key]) return resolved[key];
819
- const value = raw[key];
820
- if (!value) return {
821
- light: "",
822
- dark: ""
823
- };
824
- if ("string" == typeof value) {
825
- const match = value.match(/^\{(.+)\}$/);
826
- if (!match) throw new Error(`Invalid reference token: ${String(key)}`);
827
- const resolvedValue = resolve(match[1]);
828
- resolved[key] = resolvedValue;
829
- return resolvedValue;
830
- }
831
- const light = "string" == typeof value.light && /^\{.+\}$/.test(value.light) ? resolve(value.light.slice(1, -1)).light : value.light;
832
- const dark = "string" == typeof value.dark && /^\{.+\}$/.test(value.dark) ? resolve(value.dark.slice(1, -1)).dark : value.dark;
833
- resolved[key] = {
834
- light,
835
- dark
836
- };
837
- return resolved[key];
838
- };
839
- Object.keys(raw).forEach((key)=>{
840
- resolve(key);
841
- });
842
- return Object.fromEntries(Object.entries(resolved).filter(([_, value])=>value && value.light && value.dark));
843
- }
844
- const antdColorTokens = {
845
- colorText: {
846
- light: "rgba(0, 0, 0, 0.88)",
847
- dark: "rgba(255, 255, 255, 0.85)"
848
- },
849
- colorTextSecondary: {
850
- light: "rgba(0, 0, 0, 0.65)",
851
- dark: "rgba(255, 255, 255, 0.65)"
852
- },
853
- colorTextTertiary: {
854
- light: "rgba(0, 0, 0, 0.45)",
855
- dark: "rgba(255, 255, 255, 0.45)"
856
- },
857
- colorTextQuaternary: {
858
- light: "rgba(0, 0, 0, 0.25)",
859
- dark: "rgba(255, 255, 255, 0.25)"
860
- },
861
- colorPrimary: {
862
- light: "#175CD3",
863
- dark: "#2E90FA"
864
- },
865
- colorPrimaryBg: {
866
- light: "#E9F2FF",
867
- dark: "#152137"
868
- },
869
- colorPrimaryBgHover: {
870
- light: "#D1E9FF",
871
- dark: "#112545"
872
- },
873
- colorPrimaryBorder: {
874
- light: "#84CAFF",
875
- dark: "#1C3959"
876
- },
877
- colorPrimaryBorderHover: {
878
- light: "#53B1FD",
879
- dark: "#204C7C"
880
- },
881
- colorPrimaryHover: {
882
- light: "#1570EF",
883
- dark: "#50A0E8"
884
- },
885
- colorPrimaryActive: {
886
- light: "#175CD3",
887
- dark: "#2565AB"
888
- },
889
- colorPrimaryTextHover: {
890
- light: "#1570EF",
891
- dark: "#50A0E8"
892
- },
893
- colorPrimaryTextActive: {
894
- light: "#175CD3",
895
- dark: "#2565AB"
896
- },
897
- colorInfo: {
898
- light: "#175CD3",
899
- dark: "#2E90FA"
900
- },
901
- colorInfoBg: {
902
- light: "#E9F2FF",
903
- dark: "#152137"
904
- },
905
- colorInfoBgHover: {
906
- light: "#D1E9FF",
907
- dark: "#112545"
908
- },
909
- colorInfoBorder: {
910
- light: "#84CAFF",
911
- dark: "#1C3959"
912
- },
913
- colorInfoBorderHover: {
914
- light: "#53B1FD",
915
- dark: "#204C7C"
916
- },
917
- colorInfoHover: {
918
- light: "#1570EF",
919
- dark: "#50A0E8"
920
- },
921
- colorInfoActive: {
922
- light: "#175CD3",
923
- dark: "#2565AB"
924
- },
925
- colorInfoTextHover: {
926
- light: "#1570EF",
927
- dark: "#50A0E8"
928
- },
929
- colorInfoTextActive: {
930
- light: "#175CD3",
931
- dark: "#2565AB"
932
- },
933
- colorSuccess: {
934
- light: "#4CB200",
935
- dark: "#389E0D"
936
- },
937
- colorSuccessBg: {
938
- light: "#F6FFF0",
939
- dark: "#162100"
940
- },
941
- colorSuccessBgHover: {
942
- light: "#D9F7BE",
943
- dark: "#1D2B00"
944
- },
945
- colorSuccessBorder: {
946
- light: "#B7EB8F",
947
- dark: "#274916"
948
- },
949
- colorSuccessBorderHover: {
950
- light: "#95DE64",
951
- dark: "#306317"
952
- },
953
- colorSuccessHover: {
954
- light: "#73D13D",
955
- dark: "#52C41A"
956
- },
957
- colorSuccessActive: {
958
- light: "#389E0D",
959
- dark: "#237804"
960
- },
961
- colorSuccessTextHover: {
962
- light: "#237804",
963
- dark: "#52C41A"
964
- },
965
- colorSuccessTextActive: {
966
- light: "#092B00",
967
- dark: "#237804"
968
- },
969
- colorWarning: {
970
- light: "#FA8C16",
971
- dark: "#D48806"
972
- },
973
- colorWarningBg: {
974
- light: "#FFF7E6",
975
- dark: "#281800"
976
- },
977
- colorWarningBgHover: {
978
- light: "#FFE7BA",
979
- dark: "#3D2200"
980
- },
981
- colorWarningBorder: {
982
- light: "#FFD591",
983
- dark: "#443B16"
984
- },
985
- colorWarningBorderHover: {
986
- light: "#FFC069",
987
- dark: "#594E1A"
988
- },
989
- colorWarningHover: {
990
- light: "#FFA940",
991
- dark: "#E8B339"
992
- },
993
- colorWarningActive: {
994
- light: "#D46B08",
995
- dark: "#AA7714"
996
- },
997
- colorWarningTextHover: {
998
- light: "#AD4E00",
999
- dark: "#E8B339"
1000
- },
1001
- colorWarningTextActive: {
1002
- light: "#873800",
1003
- dark: "#AA7714"
1004
- },
1005
- colorError: {
1006
- light: "#D92D20",
1007
- dark: "#CF3D33"
1008
- },
1009
- colorErrorBg: {
1010
- light: "#FEF3F2",
1011
- dark: "#291414"
1012
- },
1013
- colorErrorBgHover: {
1014
- light: "#FEE4E2",
1015
- dark: "#411A18"
1016
- },
1017
- colorErrorBorder: {
1018
- light: "#FDA29B",
1019
- dark: "#562222"
1020
- },
1021
- colorErrorBorderHover: {
1022
- light: "#F97066",
1023
- dark: "#772A24"
1024
- },
1025
- colorErrorHover: {
1026
- light: "#F04438",
1027
- dark: "#E5695A"
1028
- },
1029
- colorErrorActive: {
1030
- light: "#D92D20",
1031
- dark: "#A3332B"
1032
- },
1033
- colorErrorTextHover: {
1034
- light: "#F04438",
1035
- dark: "#E5695A"
1036
- },
1037
- colorErrorTextActive: {
1038
- light: "#D92D20",
1039
- dark: "#A3332B"
1040
- },
1041
- colorFill: {
1042
- light: "rgba(0, 0, 0, 0.15)",
1043
- dark: "rgba(255, 255, 255, 0.15)"
1044
- },
1045
- colorFillSecondary: {
1046
- light: "rgba(0, 0, 0, 0.06)",
1047
- dark: "rgba(255, 255, 255, 0.06)"
1048
- },
1049
- colorFillTertiary: {
1050
- light: "rgba(0, 0, 0, 0.04)",
1051
- dark: "rgba(255, 255, 255, 0.04)"
1052
- },
1053
- colorFillQuaternary: {
1054
- light: "rgba(0, 0, 0, 0.02)",
1055
- dark: "rgba(255, 255, 255, 0.02)"
1056
- },
1057
- colorFillAlter: {
1058
- light: "rgba(0, 0, 0, 0.02)",
1059
- dark: "rgba(255, 255, 255, 0.02)"
1060
- },
1061
- colorBorder: {
1062
- light: "rgba(0, 0, 0, 0.16)",
1063
- dark: "rgba(255, 255, 255, 0.16)"
1064
- },
1065
- colorBorderSecondary: {
1066
- light: "rgba(0, 0, 0, 0.06)",
1067
- dark: "rgba(255, 255, 255, 0.06)"
1068
- },
1069
- colorIcon: {
1070
- light: "rgba(0, 0, 0, 0.58)",
1071
- dark: "rgba(255, 255, 255, 0.58)"
1072
- },
1073
- colorIconHover: {
1074
- light: "rgba(0, 0, 0, 0.88)",
1075
- dark: "rgba(255, 255, 255, 0.88)"
1076
- },
1077
- colorBgContainer: {
1078
- light: "#FFFFFF",
1079
- dark: "#26262C"
1080
- },
1081
- colorBgElevated: {
1082
- light: "#FFFFFF",
1083
- dark: "#2F2F37"
1084
- },
1085
- colorBgLayout: {
1086
- light: "#F5F5F5",
1087
- dark: "#1A1A1E"
1088
- },
1089
- colorBgSpotlight: {
1090
- light: "rgba(0, 0, 0, 0.85)",
1091
- dark: "#505D5D"
1092
- },
1093
- colorBgMask: {
1094
- light: "rgba(0, 0, 0, 0.45)",
1095
- dark: "rgba(0, 0, 0, 0.45)"
1096
- },
1097
- colorBgBase: {
1098
- light: "#FFFFFF",
1099
- dark: "#13131A"
1100
- },
1101
- controlOutline: {
1102
- light: "rgba(0, 0, 0, 0.12)",
1103
- dark: "rgba(255, 255, 255, 0.12)"
1104
- }
1105
- };
1106
- const sharedTokens = {
1107
- fontFamily: "var(--ds-inter)",
1108
- fontFamilyCode: "var(--ds-roboto-mono)",
1109
- fontSizeHeading1: 36,
1110
- fontSizeHeading2: 30,
1111
- fontSizeHeading3: 24,
1112
- fontSizeHeading4: 20,
1113
- fontSizeHeading5: 16,
1114
- lineHeightHeading1: 40 / 36,
1115
- lineHeightHeading2: 1.2,
1116
- lineHeightHeading3: 32 / 24,
1117
- lineHeightHeading4: 1.4,
1118
- lineHeightHeading5: 1.5,
1119
- lineHeight: 20 / 14,
1120
- lineHeightLG: 1.5,
1121
- lineHeightSM: 16 / 12,
1122
- fontWeightStrong: 600,
1123
- boxShadow: "0px 1px 2px rgba(0, 0, 0, 0.06), 0px 1px 6px rgba(0, 0, 0, 0.04), 0px 2px 10px rgba(0, 0, 0, 0.04)",
1124
- boxShadowSecondary: "0px 0px 1px 0px var(--ds-color-border-modal), 0px 3px 6px 1px rgba(0, 0, 0, 0.08), 0px 6px 26px 2px rgba(0, 0, 0, 0.08), 0px 4px 52px 0px rgba(0, 0, 0, 0.05)",
1125
- colorBgSpotlight: "rgba(0, 0, 0, 0.85)"
1126
- };
1127
- const sharedThemeConfig = {
1128
- cssVar: true,
1129
- components: {
1130
- Input: {},
1131
- InputNumber: {},
1132
- Button: {
1133
- defaultShadow: void 0,
1134
- primaryShadow: void 0,
1135
- dangerShadow: void 0
1136
- },
1137
- Select: {},
1138
- Segmented: {
1139
- controlHeightLG: 36,
1140
- controlHeightSM: 24
1141
- },
1142
- Breadcrumb: {
1143
- separatorColor: "var(--ds-color-border)"
1144
- },
1145
- Slider: {
1146
- trackBg: "var(--ds-color-primary)",
1147
- trackHoverBg: "var(--ds-color-primary-hover)",
1148
- trackBgDisabled: "var(--ds-color-text-disabled)",
1149
- railBg: "var(--ds-control-outline)",
1150
- railHoverBg: "var(--ds-color-border)",
1151
- handleColor: "var(--ds-color-primary)",
1152
- handleActiveColor: "var(--ds-color-primary-active)",
1153
- handleColorDisabled: "var(--ds-color-text-disabled)",
1154
- dotBorderColor: "var(--ds-color-primary)",
1155
- dotActiveBorderColor: "var(--ds-color-primary-active)"
1156
- },
1157
- Form: {
1158
- itemMarginBottom: 16,
1159
- labelColor: "var(--ds-color-text)"
1160
- }
1161
- }
1162
- };
1163
- const lightTheme = {
1164
- token: {
1165
- ...getTokensByTheme(antdColorTokens, "light"),
1166
- ...sharedTokens
1167
- },
1168
- ...sharedThemeConfig
1169
- };
1170
- const darkTheme = {
1171
- token: {
1172
- ...getTokensByTheme(antdColorTokens, "dark"),
1173
- ...sharedTokens
1174
- },
1175
- ...sharedThemeConfig
1176
- };
1177
- "use client";
1178
- const DSWrapper = ({ children, theme, appendClassesTo })=>{
1179
- const cls = useCls();
1180
- const className = clsx(cls("theme-provider"), theme.toString());
1181
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect)(()=>{
1182
- const classes = className.split(" ");
1183
- const el = "string" == typeof appendClassesTo ? document.querySelector(appendClassesTo) : appendClassesTo;
1184
- if (el) el.classList.add(...classes);
1185
- return ()=>{
1186
- if (el) el.classList.remove(...classes);
1187
- };
1188
- }, [
1189
- appendClassesTo,
1190
- className
1191
- ]);
1192
- return void 0 === appendClassesTo ? __WEBPACK_EXTERNAL_MODULE_react__.Children.map(children, (child)=>{
1193
- if (/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.isValidElement)(child)) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.cloneElement)(child, {
1194
- className: clsx(child.props.className, className)
1195
- });
1196
- return child;
1197
- }) : children;
1198
- };
1199
- const ThemeProvider = ({ theme, appendClassesTo, children })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__ant_design_cssinjs_c619260f__.StyleProvider, {
1200
- layer: true,
1201
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_config_provider_6a57beb3__["default"], {
1202
- theme: "light" == theme ? lightTheme : darkTheme,
1203
- prefixCls: "ds",
1204
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(DSWrapper, {
1205
- theme: theme,
1206
- appendClassesTo: appendClassesTo,
1207
- children: children
1208
- })
1209
- })
1210
- });
1211
- "use client";
1212
- const SplitterPanel = ({ children, className, style, ...rest })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_splitter_Panel_2a8c0f35__["default"], {
1213
- className: className,
1214
- style: style,
1215
- ...rest,
1216
- children: children
1217
- });
1218
- const MainSplitter = ({ children, className = "", style = {}, showSplitBar = true, ...rest })=>{
1219
- const cls = useCls();
1220
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_splitter_Splitter_9b2d5564__["default"], {
1221
- className: clsx(cls("splitter"), !showSplitBar && cls("splitter-hidden-split-bar"), className),
1222
- style: style,
1223
- ...rest,
1224
- children: children
1225
- });
1226
- };
1227
- const Splitter = Object.assign(MainSplitter, {
1228
- Panel: SplitterPanel
1229
- });
1230
- const Split = Splitter;
1231
- const measureText = (container)=>{
1232
- const span = document.createElement("span");
1233
- span.style.opacity = "0";
1234
- span.style.position = "absolute";
1235
- span.style.top = "-1000px";
1236
- span.style.left = "-1000px";
1237
- span.style.whiteSpace = "nowrap";
1238
- span.style.pointerEvents = "none";
1239
- container.appendChild(span);
1240
- return {
1241
- measure: (text)=>{
1242
- span.innerText = text;
1243
- return span.clientWidth;
1244
- },
1245
- destroy: ()=>{
1246
- container.removeChild(span);
1247
- }
1248
- };
1249
- };
1250
- const getMiddleTruncatedString = (text, ellipsis, container)=>{
1251
- var _Object_values_reverse_find;
1252
- if (!text) return text;
1253
- const { measure: getTextWidth, destroy: destroyMeasure } = measureText(container);
1254
- const textWidth = getTextWidth(text);
1255
- const containerWidth = container.clientWidth;
1256
- const initialOffset = Math.floor(containerWidth / textWidth * text.length);
1257
- if (textWidth <= containerWidth) {
1258
- destroyMeasure();
1259
- return text;
1260
- }
1261
- let offset = initialOffset;
1262
- const attempts = {};
1263
- const maxAttempts = 20;
1264
- const buffer = 10;
1265
- while(Object.values(attempts).length <= maxAttempts){
1266
- if (attempts[offset]) break;
1267
- if (offset <= 1) {
1268
- attempts[0] = [
1269
- 0,
1270
- ellipsis
1271
- ];
1272
- break;
1273
- }
1274
- const start = text.slice(0, Math.ceil((offset - ellipsis.length) / 2 - 1)).trimEnd();
1275
- const end = text.slice(Math.floor((offset - ellipsis.length) / 2) - offset).trimStart();
1276
- const truncatedStr = start + ellipsis + end;
1277
- const width = getTextWidth(truncatedStr);
1278
- attempts[offset] = [
1279
- width,
1280
- truncatedStr
1281
- ];
1282
- if (width >= containerWidth) offset -= 2;
1283
- else {
1284
- if (containerWidth - width < buffer) break;
1285
- offset += 2;
1286
- }
1287
- }
1288
- destroyMeasure();
1289
- return (null == (_Object_values_reverse_find = Object.values(attempts).reverse().find(([width])=>width < containerWidth)) ? void 0 : _Object_values_reverse_find[1]) ?? Object.values(attempts)[0][1];
1290
- };
1291
- "use client";
1292
- const Truncate = ({ children, position = "end", className, style, ...rest })=>{
1293
- const cls = useCls();
1294
- const containerRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
1295
- const [isTruncated, setIsTruncated] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
1296
- const [truncatedText, setTruncatedText] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(children);
1297
- const text = children;
1298
- const getContainerStyles = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
1299
- const baseStyles = {
1300
- overflow: "hidden",
1301
- whiteSpace: "nowrap",
1302
- textOverflow: "clip",
1303
- flexGrow: 1,
1304
- minWidth: 0,
1305
- maxWidth: "100%",
1306
- display: "block",
1307
- ...style
1308
- };
1309
- if ("end" === position) return {
1310
- ...baseStyles,
1311
- textOverflow: "ellipsis"
1312
- };
1313
- return baseStyles;
1314
- }, [
1315
- position,
1316
- style
1317
- ]);
1318
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect)(()=>{
1319
- const container = containerRef.current;
1320
- if (!container) return;
1321
- let cancellationToken = {
1322
- cancelled: false
1323
- };
1324
- const calculateTruncatedString = ()=>{
1325
- if (cancellationToken) cancellationToken.cancelled = true;
1326
- const requestCancellationToken = {
1327
- cancelled: false
1328
- };
1329
- cancellationToken = requestCancellationToken;
1330
- const truncated = getMiddleTruncatedString(text, "\u2026", container);
1331
- if (requestCancellationToken.cancelled) return;
1332
- setTruncatedText(truncated);
1333
- };
1334
- if ("middle" == position) {
1335
- var _window_document_fonts_ready, _window_document_fonts;
1336
- null == (_window_document_fonts = window.document.fonts) || null == (_window_document_fonts_ready = _window_document_fonts.ready) || _window_document_fonts_ready.then(calculateTruncatedString);
1337
- }
1338
- if ("end" == position) setTruncatedText(text);
1339
- const observer = new ResizeObserver(()=>{
1340
- if ("middle" == position) window.requestAnimationFrame(calculateTruncatedString);
1341
- if ("end" == position) {
1342
- const isOverflowing = container.scrollWidth > container.clientWidth;
1343
- if (isOverflowing) setIsTruncated(true);
1344
- }
1345
- });
1346
- observer.observe(container);
1347
- return ()=>{
1348
- cancellationToken.cancelled = true;
1349
- observer.disconnect();
1350
- };
1351
- }, [
1352
- text,
1353
- position
1354
- ]);
1355
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
1356
- ref: containerRef,
1357
- style: getContainerStyles(),
1358
- className: clsx(cls("truncate"), className),
1359
- title: isTruncated ? text : void 0,
1360
- ...rest,
1361
- children: text === truncatedText ? text : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
1362
- children: truncatedText
1363
- })
1364
- });
1365
- };
1366
- "use client";
1367
- const DropdownMenu = ({ children, items, placement, openOnHover, open: outsideOpen, onOpenChange: outsideOnOpenChange })=>{
1368
- const [open, setOpen] = (0, __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_utils_d48cdb94__.useControlled)({
1369
- controlled: outsideOpen,
1370
- default: false,
1371
- name: "open"
1372
- });
1373
- const onOpenChange = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((newValue)=>{
1374
- setOpen(newValue);
1375
- null == outsideOnOpenChange || outsideOnOpenChange(newValue);
1376
- }, [
1377
- setOpen,
1378
- outsideOnOpenChange
1379
- ]);
1380
- const cls = useCls();
1381
- const antdCssVarClassname = useAntdCssVarClassname();
1382
- const headlessUIPlacement = parseAntdPlacement(placement);
1383
- const buttonRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
1384
- const itemGroups = items.reduce((acc, current)=>{
1385
- if (0 === acc.length && "header" !== current.type) acc.push({
1386
- label: null,
1387
- items: []
1388
- });
1389
- if ("header" === current.type) acc.push({
1390
- label: current.title,
1391
- items: []
1392
- });
1393
- else if (("item" === current.type || "divider" === current.type) && acc.length > 0) acc[acc.length - 1].items.push(current);
1394
- return acc;
1395
- }, []);
1396
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_menu_54c0c798__.Menu.Root, {
1397
- openOnHover: openOnHover,
1398
- open: open,
1399
- onOpenChange: onOpenChange,
1400
- children: [
1401
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_menu_54c0c798__.Menu.Trigger, {
1402
- render: children,
1403
- ref: buttonRef
1404
- }),
1405
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_menu_54c0c798__.Menu.Portal, {
1406
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_menu_54c0c798__.Menu.Positioner, {
1407
- side: headlessUIPlacement.placement,
1408
- align: headlessUIPlacement.align,
1409
- sideOffset: 4,
1410
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_menu_54c0c798__.Menu.Popup, {
1411
- className: clsx(cls("dropdown-menu"), antdCssVarClassname),
1412
- children: itemGroups.map((group, i)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_menu_54c0c798__.Menu.Group, {
1413
- children: [
1414
- group.label && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_menu_54c0c798__.Menu.GroupLabel, {
1415
- className: cls("dropdown-menu-header"),
1416
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
1417
- children: group.label
1418
- })
1419
- }, i),
1420
- group.items.map((item, j)=>"item" == item.type ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_menu_54c0c798__.Menu.Item, {
1421
- className: clsx(cls("dropdown-menu-item")),
1422
- disabled: item.disabled,
1423
- "data-danger": item.danger,
1424
- ref: item.ref,
1425
- onClick: item.onClick,
1426
- onMouseEnter: item.onMouseEnter,
1427
- onMouseLeave: item.onMouseLeave,
1428
- onMouseOver: item.onMouseOver,
1429
- onMouseOut: item.onMouseOut,
1430
- children: [
1431
- item.icon && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
1432
- className: cls("dropdown-menu-item-icon"),
1433
- children: item.icon
1434
- }),
1435
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
1436
- children: item.label
1437
- })
1438
- ]
1439
- }, i + "-" + j) : "divider" == item.type ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_menu_54c0c798__.Menu.Separator, {
1440
- className: cls("dropdown-menu-divider")
1441
- }, i) : "header" == item.type ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_menu_54c0c798__.Menu.GroupLabel, {
1442
- className: cls("dropdown-menu-header"),
1443
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
1444
- children: item.title
1445
- })
1446
- }, i) : null)
1447
- ]
1448
- }, "group" + i))
1449
- })
1450
- })
1451
- })
1452
- ]
1453
- });
1454
- };
1455
- function reactNodeToString(node) {
1456
- if (null == node) return "";
1457
- if ("string" == typeof node) return node;
1458
- if ("number" == typeof node || "boolean" == typeof node) return node.toString();
1459
- if (Array.isArray(node)) return node.map(reactNodeToString).join("");
1460
- if ((0, __WEBPACK_EXTERNAL_MODULE_react__.isValidElement)(node) && "props" in node && node.props && "object" == typeof node.props && "children" in node.props && node.props.children) {
1461
- if ("br" === node.type) return "\n";
1462
- if (node.props.children) return reactNodeToString(node.props.children);
1463
- }
1464
- return "";
1465
- }
1466
- function isTracebackError(error) {
1467
- if (!error || "string" != typeof error && !error.toString) return false;
1468
- const errorString = "string" == typeof error ? error : error.toString();
1469
- const pythonTracebackRegex = /Traceback \(most recent call last\):/;
1470
- const pythonStackFrameRegex = /File ".*?", line \d+, in/;
1471
- const goStackTraceRegex = /goroutine \d+ \[.*\]:|panic: /;
1472
- const goStackFrameRegex = /\/.*\.go:\d+/;
1473
- const isPythonTraceback = pythonTracebackRegex.test(errorString) || pythonStackFrameRegex.test(errorString);
1474
- const isGoStackTrace = goStackTraceRegex.test(errorString) || goStackFrameRegex.test(errorString);
1475
- return isPythonTraceback || isGoStackTrace;
1476
- }
1477
- "use client";
1478
- const WithAntdTokens = ({ as: Tag = "div", ref, className, ...rest })=>{
1479
- const Component = Tag;
1480
- const cssVar = useAntdCssVarClassname();
1481
- const { renderElement } = (0, __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.useRender)({
1482
- render: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Component, {}),
1483
- refs: [
1484
- ref
1485
- ],
1486
- props: {
1487
- ...rest,
1488
- className: clsx(className, cssVar)
1489
- }
1490
- });
1491
- return renderElement();
1492
- };
1493
- "use client";
1494
- const useEnhancedEffect = "undefined" != typeof window ? __WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect : __WEBPACK_EXTERNAL_MODULE_react__.useEffect;
1495
- function useEventCallback(fn) {
1496
- const ref = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(fn);
1497
- useEnhancedEffect(()=>{
1498
- ref.current = fn;
1499
- });
1500
- return (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((...args)=>{
1501
- var _ref_current;
1502
- return null == (_ref_current = ref.current) ? void 0 : _ref_current.call(ref, ...args);
1503
- }, []);
1504
- }
1505
- function useLatestRef(value) {
1506
- const ref = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(value);
1507
- useEnhancedEffect(()=>{
1508
- ref.current = value;
1509
- });
1510
- return ref;
1511
- }
1512
- function useAnimationsFinished(ref, waitForNextTick = false) {
1513
- const frameRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(-1);
1514
- const timeoutRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(-1);
1515
- const cancelTasks = useEventCallback(()=>{
1516
- cancelAnimationFrame(frameRef.current);
1517
- clearTimeout(timeoutRef.current);
1518
- });
1519
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>cancelTasks, [
1520
- cancelTasks
1521
- ]);
1522
- return useEventCallback((fnToExecute)=>{
1523
- cancelTasks();
1524
- const element = ref.current;
1525
- if (!element) return;
1526
- if ("function" != typeof element.getAnimations) fnToExecute();
1527
- else frameRef.current = requestAnimationFrame(()=>{
1528
- function exec() {
1529
- if (!element) return;
1530
- Promise.allSettled(element.getAnimations().map((anim)=>anim.finished)).then(()=>{
1531
- (0, __WEBPACK_EXTERNAL_MODULE_react_dom_7136dc57__.flushSync)(fnToExecute);
1532
- });
1533
- }
1534
- if (waitForNextTick) timeoutRef.current = window.setTimeout(exec);
1535
- else exec();
1536
- });
1537
- });
1538
- }
1539
- "use client";
1540
- const Transition = (props)=>{
1541
- const { children = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {}), className, starting, ending, show = true, keepMounted = false, ...otherProps } = props;
1542
- const { mounted, setMounted, transitionStatus } = (0, __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_utils_d48cdb94__.useTransitionStatus)(show);
1543
- const showRef = useLatestRef(show);
1544
- const combinedClassName = clsx(className, "starting" === transitionStatus && "string" == typeof starting && starting, "ending" === transitionStatus && "string" == typeof ending && ending);
1545
- const ref = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
1546
- const runOnceAnimationsFinish = useAnimationsFinished(ref, show);
1547
- const { renderElement } = (0, __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_use_render_2fb9dc6d__.useRender)({
1548
- render: "function" == typeof children ? children(otherProps, {}) : children,
1549
- props: (0, __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_merge_props_04b69945__.mergeProps)({
1550
- ...otherProps,
1551
- ref,
1552
- className: combinedClassName,
1553
- ...{
1554
- "data-starting": "starting" === transitionStatus ? "true" : void 0,
1555
- "data-ending": "ending" === transitionStatus ? "true" : void 0
1556
- },
1557
- style: {
1558
- ..."starting" === transitionStatus && "object" == typeof starting ? starting : {},
1559
- ..."ending" === transitionStatus && "object" == typeof ending ? ending : {}
1560
- }
1561
- })
1562
- });
1563
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
1564
- if (keepMounted) return;
1565
- runOnceAnimationsFinish(()=>{
1566
- if (show === showRef.current) setMounted(show);
1567
- });
1568
- }, [
1569
- show,
1570
- keepMounted,
1571
- runOnceAnimationsFinish,
1572
- setMounted,
1573
- showRef
1574
- ]);
1575
- return mounted ? renderElement() : null;
1576
- };
1577
- const ButtonInner = ({ style, ...rest }, ref)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_button_8f463bb4__["default"], {
1578
- ref: ref,
1579
- style: style,
1580
- ...rest
1581
- });
1582
- const Button = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(ButtonInner);
1583
- const getUploadFileIcon = (fileType)=>"folder" === fileType ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.Folder, {
1584
- size: 20,
1585
- weight: "fill"
1586
- }) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.File, {
1587
- size: 20,
1588
- weight: "fill"
1589
- });
1590
- const UploadItem = ({ fileName, fileType, status = "pending", percent, removable = true, onRemove, extraActions })=>{
1591
- const cls = useCls();
1592
- const showPercent = Math.round(percent || 0);
1593
- const statusWithProgress = {
1594
- done: "success",
1595
- error: "exception",
1596
- uploading: "active",
1597
- removed: "normal",
1598
- pending: "normal"
1599
- };
1600
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_flex_86593150__["default"], {
1601
- className: clsx(cls("upload-item")),
1602
- justify: "space-between",
1603
- align: "center",
1604
- "data-error": "error" === status,
1605
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_antd_es_flex_86593150__["default"], {
1606
- align: "center",
1607
- gap: 16,
1608
- flex: 1,
1609
- className: cls("upload-item-content"),
1610
- children: [
1611
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
1612
- className: cls("upload-item-icon"),
1613
- children: getUploadFileIcon(fileType)
1614
- }),
1615
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_antd_es_flex_86593150__["default"], {
1616
- align: "start",
1617
- vertical: true,
1618
- flex: 1,
1619
- className: cls("upload-item-name-progress"),
1620
- children: [
1621
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Truncate, {
1622
- position: "middle",
1623
- children: fileName
1624
- }),
1625
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_progress_da1757d8__["default"], {
1626
- percent: showPercent,
1627
- size: "small",
1628
- className: cls("upload-item-progress"),
1629
- status: status && status in statusWithProgress ? statusWithProgress[status] : "normal"
1630
- })
1631
- ]
1632
- }),
1633
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_antd_es_flex_86593150__["default"], {
1634
- gap: 8,
1635
- align: "center",
1636
- children: [
1637
- extraActions,
1638
- removable && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(IconButton, {
1639
- label: "Remove",
1640
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.Trash, {
1641
- size: 16
1642
- }),
1643
- onClick: onRemove,
1644
- size: "small"
1645
- })
1646
- ]
1647
- })
1648
- ]
1649
- })
1650
- });
1651
- };
1652
- "use client";
1653
- const useUploadItemRender = ({ showRemoveButton = true })=>{
1654
- const itemRender = (_originNode, file, _fileList, actions)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(UploadItem, {
1655
- fileName: file.name,
1656
- fileType: file.type,
1657
- status: file.status,
1658
- percent: file.percent,
1659
- removable: showRemoveButton,
1660
- onRemove: ()=>actions.remove()
1661
- });
1662
- return (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(itemRender, [
1663
- showRemoveButton
1664
- ]);
1665
- };
1666
- "use client";
1667
- const Dragger = ({ children, uploadTitle = "Click or drag file to this area to upload", uploadDescription = "Support for a single or bulk upload.", itemRender, ...rest })=>{
1668
- const cls = useCls();
1669
- const renderChildren = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
1670
- children: [
1671
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("p", {
1672
- className: cls("upload-drag-icon"),
1673
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.CloudArrowUp, {
1674
- size: 40
1675
- })
1676
- }),
1677
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("p", {
1678
- className: cls("upload-text"),
1679
- children: uploadTitle
1680
- }),
1681
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("p", {
1682
- className: cls("upload-hint"),
1683
- children: uploadDescription
1684
- })
1685
- ]
1686
- });
1687
- const defaultItemRender = useUploadItemRender({
1688
- showRemoveButton: true
1689
- });
1690
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_upload_29096ddd__["default"].Dragger, {
1691
- itemRender: itemRender || defaultItemRender,
1692
- ...rest,
1693
- children: children ? children : renderChildren()
1694
- });
1695
- };
1696
- "use client";
1697
- const DefaultUpload = ({ showRemoveButton = true, className, fileList, children, ...restProps })=>{
1698
- const cls = useCls();
1699
- const icon = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.CloudArrowUp, {
1700
- size: 24
1701
- });
1702
- const defaultChildren = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Button, {
1703
- icon: icon,
1704
- type: "default",
1705
- children: "Upload Files"
1706
- });
1707
- const itemRender = useUploadItemRender({
1708
- showRemoveButton
1709
- });
1710
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_upload_29096ddd__["default"], {
1711
- className: clsx(cls("upload"), className),
1712
- ...restProps,
1713
- fileList: fileList,
1714
- itemRender: itemRender,
1715
- children: children || defaultChildren
1716
- });
1717
- };
1718
- const Upload = Object.assign(DefaultUpload, {
1719
- Dragger: Dragger,
1720
- Item: UploadItem
1721
- });
1722
- "use client";
1723
- const ScrollArea = ({ children, className, viewportClassName, thumbClassName, scrollbarClassName, orientation = "vertical" })=>{
1724
- const cls = useCls();
1725
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.ScrollArea.Root, {
1726
- className: clsx(cls("scroll-area"), className),
1727
- children: [
1728
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.ScrollArea.Viewport, {
1729
- className: clsx(cls("scroll-area-viewport"), viewportClassName),
1730
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.ScrollArea.Content, {
1731
- className: clsx(cls("scroll-area-content")),
1732
- children: children
1733
- })
1734
- }),
1735
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.ScrollArea.Scrollbar, {
1736
- className: clsx(cls("scroll-area-scrollbar"), scrollbarClassName),
1737
- orientation: orientation,
1738
- "data-orientation": orientation,
1739
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.ScrollArea.Thumb, {
1740
- className: clsx(cls("scroll-area-thumb", thumbClassName))
1741
- })
1742
- })
1743
- ]
1744
- });
1745
- };
1746
- "use client";
1747
- const Popover = ({ className, style, arrow = false, ...rest })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_popover_ff5d0161__["default"], {
1748
- className: className,
1749
- arrow: arrow,
1750
- style: style,
1751
- ...rest
1752
- });
1753
- "use client";
1754
- const Slider = ({ className, tooltip = {}, style, ...rest })=>{
1755
- const cls = useCls();
1756
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_slider_a2f2f6f0__["default"], {
1757
- className: clsx(cls("slider"), className),
1758
- style: style,
1759
- ...rest,
1760
- tooltip: {
1761
- arrow: false,
1762
- ...tooltip
1763
- }
1764
- });
1765
- };
1766
- "use client";
1767
- const Tooltip = ({ className, style, arrow = false, ...rest })=>{
1768
- const cls = useCls();
1769
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_tooltip_1091cc47__["default"], {
1770
- className: clsx(cls("tooltip"), className),
1771
- arrow: arrow,
1772
- style: style,
1773
- ...rest
1774
- });
1775
- };
1776
- function getBreadcrumbName(route, params) {
1777
- if (void 0 === route.title || null === route.title) return null;
1778
- const paramsKeys = Object.keys(params).join("|");
1779
- return "object" == typeof route.title ? route.title : String(route.title).replace(new RegExp(`:(${paramsKeys})`, "g"), (replacement, key)=>params[key] || replacement);
1780
- }
1781
- function useItemRender(prefixCls, itemRender) {
1782
- const mergedItemRender = (item, params, routes, path, href)=>{
1783
- if (itemRender) return itemRender(item, params, routes, path);
1784
- const name = getBreadcrumbName(item, params);
1785
- const child = item.icon ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
1786
- children: [
1787
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
1788
- className: cn(`${prefixCls}-item-icon`),
1789
- children: item.icon
1790
- }),
1791
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
1792
- className: cn(`${prefixCls}-item-name`),
1793
- children: name
1794
- })
1795
- ]
1796
- }) : name;
1797
- return (0, __WEBPACK_EXTERNAL_MODULE_antd_es_breadcrumb_useItemRender_afeae2fe__.renderItem)(prefixCls, item, child, href);
1798
- };
1799
- return mergedItemRender;
1800
- }
1801
- "use client";
1802
- const BreadcrumbInner = ({ className, items, noWrap = false, itemRender: outsideItemRender, ...rest })=>{
1803
- const cls = useCls();
1804
- const { getPrefixCls } = useGetPrefixCls();
1805
- const componentPrefixCls = getPrefixCls("breadcrumb");
1806
- const itemRender = useItemRender(componentPrefixCls, outsideItemRender);
1807
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_breadcrumb_524ec91e__["default"], {
1808
- className: clsx(cls("breadcrumb", noWrap && "breadcrumb-nowrap"), className),
1809
- items: items,
1810
- itemRender: itemRender,
1811
- ...rest
1812
- });
1813
- };
1814
- const Item = (props)=>{
1815
- const { className, ...restProps } = props;
1816
- const cls = useCls();
1817
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_breadcrumb_524ec91e__["default"].Item, {
1818
- className: clsx(cls("breadcrumb-item"), className),
1819
- ...restProps
1820
- });
1821
- };
1822
- const Separator = (props)=>{
1823
- const { className, ...restProps } = props;
1824
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_breadcrumb_524ec91e__["default"].Separator, {
1825
- ...restProps
1826
- });
1827
- };
1828
- const Breadcrumb = Object.assign(BreadcrumbInner, {
1829
- Item,
1830
- Separator
1831
- });
1832
- "use client";
1833
- const getUniqueKeysFromOriginals = (nodes, originalKeysToFind, map)=>{
1834
- if (!nodes) return [];
1835
- let keys = [];
1836
- nodes.forEach((node)=>{
1837
- const originalKey = map.get(node.key);
1838
- if (void 0 !== originalKey && originalKeysToFind.has(originalKey)) keys.push(node.key);
1839
- if (node.children) keys = keys.concat(getUniqueKeysFromOriginals(node.children, originalKeysToFind, map));
1840
- });
1841
- return keys;
1842
- };
1843
- const processTreeData = (nodes, expandedOriginalKeys, parentKeyPrefix = "", keyMap)=>{
1844
- if (!nodes) return;
1845
- return nodes.map((node)=>{
1846
- const originalKey = node.key;
1847
- if (null == originalKey) {
1848
- console.warn("Tree node is missing a key. Skipping unique key generation for this node and its children.", node);
1849
- return {
1850
- ...node
1851
- };
1852
- }
1853
- const separator = "/";
1854
- const originalKeyString = String(originalKey);
1855
- if (originalKeyString.includes(separator)) console.warn(`Tree node original key "${originalKeyString}" contains the separator character "${separator}". This might lead to unexpected behavior if keys are not truly unique.`, node);
1856
- const uniqueKey = parentKeyPrefix ? `${parentKeyPrefix}${separator}${originalKeyString}` : originalKeyString;
1857
- keyMap.set(uniqueKey, originalKey);
1858
- const isExpanded = expandedOriginalKeys.has(originalKey);
1859
- const icon = node.icon || (node.isLeaf ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.File, {}) : isExpanded ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.FolderOpen, {}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.Folder, {}));
1860
- const processedChildren = processTreeData(node.children, expandedOriginalKeys, uniqueKey, keyMap);
1861
- return {
1862
- ...node,
1863
- key: uniqueKey,
1864
- icon: icon,
1865
- children: processedChildren
1866
- };
1867
- });
1868
- };
1869
- const useUniqueKeysTree = ({ treeData: originTreeData, expandedKeys, defaultExpandedKeys = [], onExpand, checkedKeys, defaultCheckedKeys = [], onCheck, allowDuplicatedKeys })=>{
1870
- const [currentOriginalExpandedKeys, setCurrentOriginalExpandedKeys] = useControlledState(expandedKeys, void 0, defaultExpandedKeys);
1871
- const controlledCheckedKeysValue = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
1872
- if (!checkedKeys) return;
1873
- return Array.isArray(checkedKeys) ? checkedKeys : checkedKeys.checked;
1874
- }, [
1875
- checkedKeys
1876
- ]);
1877
- const [currentOriginalCheckedKeys, setCurrentOriginalCheckedKeys] = useControlledState(controlledCheckedKeysValue, void 0, defaultCheckedKeys);
1878
- const { processedTreeData, uniqueToOriginalKeyMap } = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
1879
- if (!allowDuplicatedKeys) return {
1880
- processedTreeData: originTreeData,
1881
- uniqueToOriginalKeyMap: new Map()
1882
- };
1883
- const map = new Map();
1884
- const expandedOriginalKeySet = new Set(currentOriginalExpandedKeys);
1885
- const data = processTreeData(originTreeData, expandedOriginalKeySet, "", map);
1886
- return {
1887
- processedTreeData: data,
1888
- uniqueToOriginalKeyMap: map
1889
- };
1890
- }, [
1891
- originTreeData,
1892
- currentOriginalExpandedKeys,
1893
- allowDuplicatedKeys
1894
- ]);
1895
- const currentUniqueExpandedKeys = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
1896
- if (!allowDuplicatedKeys) return currentOriginalExpandedKeys;
1897
- const originalKeysSet = new Set(currentOriginalExpandedKeys);
1898
- return getUniqueKeysFromOriginals(processedTreeData, originalKeysSet, uniqueToOriginalKeyMap);
1899
- }, [
1900
- currentOriginalExpandedKeys,
1901
- processedTreeData,
1902
- uniqueToOriginalKeyMap,
1903
- allowDuplicatedKeys
1904
- ]);
1905
- const currentUniqueCheckedKeys = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
1906
- if (!allowDuplicatedKeys) return currentOriginalCheckedKeys;
1907
- const originalKeysSet = new Set(currentOriginalCheckedKeys);
1908
- return getUniqueKeysFromOriginals(processedTreeData, originalKeysSet, uniqueToOriginalKeyMap);
1909
- }, [
1910
- currentOriginalCheckedKeys,
1911
- processedTreeData,
1912
- uniqueToOriginalKeyMap,
1913
- allowDuplicatedKeys
1914
- ]);
1915
- const handleOriginalExpand = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((keys, info)=>{
1916
- const keysArray = Array.from(keys);
1917
- setCurrentOriginalExpandedKeys(keysArray);
1918
- if (onExpand) onExpand(keysArray, info);
1919
- }, [
1920
- onExpand,
1921
- setCurrentOriginalExpandedKeys
1922
- ]);
1923
- const handleUniqueExpand = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((uniqueKeys, info)=>{
1924
- const originalKeys = uniqueKeys.map((uk)=>uniqueToOriginalKeyMap.get(uk)).filter((ok)=>void 0 !== ok);
1925
- const triggeredOriginalKey = uniqueToOriginalKeyMap.get(info.node.key);
1926
- setCurrentOriginalExpandedKeys(originalKeys);
1927
- if (onExpand) onExpand(originalKeys, {
1928
- ...info,
1929
- triggeredOriginalKey: triggeredOriginalKey
1930
- });
1931
- }, [
1932
- uniqueToOriginalKeyMap,
1933
- setCurrentOriginalExpandedKeys,
1934
- onExpand
1935
- ]);
1936
- const handleOriginalCheck = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((checkedInfoOrKeys, info)=>{
1937
- let checkedArray;
1938
- checkedArray = Array.isArray(checkedInfoOrKeys) ? Array.from(checkedInfoOrKeys) : checkedInfoOrKeys && "object" == typeof checkedInfoOrKeys && "checked" in checkedInfoOrKeys ? Array.from(checkedInfoOrKeys.checked) : [];
1939
- setCurrentOriginalCheckedKeys(checkedArray);
1940
- if (onCheck) onCheck(checkedArray, info);
1941
- }, [
1942
- onCheck,
1943
- setCurrentOriginalCheckedKeys
1944
- ]);
1945
- const handleUniqueCheck = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((checkedInfoOrKeys, info)=>{
1946
- const triggeredUniqueKey = info.node.key;
1947
- const triggeredOriginalKey = uniqueToOriginalKeyMap.get(triggeredUniqueKey);
1948
- if (void 0 === triggeredOriginalKey) return void console.error("Could not find original key for unique key:", triggeredUniqueKey);
1949
- if (!info.checked) {
1950
- const currentKeys = [
1951
- ...currentOriginalCheckedKeys
1952
- ];
1953
- const newCheckedKeys = currentKeys.filter((key)=>key !== triggeredOriginalKey);
1954
- setCurrentOriginalCheckedKeys(newCheckedKeys);
1955
- if (onCheck) onCheck(newCheckedKeys, {
1956
- ...info,
1957
- triggeredOriginalKey: triggeredOriginalKey
1958
- });
1959
- return;
1960
- }
1961
- let uniqueCheckedKeys;
1962
- uniqueCheckedKeys = Array.isArray(checkedInfoOrKeys) ? checkedInfoOrKeys : checkedInfoOrKeys && "object" == typeof checkedInfoOrKeys && "checked" in checkedInfoOrKeys ? checkedInfoOrKeys.checked : [];
1963
- const derivedOriginalKeys = new Set();
1964
- for (const uniqueKey of uniqueCheckedKeys){
1965
- const originalKey = uniqueToOriginalKeyMap.get(uniqueKey);
1966
- if (void 0 !== originalKey) derivedOriginalKeys.add(originalKey);
1967
- }
1968
- derivedOriginalKeys.add(triggeredOriginalKey);
1969
- const originalKeysArray = Array.from(derivedOriginalKeys);
1970
- setCurrentOriginalCheckedKeys(originalKeysArray);
1971
- if (onCheck) onCheck(originalKeysArray, {
1972
- ...info,
1973
- triggeredOriginalKey: triggeredOriginalKey
1974
- });
1975
- }, [
1976
- uniqueToOriginalKeyMap,
1977
- setCurrentOriginalCheckedKeys,
1978
- onCheck,
1979
- currentOriginalCheckedKeys
1980
- ]);
1981
- const handleAntTreeExpand = allowDuplicatedKeys ? handleUniqueExpand : handleOriginalExpand;
1982
- const handleAntTreeCheck = allowDuplicatedKeys ? handleUniqueCheck : handleOriginalCheck;
1983
- const finalProcessedTreeData = allowDuplicatedKeys ? processedTreeData : originTreeData;
1984
- return {
1985
- processedTreeData: finalProcessedTreeData,
1986
- currentUniqueExpandedKeys,
1987
- currentUniqueCheckedKeys,
1988
- handleAntTreeExpand,
1989
- handleAntTreeCheck
1990
- };
1991
- };
1992
- "use client";
1993
- function useTreeCommon(props) {
1994
- const { treeData: originTreeData = [], expandedKeys: propExpandedKeys, defaultExpandedKeys: propDefaultExpandedKeys = [], defaultExpandAll = false, defaultExpandParent = true, onExpand: propOnExpand, checkedKeys, defaultCheckedKeys, onCheck, allowDuplicatedKeys, className, switcherIcon, ...restProps } = props;
1995
- const resolvedDefaultExpandedKeys = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
1996
- if (defaultExpandAll) {
1997
- const keys = [];
1998
- const traverse = (nodes = [])=>{
1999
- nodes.forEach((node)=>{
2000
- keys.push(node.key);
2001
- if (Array.isArray(node.children)) traverse(node.children);
2002
- });
2003
- };
2004
- traverse(originTreeData);
2005
- return keys;
2006
- }
2007
- if (defaultExpandParent && (null == propDefaultExpandedKeys ? void 0 : propDefaultExpandedKeys.length)) {
2008
- const parentMap = new Map();
2009
- const traverse = (nodes, parent)=>{
2010
- nodes.forEach((node)=>{
2011
- if (parent) parentMap.set(node.key, parent.key);
2012
- const children = Array.isArray(node.children) ? node.children : [];
2013
- if (children.length) traverse(children, node);
2014
- });
2015
- };
2016
- traverse(originTreeData);
2017
- const expanded = new Set(propDefaultExpandedKeys);
2018
- propDefaultExpandedKeys.forEach((key)=>{
2019
- let k = key;
2020
- while(parentMap.has(k)){
2021
- const p = parentMap.get(k);
2022
- if (!expanded.has(p)) expanded.add(p);
2023
- k = p;
2024
- }
2025
- });
2026
- return Array.from(expanded);
2027
- }
2028
- return propDefaultExpandedKeys ?? [];
2029
- }, [
2030
- originTreeData,
2031
- defaultExpandAll,
2032
- defaultExpandParent,
2033
- propDefaultExpandedKeys
2034
- ]);
2035
- const { processedTreeData, currentUniqueExpandedKeys, currentUniqueCheckedKeys, handleAntTreeExpand, handleAntTreeCheck } = useUniqueKeysTree({
2036
- treeData: originTreeData,
2037
- expandedKeys: propExpandedKeys,
2038
- defaultExpandedKeys: resolvedDefaultExpandedKeys,
2039
- onExpand: propOnExpand,
2040
- checkedKeys,
2041
- defaultCheckedKeys,
2042
- onCheck,
2043
- allowDuplicatedKeys
2044
- });
2045
- const cls = useCls();
2046
- const customSwitcherIcon = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.CaretRight, {
2047
- weight: "bold",
2048
- className: cls("caret-switcher-icon")
2049
- });
2050
- return {
2051
- cls,
2052
- customSwitcherIcon,
2053
- processedTreeData,
2054
- currentUniqueExpandedKeys,
2055
- currentUniqueCheckedKeys,
2056
- handleAntTreeExpand,
2057
- handleAntTreeCheck,
2058
- restProps,
2059
- className,
2060
- switcherIcon
2061
- };
2062
- }
2063
- "use client";
2064
- const MainTreeInner = (props, ref)=>{
2065
- const { cls, customSwitcherIcon, processedTreeData, currentUniqueExpandedKeys, currentUniqueCheckedKeys, handleAntTreeExpand, handleAntTreeCheck, restProps, className, switcherIcon } = useTreeCommon(props);
2066
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_tree_05ca9855__["default"], {
2067
- ref: ref,
2068
- className: clsx(cls("tree"), className),
2069
- switcherIcon: switcherIcon || customSwitcherIcon,
2070
- treeData: processedTreeData,
2071
- expandedKeys: currentUniqueExpandedKeys,
2072
- onExpand: handleAntTreeExpand,
2073
- checkedKeys: {
2074
- checked: currentUniqueCheckedKeys,
2075
- halfChecked: []
2076
- },
2077
- onCheck: handleAntTreeCheck,
2078
- ...restProps
2079
- });
2080
- };
2081
- const DirectoryTreeInner = (props, ref)=>{
2082
- const { cls, customSwitcherIcon, processedTreeData, currentUniqueExpandedKeys, currentUniqueCheckedKeys, handleAntTreeExpand, handleAntTreeCheck, restProps, className, switcherIcon } = useTreeCommon(props);
2083
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_tree_05ca9855__["default"].DirectoryTree, {
2084
- ref: ref,
2085
- className: clsx(cls("directory-tree"), className),
2086
- switcherIcon: switcherIcon || customSwitcherIcon,
2087
- treeData: processedTreeData,
2088
- expandedKeys: currentUniqueExpandedKeys,
2089
- onExpand: handleAntTreeExpand,
2090
- checkedKeys: {
2091
- checked: currentUniqueCheckedKeys,
2092
- halfChecked: []
2093
- },
2094
- onCheck: handleAntTreeCheck,
2095
- ...restProps
2096
- });
2097
- };
2098
- const MainTree = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(MainTreeInner);
2099
- const DirectoryTree = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(DirectoryTreeInner);
2100
- const Tree = Object.assign(MainTree, {
2101
- DirectoryTree,
2102
- TreeNode: __WEBPACK_EXTERNAL_MODULE_antd_es_tree_05ca9855__["default"].TreeNode
2103
- });
2104
- const Spin = ({ indicator, ...rest })=>{
2105
- const cls = useCls();
2106
- const spinIndicator = indicator || /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
2107
- className: cls("spin-loader")
2108
- });
2109
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_spin_c7b761a0__["default"], {
2110
- indicator: spinIndicator,
2111
- ...rest
2112
- });
2113
- };
2114
- "use client";
2115
- const FormItem = ({ tooltip, label, optionalMark, ...rest })=>{
2116
- const cls = useCls();
2117
- const renderedLabel = tooltip || optionalMark ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("span", {
2118
- className: cls("form-item-label-inner"),
2119
- children: [
2120
- label,
2121
- tooltip && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(IconButton, {
2122
- className: cls("form-item-explaination-icon"),
2123
- label: "string" == typeof tooltip || /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.isValidElement)(tooltip) ? tooltip : void 0,
2124
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.Question, {})
2125
- }),
2126
- optionalMark && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
2127
- className: cls("form-item-label-optional-mark"),
2128
- children: "boolean" == typeof optionalMark ? "(optional)" : optionalMark
2129
- })
2130
- ]
2131
- }) : label;
2132
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_form_FormItem_940c64da__["default"], {
2133
- label: renderedLabel,
2134
- ...rest
2135
- });
2136
- };
2137
- "use client";
2138
- const InternalForm = ({ ...rest })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_form_Form_38f624ac__["default"], {
2139
- ...rest
2140
- });
2141
- const Form = Object.assign(InternalForm, {
2142
- useForm: __WEBPACK_EXTERNAL_MODULE_antd_es_form_Form_38f624ac__.useForm,
2143
- useFormInstance: __WEBPACK_EXTERNAL_MODULE_antd_es_form_hooks_useFormInstance_2ae86589__["default"],
2144
- useWatch: __WEBPACK_EXTERNAL_MODULE_antd_es_form_Form_38f624ac__.useWatch,
2145
- Item: FormItem,
2146
- List: __WEBPACK_EXTERNAL_MODULE_antd_es_form_FormList_8c66a51b__["default"],
2147
- ErrorList: __WEBPACK_EXTERNAL_MODULE_antd_es_form_ErrorList_c62fef91__["default"],
2148
- Provider: __WEBPACK_EXTERNAL_MODULE_antd_es_form_context_0a1516eb__.FormProvider
2149
- });
2150
- "use client";
2151
- const FieldInner = ({ label, className, size = "small", colon = true, type = "input", ...rest }, ref)=>{
2152
- const cls = useCls();
2153
- const id = (0, __WEBPACK_EXTERNAL_MODULE_react__.useId)();
2154
- const cssVarClassname = useAntdCssVarClassname();
2155
- const renderInputOrSelect = ()=>{
2156
- if ("select" === type) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Select, {
2157
- id: id,
2158
- ref: ref,
2159
- size: size,
2160
- ...rest.selectProps || {}
2161
- });
2162
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Input, {
2163
- id: id,
2164
- ref: ref,
2165
- size: size,
2166
- ...rest.inputProps || {}
2167
- });
2168
- };
2169
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
2170
- className: clsx(cls("field"), cssVarClassname, className),
2171
- children: [
2172
- label && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("label", {
2173
- htmlFor: id,
2174
- className: cls("field-label"),
2175
- children: [
2176
- label,
2177
- colon ? ":" : ""
2178
- ]
2179
- }),
2180
- renderInputOrSelect()
2181
- ]
2182
- });
2183
- };
2184
- const Field = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(FieldInner);
2185
- "use client";
2186
- const Tour = ({ indicatorsRender, ...rest })=>{
2187
- const cls = useCls();
2188
- const defaultIndicatorRender = (current, total)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
2189
- className: cls("tour-indicator-wrapper"),
2190
- children: [
2191
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("span", {
2192
- className: cls("tour-indicator-summary-text"),
2193
- children: [
2194
- current + 1,
2195
- " / ",
2196
- total
2197
- ]
2198
- }),
2199
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
2200
- children: Array.from({
2201
- length: total
2202
- }).map((_, index)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
2203
- className: clsx(index === current && cls("tour-indicator-active"), cls("tour-indicator"))
2204
- }, index))
2205
- })
2206
- ]
2207
- });
2208
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_tour_6998cb50__["default"], {
2209
- indicatorsRender: indicatorsRender || defaultIndicatorRender,
2210
- ...rest
2211
- });
2212
- };
2213
- "use client";
2214
- const toastManager = __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.Toast.createToastManager();
2215
- function createToastTypeFunction(type) {
2216
- return (message, options)=>{
2217
- const toastId = toastManager.add({
2218
- description: message,
2219
- data: {
2220
- type: type
2221
- },
2222
- ..."progress" === type || "error" === type ? {
2223
- timeout: 0
2224
- } : {},
2225
- ...options
2226
- });
2227
- return toastId;
2228
- };
2229
- }
2230
- const function_toast = Object.assign(createToastTypeFunction("info"), {
2231
- info: createToastTypeFunction("info"),
2232
- success: createToastTypeFunction("success"),
2233
- error: createToastTypeFunction("error"),
2234
- warning: createToastTypeFunction("warning"),
2235
- progress: createToastTypeFunction("progress")
2236
- });
2237
- "use client";
2238
- const CodeBlock = ({ code, children, lang: defaultLang = "tsx", className, options, activeOption: controlledActiveOption, defaultActiveOption = 0, onActiveOptionChange, copyText = "Copy", copySuccessText = "Copied", ...rest })=>{
2239
- const [activeOption, setActiveOption] = useControlledState(controlledActiveOption, onActiveOptionChange, defaultActiveOption);
2240
- const [currentCode, setCurrentCode] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(code || "");
2241
- const [lang, setLang] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(defaultLang);
2242
- const hasOptions = options && options.length > 0;
2243
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
2244
- if (hasOptions) {
2245
- var _options_activeOption, _options_activeOption1;
2246
- const newCode = (null == (_options_activeOption = options[activeOption]) ? void 0 : _options_activeOption.code) || "";
2247
- const newLang = (null == (_options_activeOption1 = options[activeOption]) ? void 0 : _options_activeOption1.lang) || defaultLang;
2248
- setCurrentCode(newCode);
2249
- setLang(newLang);
2250
- }
2251
- }, [
2252
- code,
2253
- activeOption,
2254
- defaultActiveOption,
2255
- options,
2256
- defaultLang,
2257
- hasOptions,
2258
- setActiveOption
2259
- ]);
2260
- const [tooltipContent, setTooltipContent] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(copyText);
2261
- const [copySuccess, setCopySuccess] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
2262
- const handleCopy = ()=>{
2263
- const codeContent = currentCode ? currentCode : reactNodeToString(children);
2264
- try {
2265
- navigator.clipboard.writeText(codeContent).then(()=>{
2266
- setTooltipContent(copySuccessText);
2267
- setCopySuccess(true);
2268
- });
2269
- } catch (_) {
2270
- setTooltipContent("Failed to copy");
2271
- }
2272
- };
2273
- const handleMouseLeave = ()=>{
2274
- setTooltipContent(copyText);
2275
- setCopySuccess(false);
2276
- };
2277
- const cls = useCls();
2278
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ThemeProvider, {
2279
- theme: "dark",
2280
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(WithAntdTokens, {
2281
- className: clsx(cls("code-block"), className),
2282
- ...rest,
2283
- children: [
2284
- hasOptions && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
2285
- className: cls("code-block-header"),
2286
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Segmented, {
2287
- value: activeOption,
2288
- onChange: setActiveOption,
2289
- options: options.map((opt, index)=>({
2290
- label: opt.label,
2291
- value: index
2292
- }))
2293
- })
2294
- }),
2295
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
2296
- className: cls("code-block-copy"),
2297
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(IconButton, {
2298
- onClick: handleCopy,
2299
- label: tooltipContent,
2300
- onMouseLeave: handleMouseLeave,
2301
- children: copySuccess ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.Check, {}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.Copy, {})
2302
- })
2303
- }),
2304
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
2305
- className: cls("code-block-content"),
2306
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ScrollArea, {
2307
- children: currentCode ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_prism_react_renderer_be33806e__.Highlight, {
2308
- language: lang,
2309
- code: currentCode,
2310
- theme: __WEBPACK_EXTERNAL_MODULE_prism_react_renderer_be33806e__.themes.vsDark,
2311
- children: ({ className, style, tokens, getLineProps, getTokenProps })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("pre", {
2312
- style: {
2313
- ...style,
2314
- backgroundColor: "transparent"
2315
- },
2316
- className: className,
2317
- children: tokens.map((line, i)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
2318
- ...getLineProps({
2319
- line
2320
- }),
2321
- children: line.map((token, key)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
2322
- ...getTokenProps({
2323
- token
2324
- })
2325
- }, key))
2326
- }, i))
2327
- })
2328
- }) : children
2329
- })
2330
- })
2331
- ]
2332
- })
2333
- });
2334
- };
2335
- "use client";
2336
- function InnerToast({ toast }) {
2337
- var _toast_data;
2338
- const cls = useCls();
2339
- const toastIconMap = {
2340
- info: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.Info, {
2341
- weight: "fill"
2342
- }),
2343
- warning: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.WarningCircle, {
2344
- weight: "fill"
2345
- }),
2346
- error: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.XCircle, {
2347
- weight: "fill"
2348
- }),
2349
- success: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.CheckCircle, {
2350
- weight: "fill"
2351
- }),
2352
- progress: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.CircleNotch, {})
2353
- };
2354
- const type = (null == (_toast_data = toast.data) ? void 0 : _toast_data.type) || "info";
2355
- const isTraceback = isTracebackError(null == toast ? void 0 : toast.description);
2356
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
2357
- if (isTraceback) toastManager.update(toast.id, {
2358
- timeout: 0
2359
- });
2360
- }, [
2361
- isTraceback,
2362
- toast.id
2363
- ]);
2364
- const renderDescription = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((props)=>{
2365
- const { children, className, ...rest } = props;
2366
- if (isTraceback) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
2367
- ...rest,
2368
- className: cls("toast-description", isTraceback ? "toast-description-traceback" : "", className),
2369
- children: [
2370
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("p", {
2371
- children: [
2372
- "An unexpected error occurred.",
2373
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("br", {}),
2374
- "Please contact us with error details for support."
2375
- ]
2376
- }),
2377
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("p", {
2378
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Button, {
2379
- size: "small",
2380
- onClick: ()=>{
2381
- Modal_Modal.open({
2382
- title: "Error details",
2383
- content: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(CodeBlock, {
2384
- children: children
2385
- }),
2386
- hideOkButton: true
2387
- });
2388
- toastManager.close(toast.id);
2389
- },
2390
- children: "View error details"
2391
- })
2392
- })
2393
- ]
2394
- });
2395
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("p", {
2396
- ...rest,
2397
- className: cls("toast-description", className),
2398
- children: children
2399
- });
2400
- }, [
2401
- isTraceback,
2402
- cls,
2403
- toast.id
2404
- ]);
2405
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.Toast.Root, {
2406
- toast: toast,
2407
- className: cls("toast"),
2408
- children: [
2409
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
2410
- className: cls("toast-icon-wrap"),
2411
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
2412
- className: cls("toast-icon", `toast-icon-${type}`),
2413
- children: toastIconMap[type]
2414
- })
2415
- }),
2416
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
2417
- className: cls("toast-content"),
2418
- children: [
2419
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.Toast.Title, {
2420
- className: cls("toast-title")
2421
- }),
2422
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.Toast.Description, {
2423
- render: renderDescription
2424
- })
2425
- ]
2426
- }),
2427
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.Toast.Close, {
2428
- className: cls("toast-close"),
2429
- render: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(IconButton, {
2430
- size: "small",
2431
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.X, {})
2432
- })
2433
- })
2434
- ]
2435
- });
2436
- }
2437
- function ToastList({ className }) {
2438
- const { toasts } = __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.Toast.useToastManager();
2439
- const cls = useCls();
2440
- const cssVars = useAntdCssVarClassname();
2441
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.Toast.Viewport, {
2442
- className: clsx(cls("toast-viewport"), cssVars, className),
2443
- children: toasts.map((toast)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(InnerToast, {
2444
- toast: toast
2445
- }, toast.id))
2446
- });
2447
- }
2448
- function ToastProvider(props) {
2449
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.Toast.Provider, {
2450
- toastManager: toastManager,
2451
- ...props
2452
- });
2453
- }
2454
- const Toast = Object.assign(InnerToast, {
2455
- List: ToastList,
2456
- Provider: ToastProvider
2457
- });
2458
- "use client";
2459
- "use client";
2460
- const VerticalCollapsiblePanel = ({ children, title, defaultOpen = false, open: controlledOpen, onOpenChange, className, headerClassName, headerInnerClassName, bodyClassName, contentPadding = "16px", afterTitle, actions, useTitleAsTrigger = true, keepMounted = false })=>{
2461
- const cls = useCls();
2462
- const [isOpen, setIsOpen] = useControlledState(controlledOpen, onOpenChange, defaultOpen);
2463
- const [isBodyOpen, setIsBodyOpen] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(isOpen);
2464
- const ref = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
2465
- const runOnceAnimationsFinish = useAnimationsFinished(ref, isOpen);
2466
- const cssVars = useAntdCssVarClassname();
2467
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
2468
- runOnceAnimationsFinish(()=>{
2469
- setIsBodyOpen(isOpen);
2470
- });
2471
- }, [
2472
- isOpen,
2473
- runOnceAnimationsFinish
2474
- ]);
2475
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.Collapsible.Root, {
2476
- className: clsx(cls("collapsible-panel"), cssVars, className),
2477
- open: isOpen,
2478
- onOpenChange: setIsOpen,
2479
- ref: ref,
2480
- children: [
2481
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
2482
- className: clsx(cls("collapsible-panel-header"), headerClassName),
2483
- children: [
2484
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
2485
- className: clsx(cls("collapsible-panel-header-inner"), headerInnerClassName),
2486
- children: [
2487
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
2488
- className: cls("collapsible-panel-header-text"),
2489
- onClick: useTitleAsTrigger ? ()=>setIsOpen((open)=>!open) : void 0,
2490
- style: useTitleAsTrigger ? {
2491
- cursor: "pointer"
2492
- } : {},
2493
- children: "string" == typeof title ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Truncate, {
2494
- children: title
2495
- }) : title
2496
- }),
2497
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
2498
- className: cls("collapsible-panel-header-actions"),
2499
- children: [
2500
- isOpen && actions,
2501
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.Collapsible.Trigger, {
2502
- className: cls("collapsible-panel-trigger"),
2503
- render: isOpen ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(IconButton, {
2504
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.MinusCircle, {
2505
- weight: "bold",
2506
- className: clsx(cls("collapsible-panel-caret"), isOpen && cls("collapsible-panel-caret-open"))
2507
- })
2508
- }) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(IconButton, {
2509
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.PlusCircle, {
2510
- weight: "bold",
2511
- className: clsx(cls("collapsible-panel-caret"), isOpen && cls("collapsible-panel-caret-open"))
2512
- })
2513
- })
2514
- })
2515
- ]
2516
- })
2517
- ]
2518
- }),
2519
- isOpen && afterTitle && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
2520
- className: cls("collapsible-panel-header-after"),
2521
- children: afterTitle
2522
- })
2523
- ]
2524
- }),
2525
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.Collapsible.Panel, {
2526
- className: cls("collapsible-panel-content"),
2527
- style: void 0 !== contentPadding ? {
2528
- "--ds-content-padding": false === contentPadding || 0 === contentPadding ? "0" : "number" == typeof contentPadding ? `${contentPadding}px` : contentPadding
2529
- } : {},
2530
- keepMounted: keepMounted,
2531
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Transition, {
2532
- show: isBodyOpen,
2533
- className: clsx(cls("collapsible-panel-body"), bodyClassName),
2534
- keepMounted: true,
2535
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
2536
- children: children
2537
- })
2538
- })
2539
- })
2540
- ]
2541
- });
2542
- };
2543
- "use client";
2544
- const PopupPanel = ({ children, placement, openOnHover = false, open: outsideOpen, onOpenChange: outsideOnOpenChange, content, title, trigger = "click", className, anchor, beforeCloseButton, afterCloseButton, afterTitle, size = "medium", footer, defaultOpen, resizable = false })=>{
2545
- const [open, setOpen] = useControlledState(outsideOpen, outsideOnOpenChange, defaultOpen ?? false);
2546
- const cls = useCls();
2547
- const antdCssVarClassname = useAntdCssVarClassname();
2548
- const headlessUIPlacement = parseAntdPlacement(placement);
2549
- const triggerRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
2550
- const [popupRef, setPopupRef] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(null);
2551
- const [width, setWidth] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)();
2552
- const [height, setHeight] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)();
2553
- const callbackRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((node)=>{
2554
- setPopupRef(node);
2555
- }, []);
2556
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
2557
- if (!popupRef) return;
2558
- const observer = new ResizeObserver((entries)=>{
2559
- for (const entry of entries){
2560
- setWidth(entry.contentRect.width);
2561
- setHeight(entry.contentRect.height);
2562
- }
2563
- });
2564
- observer.observe(popupRef);
2565
- return ()=>{
2566
- observer.disconnect();
2567
- };
2568
- }, [
2569
- popupRef
2570
- ]);
2571
- const defaultCloseIcon = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.X, {
2572
- size: 16
2573
- }), []);
2574
- const renderTitle = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
2575
- className: cls("popup-panel-header"),
2576
- children: [
2577
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_antd_es_flex_86593150__["default"], {
2578
- align: "center",
2579
- gap: 8,
2580
- className: cls("popup-panel-title-wrapper"),
2581
- children: [
2582
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_popover_cdb87929__.Popover.Title, {
2583
- render: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
2584
- className: cls("grow", "truncate"),
2585
- children: title
2586
- })
2587
- }),
2588
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
2589
- className: "flex items-center gap-2",
2590
- children: [
2591
- beforeCloseButton,
2592
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_popover_cdb87929__.Popover.Close, {
2593
- render: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(IconButton, {
2594
- children: defaultCloseIcon
2595
- })
2596
- }),
2597
- afterCloseButton
2598
- ]
2599
- })
2600
- ]
2601
- }),
2602
- afterTitle ? afterTitle : null
2603
- ]
2604
- }), [
2605
- afterCloseButton,
2606
- afterTitle,
2607
- beforeCloseButton,
2608
- cls,
2609
- defaultCloseIcon,
2610
- title
2611
- ]);
2612
- const [resizing, setResizing] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
2613
- const { getRootProps, getHandleProps, rootRef } = (0, __WEBPACK_EXTERNAL_MODULE_react_use_resizable_ad29d4b1__.useResizable)({
2614
- initialWidth: width,
2615
- initialHeight: height,
2616
- onDragStart: ()=>setResizing(true),
2617
- onDragEnd: ()=>setResizing(false)
2618
- });
2619
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
2620
- if (resizing) document.body.style.userSelect = "none";
2621
- else document.body.style.userSelect = "";
2622
- }, [
2623
- resizing
2624
- ]);
2625
- const onReverseHandleChangeVertical = (parent, values)=>{
2626
- if (!parent.current) return;
2627
- const { heightDiff } = values;
2628
- parent.current.style.top = `${parseInt(parent.current.style.top || "0") - heightDiff}px`;
2629
- };
2630
- const onReverseHandleChangeHorizontal = (parent, values)=>{
2631
- if (!parent.current) return;
2632
- const { widthDiff } = values;
2633
- parent.current.style.left = `${parseInt(parent.current.style.left || "0") - widthDiff}px`;
2634
- };
2635
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_popover_cdb87929__.Popover.Root, {
2636
- openOnHover: "hover" === trigger ? true : openOnHover,
2637
- open: open,
2638
- onOpenChange: (newOpen)=>{
2639
- setOpen(newOpen);
2640
- },
2641
- delay: 100,
2642
- children: [
2643
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_popover_cdb87929__.Popover.Trigger, {
2644
- render: children,
2645
- ref: triggerRef
2646
- }),
2647
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_popover_cdb87929__.Popover.Portal, {
2648
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_popover_cdb87929__.Popover.Positioner, {
2649
- className: cls("popup-panel-root"),
2650
- side: headlessUIPlacement.placement,
2651
- align: headlessUIPlacement.align,
2652
- sideOffset: 4,
2653
- anchor: anchor,
2654
- style: {
2655
- "--size-width": size ? constants_PopupPanelSize[size] : void 0
2656
- },
2657
- ref: callbackRef,
2658
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_popover_cdb87929__.Popover.Popup, {
2659
- className: clsx(cls("popup-panel"), antdCssVarClassname, className),
2660
- ...getRootProps(),
2661
- ...resizing ? {
2662
- "data-resizing": true
2663
- } : {},
2664
- children: [
2665
- title && renderTitle(),
2666
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
2667
- className: cls("popup-panel-content"),
2668
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
2669
- className: cls("popup-panel-content-inner"),
2670
- children: content
2671
- })
2672
- }),
2673
- footer && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
2674
- className: cls("popup-panel-footer"),
2675
- children: "function" == typeof footer ? footer({
2676
- close: ()=>setOpen(false)
2677
- }) : footer
2678
- }),
2679
- resizable && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
2680
- children: [
2681
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
2682
- className: cls("resize-handle-top"),
2683
- ...getHandleProps({
2684
- reverse: true,
2685
- lockHorizontal: true,
2686
- onResize: (values)=>onReverseHandleChangeVertical(rootRef, values)
2687
- })
2688
- }),
2689
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
2690
- className: cls("resize-handle-bottom"),
2691
- ...getHandleProps({
2692
- lockHorizontal: true
2693
- })
2694
- }),
2695
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
2696
- className: cls("resize-handle-left"),
2697
- ...getHandleProps({
2698
- reverse: true,
2699
- lockVertical: true,
2700
- onResize: (values)=>onReverseHandleChangeHorizontal(rootRef, values)
2701
- })
2702
- }),
2703
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
2704
- className: cls("resize-handle-right"),
2705
- ...getHandleProps({
2706
- lockVertical: true
2707
- })
2708
- })
2709
- ]
2710
- })
2711
- ]
2712
- })
2713
- })
2714
- })
2715
- ]
2716
- });
2717
- };
2718
- const MainInputInner = (props, ref)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Input, {
2719
- ref: ref,
2720
- ...props
2721
- });
2722
- const PasswordInner = (props, ref)=>{
2723
- const mergedProps = {
2724
- iconRender: (visible)=>visible ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.Eye, {
2725
- size: 16
2726
- }) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.EyeClosed, {
2727
- size: 16
2728
- }),
2729
- ...props
2730
- };
2731
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Input.Password, {
2732
- ref: ref,
2733
- ...mergedProps
2734
- });
2735
- };
2736
- const SearchInner = (props, ref)=>{
2737
- const mergedProps = {
2738
- enterButton: true === props.enterButton ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.MagnifyingGlass, {
2739
- size: 16
2740
- }) : props.enterButton,
2741
- ...props
2742
- };
2743
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Input.Search, {
2744
- ref: ref,
2745
- ...mergedProps
2746
- });
2747
- };
2748
- const TextAreaInner = (props, ref)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Input.TextArea, {
2749
- ref: ref,
2750
- ...props
2751
- });
2752
- const MainInput = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(MainInputInner);
2753
- const Password = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(PasswordInner);
2754
- const Search = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(SearchInner);
2755
- const TextArea = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(TextAreaInner);
2756
- const Input = Object.assign(MainInput, {
2757
- Password,
2758
- Search,
2759
- TextArea
2760
- });
2761
- const Badge = ({ count, showZero, ...rest })=>{
2762
- const cls = useCls();
2763
- const antdCssVar = useAntdCssVarClassname();
2764
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_badge_f5f828f9__["default"], {
2765
- count: count,
2766
- showZero: showZero,
2767
- className: clsx(cls("badge"), antdCssVar),
2768
- ...rest
2769
- });
2770
- };
2771
- const RadioInner = ({ className, style, ...rest }, ref)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_radio_e6b5c17a__["default"], {
2772
- ref: ref,
2773
- className: className,
2774
- style: style,
2775
- ...rest
2776
- });
2777
- const RadioGroup = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_radio_e6b5c17a__.Group, {
2778
- ...props
2779
- });
2780
- const RadioButton = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(({ className, style, ...rest }, ref)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_radio_e6b5c17a__.Button, {
2781
- ref: ref,
2782
- className: className,
2783
- style: style,
2784
- ...rest
2785
- }));
2786
- const ForwardedRadio = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(RadioInner);
2787
- const Radio = Object.assign(ForwardedRadio, {
2788
- Group: RadioGroup,
2789
- Button: RadioButton
2790
- });
2791
- "use client";
2792
- const DSRootContext = __WEBPACK_EXTERNAL_MODULE_react__["default"].createContext({
2793
- theme: "light"
2794
- });
2795
- const DSRootContextProvider = DSRootContext.Provider;
2796
- const useDS = ()=>__WEBPACK_EXTERNAL_MODULE_react__["default"].useContext(DSRootContext);
2797
- "use client";
2798
- const DSRoot = ({ className, appendClassesTo = "html", children, theme, ...props })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(DSRootContextProvider, {
2799
- value: {
2800
- theme: theme
2801
- },
2802
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ThemeProvider, {
2803
- theme: theme,
2804
- ...props,
2805
- appendClassesTo: appendClassesTo,
2806
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd_es_app_App_698582f4__["default"], {
2807
- className: className,
2808
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Toast.Provider, {
2809
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(Modal_Modal.Provider, {
2810
- children: [
2811
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Toast.List, {}),
2812
- children
2813
- ]
2814
- })
2815
- })
2816
- })
2817
- })
2818
- });
2819
- "use client";
2820
- const useToken = __WEBPACK_EXTERNAL_MODULE_antd_es_theme_57fdaa32__["default"].useToken;
2821
- const useBreakpoint = __WEBPACK_EXTERNAL_MODULE_antd_es_grid_ec1d1712__["default"].useBreakpoint;
2822
- const useMessage = ()=>{
2823
- const { message } = (0, __WEBPACK_EXTERNAL_MODULE_antd_es_app_useApp_90d95086__["default"])();
2824
- return message;
2825
- };
2826
- const antd_useModal = ()=>{
2827
- const { modal } = (0, __WEBPACK_EXTERNAL_MODULE_antd_es_app_useApp_90d95086__["default"])();
2828
- return modal;
2829
- };
2830
- const rawChartColorTokens = {
2831
- colorChartsRed300: {
2832
- light: "#ea7158",
2833
- dark: "#d63f38"
2834
- },
2835
- colorChartsRed400: {
2836
- light: "#dc5032",
2837
- dark: "#ed5958"
2838
- },
2839
- colorChartsRed500: {
2840
- light: "#d13313",
2841
- dark: "#fe6e73"
2842
- },
2843
- colorChartsRed600: {
2844
- light: "#ba2e0f",
2845
- dark: "#ff8a8a"
2846
- },
2847
- colorChartsRed700: {
2848
- light: "#a82a0c",
2849
- dark: "#ffa09e"
2850
- },
2851
- colorChartsRed800: {
2852
- light: "#972709",
2853
- dark: "#ffb3b0"
2854
- },
2855
- colorChartsRed900: {
2856
- light: "#892407",
2857
- dark: "#ffc4c0"
2858
- },
2859
- colorChartsRed1000: {
2860
- light: "#7d2105",
2861
- dark: "#ffd2cf"
2862
- },
2863
- colorChartsRed1100: {
2864
- light: "#721e03",
2865
- dark: "#ffe0dd"
2866
- },
2867
- colorChartsRed1200: {
2868
- light: "#671c00",
2869
- dark: "#ffecea"
2870
- },
2871
- colorChartsOrange300: {
2872
- light: "#e07941",
2873
- dark: "#c55305"
2874
- },
2875
- colorChartsOrange400: {
2876
- light: "#cc5f21",
2877
- dark: "#de6923"
2878
- },
2879
- colorChartsOrange500: {
2880
- light: "#bc4d01",
2881
- dark: "#f27c36"
2882
- },
2883
- colorChartsOrange600: {
2884
- light: "#a84401",
2885
- dark: "#f89256"
2886
- },
2887
- colorChartsOrange700: {
2888
- light: "#983c02",
2889
- dark: "#fca572"
2890
- },
2891
- colorChartsOrange800: {
2892
- light: "#8a3603",
2893
- dark: "#ffb68b"
2894
- },
2895
- colorChartsOrange900: {
2896
- light: "#7e3103",
2897
- dark: "#ffc6a4"
2898
- },
2899
- colorChartsOrange1000: {
2900
- light: "#732c02",
2901
- dark: "#ffd4bb"
2902
- },
2903
- colorChartsOrange1100: {
2904
- light: "#692801",
2905
- dark: "#ffe1cf"
2906
- },
2907
- colorChartsOrange1200: {
2908
- light: "#602400",
2909
- dark: "#ffede2"
2910
- },
2911
- colorChartsYellow300: {
2912
- light: "#b2911c",
2913
- dark: "#977001"
2914
- },
2915
- colorChartsYellow400: {
2916
- light: "#9c7b0b",
2917
- dark: "#b08400"
2918
- },
2919
- colorChartsYellow500: {
2920
- light: "#8a6b05",
2921
- dark: "#c59600"
2922
- },
2923
- colorChartsYellow600: {
2924
- light: "#7b5f04",
2925
- dark: "#d3a61c"
2926
- },
2927
- colorChartsYellow700: {
2928
- light: "#6f5504",
2929
- dark: "#dfb52c"
2930
- },
2931
- colorChartsYellow800: {
2932
- light: "#654d03",
2933
- dark: "#eac33a"
2934
- },
2935
- colorChartsYellow900: {
2936
- light: "#5d4503",
2937
- dark: "#f1cf65"
2938
- },
2939
- colorChartsYellow1000: {
2940
- light: "#553f03",
2941
- dark: "#f7db8a"
2942
- },
2943
- colorChartsYellow1100: {
2944
- light: "#4d3901",
2945
- dark: "#fce5a8"
2946
- },
2947
- colorChartsYellow1200: {
2948
- light: "#483300",
2949
- dark: "#ffefc9"
2950
- },
2951
- colorChartsGreen300: {
2952
- light: "#67a353",
2953
- dark: "#48851a"
2954
- },
2955
- colorChartsGreen400: {
2956
- light: "#41902c",
2957
- dark: "#5a9b29"
2958
- },
2959
- colorChartsGreen500: {
2960
- light: "#1f8104",
2961
- dark: "#69ae34"
2962
- },
2963
- colorChartsGreen600: {
2964
- light: "#1a7302",
2965
- dark: "#7dbd4c"
2966
- },
2967
- colorChartsGreen700: {
2968
- light: "#176702",
2969
- dark: "#8fca61"
2970
- },
2971
- colorChartsGreen800: {
2972
- light: "#145d02",
2973
- dark: "#9fd673"
2974
- },
2975
- colorChartsGreen900: {
2976
- light: "#125502",
2977
- dark: "#b2df8d"
2978
- },
2979
- colorChartsGreen1000: {
2980
- light: "#104d01",
2981
- dark: "#c5e7a8"
2982
- },
2983
- colorChartsGreen1100: {
2984
- light: "#0f4601",
2985
- dark: "#d5efbe"
2986
- },
2987
- colorChartsGreen1200: {
2988
- light: "#0d4000",
2989
- dark: "#e4f7d5"
2990
- },
2991
- colorChartsTeal300: {
2992
- light: "#2ea597",
2993
- dark: "#018977"
2994
- },
2995
- colorChartsTeal400: {
2996
- light: "#1c8e81",
2997
- dark: "#009d89"
2998
- },
2999
- colorChartsTeal500: {
3000
- light: "#0d7d70",
3001
- dark: "#00b09b"
3002
- },
3003
- colorChartsTeal600: {
3004
- light: "#096f64",
3005
- dark: "#40bfa9"
3006
- },
3007
- colorChartsTeal700: {
3008
- light: "#06645a",
3009
- dark: "#5fccb7"
3010
- },
3011
- colorChartsTeal800: {
3012
- light: "#045b52",
3013
- dark: "#77d7c3"
3014
- },
3015
- colorChartsTeal900: {
3016
- light: "#03524a",
3017
- dark: "#94e0d0"
3018
- },
3019
- colorChartsTeal1000: {
3020
- light: "#014b44",
3021
- dark: "#ace9db"
3022
- },
3023
- colorChartsTeal1100: {
3024
- light: "#01443e",
3025
- dark: "#c2f0e6"
3026
- },
3027
- colorChartsTeal1200: {
3028
- light: "#003e38",
3029
- dark: "#d7f7f0"
3030
- },
3031
- colorChartsBlue1300: {
3032
- light: "#529ccb",
3033
- dark: "#00819c"
3034
- },
3035
- colorChartsBlue1400: {
3036
- light: "#3184c2",
3037
- dark: "#0497ba"
3038
- },
3039
- colorChartsBlue1500: {
3040
- light: "#0273bb",
3041
- dark: "#08aad2"
3042
- },
3043
- colorChartsBlue1600: {
3044
- light: "#0166ab",
3045
- dark: "#44b9dd"
3046
- },
3047
- colorChartsBlue1700: {
3048
- light: "#015b9d",
3049
- dark: "#63c6e7"
3050
- },
3051
- colorChartsBlue1800: {
3052
- light: "#015292",
3053
- dark: "#79d2f0"
3054
- },
3055
- colorChartsBlue1900: {
3056
- light: "#014a87",
3057
- dark: "#98dcf5"
3058
- },
3059
- colorChartsBlue11000: {
3060
- light: "#01437d",
3061
- dark: "#b3e4f8"
3062
- },
3063
- colorChartsBlue11100: {
3064
- light: "#003c75",
3065
- dark: "#caedfc"
3066
- },
3067
- colorChartsBlue11200: {
3068
- light: "#00366d",
3069
- dark: "#ddf4ff"
3070
- },
3071
- colorChartsBlue2300: {
3072
- light: "#688ae8",
3073
- dark: "#486de8"
3074
- },
3075
- colorChartsBlue2400: {
3076
- light: "#5978e3",
3077
- dark: "#6384f5"
3078
- },
3079
- colorChartsBlue2500: {
3080
- light: "#4066df",
3081
- dark: "#7698fe"
3082
- },
3083
- colorChartsBlue2600: {
3084
- light: "#3759ce",
3085
- dark: "#8ea9ff"
3086
- },
3087
- colorChartsBlue2700: {
3088
- light: "#314fbf",
3089
- dark: "#a2b8ff"
3090
- },
3091
- colorChartsBlue2800: {
3092
- light: "#2c46b1",
3093
- dark: "#b1c5ff"
3094
- },
3095
- colorChartsBlue2900: {
3096
- light: "#273ea5",
3097
- dark: "#c3d1ff"
3098
- },
3099
- colorChartsBlue21000: {
3100
- light: "#23379b",
3101
- dark: "#d2dcff"
3102
- },
3103
- colorChartsBlue21100: {
3104
- light: "#1f3191",
3105
- dark: "#dfe6ff"
3106
- },
3107
- colorChartsBlue21200: {
3108
- light: "#1b2b88",
3109
- dark: "#ecf0ff"
3110
- },
3111
- colorChartsPurple300: {
3112
- light: "#a783e1",
3113
- dark: "#8d59de"
3114
- },
3115
- colorChartsPurple400: {
3116
- light: "#9469d6",
3117
- dark: "#a173ea"
3118
- },
3119
- colorChartsPurple500: {
3120
- light: "#8456ce",
3121
- dark: "#b088f5"
3122
- },
3123
- colorChartsPurple600: {
3124
- light: "#7749bf",
3125
- dark: "#bf9bf9"
3126
- },
3127
- colorChartsPurple700: {
3128
- light: "#6b40b2",
3129
- dark: "#cbabfc"
3130
- },
3131
- colorChartsPurple800: {
3132
- light: "#6237a7",
3133
- dark: "#d6baff"
3134
- },
3135
- colorChartsPurple900: {
3136
- light: "#59309d",
3137
- dark: "#dfc8ff"
3138
- },
3139
- colorChartsPurple1000: {
3140
- light: "#512994",
3141
- dark: "#e8d5ff"
3142
- },
3143
- colorChartsPurple1100: {
3144
- light: "#4a238b",
3145
- dark: "#efe2ff"
3146
- },
3147
- colorChartsPurple1200: {
3148
- light: "#431d84",
3149
- dark: "#f5edff"
3150
- },
3151
- colorChartsPink300: {
3152
- light: "#da7596",
3153
- dark: "#c64a70"
3154
- },
3155
- colorChartsPink400: {
3156
- light: "#ce567c",
3157
- dark: "#d56889"
3158
- },
3159
- colorChartsPink500: {
3160
- light: "#c33d69",
3161
- dark: "#e07f9d"
3162
- },
3163
- colorChartsPink600: {
3164
- light: "#b1325c",
3165
- dark: "#eb92ad"
3166
- },
3167
- colorChartsPink700: {
3168
- light: "#a32952",
3169
- dark: "#f5a2bb"
3170
- },
3171
- colorChartsPink800: {
3172
- light: "#962249",
3173
- dark: "#ffb0c8"
3174
- },
3175
- colorChartsPink900: {
3176
- light: "#8b1b42",
3177
- dark: "#ffc1d4"
3178
- },
3179
- colorChartsPink1000: {
3180
- light: "#81143b",
3181
- dark: "#ffd1de"
3182
- },
3183
- colorChartsPink1100: {
3184
- light: "#780d35",
3185
- dark: "#ffdfe8"
3186
- },
3187
- colorChartsPink1200: {
3188
- light: "#6f062f",
3189
- dark: "#ffecf1"
3190
- },
3191
- colorChartsStatusCritical: {
3192
- light: "{colorChartsRed1000}",
3193
- dark: "{colorChartsRed300}"
3194
- },
3195
- colorChartsStatusHigh: {
3196
- light: "{colorChartsRed600}",
3197
- dark: "{colorChartsRed500}"
3198
- },
3199
- colorChartsStatusMedium: {
3200
- light: "{colorChartsOrange400}",
3201
- dark: "{colorChartsOrange600}"
3202
- },
3203
- colorChartsStatusLow: {
3204
- light: "{colorChartsYellow300}",
3205
- dark: "{colorChartsYellow700}"
3206
- },
3207
- colorChartsStatusPositive: {
3208
- light: "{colorChartsGreen300}",
3209
- dark: "{colorChartsGreen500}"
3210
- },
3211
- colorChartsStatusInfo: {
3212
- light: "{colorChartsBlue1400}",
3213
- dark: "{colorChartsBlue1500}"
3214
- },
3215
- colorChartsStatusNeutral: antdColorTokens.colorTextSecondary,
3216
- colorChartsThresholdNegative: antdColorTokens.colorError,
3217
- colorChartsThresholdPositive: antdColorTokens.colorSuccess,
3218
- colorChartsThresholdInfo: antdColorTokens.colorInfo,
3219
- colorChartsThresholdNeutral: antdColorTokens.colorTextTertiary,
3220
- colorChartsLineGrid: {
3221
- light: "#DADADC",
3222
- dark: "#434347"
3223
- },
3224
- colorChartsLineTick: "{colorChartsLineGrid}",
3225
- colorChartsLineAxis: {
3226
- light: "#C8C8CB",
3227
- dark: "#73737A"
3228
- },
3229
- colorChartsLabelAxis: {
3230
- light: "#7C7C83",
3231
- dark: "#898990"
3232
- },
3233
- colorChartsPaletteCategorical1: "{colorChartsBlue2300}",
3234
- colorChartsPaletteCategorical2: "{colorChartsPink500}",
3235
- colorChartsPaletteCategorical3: "{colorChartsTeal300}",
3236
- colorChartsPaletteCategorical4: "{colorChartsPurple500}",
3237
- colorChartsPaletteCategorical5: "{colorChartsOrange300}",
3238
- colorChartsPaletteCategorical6: "{colorChartsBlue2600}",
3239
- colorChartsPaletteCategorical7: "{colorChartsPink800}",
3240
- colorChartsPaletteCategorical8: "{colorChartsTeal600}",
3241
- colorChartsPaletteCategorical9: "{colorChartsPurple800}",
3242
- colorChartsPaletteCategorical10: "{colorChartsOrange600}",
3243
- colorChartsPaletteCategorical11: "{colorChartsBlue2900}",
3244
- colorChartsPaletteCategorical12: "{colorChartsPink1100}",
3245
- colorChartsPaletteCategorical13: "{colorChartsTeal900}",
3246
- colorChartsPaletteCategorical14: "{colorChartsPurple1100}",
3247
- colorChartsPaletteCategorical15: "{colorChartsOrange900}",
3248
- colorChartsPaletteCategorical16: "{colorChartsBlue21200}",
3249
- colorChartsPaletteCategorical17: "{colorChartsPink400}",
3250
- colorChartsPaletteCategorical18: "{colorChartsTeal1200}",
3251
- colorChartsPaletteCategorical19: "{colorChartsPurple400}",
3252
- colorChartsPaletteCategorical20: "{colorChartsOrange1200}",
3253
- colorChartsPaletteCategorical21: "{colorChartsBlue2500}",
3254
- colorChartsPaletteCategorical22: "{colorChartsPink700}",
3255
- colorChartsPaletteCategorical23: "{colorChartsTeal500}",
3256
- colorChartsPaletteCategorical24: "{colorChartsPurple700}",
3257
- colorChartsPaletteCategorical25: "{colorChartsOrange500}",
3258
- colorChartsPaletteCategorical26: "{colorChartsBlue2800}",
3259
- colorChartsPaletteCategorical27: "{colorChartsPink1000}",
3260
- colorChartsPaletteCategorical28: "{colorChartsTeal800}",
3261
- colorChartsPaletteCategorical29: "{colorChartsPurple1000}",
3262
- colorChartsPaletteCategorical30: "{colorChartsOrange800}",
3263
- colorChartsPaletteCategorical31: "{colorChartsBlue21100}",
3264
- colorChartsPaletteCategorical32: "{colorChartsPink300}",
3265
- colorChartsPaletteCategorical33: "{colorChartsTeal1100}",
3266
- colorChartsPaletteCategorical34: "{colorChartsPurple300}",
3267
- colorChartsPaletteCategorical35: "{colorChartsOrange1100}",
3268
- colorChartsPaletteCategorical36: "{colorChartsBlue2400}",
3269
- colorChartsPaletteCategorical37: "{colorChartsPink600}",
3270
- colorChartsPaletteCategorical38: "{colorChartsTeal400}",
3271
- colorChartsPaletteCategorical39: "{colorChartsPurple600}",
3272
- colorChartsPaletteCategorical40: "{colorChartsOrange400}",
3273
- colorChartsPaletteCategorical41: "{colorChartsBlue2700}",
3274
- colorChartsPaletteCategorical42: "{colorChartsPink900}",
3275
- colorChartsPaletteCategorical43: "{colorChartsTeal700}",
3276
- colorChartsPaletteCategorical44: "{colorChartsPurple900}",
3277
- colorChartsPaletteCategorical45: "{colorChartsOrange700}",
3278
- colorChartsPaletteCategorical46: "{colorChartsBlue21000}",
3279
- colorChartsPaletteCategorical47: "{colorChartsPink1200}",
3280
- colorChartsPaletteCategorical48: "{colorChartsTeal1000}",
3281
- colorChartsPaletteCategorical49: "{colorChartsPurple1200}",
3282
- colorChartsPaletteCategorical50: "{colorChartsOrange1000}"
3283
- };
3284
- const chartColorTokens = resolveColorTokens(rawChartColorTokens);
3285
- const categoricalChartColorKeys = Object.keys(chartColorTokens).filter((key)=>key.startsWith("colorChartsPaletteCategorical"));
3286
- const categoricalChartColorTokens = categoricalChartColorKeys.reduce((acc, key)=>{
3287
- acc[key] = chartColorTokens[key];
3288
- return acc;
3289
- }, {});
3290
- const categoricalChartsColors = categoricalChartColorKeys.map((key)=>chartColorTokens[key]);
3291
- const useCharts = ()=>{
3292
- const { theme } = useDS();
3293
- const themedChartColorTokens = getTokensByTheme(chartColorTokens, theme);
3294
- const axisLineColor = themedChartColorTokens["colorChartsLineAxis"];
3295
- const splitLineColor = themedChartColorTokens["colorChartsLineGrid"];
3296
- const axisLabelColor = themedChartColorTokens["colorChartsLabelAxis"];
3297
- const categoricalColors = getColorsByTheme(categoricalChartColorTokens, theme);
3298
- const echartsAxisConfig = {
3299
- axisLine: {
3300
- lineStyle: {
3301
- color: axisLineColor
3302
- }
3303
- },
3304
- splitLine: {
3305
- lineStyle: {
3306
- color: splitLineColor
3307
- }
3308
- },
3309
- axisLabel: {
3310
- color: axisLabelColor,
3311
- fontFamily: "InterVariable"
3312
- }
3313
- };
3314
- return {
3315
- axisLineColor,
3316
- splitLineColor,
3317
- axisLabelColor,
3318
- categoricalColors,
3319
- echartsAxisConfig
3320
- };
3321
- };
3322
- var __webpack_exports__Affix = __WEBPACK_EXTERNAL_MODULE_antd__.Affix;
3323
- var __webpack_exports__Alert = __WEBPACK_EXTERNAL_MODULE_antd__.Alert;
3324
- var __webpack_exports__Anchor = __WEBPACK_EXTERNAL_MODULE_antd__.Anchor;
3325
- var __webpack_exports__App = __WEBPACK_EXTERNAL_MODULE_antd__.App;
3326
- var __webpack_exports__AutoComplete = __WEBPACK_EXTERNAL_MODULE_antd__.AutoComplete;
3327
- var __webpack_exports__Avatar = __WEBPACK_EXTERNAL_MODULE_antd__.Avatar;
3328
- var __webpack_exports__BackTop = __WEBPACK_EXTERNAL_MODULE_antd__.BackTop;
3329
- var __webpack_exports__Calendar = __WEBPACK_EXTERNAL_MODULE_antd__.Calendar;
3330
- var __webpack_exports__Card = __WEBPACK_EXTERNAL_MODULE_antd__.Card;
3331
- var __webpack_exports__Carousel = __WEBPACK_EXTERNAL_MODULE_antd__.Carousel;
3332
- var __webpack_exports__Cascader = __WEBPACK_EXTERNAL_MODULE_antd__.Cascader;
3333
- var __webpack_exports__Col = __WEBPACK_EXTERNAL_MODULE_antd__.Col;
3334
- var __webpack_exports__Collapse = __WEBPACK_EXTERNAL_MODULE_antd__.Collapse;
3335
- var __webpack_exports__ColorPicker = __WEBPACK_EXTERNAL_MODULE_antd__.ColorPicker;
3336
- var __webpack_exports__ConfigProvider = __WEBPACK_EXTERNAL_MODULE_antd__.ConfigProvider;
3337
- var __webpack_exports__DatePicker = __WEBPACK_EXTERNAL_MODULE_antd__.DatePicker;
3338
- var __webpack_exports__Descriptions = __WEBPACK_EXTERNAL_MODULE_antd__.Descriptions;
3339
- var __webpack_exports__Divider = __WEBPACK_EXTERNAL_MODULE_antd__.Divider;
3340
- var __webpack_exports__Drawer = __WEBPACK_EXTERNAL_MODULE_antd__.Drawer;
3341
- var __webpack_exports__Dropdown = __WEBPACK_EXTERNAL_MODULE_antd__.Dropdown;
3342
- var __webpack_exports__Flex = __WEBPACK_EXTERNAL_MODULE_antd__.Flex;
3343
- var __webpack_exports__FloatButton = __WEBPACK_EXTERNAL_MODULE_antd__.FloatButton;
3344
- var __webpack_exports__Grid = __WEBPACK_EXTERNAL_MODULE_antd__.Grid;
3345
- var __webpack_exports__InputNumber = __WEBPACK_EXTERNAL_MODULE_antd__.InputNumber;
3346
- var __webpack_exports__Layout = __WEBPACK_EXTERNAL_MODULE_antd__.Layout;
3347
- var __webpack_exports__List = __WEBPACK_EXTERNAL_MODULE_antd__.List;
3348
- var __webpack_exports__Mentions = __WEBPACK_EXTERNAL_MODULE_antd__.Mentions;
3349
- var __webpack_exports__Menu = __WEBPACK_EXTERNAL_MODULE_antd__.Menu;
3350
- var __webpack_exports__Pagination = __WEBPACK_EXTERNAL_MODULE_antd__.Pagination;
3351
- var __webpack_exports__Popconfirm = __WEBPACK_EXTERNAL_MODULE_antd__.Popconfirm;
3352
- var __webpack_exports__Progress = __WEBPACK_EXTERNAL_MODULE_antd__.Progress;
3353
- var __webpack_exports__QRCode = __WEBPACK_EXTERNAL_MODULE_antd__.QRCode;
3354
- var __webpack_exports__Rate = __WEBPACK_EXTERNAL_MODULE_antd__.Rate;
3355
- var __webpack_exports__Result = __WEBPACK_EXTERNAL_MODULE_antd__.Result;
3356
- var __webpack_exports__Row = __WEBPACK_EXTERNAL_MODULE_antd__.Row;
3357
- var __webpack_exports__Skeleton = __WEBPACK_EXTERNAL_MODULE_antd__.Skeleton;
3358
- var __webpack_exports__Space = __WEBPACK_EXTERNAL_MODULE_antd__.Space;
3359
- var __webpack_exports__Statistic = __WEBPACK_EXTERNAL_MODULE_antd__.Statistic;
3360
- var __webpack_exports__Steps = __WEBPACK_EXTERNAL_MODULE_antd__.Steps;
3361
- var __webpack_exports__Tabs = __WEBPACK_EXTERNAL_MODULE_antd__.Tabs;
3362
- var __webpack_exports__TimePicker = __WEBPACK_EXTERNAL_MODULE_antd__.TimePicker;
3363
- var __webpack_exports__Timeline = __WEBPACK_EXTERNAL_MODULE_antd__.Timeline;
3364
- var __webpack_exports__Transfer = __WEBPACK_EXTERNAL_MODULE_antd__.Transfer;
3365
- var __webpack_exports__TreeSelect = __WEBPACK_EXTERNAL_MODULE_antd__.TreeSelect;
3366
- var __webpack_exports__Typography = __WEBPACK_EXTERNAL_MODULE_antd__.Typography;
3367
- var __webpack_exports__Watermark = __WEBPACK_EXTERNAL_MODULE_antd__.Watermark;
3368
- var __webpack_exports__message = __WEBPACK_EXTERNAL_MODULE_antd__.message;
3369
- var __webpack_exports__notification = __WEBPACK_EXTERNAL_MODULE_antd__.notification;
3370
- var __webpack_exports__theme = __WEBPACK_EXTERNAL_MODULE_antd__.theme;
3371
- var __webpack_exports__unstableSetRender = __WEBPACK_EXTERNAL_MODULE_antd__.unstableSetRender;
3372
- var __webpack_exports__useApp = __WEBPACK_EXTERNAL_MODULE_antd_es_app_useApp_90d95086__["default"];
3373
- var __webpack_exports__useForm = __WEBPACK_EXTERNAL_MODULE_antd_es_form_Form_38f624ac__.useForm;
3374
- var __webpack_exports__useWatch = __WEBPACK_EXTERNAL_MODULE_antd_es_form_Form_38f624ac__.useWatch;
3375
- var __webpack_exports__version = __WEBPACK_EXTERNAL_MODULE_antd__.version;
3376
- export { Badge, Breadcrumb, Button, Checkbox, CodeBlock, DSRoot, DefaultUpload, DropdownMenu, Empty, EmptyIcon, Field, Form, IconButton, Input, Modal_Modal as Modal, Popover, PopupPanel, Radio, ScrollArea, Segmented, Select, Slider, Spin, Split, Splitter, Switch, Table, component_Tag as Tag, ThemeProvider, Toast, Tooltip, Tour, Transition, Tree, Truncate, Upload, VerticalCollapsiblePanel, WithAntdTokens, antdColorTokens, categoricalChartColorKeys, categoricalChartColorTokens, categoricalChartsColors, chartColorTokens, clsx, cn, cx, darkTheme, getUniqueKeysFromOriginals, isTracebackError, lightTheme, parseAntdPlacement, processTreeData, rawChartColorTokens, reactNodeToString, function_toast as toast, toastManager, useAnimationsFinished, useAntdCssVarClassname, useBreakpoint, useCharts, useCls, useControlledState, useEnhancedEffect, useEventCallback, useGetPrefixCls, useLatestRef, useMessage, antd_useModal as useModal, useToken, useUniqueKeysTree, useUploadItemRender, __webpack_exports__Affix as Affix, __webpack_exports__Alert as Alert, __webpack_exports__Anchor as Anchor, __webpack_exports__App as App, __webpack_exports__AutoComplete as AutoComplete, __webpack_exports__Avatar as Avatar, __webpack_exports__BackTop as BackTop, __webpack_exports__Calendar as Calendar, __webpack_exports__Card as Card, __webpack_exports__Carousel as Carousel, __webpack_exports__Cascader as Cascader, __webpack_exports__Col as Col, __webpack_exports__Collapse as Collapse, __webpack_exports__ColorPicker as ColorPicker, __webpack_exports__ConfigProvider as ConfigProvider, __webpack_exports__DatePicker as DatePicker, __webpack_exports__Descriptions as Descriptions, __webpack_exports__Divider as Divider, __webpack_exports__Drawer as Drawer, __webpack_exports__Dropdown as Dropdown, __webpack_exports__Flex as Flex, __webpack_exports__FloatButton as FloatButton, __webpack_exports__Grid as Grid, __webpack_exports__InputNumber as InputNumber, __webpack_exports__Layout as Layout, __webpack_exports__List as List, __webpack_exports__Mentions as Mentions, __webpack_exports__Menu as Menu, __webpack_exports__Pagination as Pagination, __webpack_exports__Popconfirm as Popconfirm, __webpack_exports__Progress as Progress, __webpack_exports__QRCode as QRCode, __webpack_exports__Rate as Rate, __webpack_exports__Result as Result, __webpack_exports__Row as Row, __webpack_exports__Skeleton as Skeleton, __webpack_exports__Space as Space, __webpack_exports__Statistic as Statistic, __webpack_exports__Steps as Steps, __webpack_exports__Tabs as Tabs, __webpack_exports__TimePicker as TimePicker, __webpack_exports__Timeline as Timeline, __webpack_exports__Transfer as Transfer, __webpack_exports__TreeSelect as TreeSelect, __webpack_exports__Typography as Typography, __webpack_exports__Watermark as Watermark, __webpack_exports__message as message, __webpack_exports__notification as notification, __webpack_exports__theme as theme, __webpack_exports__unstableSetRender as unstableSetRender, __webpack_exports__useApp as useApp, __webpack_exports__useForm as useForm, __webpack_exports__useWatch as useWatch, __webpack_exports__version as version };
1
+ import { componentMetadata as r, getComponentsByCategory as t } from "./metadata.js";
2
+ import { Affix as p, Alert as m, Anchor as s, App as f, AutoComplete as n, Avatar as x, BackTop as l, Calendar as i, Card as c, Carousel as u, Cascader as d, Col as C, Collapse as T, ColorPicker as h, ConfigProvider as k, DatePicker as g, Descriptions as S, Divider as P, Drawer as A, Dropdown as y, Flex as b, FloatButton as B, Grid as D, InputNumber as R, Layout as M, List as v, Mentions as F, Menu as w, Pagination as E, Popconfirm as I, Progress as U, QRCode as K, Rate as L, Result as W, Row as q, Skeleton as G, Space as N, Statistic as V, Steps as O, Tabs as Q, TimePicker as j, Timeline as z, Transfer as H, TreeSelect as J, Typography as X, Watermark as Y, message as Z, notification as _, theme as $, unstableSetRender as oo, version as eo } from "antd";
3
+ import { Select as to } from "./components/Select/component.js";
4
+ import { Modal as po } from "./components/Modal/index.js";
5
+ import { IconButton as so } from "./components/IconButton/component.js";
6
+ import { Switch as no } from "./components/Switch/component.js";
7
+ import { Checkbox as lo } from "./components/Checkbox/component.js";
8
+ import { Segmented as co } from "./components/Segmented/component.js";
9
+ import { Table as Co } from "./components/Table/component.js";
10
+ import { Tag as ho } from "./components/Tag/component.js";
11
+ import { ThemeProvider as go } from "./components/ThemeProvider/component.js";
12
+ import { Split as Po, Splitter as Ao } from "./components/Splitter/component.js";
13
+ import { Truncate as bo } from "./components/Truncate/component.js";
14
+ import { DropdownMenu as Do } from "./components/DropdownMenu/component.js";
15
+ import { clsx as Mo, cn as vo, cx as Fo } from "./components/utils/cn.js";
16
+ import { reactNodeToString as Eo } from "./components/utils/reactToString.js";
17
+ import { isTracebackError as Uo } from "./components/utils/isTracebackError.js";
18
+ import { parseAntdPlacement as Lo, useAntdCssVarClassname as Wo, useCls as qo, useGetPrefixCls as Go } from "./components/utils/antdUtils.js";
19
+ import { WithAntdTokens as Vo } from "./components/utils/WithAntdTokens.js";
20
+ import { Transition as Qo } from "./components/Transition/component.js";
21
+ import { DefaultUpload as zo, Upload as Ho } from "./components/Upload/component.js";
22
+ import { useUploadItemRender as Xo } from "./components/Upload/hooks.js";
23
+ import { ScrollArea as Zo } from "./components/ScrollArea/component.js";
24
+ import { Popover as $o } from "./components/Popover/component.js";
25
+ import { Slider as ee } from "./components/Slider/component.js";
26
+ import { Tooltip as te } from "./components/Tooltip/component.js";
27
+ import { Breadcrumb as pe } from "./components/Breadcrumb/component.js";
28
+ import { useUniqueKeysTree as se } from "./components/Tree/useUniqueKeysTree.js";
29
+ import { getUniqueKeysFromOriginals as ne, processTreeData as xe } from "./components/Tree/helpers.js";
30
+ import { Tree as ie } from "./components/Tree/components.js";
31
+ import { Spin as ue } from "./components/Spin/component.js";
32
+ import { Empty as Ce, EmptyIcon as Te } from "./components/Empty/component.js";
33
+ import { Form as ke } from "./components/Form/component.js";
34
+ import { Field as Se } from "./components/Field/component.js";
35
+ import { Tour as Ae } from "./components/Tour/component.js";
36
+ import { Toast as be } from "./components/Toast/component.js";
37
+ import { toast as De, toastManager as Re } from "./components/Toast/function.js";
38
+ import { VerticalCollapsiblePanel as ve } from "./components/VerticalCollapsiblePanel/component.js";
39
+ import { PopupPanel as we } from "./components/PopupPanel/component.js";
40
+ import { CodeBlock as Ie } from "./components/CodeBlock/component.js";
41
+ import { StackChild as Ke } from "./components/Stack/StackChild.js";
42
+ import { Stack as We } from "./components/Stack/index.js";
43
+ import { Input as Ge } from "./components/Input/component.js";
44
+ import { Badge as Ve } from "./components/Badge/component.js";
45
+ import { Radio as Qe } from "./components/Radio/component.js";
46
+ import { Button as ze } from "./components/Button/component.js";
47
+ import { DSRoot as Je } from "./components/DSRoot/component.js";
48
+ import { useForm as Ye, useWatch as Ze } from "antd/es/form/Form";
49
+ import { useBreakpoint as $e, useMessage as or, useModal as er, useToken as rr } from "./components/hooks/antd.js";
50
+ import { default as ar } from "antd/es/app/useApp";
51
+ import { useAnimationsFinished as mr, useEnhancedEffect as sr, useEventCallback as fr, useLatestRef as nr } from "./components/hooks/base-ui.js";
52
+ import { useControlledState as lr } from "./components/hooks/useControlledState.js";
53
+ import { useCharts as cr } from "./components/hooks/useCharts.js";
54
+ import { antdColorTokens as dr, darkTheme as Cr, lightTheme as Tr } from "./tokens/and-theme/tokens.js";
55
+ import { categoricalChartColorKeys as kr, categoricalChartColorTokens as gr, categoricalChartsColors as Sr } from "./tokens/charts/index.js";
56
+ import { chartColorTokens as Ar, rawChartColorTokens as yr } from "./tokens/charts/tokens.js";
57
+ export {
58
+ p as Affix,
59
+ m as Alert,
60
+ s as Anchor,
61
+ f as App,
62
+ n as AutoComplete,
63
+ x as Avatar,
64
+ l as BackTop,
65
+ Ve as Badge,
66
+ pe as Breadcrumb,
67
+ ze as Button,
68
+ i as Calendar,
69
+ c as Card,
70
+ u as Carousel,
71
+ d as Cascader,
72
+ lo as Checkbox,
73
+ Ie as CodeBlock,
74
+ C as Col,
75
+ T as Collapse,
76
+ h as ColorPicker,
77
+ k as ConfigProvider,
78
+ Je as DSRoot,
79
+ g as DatePicker,
80
+ zo as DefaultUpload,
81
+ S as Descriptions,
82
+ P as Divider,
83
+ A as Drawer,
84
+ y as Dropdown,
85
+ Do as DropdownMenu,
86
+ Ce as Empty,
87
+ Te as EmptyIcon,
88
+ Se as Field,
89
+ b as Flex,
90
+ B as FloatButton,
91
+ ke as Form,
92
+ D as Grid,
93
+ so as IconButton,
94
+ Ge as Input,
95
+ R as InputNumber,
96
+ M as Layout,
97
+ v as List,
98
+ F as Mentions,
99
+ w as Menu,
100
+ po as Modal,
101
+ E as Pagination,
102
+ I as Popconfirm,
103
+ $o as Popover,
104
+ we as PopupPanel,
105
+ U as Progress,
106
+ K as QRCode,
107
+ Qe as Radio,
108
+ L as Rate,
109
+ W as Result,
110
+ q as Row,
111
+ Zo as ScrollArea,
112
+ co as Segmented,
113
+ to as Select,
114
+ G as Skeleton,
115
+ ee as Slider,
116
+ N as Space,
117
+ ue as Spin,
118
+ Po as Split,
119
+ Ao as Splitter,
120
+ We as Stack,
121
+ Ke as StackChild,
122
+ V as Statistic,
123
+ O as Steps,
124
+ no as Switch,
125
+ Co as Table,
126
+ Q as Tabs,
127
+ ho as Tag,
128
+ go as ThemeProvider,
129
+ j as TimePicker,
130
+ z as Timeline,
131
+ be as Toast,
132
+ te as Tooltip,
133
+ Ae as Tour,
134
+ H as Transfer,
135
+ Qo as Transition,
136
+ ie as Tree,
137
+ J as TreeSelect,
138
+ bo as Truncate,
139
+ X as Typography,
140
+ Ho as Upload,
141
+ ve as VerticalCollapsiblePanel,
142
+ Y as Watermark,
143
+ Vo as WithAntdTokens,
144
+ dr as antdColorTokens,
145
+ kr as categoricalChartColorKeys,
146
+ gr as categoricalChartColorTokens,
147
+ Sr as categoricalChartsColors,
148
+ Ar as chartColorTokens,
149
+ Mo as clsx,
150
+ vo as cn,
151
+ r as componentMetadata,
152
+ Fo as cx,
153
+ Cr as darkTheme,
154
+ t as getComponentsByCategory,
155
+ ne as getUniqueKeysFromOriginals,
156
+ Uo as isTracebackError,
157
+ Tr as lightTheme,
158
+ Z as message,
159
+ _ as notification,
160
+ Lo as parseAntdPlacement,
161
+ xe as processTreeData,
162
+ yr as rawChartColorTokens,
163
+ Eo as reactNodeToString,
164
+ $ as theme,
165
+ De as toast,
166
+ Re as toastManager,
167
+ oo as unstableSetRender,
168
+ mr as useAnimationsFinished,
169
+ Wo as useAntdCssVarClassname,
170
+ ar as useApp,
171
+ $e as useBreakpoint,
172
+ cr as useCharts,
173
+ qo as useCls,
174
+ lr as useControlledState,
175
+ sr as useEnhancedEffect,
176
+ fr as useEventCallback,
177
+ Ye as useForm,
178
+ Go as useGetPrefixCls,
179
+ nr as useLatestRef,
180
+ or as useMessage,
181
+ er as useModal,
182
+ rr as useToken,
183
+ se as useUniqueKeysTree,
184
+ Xo as useUploadItemRender,
185
+ Ze as useWatch,
186
+ eo as version
187
+ };
188
+ //# sourceMappingURL=index.js.map