@unicom-cloud/ui 0.8.108 → 0.8.109

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 (760) hide show
  1. package/Affix.js +9 -10
  2. package/Alert.js +5 -6
  3. package/AutoComplete.js +9 -10
  4. package/BackTop.js +9 -10
  5. package/Badge.js +9 -10
  6. package/Breadcrumb.js +9 -10
  7. package/Button.js +8 -9
  8. package/Calendar.js +9 -12
  9. package/Card.js +8 -9
  10. package/Carousel.js +8 -9
  11. package/Cascader.js +2 -2
  12. package/Checkbox.js +7 -9
  13. package/Collapse.js +2 -3
  14. package/ColorPicker.js +6 -8
  15. package/Comment.js +5 -6
  16. package/ConfigProvider.js +5 -6
  17. package/Copy.js +11 -17
  18. package/Countdown.js +19 -11
  19. package/DatePicker.js +8 -13
  20. package/Descriptions.js +4 -5
  21. package/Details.js +20 -11
  22. package/Development.js +3 -5
  23. package/Divider.js +5 -6
  24. package/Draggable.js +3 -4
  25. package/Dropdown.js +10 -12
  26. package/Empty.js +3 -6
  27. package/Flex.js +20 -12
  28. package/Form.js +13 -17
  29. package/Icon.js +6 -7
  30. package/IconHover.js +2 -4
  31. package/Image.js +5 -5
  32. package/Input.js +12 -17
  33. package/InputNumber.js +5 -7
  34. package/Layout.js +11 -12
  35. package/Link.js +5 -6
  36. package/LiquidFill.js +23 -22
  37. package/List.js +9 -10
  38. package/Loading.js +19 -10
  39. package/Marquee.js +23 -22
  40. package/Mentions.js +5 -6
  41. package/Menu.js +6 -7
  42. package/Message.js +6 -13
  43. package/Modal.js +3 -4
  44. package/Notice.js +18 -11
  45. package/Notification.js +7 -13
  46. package/OverflowEllipsis.js +7 -6
  47. package/PageHeader.js +7 -9
  48. package/Popconfirm.js +5 -6
  49. package/Popover.js +5 -6
  50. package/Progress.js +5 -6
  51. package/QrCode.js +22 -21
  52. package/Radio.js +6 -8
  53. package/Rate.js +5 -6
  54. package/ResizeBox.js +11 -12
  55. package/Result.js +4 -5
  56. package/Segmented.js +21 -12
  57. package/SelectView.js +2 -2
  58. package/Skeleton.js +5 -6
  59. package/Slider.js +8 -11
  60. package/Space.js +20 -12
  61. package/SpeechSynthesis.js +2 -4
  62. package/Spin.js +5 -6
  63. package/Statistic.js +8 -10
  64. package/Steps.js +8 -9
  65. package/SuspenseFallbackTest.js +2 -2
  66. package/Switch.js +8 -13
  67. package/Table.js +15 -26
  68. package/Tabs.js +5 -5
  69. package/Tag.js +7 -9
  70. package/Tooltip.js +6 -7
  71. package/Tour.js +23 -23
  72. package/Transfer.js +7 -8
  73. package/Tree.js +1 -1
  74. package/TreeSelect.js +4 -3
  75. package/Trigger.js +12 -17
  76. package/Upload.js +5 -6
  77. package/affix/index.js +29 -30
  78. package/alert/index.js +33 -34
  79. package/anchor/Anchor.js +102 -104
  80. package/anchor/Link.js +15 -16
  81. package/anchor/util.js +6 -7
  82. package/app/App.js +9 -13
  83. package/auto-complete/index.js +84 -85
  84. package/avatar/Avatar.js +17 -18
  85. package/avatar/Group.js +9 -10
  86. package/back-top/index.js +27 -28
  87. package/badge/Count.js +11 -11
  88. package/badge/index.js +51 -52
  89. package/breadcrumb/Item.js +11 -11
  90. package/breadcrumb/index.js +33 -33
  91. package/button/Group.js +7 -8
  92. package/button/index.js +12 -13
  93. package/calendar/Lunar.js +1 -1
  94. package/calendar/Month.js +10 -140
  95. package/calendar/Year.js +22 -23
  96. package/calendar/index.js +283 -134
  97. package/card/Grid.js +7 -8
  98. package/card/Meta.js +12 -13
  99. package/card/index.js +17 -18
  100. package/carousel/Arrow.js +9 -10
  101. package/carousel/Indicator.js +23 -24
  102. package/carousel/index.js +31 -33
  103. package/cascader/Cascader.js +24 -286
  104. package/cascader/index.js +2 -2
  105. package/cascader/util.js +14 -65
  106. package/checkbox/Checkbox.js +17 -123
  107. package/checkbox/Group.js +12 -95
  108. package/checkbox/GroupBlock.js +7 -61
  109. package/checkbox/index.js +7 -8
  110. package/chunk/-PX9OR3r.js +154 -0
  111. package/{components/common/hooks/useMergeValue.js → chunk/2vdCeheu.js} +8 -8
  112. package/chunk/5_U1CBIu.js +8 -0
  113. package/chunk/8w-ItYb1.js +9 -0
  114. package/chunk/9WWq1a0I.js +644 -0
  115. package/chunk/B--6x-RL.js +27 -0
  116. package/chunk/B4h3m4Jx.js +69 -0
  117. package/chunk/B5RFT17G.js +15 -0
  118. package/{components/common/utils/getHighlightText.js → chunk/B7M-FGia.js} +10 -11
  119. package/chunk/B8W1N4er.js +29 -0
  120. package/chunk/B9YvSTvI.js +2321 -0
  121. package/chunk/BDKb_-wj.js +1813 -0
  122. package/{components/common/utils/setTheme.js → chunk/BE7UY3my.js} +3 -4
  123. package/chunk/BJ9_azwQ.js +1391 -0
  124. package/chunk/BJeTDXdz.js +8 -0
  125. package/chunk/BKKEev13.js +11 -0
  126. package/{components/common/hooks/useListenResize.js → chunk/BL9DMeor.js} +1 -1
  127. package/chunk/BLOlsa0k.js +11 -0
  128. package/chunk/BTLlOOe9.js +189 -0
  129. package/chunk/BfBHo0RR.js +470 -0
  130. package/chunk/Bg3uJGPu.js +10 -0
  131. package/chunk/Bm3gJPkz.js +925 -0
  132. package/{components/common/hooks/useOverflowHidden.js → chunk/BqWBaRtM.js} +1 -1
  133. package/chunk/Bz3KT4sO.js +573 -0
  134. package/{components/common/utils/mutationObserver.js → chunk/C0pqKVwu.js} +6 -7
  135. package/chunk/C6A94b7f.js +31 -0
  136. package/chunk/C6Aw3qIJ.js +16 -0
  137. package/chunk/CMl7m9nA.js +6 -0
  138. package/chunk/COqvRD0G.js +11 -0
  139. package/{color-picker/hooks/useControlBlock.js → chunk/CQPG8hFg.js} +7 -7
  140. package/chunk/CRdegvoa.js +14 -0
  141. package/chunk/CTMmW21t.js +13 -0
  142. package/chunk/CXrVhA6-.js +54 -0
  143. package/chunk/CYhxqVkn.js +9 -0
  144. package/chunk/CdXR6dj7.js +4 -0
  145. package/chunk/CftuXmo_.js +6 -0
  146. package/chunk/CjNkKiBA.js +7 -0
  147. package/chunk/ClqoGc3r.js +17 -0
  148. package/chunk/D1iEYgh3.js +27 -0
  149. package/chunk/DE-83rKc.js +23 -0
  150. package/chunk/DEpQcf8m.js +20 -0
  151. package/chunk/DGSfSsAY.js +164 -0
  152. package/chunk/DGU7ULZK.js +86 -0
  153. package/{components/common/utils/mergeProps.js → chunk/DH7HTOV_.js} +2 -3
  154. package/{components/common/utils/getStringLength.js → chunk/DKHXj8Kf.js} +2 -3
  155. package/{components/common/utils/dayjs.js → chunk/DS_deHpN.js} +55 -56
  156. package/{components/common/suspense-fallback-test/index.js → chunk/DX1O8GPj.js} +1 -1
  157. package/chunk/DXlwLh0Y.js +806 -0
  158. package/chunk/DYc9a7tm.js +261 -0
  159. package/chunk/DblEjsQ8.js +231 -0
  160. package/chunk/DfChiMIE.js +15 -0
  161. package/chunk/DgWzb7M5.js +1470 -0
  162. package/{components/common/utils/getHotkeyHandler.js → chunk/Dh7Osrvr.js} +5 -6
  163. package/chunk/DjPTURUf.js +209 -0
  164. package/{components/common/hooks/useMedia.js → chunk/DlSv5Vu0.js} +6 -6
  165. package/{components/common/hooks/usePersistCallback.js → chunk/DmDh7NRL.js} +6 -6
  166. package/chunk/DryCfcSV.js +833 -0
  167. package/chunk/DsaQZE4X.js +45 -0
  168. package/chunk/Dt2nDgq_.js +178 -0
  169. package/{components/common/hooks/useStateWithPromise.js → chunk/Duezix3m.js} +6 -6
  170. package/chunk/DxYoPlum.js +50 -0
  171. package/{components/common/hooks/useMergeProps.js → chunk/FgWHhRFz.js} +4 -6
  172. package/{dist/scroll-into-view-if-needed/smooth/index.js → chunk/LTS4rIKA.js} +13 -13
  173. package/chunk/RjJoagzL.js +24 -0
  174. package/chunk/Ry6vahfr.js +15 -0
  175. package/chunk/cW_5U6dL.js +28 -0
  176. package/{components/common/utils/dom.js → chunk/d1c9z8T1.js} +14 -14
  177. package/{dist/validate/src/index.js → chunk/hc_ufgVf.js} +151 -91
  178. package/{components/common/hooks/useIsFirstRender.js → chunk/oopARUrq.js} +1 -1
  179. package/chunk/p9jiLDTk.js +296 -0
  180. package/{components/common/hooks/usePrefersColorSchemeDark.js → chunk/rT6qmv-Y.js} +5 -5
  181. package/{components/common/hooks/useWindowSize.js → chunk/siEVY1s5.js} +6 -6
  182. package/chunk/yXI2bb8U.js +110 -0
  183. package/{components/common/hooks/useOnlineStatus.js → chunk/zmmqLCF4.js} +1 -1
  184. package/collapse/Collapse.js +234 -69
  185. package/collapse/Item.js +9 -179
  186. package/collapse/index.js +1 -1
  187. package/color-picker/ControlBar.js +18 -19
  188. package/color-picker/InputAlpha.js +10 -11
  189. package/color-picker/InputHex.js +23 -24
  190. package/color-picker/InputRgb.js +16 -18
  191. package/color-picker/Palette.js +10 -11
  192. package/color-picker/Panel.js +44 -46
  193. package/color-picker/index.js +237 -121
  194. package/comment/index.js +17 -18
  195. package/config-provider/ConfigProvider.js +12 -57
  196. package/config-provider/context.js +7 -24
  197. package/config-provider/index.js +5 -6
  198. package/copy/index.js +29 -35
  199. package/countdown/index.js +47 -39
  200. package/countdown/util.js +1 -1
  201. package/date-picker/Picker.js +86 -88
  202. package/date-picker/RangePicker.js +22 -580
  203. package/date-picker/index.js +22 -27
  204. package/date-picker/util.js +6 -6
  205. package/descriptions/index.js +24 -25
  206. package/details/index.js +49 -40
  207. package/development/index.js +55 -16
  208. package/divider/index.js +12 -13
  209. package/draggable/index.js +17 -18
  210. package/drawer/Drawer.js +63 -65
  211. package/dropdown/Button.js +9 -88
  212. package/dropdown/index.js +168 -90
  213. package/empty/index.js +5 -21
  214. package/flex/index.js +105 -31
  215. package/form/Control.js +172 -210
  216. package/form/Form.js +14 -155
  217. package/form/FormItem.js +46 -42
  218. package/form/FormLabel.js +33 -41
  219. package/form/FormList.js +3 -3
  220. package/form/context.js +1 -1
  221. package/form/index.js +101 -28
  222. package/form/promisify.js +4 -5
  223. package/form/store.js +212 -284
  224. package/form/util.js +19 -19
  225. package/grid/Grid.js +26 -27
  226. package/grid/Item.js +13 -14
  227. package/hooks/index.js +134 -56
  228. package/hooks/useCreate.js +2 -2
  229. package/hooks/useForceUpdate.js +2 -2
  230. package/hooks/useId.js +2 -2
  231. package/hooks/useInView.js +2 -2
  232. package/hooks/useIntersectionObserver.js +2 -2
  233. package/hooks/useInterval.js +2 -2
  234. package/hooks/useIsFirstRender.js +2 -2
  235. package/hooks/useIsomorphicLayoutEffect.js +2 -2
  236. package/hooks/useKeyboardEvent.js +2 -2
  237. package/hooks/useListenResize.js +2 -2
  238. package/hooks/useMedia.js +2 -2
  239. package/hooks/useMergeProps.js +2 -2
  240. package/hooks/useMergeValue.js +2 -2
  241. package/hooks/useOnlineStatus.js +2 -2
  242. package/hooks/useOverflowHidden.js +2 -2
  243. package/hooks/useOverrideRef.js +2 -2
  244. package/hooks/usePersistCallback.js +2 -2
  245. package/hooks/usePrefersColorSchemeDark.js +2 -2
  246. package/hooks/usePrevious.js +2 -2
  247. package/hooks/useRefs.js +2 -2
  248. package/hooks/useResizeObserver.js +2 -2
  249. package/hooks/useResponsiveState.js +30 -30
  250. package/hooks/useStateCallback.js +2 -2
  251. package/hooks/useStateWithPromise.js +2 -2
  252. package/hooks/useUpdateEffect.js +2 -2
  253. package/hooks/useVerificationCode.js +2 -2
  254. package/hooks/useWatch.js +2 -2
  255. package/hooks/useWatermark.js +81 -76
  256. package/hooks/useWindowSize.js +2 -2
  257. package/icon/addFromIconFontCn.js +5 -31
  258. package/icon/index.js +49 -23
  259. package/icon-hover/index.js +5 -37
  260. package/icons/file.js +64 -14
  261. package/image/Image.js +43 -48
  262. package/image/ImageFooter.js +6 -44
  263. package/image/ImagePreview.js +45 -478
  264. package/image/ImagePreviewArrow.js +7 -8
  265. package/image/ImagePreviewGroup.js +23 -23
  266. package/image/index.js +3 -3
  267. package/index.js +726 -687
  268. package/input/Button.js +9 -70
  269. package/input/Group.js +8 -9
  270. package/input/Input.js +683 -157
  271. package/input/InputElement.js +12 -12
  272. package/input/Number.js +2 -2
  273. package/input/Password.js +11 -69
  274. package/input/Search.js +11 -64
  275. package/input/Textarea.js +14 -169
  276. package/input/index.js +13 -17
  277. package/input-number/decimal.js +17 -28
  278. package/input-number/index.js +16 -207
  279. package/input-number/useSelectionRange.js +3 -3
  280. package/input-tag/InputTag.js +111 -117
  281. package/layout/Content.js +6 -7
  282. package/layout/Footer.js +5 -6
  283. package/layout/Header.js +6 -7
  284. package/layout/Sider.js +13 -14
  285. package/layout/index.js +19 -20
  286. package/link/index.js +17 -18
  287. package/liquid-fill/index.js +48 -47
  288. package/list/Item.js +10 -11
  289. package/list/Meta.js +6 -7
  290. package/list/index.js +34 -35
  291. package/loading/index.js +40 -31
  292. package/locale/en-US.js +3 -4
  293. package/locale/tr-TR.js +3 -4
  294. package/marquee/index.js +30 -29
  295. package/marquee-/index.js +59 -59
  296. package/mentions/index.js +41 -42
  297. package/menu/Item.js +10 -10
  298. package/menu/Menu.js +24 -180
  299. package/menu/OverflowWrap.js +8 -87
  300. package/menu/index.js +9 -9
  301. package/message/index.js +13 -144
  302. package/message/useMessage.js +5 -56
  303. package/modal/Confirm.js +11 -108
  304. package/modal/Modal.js +21 -442
  305. package/modal/index.js +4 -4
  306. package/notice/index.js +28 -176
  307. package/notification/index.js +15 -144
  308. package/notification/useNotification.js +4 -52
  309. package/overflow-ellipsis/OverflowItem.js +9 -10
  310. package/overflow-ellipsis/index.js +36 -35
  311. package/package.json +1 -1
  312. package/page-header/index.js +56 -55
  313. package/pagination/PageItem.js +15 -16
  314. package/pagination/PageJumper.js +16 -17
  315. package/pagination/PageOption.js +22 -23
  316. package/pagination/Pagination.js +10 -11
  317. package/picker/Input.js +20 -22
  318. package/picker/InputRange.js +50 -52
  319. package/popconfirm/index.js +14 -15
  320. package/popover/index.js +10 -11
  321. package/portal/Portal.js +6 -6
  322. package/progress/CircleProgress.js +1 -1
  323. package/progress/LineProgess.js +1 -1
  324. package/progress/index.js +34 -35
  325. package/qr-code/index.js +30 -29
  326. package/radio/Group.js +14 -94
  327. package/radio/GroupBlock.js +8 -67
  328. package/radio/Radio.js +13 -89
  329. package/radio/index.js +5 -6
  330. package/rate/index.js +7 -8
  331. package/resize-box/ResizeTrigger.js +26 -27
  332. package/resize-box/Split.js +20 -21
  333. package/resize-box/SplitGroup.js +42 -43
  334. package/resize-box/index.js +23 -24
  335. package/result/index.js +17 -18
  336. package/row-col/Col-.js +16 -17
  337. package/row-col/Col.js +98 -112
  338. package/row-col/Row.js +8 -9
  339. package/segmented/index.js +55 -46
  340. package/select/OptGroup.js +10 -10
  341. package/select/Option.js +12 -13
  342. package/select/Select.js +67 -69
  343. package/select/util.js +11 -11
  344. package/select-view/Core.js +65 -67
  345. package/select-view/index.js +7 -7
  346. package/skeleton/index.js +17 -18
  347. package/slider/Button.js +26 -27
  348. package/slider/Input.js +19 -19
  349. package/slider/index.js +345 -220
  350. package/space/index.js +42 -34
  351. package/speech-synthesis/index.js +84 -9
  352. package/spin/DotLoading.js +8 -9
  353. package/spin/index.js +29 -30
  354. package/splitter/Panel.js +14 -15
  355. package/splitter/SplitBar.js +10 -155
  356. package/splitter/Splitter.js +249 -102
  357. package/statistic/index.js +30 -32
  358. package/steps/index.js +18 -19
  359. package/style.css +1 -1
  360. package/suspense-fallback-test/index.js +2 -2
  361. package/switch/index.js +32 -37
  362. package/table/ColGroup.js +9 -9
  363. package/table/Table.js +21 -611
  364. package/table/{summary/context.js → context.js} +2 -2
  365. package/table/index.js +166 -27
  366. package/tabs/Tab.js +16 -169
  367. package/tabs/TabContent.js +6 -51
  368. package/tabs/TabPane.js +7 -8
  369. package/tabs/index.js +6 -6
  370. package/tag/index.js +21 -23
  371. package/time-picker/Picker.js +34 -35
  372. package/time-picker/RangePicker.js +14 -14
  373. package/time-picker/TimeColumn.js +2 -2
  374. package/time-picker/TimePicker.js +18 -19
  375. package/time-picker/util.js +7 -7
  376. package/timeline/Item.js +7 -8
  377. package/timeline/Timeline.js +6 -7
  378. package/tooltip/index.js +19 -20
  379. package/tour/index.js +43 -43
  380. package/transfer/Item.js +21 -22
  381. package/transfer/List.js +33 -36
  382. package/transfer/index.js +29 -30
  383. package/tree/Animation.js +9 -97
  384. package/tree/Node.js +14 -206
  385. package/tree/NodeList.js +35 -35
  386. package/tree/Tree.js +434 -495
  387. package/tree/index.js +1 -1
  388. package/tree-select/List.js +17 -17
  389. package/tree-select/Select.js +330 -193
  390. package/tree-select/index.js +2 -2
  391. package/trigger/getPopupStyle.js +34 -34
  392. package/trigger/index.js +101 -103
  393. package/types/common/empty/index.d.ts +1 -1
  394. package/types/common/higher-order/with-speech-synthesis/index.d.ts +1 -1
  395. package/types/common/hooks/src/create-deep-compare-effect/index.d.ts +5 -0
  396. package/types/common/hooks/src/create-update-effect/index.d.ts +4 -0
  397. package/types/common/hooks/src/create-use-storage-state/index.d.ts +11 -0
  398. package/types/common/hooks/src/index.d.ts +78 -0
  399. package/types/common/hooks/src/use-async-effect/index.d.ts +3 -0
  400. package/types/common/hooks/src/use-boolean/index.d.ts +7 -0
  401. package/types/common/hooks/src/use-click-away/index.d.ts +4 -0
  402. package/types/common/hooks/src/use-controllable-value/index.d.ts +16 -0
  403. package/types/common/hooks/src/use-cookie-state/index.d.ts +7 -0
  404. package/types/common/hooks/src/use-count-down/index.d.ts +17 -0
  405. package/types/common/hooks/src/use-counter/index.d.ts +18 -0
  406. package/types/common/hooks/src/use-creation/index.d.ts +3 -0
  407. package/types/common/hooks/src/use-debounce/debounceOptions.d.ts +6 -0
  408. package/types/common/hooks/src/use-debounce/index.d.ts +3 -0
  409. package/types/common/hooks/src/use-debounce-effect/index.d.ts +4 -0
  410. package/types/common/hooks/src/use-debounce-fn/index.d.ts +8 -0
  411. package/types/common/hooks/src/use-deep-compare-effect/index.d.ts +3 -0
  412. package/types/common/hooks/src/use-deep-compare-layout-effect/index.d.ts +3 -0
  413. package/types/common/hooks/src/use-document-visibility/index.d.ts +3 -0
  414. package/types/common/hooks/src/use-drag/index.d.ts +13 -0
  415. package/types/common/hooks/src/use-drop/index.d.ts +15 -0
  416. package/types/common/hooks/src/use-dynamic-list/index.d.ts +18 -0
  417. package/types/common/hooks/src/use-event-emitter/index.d.ts +11 -0
  418. package/types/common/hooks/src/use-event-listener/index.d.ts +17 -0
  419. package/types/common/hooks/src/use-event-target/index.d.ts +14 -0
  420. package/types/common/hooks/src/use-external/index.d.ts +20 -0
  421. package/types/common/hooks/src/use-favicon/index.d.ts +2 -0
  422. package/types/common/hooks/src/use-focus-within/index.d.ts +7 -0
  423. package/types/common/hooks/src/use-fullscreen/index.d.ts +17 -0
  424. package/types/common/hooks/src/use-get-state/index.d.ts +9 -0
  425. package/types/common/hooks/src/use-history-travel/index.d.ts +10 -0
  426. package/types/common/hooks/src/use-hover/index.d.ts +8 -0
  427. package/types/common/hooks/src/use-in-viewport/index.d.ts +10 -0
  428. package/types/common/hooks/src/use-infinite-scroll/index.d.ts +15 -0
  429. package/types/common/hooks/src/use-infinite-scroll/types.d.ts +32 -0
  430. package/types/common/hooks/src/use-interval/index.d.ts +4 -0
  431. package/types/common/hooks/src/use-isomorphic-layout-effect/index.d.ts +3 -0
  432. package/types/common/hooks/src/use-key-press/index.d.ts +14 -0
  433. package/types/common/hooks/src/use-latest/index.d.ts +2 -0
  434. package/types/common/hooks/src/use-local-storage-state/index.d.ts +2 -0
  435. package/types/common/hooks/src/use-lock-fn/index.d.ts +2 -0
  436. package/types/common/hooks/src/use-long-press/index.d.ts +13 -0
  437. package/types/common/hooks/src/use-map/index.d.ts +8 -0
  438. package/types/common/hooks/src/use-memoized-fn/index.d.ts +4 -0
  439. package/types/common/hooks/src/use-mount/index.d.ts +3 -0
  440. package/types/common/hooks/src/use-mouse/index.d.ts +17 -0
  441. package/types/common/hooks/src/use-mutation-observer/index.d.ts +3 -0
  442. package/types/common/hooks/src/use-network/index.d.ts +12 -0
  443. package/types/common/hooks/src/use-pagination/index.d.ts +3 -0
  444. package/types/common/hooks/src/use-pagination/types.d.ts +29 -0
  445. package/types/common/hooks/src/use-previous/index.d.ts +3 -0
  446. package/types/common/hooks/src/use-raf-interval/index.d.ts +4 -0
  447. package/types/common/hooks/src/use-raf-state/index.d.ts +7 -0
  448. package/types/common/hooks/src/use-raf-timeout/index.d.ts +2 -0
  449. package/types/common/hooks/src/use-reactive/index.d.ts +2 -0
  450. package/types/common/hooks/src/use-request/index.d.ts +4 -0
  451. package/types/common/hooks/src/use-request/src/Fetch.d.ts +20 -0
  452. package/types/common/hooks/src/use-request/src/plugins/useAutoRunPlugin.d.ts +3 -0
  453. package/types/common/hooks/src/use-request/src/plugins/useCachePlugin.d.ts +3 -0
  454. package/types/common/hooks/src/use-request/src/plugins/useDebouncePlugin.d.ts +3 -0
  455. package/types/common/hooks/src/use-request/src/plugins/useLoadingDelayPlugin.d.ts +3 -0
  456. package/types/common/hooks/src/use-request/src/plugins/usePollingPlugin.d.ts +3 -0
  457. package/types/common/hooks/src/use-request/src/plugins/useRefreshOnWindowFocusPlugin.d.ts +3 -0
  458. package/types/common/hooks/src/use-request/src/plugins/useRetryPlugin.d.ts +3 -0
  459. package/types/common/hooks/src/use-request/src/plugins/useThrottlePlugin.d.ts +3 -0
  460. package/types/common/hooks/src/use-request/src/types.d.ts +73 -0
  461. package/types/common/hooks/src/use-request/src/useRequest.d.ts +3 -0
  462. package/types/common/hooks/src/use-request/src/useRequestImplement.d.ts +3 -0
  463. package/types/common/hooks/src/use-request/src/utils/cache.d.ts +14 -0
  464. package/types/common/hooks/src/use-request/src/utils/cachePromise.d.ts +4 -0
  465. package/types/common/hooks/src/use-request/src/utils/cacheSubscribe.d.ts +4 -0
  466. package/types/common/hooks/src/use-request/src/utils/isDocumentVisible.d.ts +1 -0
  467. package/types/common/hooks/src/use-request/src/utils/isOnline.d.ts +2 -0
  468. package/types/common/hooks/src/use-request/src/utils/limit.d.ts +1 -0
  469. package/types/common/hooks/src/use-request/src/utils/subscribeFocus.d.ts +3 -0
  470. package/types/common/hooks/src/use-request/src/utils/subscribeReVisible.d.ts +3 -0
  471. package/types/common/hooks/src/use-reset-state/index.d.ts +4 -0
  472. package/types/common/hooks/src/use-responsive/index.d.ts +5 -0
  473. package/types/common/hooks/src/use-safe-state/index.d.ts +7 -0
  474. package/types/common/hooks/src/use-scroll/index.d.ts +9 -0
  475. package/types/common/hooks/src/use-selections/index.d.ts +21 -0
  476. package/types/common/hooks/src/use-session-storage-state/index.d.ts +2 -0
  477. package/types/common/hooks/src/use-set/index.d.ts +6 -0
  478. package/types/common/hooks/src/use-set-state/index.d.ts +3 -0
  479. package/types/common/hooks/src/use-size/index.d.ts +7 -0
  480. package/types/common/hooks/src/use-text-selection/index.d.ts +14 -0
  481. package/types/common/hooks/src/use-theme/index.d.ts +16 -0
  482. package/types/common/hooks/src/use-throttle/index.d.ts +3 -0
  483. package/types/common/hooks/src/use-throttle/throttleOptions.d.ts +5 -0
  484. package/types/common/hooks/src/use-throttle-effect/index.d.ts +4 -0
  485. package/types/common/hooks/src/use-throttle-fn/index.d.ts +8 -0
  486. package/types/common/hooks/src/use-timeout/index.d.ts +2 -0
  487. package/types/common/hooks/src/use-title/index.d.ts +5 -0
  488. package/types/common/hooks/src/use-toggle/index.d.ts +10 -0
  489. package/types/common/hooks/src/use-tracked-effect/index.d.ts +4 -0
  490. package/types/common/hooks/src/use-unmount/index.d.ts +2 -0
  491. package/types/common/hooks/src/use-unmounted-ref/index.d.ts +2 -0
  492. package/types/common/hooks/src/use-update/index.d.ts +2 -0
  493. package/types/common/hooks/src/use-update-effect/index.d.ts +3 -0
  494. package/types/common/hooks/src/use-update-layout-effect/index.d.ts +3 -0
  495. package/types/common/hooks/src/use-url-state/index.d.ts +10 -0
  496. package/types/common/hooks/src/use-virtual-list/index.d.ts +13 -0
  497. package/types/common/hooks/src/use-web-socket/index.d.ts +26 -0
  498. package/types/common/hooks/src/use-why-did-you-update/index.d.ts +3 -0
  499. package/types/common/hooks/src/utils/createEffectWithTarget.d.ts +4 -0
  500. package/types/common/hooks/src/utils/depsAreSame.d.ts +3 -0
  501. package/types/common/hooks/src/utils/depsEqual.d.ts +2 -0
  502. package/types/common/hooks/src/utils/domTarget.d.ts +6 -0
  503. package/types/common/hooks/src/utils/getDocumentOrShadow.d.ts +3 -0
  504. package/types/common/hooks/src/utils/index.d.ts +1 -0
  505. package/types/common/hooks/src/utils/isAppleDevice.d.ts +2 -0
  506. package/types/common/hooks/src/utils/isBrowser.d.ts +2 -0
  507. package/types/common/hooks/src/utils/isDev.d.ts +2 -0
  508. package/types/common/hooks/src/utils/rect.d.ts +4 -0
  509. package/types/common/hooks/src/utils/useDeepCompareWithTarget.d.ts +4 -0
  510. package/types/common/hooks/src/utils/useEffectWithTarget.d.ts +2 -0
  511. package/types/common/hooks/src/utils/useIsomorphicLayoutEffectWithTarget.d.ts +2 -0
  512. package/types/common/hooks/src/utils/useLayoutEffectWithTarget.d.ts +2 -0
  513. package/types/common/hooks/useForceUpdate.d.ts +1 -1
  514. package/types/common/hooks/useInterval.d.ts +1 -2
  515. package/types/common/hooks/useMergeProps.d.ts +1 -1
  516. package/types/common/hooks/useOverrideRef.d.ts +1 -4
  517. package/types/common/hooks/usePrevious.d.ts +1 -3
  518. package/types/common/hooks/useResizeObserver.d.ts +1 -1
  519. package/types/common/hooks/useUpdateEffect.d.ts +1 -18
  520. package/types/common/utils/is.d.ts +2 -3
  521. package/types/common/utils/reactDOM.d.ts +20 -9
  522. package/types/common/utils/resizeObserver.d.ts +2 -1
  523. package/types/pc/back-top/index.d.ts +2 -2
  524. package/types/pc/carousel/interface.d.ts +1 -1
  525. package/types/pc/cascader/base/node.d.ts +1 -1
  526. package/types/pc/cascader/base/store.d.ts +3 -3
  527. package/types/pc/cascader/index.d.ts +2 -1
  528. package/types/pc/cascader/interface.d.ts +3 -3
  529. package/types/pc/cascader/util.d.ts +1 -0
  530. package/types/pc/color-picker/hooks/useColorPicker.d.ts +2 -2
  531. package/types/pc/color-picker/hooks/useControlBlock.d.ts +2 -2
  532. package/types/pc/config-provider/ConfigProvider.d.ts +2 -2
  533. package/types/pc/empty/index.d.ts +1 -1
  534. package/types/pc/form/Control.d.ts +2 -2
  535. package/types/pc/form/FormItem.d.ts +1 -1
  536. package/types/pc/form/FormLabel.d.ts +2 -7
  537. package/types/pc/form/interface.d.ts +6 -1
  538. package/types/pc/form/util.d.ts +1 -1
  539. package/types/pc/hooks/index.d.ts +1 -0
  540. package/types/pc/index.d.ts +3 -1
  541. package/types/pc/overflow-ellipsis/OverflowItem.d.ts +1 -8
  542. package/types/pc/overflow-ellipsis/index.d.ts +3 -9
  543. package/types/pc/overflow-ellipsis/interface.d.ts +19 -0
  544. package/types/pc/page-header/interface.d.ts +5 -0
  545. package/types/pc/segmented/interface.d.ts +2 -2
  546. package/types/pc/select/interface.d.ts +1 -1
  547. package/types/pc/select/util.d.ts +1 -1
  548. package/types/pc/slider/index.d.ts +1 -1
  549. package/types/pc/speech-synthesis/index.d.ts +1 -1
  550. package/types/pc/table/context.d.ts +5 -0
  551. package/types/pc/table/interface.d.ts +4 -0
  552. package/types/pc/tabs/interface.d.ts +1 -1
  553. package/types/pc/tree/Node.d.ts +2 -4
  554. package/types/pc/tree/Tree.d.ts +10 -10
  555. package/types/pc/tree/index.d.ts +0 -3
  556. package/types/pc/tree/interface.d.ts +7 -4
  557. package/types/pc/tree/util.d.ts +1 -2
  558. package/types/pc/tree-select/Select.d.ts +2 -6
  559. package/types/pc/tree-select/interface.d.ts +1 -1
  560. package/types/pc/upload/interface.d.ts +1 -1
  561. package/types/pc/utils/is.d.ts +1 -1
  562. package/types/pc/utils/keyboardCode.d.ts +1 -0
  563. package/types/pc/version/index.d.ts +3 -3
  564. package/typography/Base.js +36 -37
  565. package/typography/EditContent.js +8 -8
  566. package/typography/Ellipsis.js +32 -38
  567. package/typography/Operations.js +16 -20
  568. package/typography/Paragraph.js +11 -12
  569. package/typography/Typography.js +4 -5
  570. package/typography/useCssEllipsis.js +1 -1
  571. package/typography/useEllipsis.js +27 -27
  572. package/upload/TriggerNode.js +8 -9
  573. package/upload/Upload.js +522 -124
  574. package/upload/Uploader.js +12 -12
  575. package/upload/index.js +4 -4
  576. package/upload/request.js +3 -3
  577. package/upload/request_.js +4 -4
  578. package/upload/util.js +15 -16
  579. package/utils/PqbCSSTransition.js +3 -3
  580. package/utils/constant.js +6 -6
  581. package/utils/contextHolder.js +4 -29
  582. package/utils/dayjs.js +13 -13
  583. package/utils/dom.js +7 -7
  584. package/utils/fillNBSP.js +3 -3
  585. package/utils/findScrollParent.js +15 -2
  586. package/utils/getHighlightText.js +1 -1
  587. package/utils/getHotkeyHandler.js +1 -1
  588. package/utils/getStringLength.js +1 -1
  589. package/utils/include.js +3 -3
  590. package/utils/index.js +241 -249
  591. package/utils/intersectionObserver.js +1 -1
  592. package/utils/is.js +72 -73
  593. package/utils/keyboardCode.js +27 -3
  594. package/utils/mergeProps.js +1 -1
  595. package/utils/mergedToString.js +1 -1
  596. package/utils/mutationObserver.js +1 -1
  597. package/utils/omit.js +1 -1
  598. package/utils/pad.js +16 -3
  599. package/utils/pick.js +5 -5
  600. package/utils/react19Adapter.js +3 -1
  601. package/utils/reactDOM.js +3 -3
  602. package/utils/reactTransitionGroup.js +8 -12
  603. package/utils/resizeObserver.js +2 -2
  604. package/utils/responsiveObserve.js +1 -1
  605. package/utils/scrollIntoViewIfNeeded.js +9 -10
  606. package/utils/setDarkTheme.js +30 -10
  607. package/utils/setPrimaryColor.js +30 -6
  608. package/utils/setTheme.js +3 -3
  609. package/utils/style.js +37 -4
  610. package/utils/throttleByRaf.js +14 -3
  611. package/utils/throttleByRaf2.js +1 -1
  612. package/utils/toArray.js +3 -3
  613. package/utils/tween.js +4 -5
  614. package/utils/validate.js +4 -5
  615. package/utils/warning.js +9 -3
  616. package/verification-code/VerificationCode.js +9 -10
  617. package/version/index.js +1 -1
  618. package/virtual-list/VirtualList.js +391 -280
  619. package/watermark/Watermark.js +13 -14
  620. package/calendar/header/Panel.js +0 -57
  621. package/calendar/header/index.js +0 -110
  622. package/calendar/hook/useCellClassName.js +0 -41
  623. package/cascader/base/node.js +0 -141
  624. package/cascader/base/store.js +0 -90
  625. package/cascader/hook/useRefCurrent.js +0 -12
  626. package/cascader/panel/List.js +0 -274
  627. package/cascader/panel/Option.js +0 -34
  628. package/cascader/panel/Search.js +0 -168
  629. package/color-picker/hooks/useColorPicker.js +0 -125
  630. package/components/common/development/index.js +0 -47
  631. package/components/common/empty/index.js +0 -49
  632. package/components/common/flex/index.js +0 -73
  633. package/components/common/flex/interface.js +0 -9
  634. package/components/common/higher-order/with-speech-synthesis/index.js +0 -82
  635. package/components/common/hooks/useCreate.js +0 -8
  636. package/components/common/hooks/useForceUpdate.js +0 -12
  637. package/components/common/hooks/useId.js +0 -11
  638. package/components/common/hooks/useInView.js +0 -31
  639. package/components/common/hooks/useIntersectionObserver.js +0 -24
  640. package/components/common/hooks/useInterval.js +0 -18
  641. package/components/common/hooks/useIsomorphicLayoutEffect.js +0 -6
  642. package/components/common/hooks/useKeyboardEvent.js +0 -16
  643. package/components/common/hooks/useOverrideRef.js +0 -14
  644. package/components/common/hooks/usePrevious.js +0 -10
  645. package/components/common/hooks/useRefs.js +0 -10
  646. package/components/common/hooks/useResizeObserver.js +0 -16
  647. package/components/common/hooks/useStateCallback.js +0 -15
  648. package/components/common/hooks/useUpdateEffect.js +0 -12
  649. package/components/common/hooks/useWatch.js +0 -11
  650. package/components/common/icons/file/index.js +0 -58
  651. package/components/common/space/index.js +0 -76
  652. package/components/common/utils/PqbCSSTransition.js +0 -32
  653. package/components/common/utils/constant.js +0 -9
  654. package/components/common/utils/copy.js +0 -7
  655. package/components/common/utils/fillNBSP.js +0 -7
  656. package/components/common/utils/findScrollParent.js +0 -17
  657. package/components/common/utils/include.js +0 -10
  658. package/components/common/utils/intersectionObserver.js +0 -21
  659. package/components/common/utils/is.js +0 -110
  660. package/components/common/utils/mergedToString.js +0 -16
  661. package/components/common/utils/omit.js +0 -12
  662. package/components/common/utils/pad.js +0 -18
  663. package/components/common/utils/pick.js +0 -18
  664. package/components/common/utils/react19Adapter.js +0 -3
  665. package/components/common/utils/reactDOM.js +0 -48
  666. package/components/common/utils/resizeObserver.js +0 -21
  667. package/components/common/utils/scrollIntoViewIfNeeded.js +0 -25
  668. package/components/common/utils/setDarkTheme.js +0 -27
  669. package/components/common/utils/setDir.js +0 -12
  670. package/components/common/utils/setPrimaryColor.js +0 -30
  671. package/components/common/utils/style.js +0 -39
  672. package/components/common/utils/throttleByRaf.js +0 -16
  673. package/components/common/utils/toArray.js +0 -14
  674. package/components/common/utils/warning.js +0 -11
  675. package/date-picker/hook/useCellClassName.js +0 -60
  676. package/date-picker/panel/Body.js +0 -87
  677. package/date-picker/panel/Footer.js +0 -71
  678. package/date-picker/panel/Header.js +0 -69
  679. package/date-picker/panel/Shortcut.js +0 -45
  680. package/date-picker/panel/WeekList.js +0 -19
  681. package/date-picker/panel/date/index.js +0 -193
  682. package/date-picker/panel/month/index.js +0 -112
  683. package/date-picker/panel/quarter/index.js +0 -94
  684. package/date-picker/panel/range/index.js +0 -250
  685. package/date-picker/panel/week/index.js +0 -35
  686. package/date-picker/panel/year/index.js +0 -73
  687. package/dist/dom-helpers/addClass.js +0 -10
  688. package/dist/dom-helpers/hasClass.js +0 -8
  689. package/dist/dom-helpers/removeClass.js +0 -18
  690. package/dist/react-transition-group/chunk/CPfP7aNL.js +0 -381
  691. package/dist/react-transition-group/chunk/F6QOOr2H.js +0 -500
  692. package/dist/react-transition-group/src/CSSTransition.js +0 -202
  693. package/dist/react-transition-group/src/ReplaceTransition.js +0 -43
  694. package/dist/react-transition-group/src/SwitchTransition.js +0 -117
  695. package/dist/react-transition-group/src/TransitionGroup.js +0 -160
  696. package/dist/react-transition-group/src/TransitionGroupContext.js +0 -5
  697. package/dist/react-transition-group/src/config.js +0 -6
  698. package/dist/scroll-into-view-if-needed/compute/index.js +0 -126
  699. package/dist/scroll-into-view-if-needed/src/index.js +0 -33
  700. package/dist/tween/src/easing.js +0 -43
  701. package/dist/tween/src/tween.js +0 -70
  702. package/dist/validate/chunk/BXTR2LmP.js +0 -49
  703. package/dist/validate/src/util.js +0 -22
  704. package/form/hook/useContext.js +0 -30
  705. package/form/hook/useForm.js +0 -58
  706. package/form/hook/useState.js +0 -30
  707. package/form/hook/useWatch.js +0 -35
  708. package/hooks/use-watermark/utils.js +0 -9
  709. package/image/util/getFixTranslate.js +0 -7
  710. package/image/util/getScale.js +0 -71
  711. package/image/util/hook/useImageStatus.js +0 -16
  712. package/image/util/hook/useShowFooter.js +0 -7
  713. package/menu/sub-menu/Inline.js +0 -111
  714. package/menu/sub-menu/Pop.js +0 -120
  715. package/menu/sub-menu/index.js +0 -17
  716. package/modal/use-modal/Hook.js +0 -50
  717. package/modal/use-modal/index.js +0 -65
  718. package/slider/hook/useInterval.js +0 -73
  719. package/slider/hook/useLegalValue.js +0 -70
  720. package/splitter/hooks/useEvent.js +0 -12
  721. package/splitter/hooks/useItems.js +0 -26
  722. package/splitter/hooks/useResizable.js +0 -17
  723. package/splitter/hooks/useResize.js +0 -68
  724. package/splitter/hooks/useSizes.js +0 -60
  725. package/table/hook/useColumns.js +0 -142
  726. package/table/hook/useComponent.js +0 -28
  727. package/table/hook/useExpand.js +0 -36
  728. package/table/hook/useRowSelection.js +0 -94
  729. package/table/hook/useSorter.js +0 -54
  730. package/table/hook/useStickyClassNames.js +0 -31
  731. package/table/hook/useStickyOffsets.js +0 -28
  732. package/table/hook/useThResizable.js +0 -87
  733. package/table/summary/Cell.js +0 -10
  734. package/table/summary/Row.js +0 -24
  735. package/table/summary/index.js +0 -12
  736. package/table/tbody/Td.js +0 -184
  737. package/table/tbody/Tr.js +0 -164
  738. package/table/tbody/index.js +0 -153
  739. package/table/tfoot/index.js +0 -16
  740. package/table/th-resizable/index.js +0 -104
  741. package/table/thead/Column.js +0 -252
  742. package/table/thead/index.js +0 -131
  743. package/tabs/hook/useDomSize.js +0 -17
  744. package/tabs/hook/useHeaderScroll.js +0 -67
  745. package/tabs/tab-header/DropdownIcon.js +0 -66
  746. package/tabs/tab-header/TabInk.js +0 -64
  747. package/tabs/tab-header/TabNavIcon.js +0 -65
  748. package/tabs/tab-header/TabTitle.js +0 -78
  749. package/tabs/tab-header/index.js +0 -328
  750. package/tree-select/hook/useKeyCache.js +0 -55
  751. package/tree-select/hook/useStateValue.js +0 -95
  752. package/tree-select/hook/useTreeData.js +0 -13
  753. package/types/common/utils/keyboardCode.d.ts +0 -4
  754. package/upload/list/PictureItem.js +0 -109
  755. package/upload/list/TextItem.js +0 -117
  756. package/upload/list/UploadProgress.js +0 -89
  757. package/upload/list/index.js +0 -139
  758. package/virtual-list/util/algorithm.js +0 -32
  759. package/virtual-list/util/item.js +0 -98
  760. /package/{speech-synthesis/style/index.less.js → overflow-ellipsis/interface.js} +0 -0
@@ -0,0 +1,2321 @@
1
+ import { useEffect as D, useState as T, useMemo as _, useRef as b, useLayoutEffect as he, useCallback as M } from "react";
2
+ import "./DsaQZE4X.js";
3
+ import { isFunction as z, isString as ne, isNumber as H, isEqual as Ve, isBoolean as qe, isUndefined as Ue, isObject as $e } from "@unicom-cloud/utils/is";
4
+ import { g as N, a as C, d as q, e as We, c as $, i as V, f as Ge, s as Ke, h as Je, j as Qe, k as Ze } from "./BTLlOOe9.js";
5
+ import { a as E } from "./D1iEYgh3.js";
6
+ import { u as re } from "./BJeTDXdz.js";
7
+ import ce from "@unicom-cloud/utils/js-cookie";
8
+ import et from "dayjs";
9
+ import De from "lodash/debounce";
10
+ import { i as Q } from "./CdXR6dj7.js";
11
+ import { u as K, c as tt } from "./DfChiMIE.js";
12
+ import Y from "@unicom-cloud/utils/screenfull";
13
+ import { isAppleDevice as nt } from "@unicom-cloud/utils/constant/platform";
14
+ import Me from "lodash/throttle";
15
+ import de from "lodash/isPlainObject";
16
+ import ae from "@unicom-cloud/utils/query-string";
17
+ import * as rt from "react-router";
18
+ function st(e) {
19
+ return z(e[Symbol.asyncIterator]);
20
+ }
21
+ function gn(e, t) {
22
+ D(() => {
23
+ const n = e();
24
+ let r = !1;
25
+ async function s() {
26
+ if (st(n))
27
+ for (; !((await n.next()).done || r); )
28
+ ;
29
+ else
30
+ await n;
31
+ }
32
+ return s(), () => {
33
+ r = !0;
34
+ };
35
+ }, t);
36
+ }
37
+ function ot(e = !1, t) {
38
+ const [n, r] = T(e), s = _(() => {
39
+ const o = t === void 0 ? !e : t;
40
+ return {
41
+ toggle: () => r((l) => l === e ? o : e),
42
+ set: (l) => r(l),
43
+ setLeft: () => r(e),
44
+ setRight: () => r(o)
45
+ };
46
+ }, []);
47
+ return [n, s];
48
+ }
49
+ function ct(e = !1) {
50
+ const [t, { toggle: n, set: r }] = ot(!!e), s = _(() => ({
51
+ toggle: n,
52
+ set: (c) => r(!!c),
53
+ setTrue: () => r(!0),
54
+ setFalse: () => r(!1)
55
+ }), []);
56
+ return [t, s];
57
+ }
58
+ const at = (e) => e.every((t) => {
59
+ const n = N(t);
60
+ return n ? n.getRootNode() instanceof ShadowRoot : !1;
61
+ }), ut = (e) => e ? e.getRootNode() : document, it = (e) => {
62
+ if (!e || !document.getRootNode)
63
+ return document;
64
+ const t = Array.isArray(e) ? e : [e];
65
+ return at(t) ? ut(N(t[0])) : document;
66
+ };
67
+ function hn(e, t, n = "click") {
68
+ const r = C(e);
69
+ q(
70
+ () => {
71
+ const s = (c) => {
72
+ (Array.isArray(t) ? t : [t]).some((i) => {
73
+ const l = N(i);
74
+ return !l || l.contains(c.target);
75
+ }) || r.current(c);
76
+ }, o = it(t), a = Array.isArray(n) ? n : [n];
77
+ return a.forEach(
78
+ (c) => o.addEventListener(c, s)
79
+ ), () => {
80
+ a.forEach(
81
+ (c) => o.removeEventListener(c, s)
82
+ );
83
+ };
84
+ },
85
+ Array.isArray(n) ? n : [n],
86
+ t
87
+ );
88
+ }
89
+ function pn(e, t = {}) {
90
+ const n = e ?? {}, {
91
+ defaultValue: r,
92
+ defaultValuePropName: s = "defaultValue",
93
+ valuePropName: o = "value",
94
+ trigger: a = "onChange"
95
+ } = t, c = n[o], d = Object.prototype.hasOwnProperty.call(
96
+ n,
97
+ o
98
+ ), i = _(() => d ? c : Object.prototype.hasOwnProperty.call(n, s) ? n[s] : r, []), l = b(i);
99
+ d && (l.current = c);
100
+ const u = re();
101
+ function g(v, ...y) {
102
+ const m = z(v) ? v(l.current) : v;
103
+ d || (l.current = m, u()), n[a] && n[a](m, ...y);
104
+ }
105
+ return [l.current, E(g)];
106
+ }
107
+ function vn(e, t = {}) {
108
+ const [n, r] = T(() => {
109
+ const o = ce.get(e);
110
+ return ne(o) ? o : z(t.defaultValue) ? t.defaultValue() : t.defaultValue;
111
+ }), s = E(
112
+ (o, a = {}) => {
113
+ const { defaultValue: c, ...d } = { ...t, ...a }, i = z(o) ? o(n) : o;
114
+ r(i), i === void 0 ? ce.remove(e) : ce.set(e, i, d);
115
+ }
116
+ );
117
+ return [n, s];
118
+ }
119
+ const ue = (e) => {
120
+ if (!e)
121
+ return 0;
122
+ const t = et(e).valueOf() - Date.now();
123
+ return t < 0 ? 0 : t;
124
+ }, lt = (e) => ({
125
+ days: Math.floor(e / 864e5),
126
+ hours: Math.floor(e / 36e5) % 24,
127
+ minutes: Math.floor(e / 6e4) % 60,
128
+ seconds: Math.floor(e / 1e3) % 60,
129
+ milliseconds: Math.floor(e) % 1e3
130
+ }), yn = (e = {}) => {
131
+ const { leftTime: t, targetDate: n, interval: r = 1e3, onEnd: s } = e || {}, o = _(() => H(t) && t > 0 ? Date.now() + t : void 0, [t]), a = "leftTime" in e ? o : n, [c, d] = T(() => ue(a)), i = C(s);
132
+ D(() => {
133
+ if (!a) {
134
+ d(0);
135
+ return;
136
+ }
137
+ d(ue(a));
138
+ const u = setInterval(() => {
139
+ const g = ue(a);
140
+ d(g), g === 0 && (clearInterval(u), i.current?.());
141
+ }, r);
142
+ return () => clearInterval(u);
143
+ }, [a, r]);
144
+ const l = _(() => lt(c), [c]);
145
+ return [c, l];
146
+ };
147
+ function Se(e, t = {}) {
148
+ const { min: n, max: r } = t;
149
+ let s = e;
150
+ return H(r) && (s = Math.min(r, s)), H(n) && (s = Math.max(n, s)), s;
151
+ }
152
+ function En(e = 0, t = {}) {
153
+ const { min: n, max: r } = t, [s, o] = T(() => Se(e, {
154
+ min: n,
155
+ max: r
156
+ })), a = (u) => {
157
+ o((g) => {
158
+ const v = H(u) ? u : u(g);
159
+ return Se(v, {
160
+ max: r,
161
+ min: n
162
+ });
163
+ });
164
+ }, c = (u = 1) => {
165
+ a((g) => g + u);
166
+ }, d = (u = 1) => {
167
+ a((g) => g - u);
168
+ }, i = (u) => {
169
+ a(u);
170
+ }, l = () => {
171
+ a(e);
172
+ };
173
+ return [
174
+ s,
175
+ {
176
+ inc: E(c),
177
+ dec: E(d),
178
+ set: E(i),
179
+ reset: E(l)
180
+ }
181
+ ];
182
+ }
183
+ const se = (e, t) => {
184
+ const { current: n } = b({
185
+ deps: t,
186
+ obj: void 0,
187
+ initialized: !1
188
+ });
189
+ return (n.initialized === !1 || !We(n.deps, t)) && (n.deps = t, n.obj = e(), n.initialized = !0), n.obj;
190
+ };
191
+ function Ne(e, t) {
192
+ Q && (z(e) || console.error(
193
+ `useDebounceFn expected parameter is a function, got ${typeof e}`
194
+ ));
195
+ const n = C(e), r = t?.wait ?? 1e3, s = _(
196
+ () => De(
197
+ (...o) => n.current(...o),
198
+ r,
199
+ t
200
+ ),
201
+ []
202
+ );
203
+ return $(() => {
204
+ s.cancel();
205
+ }), {
206
+ run: s,
207
+ cancel: s.cancel,
208
+ flush: s.flush
209
+ };
210
+ }
211
+ function Sn(e, t) {
212
+ const [n, r] = T(e), { run: s } = Ne(() => {
213
+ r(e);
214
+ }, t);
215
+ return D(() => {
216
+ s();
217
+ }, [e]), n;
218
+ }
219
+ function wn(e, t, n) {
220
+ const [r, s] = T({}), { run: o } = Ne(() => {
221
+ s({});
222
+ }, n);
223
+ D(() => o(), t), K(e, [r]);
224
+ }
225
+ const Oe = (e = [], t = []) => Ve(e, t), Fe = (e) => (t, n) => {
226
+ const r = b(void 0), s = b(0);
227
+ (n === void 0 || !Oe(n, r.current)) && (s.current += 1), r.current = n, e(t, [s.current]);
228
+ }, bn = Fe(D), Rn = Fe(he);
229
+ function X(e, t, n = {}) {
230
+ const { enable: r = !0 } = n, s = C(t);
231
+ q(
232
+ () => {
233
+ if (!r)
234
+ return;
235
+ const o = N(n.target, window);
236
+ if (!o?.addEventListener)
237
+ return;
238
+ const a = (d) => s.current(d), c = Array.isArray(e) ? e : [e];
239
+ return c.forEach((d) => {
240
+ o.addEventListener(d, a, {
241
+ capture: n.capture,
242
+ once: n.once,
243
+ passive: n.passive
244
+ });
245
+ }), () => {
246
+ c.forEach((d) => {
247
+ o.removeEventListener(d, a, {
248
+ capture: n.capture
249
+ });
250
+ });
251
+ };
252
+ },
253
+ [e, n.capture, n.once, n.passive, r],
254
+ n.target
255
+ );
256
+ }
257
+ const we = () => V ? document.visibilityState : "visible";
258
+ function Tn() {
259
+ const [e, t] = T(we);
260
+ return X(
261
+ "visibilitychange",
262
+ () => {
263
+ t(we());
264
+ },
265
+ {
266
+ target: () => document
267
+ }
268
+ ), e;
269
+ }
270
+ const xe = (e) => {
271
+ Q && (z(e) || console.error(
272
+ `useMount: parameter \`fn\` expected to be a function, but got "${typeof e}".`
273
+ )), D(() => e?.(), []);
274
+ }, Ln = (e, t, n = {}) => {
275
+ const r = C(n), s = C(e), o = b(void 0), { dragImage: a } = r.current;
276
+ xe(() => {
277
+ if (a?.image) {
278
+ const { image: c } = a;
279
+ if (ne(c)) {
280
+ const d = new Image();
281
+ d.src = c, o.current = d;
282
+ } else
283
+ o.current = c;
284
+ }
285
+ }), q(
286
+ () => {
287
+ const c = N(t);
288
+ if (!c?.addEventListener)
289
+ return;
290
+ const d = (l) => {
291
+ if (r.current.onDragStart?.(l), l.dataTransfer.setData("custom", JSON.stringify(s.current)), a?.image && o.current) {
292
+ const { offsetX: u = 0, offsetY: g = 0 } = a;
293
+ l.dataTransfer.setDragImage(
294
+ o.current,
295
+ u,
296
+ g
297
+ );
298
+ }
299
+ }, i = (l) => {
300
+ r.current.onDragEnd?.(l);
301
+ };
302
+ return c.setAttribute("draggable", "true"), c.addEventListener("dragstart", d), c.addEventListener("dragend", i), () => {
303
+ c.removeEventListener("dragstart", d), c.removeEventListener("dragend", i);
304
+ };
305
+ },
306
+ [],
307
+ t
308
+ );
309
+ }, An = (e, t = {}) => {
310
+ const n = C(t), r = b(void 0);
311
+ q(
312
+ () => {
313
+ const s = N(e);
314
+ if (!s?.addEventListener)
315
+ return;
316
+ const o = (u, g) => {
317
+ const v = u.getData("text/uri-list"), y = u.getData("custom");
318
+ if (y && n.current.onDom) {
319
+ let m = y;
320
+ try {
321
+ m = JSON.parse(y);
322
+ } catch {
323
+ m = y;
324
+ }
325
+ n.current.onDom(m, g);
326
+ return;
327
+ }
328
+ if (v && n.current.onUri) {
329
+ n.current.onUri(v, g);
330
+ return;
331
+ }
332
+ if (u.files && u.files.length && n.current.onFiles) {
333
+ n.current.onFiles(
334
+ Array.from(u.files),
335
+ g
336
+ );
337
+ return;
338
+ }
339
+ u.items && u.items.length && n.current.onText && u.items[0].getAsString((m) => {
340
+ n.current.onText(m, g);
341
+ });
342
+ }, a = (u) => {
343
+ u.preventDefault(), u.stopPropagation(), r.current = u.target, n.current.onDragEnter?.(u);
344
+ }, c = (u) => {
345
+ u.preventDefault(), n.current.onDragOver?.(u);
346
+ }, d = (u) => {
347
+ u.target === r.current && n.current.onDragLeave?.(u);
348
+ }, i = (u) => {
349
+ u.preventDefault(), o(u.dataTransfer, u), n.current.onDrop?.(u);
350
+ }, l = (u) => {
351
+ o(u.clipboardData, u), n.current.onPaste?.(u);
352
+ };
353
+ return s.addEventListener("dragenter", a), s.addEventListener("dragover", c), s.addEventListener("dragleave", d), s.addEventListener("drop", i), s.addEventListener("paste", l), () => {
354
+ s.removeEventListener("dragenter", a), s.removeEventListener("dragover", c), s.removeEventListener("dragleave", d), s.removeEventListener("drop", i), s.removeEventListener("paste", l);
355
+ };
356
+ },
357
+ [],
358
+ e
359
+ );
360
+ }, Pn = (e = []) => {
361
+ const t = b(-1), n = b([]), r = M((f) => {
362
+ t.current += 1, n.current.splice(f, 0, t.current);
363
+ }, []), [s, o] = T(() => (e.forEach((f, h) => {
364
+ r(h);
365
+ }), e)), a = M((f) => {
366
+ n.current = [], o(() => (f.forEach((h, S) => {
367
+ r(S);
368
+ }), f));
369
+ }, []), c = M((f, h) => {
370
+ o((S) => {
371
+ const R = [...S];
372
+ return R.splice(f, 0, h), r(f), R;
373
+ });
374
+ }, []), d = M((f) => n.current[f], []), i = M(
375
+ (f) => n.current.findIndex((h) => h === f),
376
+ []
377
+ ), l = M((f, h) => {
378
+ o((S) => {
379
+ const R = [...S];
380
+ return h.forEach((k, w) => {
381
+ r(f + w);
382
+ }), R.splice(f, 0, ...h), R;
383
+ });
384
+ }, []), u = M((f, h) => {
385
+ o((S) => {
386
+ const R = [...S];
387
+ return R[f] = h, R;
388
+ });
389
+ }, []), g = M((f) => {
390
+ o((h) => {
391
+ const S = [...h];
392
+ S.splice(f, 1);
393
+ try {
394
+ n.current.splice(f, 1);
395
+ } catch (R) {
396
+ console.error(R);
397
+ }
398
+ return S;
399
+ });
400
+ }, []), v = M((f) => {
401
+ if (!Array.isArray(f)) {
402
+ Q && console.error(
403
+ `\`indexes\` parameter of \`batchRemove\` function expected to be an array, but got "${typeof f}".`
404
+ );
405
+ return;
406
+ }
407
+ f.length && o((h) => {
408
+ const S = [], R = h.filter((k, w) => {
409
+ const x = !f.includes(w);
410
+ return x && S.push(d(w)), x;
411
+ });
412
+ return n.current = S, R;
413
+ });
414
+ }, []), y = M((f, h) => {
415
+ f !== h && o((S) => {
416
+ const R = [...S], k = R.filter((w, x) => x !== f);
417
+ k.splice(h, 0, R[f]);
418
+ try {
419
+ const w = n.current.filter(
420
+ (x, P) => P !== f
421
+ );
422
+ w.splice(h, 0, n.current[f]), n.current = w;
423
+ } catch (w) {
424
+ console.error(w);
425
+ }
426
+ return k;
427
+ });
428
+ }, []), m = M((f) => {
429
+ o((h) => (r(h.length), h.concat([f])));
430
+ }, []), L = M(() => {
431
+ try {
432
+ n.current = n.current.slice(0, n.current.length - 1);
433
+ } catch (f) {
434
+ console.error(f);
435
+ }
436
+ o((f) => f.slice(0, f.length - 1));
437
+ }, []), A = M((f) => {
438
+ o((h) => (r(0), [f].concat(h)));
439
+ }, []), F = M(() => {
440
+ try {
441
+ n.current = n.current.slice(1, n.current.length);
442
+ } catch (f) {
443
+ console.error(f);
444
+ }
445
+ o((f) => f.slice(1, f.length));
446
+ }, []), p = M(
447
+ (f) => f.map((h, S) => ({ key: S, item: h })).sort((h, S) => i(h.key) - i(S.key)).filter((h) => !!h.item).map((h) => h.item),
448
+ // retrive the data
449
+ []
450
+ );
451
+ return {
452
+ list: s,
453
+ insert: c,
454
+ merge: l,
455
+ replace: u,
456
+ remove: g,
457
+ batchRemove: v,
458
+ getKey: d,
459
+ getIndex: i,
460
+ move: y,
461
+ push: m,
462
+ pop: L,
463
+ unshift: A,
464
+ shift: F,
465
+ sortList: p,
466
+ resetList: a
467
+ };
468
+ };
469
+ function Cn(e) {
470
+ const { initialValue: t, transformer: n } = e || {}, [r, s] = T(t), o = C(n), a = M(() => s(t), []), c = M((d) => {
471
+ const i = d.target.value;
472
+ return z(o.current) ? s(o.current(i)) : s(i);
473
+ }, []);
474
+ return [
475
+ r,
476
+ {
477
+ onChange: c,
478
+ reset: a
479
+ }
480
+ ];
481
+ }
482
+ const J = {}, ft = (e, t = {}) => {
483
+ const n = document.querySelector(`script[src="${e}"]`);
484
+ if (!n) {
485
+ const r = document.createElement("script");
486
+ return r.src = e, Object.keys(t).forEach((s) => {
487
+ r[s] = t[s];
488
+ }), r.setAttribute("data-status", "loading"), document.body.appendChild(r), {
489
+ ref: r,
490
+ status: "loading"
491
+ };
492
+ }
493
+ return {
494
+ ref: n,
495
+ status: n.getAttribute("data-status") || "ready"
496
+ };
497
+ }, dt = (e, t = {}) => {
498
+ const n = document.querySelector(`link[href="${e}"]`);
499
+ if (!n) {
500
+ const r = document.createElement("link");
501
+ return r.rel = "stylesheet", r.href = e, Object.keys(t).forEach((o) => {
502
+ r[o] = t[o];
503
+ }), "hideFocus" in r && r.relList && (r.rel = "preload", r.as = "style"), r.setAttribute("data-status", "loading"), document.head.appendChild(r), {
504
+ ref: r,
505
+ status: "loading"
506
+ };
507
+ }
508
+ return {
509
+ ref: n,
510
+ status: n.getAttribute("data-status") || "ready"
511
+ };
512
+ }, Dn = (e, t) => {
513
+ const [n, r] = T(e ? "loading" : "unset"), s = b(void 0);
514
+ return D(() => {
515
+ if (!e) {
516
+ r("unset");
517
+ return;
518
+ }
519
+ const o = e.replace(/[|#].*$/, "");
520
+ if (t?.type === "css" || !t?.type && /(^css!|\.css$)/.test(o)) {
521
+ const c = dt(e, t?.css);
522
+ s.current = c.ref, r(c.status);
523
+ } else if (t?.type === "js" || !t?.type && /(^js!|\.js$)/.test(o)) {
524
+ const c = ft(e, t?.js);
525
+ s.current = c.ref, r(c.status);
526
+ } else
527
+ console.error(
528
+ "Cannot infer the type of external resource, and please provide a type ('js' | 'css'). "
529
+ );
530
+ if (!s.current)
531
+ return;
532
+ J[e] === void 0 ? J[e] = 1 : J[e] += 1;
533
+ const a = (c) => {
534
+ const d = c.type === "load" ? "ready" : "error";
535
+ s.current?.setAttribute("data-status", d), r(d);
536
+ };
537
+ return s.current.addEventListener("load", a), s.current.addEventListener("error", a), () => {
538
+ s.current?.removeEventListener("load", a), s.current?.removeEventListener("error", a), J[e] -= 1, J[e] === 0 && !t?.keepWhenUnused && s.current?.remove(), s.current = void 0;
539
+ };
540
+ }, [e]), n;
541
+ }, mt = {
542
+ SVG: "image/svg+xml",
543
+ ICO: "image/x-icon",
544
+ GIF: "image/gif",
545
+ PNG: "image/png"
546
+ }, Mn = (e) => {
547
+ D(() => {
548
+ if (!e)
549
+ return;
550
+ const t = e.split("."), n = t[t.length - 1].toLocaleUpperCase(), r = document.querySelector("link[rel*='icon']") || document.createElement("link");
551
+ r.type = mt[n], r.href = e, r.rel = "shortcut icon", document.getElementsByTagName("head")[0].appendChild(r);
552
+ }, [e]);
553
+ };
554
+ function Nn(e, t) {
555
+ const [n, r] = T(!1), { onFocus: s, onBlur: o, onChange: a } = t || {};
556
+ return X(
557
+ "focusin",
558
+ (c) => {
559
+ n || (s?.(c), a?.(!0), r(!0));
560
+ },
561
+ {
562
+ target: e
563
+ }
564
+ ), X(
565
+ "focusout",
566
+ (c) => {
567
+ n && !c.currentTarget?.contains?.(c.relatedTarget) && (o?.(c), a?.(!1), r(!1));
568
+ },
569
+ {
570
+ target: e
571
+ }
572
+ ), n;
573
+ }
574
+ const On = (e, t) => {
575
+ const { onExit: n, onEnter: r, pageFullscreen: s = !1 } = t || {}, { className: o = "@unicom-cloud-ui-hooks-page-fullscreen", zIndex: a = 999999 } = qe(s) || !s ? {} : s, c = C(n), d = C(r), [i, l] = T(g), u = b(g());
576
+ function g() {
577
+ return Y.isEnabled && !!Y.element && Y.element === N(e);
578
+ }
579
+ const v = (f) => {
580
+ f ? d.current?.() : c.current?.();
581
+ }, y = (f) => {
582
+ u.current !== f && (v(f), l(f), u.current = f);
583
+ }, m = () => {
584
+ const f = g();
585
+ y(f);
586
+ }, L = (f) => {
587
+ const h = N(e);
588
+ if (!h)
589
+ return;
590
+ let S = document.getElementById(o);
591
+ f ? (h.classList.add(o), S || (S = document.createElement("style"), S.setAttribute("id", o), S.textContent = `
592
+ .${o} {
593
+ position: fixed; left: 0; top: 0; right: 0; bottom: 0;
594
+ width: 100% !important; height: 100% !important;
595
+ z-index: ${a};
596
+ }`, h.appendChild(S))) : (h.classList.remove(o), S && S.remove()), y(f);
597
+ }, A = () => {
598
+ const f = N(e);
599
+ if (f) {
600
+ if (s) {
601
+ L(!0);
602
+ return;
603
+ }
604
+ if (Y.isEnabled)
605
+ try {
606
+ Y.request(f);
607
+ } catch (h) {
608
+ console.error(h);
609
+ }
610
+ }
611
+ }, F = () => {
612
+ const f = N(e);
613
+ if (f) {
614
+ if (s) {
615
+ L(!1);
616
+ return;
617
+ }
618
+ Y.isEnabled && Y.element === f && Y.exit();
619
+ }
620
+ }, p = () => {
621
+ i ? F() : A();
622
+ };
623
+ return D(() => {
624
+ if (!(!Y.isEnabled || s))
625
+ return Y.on("change", m), () => {
626
+ Y.off("change", m);
627
+ };
628
+ }, []), [
629
+ i,
630
+ {
631
+ enterFullscreen: E(A),
632
+ exitFullscreen: E(F),
633
+ toggleFullscreen: E(p),
634
+ isEnabled: Y.isEnabled
635
+ }
636
+ ];
637
+ };
638
+ function Fn(e) {
639
+ const [t, n] = T(e), r = C(t), s = M(() => r.current, []);
640
+ return [t, n, s];
641
+ }
642
+ const gt = (e, t) => {
643
+ let n = e > 0 ? e - 1 : t.length + e;
644
+ return n >= t.length - 1 && (n = t.length - 1), n < 0 && (n = 0), n;
645
+ }, be = (e, t) => {
646
+ const n = gt(e, t);
647
+ return {
648
+ _current: t[n],
649
+ _before: t.slice(0, n),
650
+ _after: t.slice(n + 1)
651
+ };
652
+ };
653
+ function xn(e, t = 0) {
654
+ const [n, r] = T({
655
+ present: e,
656
+ past: [],
657
+ future: []
658
+ }), { present: s, past: o, future: a } = n, c = b(e), d = (...v) => {
659
+ const y = v.length > 0 ? v[0] : c.current;
660
+ c.current = y, r({
661
+ present: y,
662
+ future: [],
663
+ past: []
664
+ });
665
+ }, i = (v) => {
666
+ const y = [...o, s], m = H(t) ? t : Number(t);
667
+ m > 0 && y.length > m && y.splice(0, 1), r({
668
+ present: v,
669
+ future: [],
670
+ past: y
671
+ });
672
+ }, l = (v = 1) => {
673
+ if (a.length === 0)
674
+ return;
675
+ const { _before: y, _current: m, _after: L } = be(v, a);
676
+ r({
677
+ past: [...o, s, ...y],
678
+ present: m,
679
+ future: L
680
+ });
681
+ }, u = (v = -1) => {
682
+ if (o.length === 0)
683
+ return;
684
+ const { _before: y, _current: m, _after: L } = be(v, o);
685
+ r({
686
+ past: y,
687
+ present: m,
688
+ future: [...L, s, ...a]
689
+ });
690
+ }, g = (v) => {
691
+ const y = H(v) ? v : Number(v);
692
+ if (y !== 0) {
693
+ if (y > 0)
694
+ return l(y);
695
+ u(y);
696
+ }
697
+ };
698
+ return {
699
+ value: s,
700
+ backLength: o.length,
701
+ forwardLength: a.length,
702
+ setValue: E(i),
703
+ go: E(g),
704
+ back: E(() => {
705
+ g(-1);
706
+ }),
707
+ forward: E(() => {
708
+ g(1);
709
+ }),
710
+ reset: E(d)
711
+ };
712
+ }
713
+ const kn = (e, t) => {
714
+ const { onEnter: n, onLeave: r, onChange: s } = t || {}, [o, { setTrue: a, setFalse: c }] = ct(!1);
715
+ return X(
716
+ "mouseenter",
717
+ () => {
718
+ n?.(), a(), s?.(!0);
719
+ },
720
+ {
721
+ target: e
722
+ }
723
+ ), X(
724
+ "mouseleave",
725
+ () => {
726
+ r?.(), c(), s?.(!1);
727
+ },
728
+ {
729
+ target: e
730
+ }
731
+ ), o;
732
+ };
733
+ function _n(e, t) {
734
+ const { callback: n, ...r } = t || {}, [s, o] = T(), [a, c] = T();
735
+ return q(
736
+ () => {
737
+ const i = (Array.isArray(e) ? e : [e]).map((u) => N(u)).filter(Boolean);
738
+ if (!i.length)
739
+ return;
740
+ const l = new IntersectionObserver(
741
+ (u) => {
742
+ for (const g of u)
743
+ c(g.intersectionRatio), o(g.isIntersecting), n?.(g);
744
+ },
745
+ {
746
+ ...r,
747
+ root: N(t?.root)
748
+ }
749
+ );
750
+ return i.forEach((u) => l.observe(u)), () => {
751
+ l.disconnect();
752
+ };
753
+ },
754
+ [t?.rootMargin, t?.threshold, n],
755
+ e
756
+ ), [s, a];
757
+ }
758
+ const G = /* @__PURE__ */ new Map(), ht = (e, t, n) => {
759
+ const r = G.get(e);
760
+ r?.timer && clearTimeout(r.timer);
761
+ let s;
762
+ t > -1 && (s = setTimeout(() => {
763
+ G.delete(e);
764
+ }, t)), G.set(e, {
765
+ ...n,
766
+ timer: s
767
+ });
768
+ }, pt = (e) => G.get(e), Hn = (e) => {
769
+ e ? (Array.isArray(e) ? e : [e]).forEach((n) => G.delete(n)) : G.clear();
770
+ }, ee = /* @__PURE__ */ new Map(), vt = (e) => ee.get(e), yt = (e, t) => {
771
+ ee.set(e, t), t.then((n) => (ee.delete(e), n)).catch(() => {
772
+ ee.delete(e);
773
+ });
774
+ }, W = {}, Et = (e, t) => {
775
+ W[e] && W[e].forEach((n) => n(t));
776
+ }, ie = (e, t) => (W[e] || (W[e] = []), W[e].push(t), function() {
777
+ const r = W[e].indexOf(t);
778
+ W[e].splice(r, 1);
779
+ }), St = (e, {
780
+ cacheKey: t,
781
+ cacheTime: n = 300 * 1e3,
782
+ staleTime: r = 0,
783
+ setCache: s,
784
+ getCache: o
785
+ }) => {
786
+ const a = b(void 0), c = b(void 0), d = (l, u) => {
787
+ s ? s(u) : ht(l, n, u), Et(l, u.data);
788
+ }, i = (l, u = []) => o ? o(u) : pt(l);
789
+ return se(() => {
790
+ if (!t)
791
+ return;
792
+ const l = i(t);
793
+ l && Object.hasOwnProperty.call(l, "data") && (e.state.data = l.data, e.state.params = l.params, (r === -1 || Date.now() - l.time <= r) && (e.state.loading = !1)), a.current = ie(t, (u) => {
794
+ e.setState({ data: u });
795
+ });
796
+ }, []), $(() => {
797
+ a.current?.();
798
+ }), t ? {
799
+ onBefore: (l) => {
800
+ const u = i(t, l);
801
+ return !u || !Object.hasOwnProperty.call(u, "data") ? {} : r === -1 || Date.now() - u.time <= r ? {
802
+ loading: !1,
803
+ data: u?.data,
804
+ error: void 0,
805
+ returnNow: !0
806
+ } : {
807
+ data: u?.data,
808
+ error: void 0
809
+ };
810
+ },
811
+ onRequest: (l, u) => {
812
+ let g = vt(t);
813
+ return g && g !== c.current ? { servicePromise: g } : (g = l(...u), c.current = g, yt(t, g), { servicePromise: g });
814
+ },
815
+ onSuccess: (l, u) => {
816
+ t && (a.current?.(), d(t, {
817
+ data: l,
818
+ params: u,
819
+ time: Date.now()
820
+ }), a.current = ie(t, (g) => {
821
+ e.setState({ data: g });
822
+ }));
823
+ },
824
+ onMutate: (l) => {
825
+ t && (a.current?.(), d(t, {
826
+ data: l,
827
+ params: e.state.params,
828
+ time: Date.now()
829
+ }), a.current = ie(t, (u) => {
830
+ e.setState({ data: u });
831
+ }));
832
+ }
833
+ } : {};
834
+ }, wt = (e, { debounceWait: t, debounceLeading: n, debounceTrailing: r, debounceMaxWait: s }) => {
835
+ const o = b(void 0), a = _(() => {
836
+ const c = {};
837
+ return n !== void 0 && (c.leading = n), r !== void 0 && (c.trailing = r), s !== void 0 && (c.maxWait = s), c;
838
+ }, [n, r, s]);
839
+ return D(() => {
840
+ if (t) {
841
+ const c = e.runAsync.bind(e);
842
+ return o.current = De(
843
+ (d) => {
844
+ d();
845
+ },
846
+ t,
847
+ a
848
+ ), e.runAsync = (...d) => new Promise((i, l) => {
849
+ o.current?.(() => {
850
+ c(...d).then(i).catch(l);
851
+ });
852
+ }), () => {
853
+ o.current?.cancel(), e.runAsync = c;
854
+ };
855
+ }
856
+ }, [t, a]), t ? {
857
+ onCancel: () => {
858
+ o.current?.cancel();
859
+ }
860
+ } : {};
861
+ }, bt = (e, { loadingDelay: t, ready: n }) => {
862
+ const r = b(void 0);
863
+ if (!t)
864
+ return {};
865
+ const s = () => {
866
+ r.current && clearTimeout(r.current);
867
+ };
868
+ return {
869
+ onBefore: () => (s(), n !== !1 && (r.current = setTimeout(() => {
870
+ e.setState({
871
+ loading: !0
872
+ });
873
+ }, t)), {
874
+ loading: !1
875
+ }),
876
+ onFinally: () => {
877
+ s();
878
+ },
879
+ onCancel: () => {
880
+ s();
881
+ }
882
+ };
883
+ }, Rt = (e, { pollingInterval: t, pollingWhenHidden: n = !0, pollingErrorRetryCount: r = -1 }) => {
884
+ const s = b(void 0), o = b(void 0), a = b(0), c = () => {
885
+ s.current && clearTimeout(s.current), o.current?.();
886
+ };
887
+ return K(() => {
888
+ t || c();
889
+ }, [t]), t ? {
890
+ onBefore: () => {
891
+ c();
892
+ },
893
+ onError: () => {
894
+ a.current += 1;
895
+ },
896
+ onSuccess: () => {
897
+ a.current = 0;
898
+ },
899
+ onFinally: () => {
900
+ r === -1 || // When an error occurs, the request is not repeated after pollingErrorRetryCount retries
901
+ r !== -1 && a.current <= r ? s.current = setTimeout(() => {
902
+ !n && !Ge() ? o.current = Ke(() => {
903
+ e.refresh();
904
+ }) : e.refresh();
905
+ }, t) : a.current = 0;
906
+ },
907
+ onCancel: () => {
908
+ c();
909
+ }
910
+ } : {};
911
+ };
912
+ function Tt(e, t) {
913
+ let n = !1;
914
+ return (...r) => {
915
+ n || (n = !0, e(...r), setTimeout(() => {
916
+ n = !1;
917
+ }, t));
918
+ };
919
+ }
920
+ const Lt = (e, { refreshOnWindowFocus: t, focusTimespan: n = 5e3 }) => {
921
+ const r = b(void 0), s = () => {
922
+ r.current?.();
923
+ };
924
+ return D(() => {
925
+ if (t) {
926
+ const o = Tt(
927
+ e.refresh.bind(e),
928
+ n
929
+ );
930
+ r.current = Je(() => {
931
+ o();
932
+ });
933
+ }
934
+ return () => {
935
+ s();
936
+ };
937
+ }, [t, n]), $(() => {
938
+ s();
939
+ }), {};
940
+ }, At = (e, { retryInterval: t, retryCount: n }) => {
941
+ const r = b(void 0), s = b(0), o = b(!1);
942
+ return n ? {
943
+ onBefore: () => {
944
+ o.current || (s.current = 0), o.current = !1, r.current && clearTimeout(r.current);
945
+ },
946
+ onSuccess: () => {
947
+ s.current = 0;
948
+ },
949
+ onError: () => {
950
+ if (s.current += 1, n === -1 || s.current <= n) {
951
+ const a = t ?? Math.min(1e3 * 2 ** s.current, 3e4);
952
+ r.current = setTimeout(() => {
953
+ o.current = !0, e.refresh();
954
+ }, a);
955
+ } else
956
+ s.current = 0;
957
+ },
958
+ onCancel: () => {
959
+ s.current = 0, r.current && clearTimeout(r.current);
960
+ }
961
+ } : {};
962
+ }, Pt = (e, { throttleWait: t, throttleLeading: n, throttleTrailing: r }) => {
963
+ const s = b(void 0), o = {};
964
+ return n !== void 0 && (o.leading = n), r !== void 0 && (o.trailing = r), D(() => {
965
+ if (t) {
966
+ const a = e.runAsync.bind(e);
967
+ return s.current = Me(
968
+ (c) => {
969
+ c();
970
+ },
971
+ t,
972
+ o
973
+ ), e.runAsync = (...c) => new Promise((d, i) => {
974
+ s.current?.(() => {
975
+ a(...c).then(d).catch(i);
976
+ });
977
+ }), () => {
978
+ e.runAsync = a, s.current?.cancel();
979
+ };
980
+ }
981
+ }, [t, n, r]), t ? {
982
+ onCancel: () => {
983
+ s.current?.cancel();
984
+ }
985
+ } : {};
986
+ };
987
+ class Ct {
988
+ constructor(t, n, r, s = {}) {
989
+ this.serviceRef = t, this.options = n, this.subscribe = r, this.initState = s, this.count = 0, this.state = {
990
+ loading: !1,
991
+ params: void 0,
992
+ data: void 0,
993
+ error: void 0
994
+ }, this.state = {
995
+ ...this.state,
996
+ loading: !n.manual,
997
+ ...s
998
+ };
999
+ }
1000
+ setState(t = {}) {
1001
+ this.state = {
1002
+ ...this.state,
1003
+ ...t
1004
+ }, this.subscribe();
1005
+ }
1006
+ runPluginHandler(t, ...n) {
1007
+ const r = this.pluginImpls.map((s) => s[t]?.(...n)).filter(Boolean);
1008
+ return Object.assign({}, ...r);
1009
+ }
1010
+ async runAsync(...t) {
1011
+ this.count += 1;
1012
+ const n = this.count, {
1013
+ stopNow: r = !1,
1014
+ returnNow: s = !1,
1015
+ ...o
1016
+ } = this.runPluginHandler("onBefore", t);
1017
+ if (r)
1018
+ return new Promise(() => {
1019
+ });
1020
+ if (this.setState({
1021
+ loading: !0,
1022
+ params: t,
1023
+ ...o
1024
+ }), s)
1025
+ return Promise.resolve(o.data);
1026
+ this.options.onBefore?.(t);
1027
+ try {
1028
+ let { servicePromise: a } = this.runPluginHandler(
1029
+ "onRequest",
1030
+ this.serviceRef.current,
1031
+ t
1032
+ );
1033
+ a || (a = this.serviceRef.current(...t));
1034
+ const c = await a;
1035
+ return n !== this.count ? new Promise(() => {
1036
+ }) : (this.setState({
1037
+ data: c,
1038
+ error: void 0,
1039
+ loading: !1
1040
+ }), this.options.onSuccess?.(c, t), this.runPluginHandler("onSuccess", c, t), this.options.onFinally?.(t, c, void 0), n === this.count && this.runPluginHandler("onFinally", t, c, void 0), c);
1041
+ } catch (a) {
1042
+ if (n !== this.count)
1043
+ return new Promise(() => {
1044
+ });
1045
+ throw this.setState({
1046
+ error: a,
1047
+ loading: !1
1048
+ }), this.options.onError?.(a, t), this.runPluginHandler("onError", a, t), this.options.onFinally?.(t, void 0, a), n === this.count && this.runPluginHandler("onFinally", t, void 0, a), a;
1049
+ }
1050
+ }
1051
+ run(...t) {
1052
+ this.runAsync(...t).catch((n) => {
1053
+ this.options.onError || console.error(n);
1054
+ });
1055
+ }
1056
+ cancel() {
1057
+ this.count += 1, this.setState({
1058
+ loading: !1
1059
+ }), this.runPluginHandler("onCancel");
1060
+ }
1061
+ refresh() {
1062
+ this.run(...this.state.params || []);
1063
+ }
1064
+ refreshAsync() {
1065
+ return this.runAsync(...this.state.params || []);
1066
+ }
1067
+ mutate(t) {
1068
+ const n = z(t) ? t(this.state.data) : t;
1069
+ this.runPluginHandler("onMutate", n), this.setState({
1070
+ data: n
1071
+ });
1072
+ }
1073
+ }
1074
+ function Dt(e, t = {}, n = []) {
1075
+ const { manual: r = !1, ready: s = !0, ...o } = t;
1076
+ Q && t.defaultParams && !Array.isArray(t.defaultParams) && console.warn(
1077
+ `expected defaultParams is array, got ${typeof t.defaultParams}`
1078
+ );
1079
+ const a = {
1080
+ manual: r,
1081
+ ready: s,
1082
+ ...o
1083
+ }, c = C(e), d = re(), i = se(() => {
1084
+ const l = n.map((u) => u?.onInit?.(a)).filter(Boolean);
1085
+ return new Ct(
1086
+ c,
1087
+ a,
1088
+ d,
1089
+ Object.assign({}, ...l)
1090
+ );
1091
+ }, []);
1092
+ return i.options = a, i.pluginImpls = n.map(
1093
+ (l) => l(i, a)
1094
+ ), xe(() => {
1095
+ if (!r && s) {
1096
+ const l = i.state.params || t.defaultParams || [];
1097
+ i.run(...l);
1098
+ }
1099
+ }), $(() => {
1100
+ i.cancel();
1101
+ }), {
1102
+ loading: i.state.loading,
1103
+ data: i.state.data,
1104
+ error: i.state.error,
1105
+ params: i.state.params || [],
1106
+ cancel: E(i.cancel.bind(i)),
1107
+ refresh: E(i.refresh.bind(i)),
1108
+ refreshAsync: E(i.refreshAsync.bind(i)),
1109
+ run: E(i.run.bind(i)),
1110
+ runAsync: E(i.runAsync.bind(i)),
1111
+ mutate: E(i.mutate.bind(i))
1112
+ };
1113
+ }
1114
+ function ke(e, t, n) {
1115
+ return Dt(e, t, [
1116
+ ...n || [],
1117
+ wt,
1118
+ bt,
1119
+ Rt,
1120
+ Lt,
1121
+ Pt,
1122
+ Qe,
1123
+ St,
1124
+ At
1125
+ ]);
1126
+ }
1127
+ const Mt = (e) => e === document || e === document.documentElement || e === document.body ? Math.max(
1128
+ window.pageYOffset,
1129
+ document.documentElement.scrollTop,
1130
+ document.body.scrollTop
1131
+ ) : e.scrollTop, Re = (e) => e.scrollHeight || Math.max(document.documentElement.scrollHeight, document.body.scrollHeight), Nt = (e) => e.clientHeight || Math.max(document.documentElement.clientHeight, document.body.clientHeight), zn = (e, t = {}) => {
1132
+ const {
1133
+ target: n,
1134
+ isNoMore: r,
1135
+ threshold: s = 100,
1136
+ direction: o = "bottom",
1137
+ reloadDeps: a = [],
1138
+ manual: c,
1139
+ onBefore: d,
1140
+ onSuccess: i,
1141
+ onError: l,
1142
+ onFinally: u
1143
+ } = t, [g, v] = T(), [y, m] = T(!1), L = o === "top", A = b(void 0), F = b(0), p = _(() => r ? r(g) : !1, [g]), { loading: f, error: h, run: S, runAsync: R, cancel: k } = ke(
1144
+ async (O) => ({ currentData: await e(O), lastData: O }),
1145
+ {
1146
+ manual: c,
1147
+ onFinally: (O, I, B) => {
1148
+ m(!1), u?.(I?.currentData, B);
1149
+ },
1150
+ onBefore: () => d?.(),
1151
+ onSuccess: (O) => {
1152
+ O.lastData ? v({
1153
+ ...O.currentData,
1154
+ list: L ? [...O.currentData.list, ...O.lastData.list ?? []] : [...O.lastData.list ?? [], ...O.currentData.list]
1155
+ }) : v({
1156
+ ...O.currentData,
1157
+ list: [...O.currentData.list ?? []]
1158
+ }), setTimeout(() => {
1159
+ if (L) {
1160
+ let I = N(n);
1161
+ if (I = I === document ? document.documentElement : I, I) {
1162
+ const B = Re(I);
1163
+ I.scrollTo(0, B - F.current);
1164
+ }
1165
+ } else
1166
+ ye();
1167
+ }), i?.(O.currentData);
1168
+ },
1169
+ onError: (O) => l?.(O)
1170
+ }
1171
+ ), w = E(() => {
1172
+ p || (m(!0), S(g));
1173
+ }), x = async () => (await R(g)).currentData, P = E(() => p ? Promise.reject() : (m(!0), x())), j = () => (m(!1), S()), oe = () => (m(!1), x()), ye = () => {
1174
+ const O = N(n);
1175
+ if (!O)
1176
+ return;
1177
+ const I = O === document ? document.documentElement : O, B = Mt(I), Ee = Re(I), Be = Nt(I);
1178
+ L ? (A.current !== void 0 && A.current > B && B <= s && w(), A.current = B, F.current = Ee - B) : Ee - B <= Be + s && w();
1179
+ };
1180
+ return X(
1181
+ "scroll",
1182
+ () => {
1183
+ f || y || ye();
1184
+ },
1185
+ { target: n }
1186
+ ), K(() => {
1187
+ S();
1188
+ }, [...a]), {
1189
+ data: g,
1190
+ loading: !y && f,
1191
+ error: h,
1192
+ loadingMore: y,
1193
+ noMore: p,
1194
+ loadMore: w,
1195
+ loadMoreAsync: P,
1196
+ reload: E(j),
1197
+ reloadAsync: E(oe),
1198
+ mutate: v,
1199
+ cancel: k
1200
+ };
1201
+ }, _e = (e, t, n) => {
1202
+ const r = b(void 0), s = b(0);
1203
+ Oe(t, r.current) || (s.current += 1), r.current = t, q(e, [s.current], n);
1204
+ }, He = {
1205
+ 0: 48,
1206
+ 1: 49,
1207
+ 2: 50,
1208
+ 3: 51,
1209
+ 4: 52,
1210
+ 5: 53,
1211
+ 6: 54,
1212
+ 7: 55,
1213
+ 8: 56,
1214
+ 9: 57,
1215
+ backspace: 8,
1216
+ tab: 9,
1217
+ enter: 13,
1218
+ shift: 16,
1219
+ ctrl: 17,
1220
+ alt: 18,
1221
+ pausebreak: 19,
1222
+ capslock: 20,
1223
+ esc: 27,
1224
+ space: 32,
1225
+ pageup: 33,
1226
+ pagedown: 34,
1227
+ end: 35,
1228
+ home: 36,
1229
+ leftarrow: 37,
1230
+ uparrow: 38,
1231
+ rightarrow: 39,
1232
+ downarrow: 40,
1233
+ insert: 45,
1234
+ delete: 46,
1235
+ a: 65,
1236
+ b: 66,
1237
+ c: 67,
1238
+ d: 68,
1239
+ e: 69,
1240
+ f: 70,
1241
+ g: 71,
1242
+ h: 72,
1243
+ i: 73,
1244
+ j: 74,
1245
+ k: 75,
1246
+ l: 76,
1247
+ m: 77,
1248
+ n: 78,
1249
+ o: 79,
1250
+ p: 80,
1251
+ q: 81,
1252
+ r: 82,
1253
+ s: 83,
1254
+ t: 84,
1255
+ u: 85,
1256
+ v: 86,
1257
+ w: 87,
1258
+ x: 88,
1259
+ y: 89,
1260
+ z: 90,
1261
+ leftwindowkey: 91,
1262
+ rightwindowkey: 92,
1263
+ meta: nt ? [91, 93] : [91, 92],
1264
+ selectkey: 93,
1265
+ numpad0: 96,
1266
+ numpad1: 97,
1267
+ numpad2: 98,
1268
+ numpad3: 99,
1269
+ numpad4: 100,
1270
+ numpad5: 101,
1271
+ numpad6: 102,
1272
+ numpad7: 103,
1273
+ numpad8: 104,
1274
+ numpad9: 105,
1275
+ multiply: 106,
1276
+ add: 107,
1277
+ subtract: 109,
1278
+ decimalpoint: 110,
1279
+ divide: 111,
1280
+ f1: 112,
1281
+ f2: 113,
1282
+ f3: 114,
1283
+ f4: 115,
1284
+ f5: 116,
1285
+ f6: 117,
1286
+ f7: 118,
1287
+ f8: 119,
1288
+ f9: 120,
1289
+ f10: 121,
1290
+ f11: 122,
1291
+ f12: 123,
1292
+ numlock: 144,
1293
+ scrolllock: 145,
1294
+ semicolon: 186,
1295
+ equalsign: 187,
1296
+ comma: 188,
1297
+ dash: 189,
1298
+ period: 190,
1299
+ forwardslash: 191,
1300
+ graveaccent: 192,
1301
+ openbracket: 219,
1302
+ backslash: 220,
1303
+ closebracket: 221,
1304
+ singlequote: 222
1305
+ }, me = {
1306
+ ctrl: (e) => e.ctrlKey,
1307
+ shift: (e) => e.shiftKey,
1308
+ alt: (e) => e.altKey,
1309
+ meta: (e) => e.type === "keyup" ? He.meta.includes(e.keyCode) : e.metaKey
1310
+ };
1311
+ function ze(e) {
1312
+ return ne(e) || H(e);
1313
+ }
1314
+ function Ot(e) {
1315
+ const t = Object.keys(me).reduce((n, r) => me[r](e) ? n + 1 : n, 0);
1316
+ return [16, 17, 18, 91, 92].includes(e.keyCode) ? t : t + 1;
1317
+ }
1318
+ function Te(e, t, n) {
1319
+ if (!e.key)
1320
+ return !1;
1321
+ if (H(t))
1322
+ return e.keyCode === t ? t : !1;
1323
+ const r = t.split(".");
1324
+ let s = 0;
1325
+ for (const o of r) {
1326
+ const a = me[o], c = He[o.toLowerCase()];
1327
+ (a && a(e) || c && c === e.keyCode) && s++;
1328
+ }
1329
+ return n ? s === r.length && Ot(e) === r.length ? t : !1 : s === r.length ? t : !1;
1330
+ }
1331
+ function Ft(e, t) {
1332
+ return z(e) ? e : ze(e) ? (n) => Te(n, e, t) : Array.isArray(e) ? (n) => e.find((r) => Te(n, r, t)) : () => !!e;
1333
+ }
1334
+ const xt = ["keydown"];
1335
+ function jn(e, t, n) {
1336
+ const {
1337
+ events: r = xt,
1338
+ target: s,
1339
+ exactMatch: o = !1,
1340
+ useCapture: a = !1
1341
+ } = n || {}, c = C(t), d = C(e);
1342
+ _e(
1343
+ () => {
1344
+ const i = N(s, window);
1345
+ if (!i)
1346
+ return;
1347
+ const l = (u) => {
1348
+ const v = Ft(d.current, o)(u), y = ze(v) ? v : u.key;
1349
+ if (v)
1350
+ return c.current?.(u, y);
1351
+ };
1352
+ for (const u of r)
1353
+ i?.addEventListener?.(u, l, a);
1354
+ return () => {
1355
+ for (const u of r)
1356
+ i?.removeEventListener?.(u, l, a);
1357
+ };
1358
+ },
1359
+ [r],
1360
+ s
1361
+ );
1362
+ }
1363
+ const Le = "HOOKS_SYNC_STORAGE_EVENT_NAME";
1364
+ function je(e) {
1365
+ function t(n, r = {}) {
1366
+ let s;
1367
+ const {
1368
+ listenStorageChange: o = !1,
1369
+ onError: a = (m) => {
1370
+ console.error(m);
1371
+ }
1372
+ } = r;
1373
+ try {
1374
+ s = e();
1375
+ } catch (m) {
1376
+ a(m);
1377
+ }
1378
+ const c = (m) => r.serializer ? r.serializer(m) : JSON.stringify(m), d = (m) => r.deserializer ? r.deserializer(m) : JSON.parse(m);
1379
+ function i() {
1380
+ try {
1381
+ const m = s?.getItem(n);
1382
+ if (m)
1383
+ return d(m);
1384
+ } catch (m) {
1385
+ a(m);
1386
+ }
1387
+ return z(r.defaultValue) ? r.defaultValue() : r.defaultValue;
1388
+ }
1389
+ const [l, u] = T(i);
1390
+ K(() => {
1391
+ u(i());
1392
+ }, [n]);
1393
+ const g = (m) => {
1394
+ const L = z(m) ? m(l) : m;
1395
+ o || u(L);
1396
+ try {
1397
+ let A;
1398
+ const F = s?.getItem(n);
1399
+ Ue(L) ? (A = null, s?.removeItem(n)) : (A = c(L), s?.setItem(n, A)), dispatchEvent(
1400
+ // send custom event to communicate within same page
1401
+ // importantly this should not be a StorageEvent since those cannot
1402
+ // be constructed with a non-built-in storage area
1403
+ new CustomEvent(Le, {
1404
+ detail: {
1405
+ key: n,
1406
+ newValue: A,
1407
+ oldValue: F,
1408
+ storageArea: s
1409
+ }
1410
+ })
1411
+ );
1412
+ } catch (A) {
1413
+ a(A);
1414
+ }
1415
+ }, v = (m) => {
1416
+ m.key !== n || m.storageArea !== s || u(i());
1417
+ }, y = (m) => {
1418
+ v(m.detail);
1419
+ };
1420
+ return X("storage", v, {
1421
+ enable: o
1422
+ }), X(Le, y, {
1423
+ enable: o
1424
+ }), [
1425
+ l,
1426
+ E(g)
1427
+ ];
1428
+ }
1429
+ return t;
1430
+ }
1431
+ const In = je(
1432
+ () => V ? localStorage : void 0
1433
+ );
1434
+ function Yn(e) {
1435
+ const t = b(!1);
1436
+ return M(
1437
+ async (...n) => {
1438
+ if (!t.current) {
1439
+ t.current = !0;
1440
+ try {
1441
+ return await e(...n);
1442
+ } catch (r) {
1443
+ throw r;
1444
+ } finally {
1445
+ t.current = !1;
1446
+ }
1447
+ }
1448
+ },
1449
+ [e]
1450
+ );
1451
+ }
1452
+ function Xn(e, t, { delay: n = 300, moveThreshold: r, onClick: s, onLongPressEnd: o } = {}) {
1453
+ const a = C(e), c = C(s), d = C(o), i = b(void 0), l = b(!1), u = b({ x: 0, y: 0 }), g = b(!1), v = b(!1), y = !!(r?.x && r.x > 0 || r?.y && r.y > 0);
1454
+ q(
1455
+ () => {
1456
+ const m = N(t);
1457
+ if (!m?.addEventListener)
1458
+ return;
1459
+ const L = (w) => {
1460
+ const { clientX: x, clientY: P } = A(w), j = Math.abs(x - u.current.x), oe = Math.abs(P - u.current.y);
1461
+ return !!(r?.x && j > r.x || r?.y && oe > r.y);
1462
+ };
1463
+ function A(w) {
1464
+ return "TouchEvent" in window && w instanceof TouchEvent ? {
1465
+ clientX: w.touches[0].clientX,
1466
+ clientY: w.touches[0].clientY
1467
+ } : w instanceof MouseEvent ? {
1468
+ clientX: w.clientX,
1469
+ clientY: w.clientY
1470
+ } : { clientX: 0, clientY: 0 };
1471
+ }
1472
+ const F = (w) => {
1473
+ i.current = setTimeout(() => {
1474
+ a.current(w), l.current = !0;
1475
+ }, n);
1476
+ }, p = (w) => {
1477
+ if (!v.current) {
1478
+ if (v.current = !0, y) {
1479
+ const { clientX: x, clientY: P } = A(w);
1480
+ u.current.x = x, u.current.y = P;
1481
+ }
1482
+ F(w);
1483
+ }
1484
+ }, f = (w) => {
1485
+ w?.sourceCapabilities?.firesTouchEvents || (g.current = !0, y && (u.current.x = w.clientX, u.current.y = w.clientY), F(w));
1486
+ }, h = (w) => {
1487
+ i.current && L(w) && (clearTimeout(i.current), i.current = void 0);
1488
+ }, S = (w) => {
1489
+ v.current && (v.current = !1, i.current && (clearTimeout(i.current), i.current = void 0), l.current ? d.current?.(w) : c.current && c.current(w), l.current = !1);
1490
+ }, R = (w) => {
1491
+ w?.sourceCapabilities?.firesTouchEvents || g.current && (g.current = !1, i.current && (clearTimeout(i.current), i.current = void 0), l.current ? d.current?.(w) : c.current && c.current(w), l.current = !1);
1492
+ }, k = (w) => {
1493
+ g.current && (g.current = !1, i.current && (clearTimeout(i.current), i.current = void 0), l.current && (d.current?.(w), l.current = !1));
1494
+ };
1495
+ return m.addEventListener("mousedown", f), m.addEventListener("mouseup", R), m.addEventListener("mouseleave", k), m.addEventListener("touchstart", p), m.addEventListener("touchend", S), y && (m.addEventListener("mousemove", h), m.addEventListener("touchmove", h)), () => {
1496
+ i.current && (clearTimeout(i.current), l.current = !1), m.removeEventListener("mousedown", f), m.removeEventListener("mouseup", R), m.removeEventListener("mouseleave", k), m.removeEventListener("touchstart", p), m.removeEventListener("touchend", S), y && (m.removeEventListener("mousemove", h), m.removeEventListener("touchmove", h));
1497
+ };
1498
+ },
1499
+ [],
1500
+ t
1501
+ );
1502
+ }
1503
+ function Bn(e) {
1504
+ const t = () => new Map(e), [n, r] = T(t), s = (i, l) => {
1505
+ r((u) => {
1506
+ const g = new Map(u);
1507
+ return g.set(i, l), g;
1508
+ });
1509
+ }, o = (i) => {
1510
+ r(new Map(i));
1511
+ }, a = (i) => {
1512
+ r((l) => {
1513
+ const u = new Map(l);
1514
+ return u.delete(i), u;
1515
+ });
1516
+ }, c = () => r(t()), d = (i) => n.get(i);
1517
+ return [
1518
+ n,
1519
+ {
1520
+ set: E(s),
1521
+ setAll: E(o),
1522
+ remove: E(a),
1523
+ reset: E(c),
1524
+ get: E(d)
1525
+ }
1526
+ ];
1527
+ }
1528
+ function pe(e) {
1529
+ const t = b(0), [n, r] = T(e), s = M((o) => {
1530
+ cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
1531
+ r(o);
1532
+ });
1533
+ }, []);
1534
+ return $(() => {
1535
+ cancelAnimationFrame(t.current);
1536
+ }), [n, s];
1537
+ }
1538
+ const kt = {
1539
+ screenX: NaN,
1540
+ screenY: NaN,
1541
+ clientX: NaN,
1542
+ clientY: NaN,
1543
+ pageX: NaN,
1544
+ pageY: NaN,
1545
+ elementX: NaN,
1546
+ elementY: NaN,
1547
+ elementH: NaN,
1548
+ elementW: NaN,
1549
+ elementPosX: NaN,
1550
+ elementPosY: NaN
1551
+ }, Vn = (e) => {
1552
+ const [t, n] = pe(kt);
1553
+ return X(
1554
+ "mousemove",
1555
+ (r) => {
1556
+ const { screenX: s, screenY: o, clientX: a, clientY: c, pageX: d, pageY: i } = r, l = {
1557
+ screenX: s,
1558
+ screenY: o,
1559
+ clientX: a,
1560
+ clientY: c,
1561
+ pageX: d,
1562
+ pageY: i,
1563
+ elementX: NaN,
1564
+ elementY: NaN,
1565
+ elementH: NaN,
1566
+ elementW: NaN,
1567
+ elementPosX: NaN,
1568
+ elementPosY: NaN
1569
+ }, u = N(e);
1570
+ if (u) {
1571
+ const { left: g, top: v, width: y, height: m } = u.getBoundingClientRect();
1572
+ l.elementPosX = g + window.pageXOffset, l.elementPosY = v + window.pageYOffset, l.elementX = d - l.elementPosX, l.elementY = i - l.elementPosY, l.elementW = y, l.elementH = m;
1573
+ }
1574
+ n(l);
1575
+ },
1576
+ {
1577
+ target: () => document
1578
+ }
1579
+ ), t;
1580
+ }, qn = (e, t, n = {}) => {
1581
+ const r = C(e);
1582
+ _e(
1583
+ () => {
1584
+ const s = N(t);
1585
+ if (!s)
1586
+ return;
1587
+ const o = new MutationObserver(r.current);
1588
+ return o.observe(s, n), () => {
1589
+ o?.disconnect();
1590
+ };
1591
+ },
1592
+ [n],
1593
+ t
1594
+ );
1595
+ };
1596
+ function Ie() {
1597
+ const e = navigator;
1598
+ return $e(e) ? e.connection || e.mozConnection || e.webkitConnection : null;
1599
+ }
1600
+ function Ae() {
1601
+ const e = Ie();
1602
+ return e ? {
1603
+ rtt: e.rtt,
1604
+ type: e.type,
1605
+ saveData: e.saveData,
1606
+ downlink: e.downlink,
1607
+ downlinkMax: e.downlinkMax,
1608
+ effectiveType: e.effectiveType
1609
+ } : {};
1610
+ }
1611
+ function Un() {
1612
+ const [e, t] = T(() => ({
1613
+ since: void 0,
1614
+ online: navigator?.onLine,
1615
+ ...Ae()
1616
+ }));
1617
+ return D(() => {
1618
+ const n = () => {
1619
+ t((a) => ({
1620
+ ...a,
1621
+ online: !0,
1622
+ since: /* @__PURE__ */ new Date()
1623
+ }));
1624
+ }, r = () => {
1625
+ t((a) => ({
1626
+ ...a,
1627
+ online: !1,
1628
+ since: /* @__PURE__ */ new Date()
1629
+ }));
1630
+ }, s = () => {
1631
+ t((a) => ({
1632
+ ...a,
1633
+ ...Ae()
1634
+ }));
1635
+ };
1636
+ window.addEventListener("online", n), window.addEventListener("offline", r);
1637
+ const o = Ie();
1638
+ return o?.addEventListener("change", s), () => {
1639
+ window.removeEventListener("online", n), window.removeEventListener("offline", r), o?.removeEventListener(
1640
+ "change",
1641
+ s
1642
+ );
1643
+ };
1644
+ }, []), e;
1645
+ }
1646
+ const $n = (e, t = {}) => {
1647
+ const { defaultPageSize: n = 10, defaultCurrent: r = 1, ...s } = t, o = ke(e, {
1648
+ defaultParams: [{ current: r, pageSize: n }],
1649
+ refreshDepsAction: () => {
1650
+ u(1);
1651
+ },
1652
+ ...s
1653
+ }), { current: a = 1, pageSize: c = n } = o.params[0] || {}, d = o.data?.total || 0, i = _(
1654
+ () => Math.ceil(d / c),
1655
+ [c, d]
1656
+ ), l = (v, y) => {
1657
+ let m = v <= 0 ? 1 : v;
1658
+ const L = y <= 0 ? 1 : y, A = Math.ceil(d / L);
1659
+ m > A && (m = Math.max(1, A));
1660
+ const [F = {}, ...p] = o.params || [];
1661
+ o.run(
1662
+ {
1663
+ ...F,
1664
+ current: m,
1665
+ pageSize: L
1666
+ },
1667
+ ...p
1668
+ );
1669
+ }, u = (v) => {
1670
+ l(v, c);
1671
+ }, g = (v) => {
1672
+ l(a, v);
1673
+ };
1674
+ return {
1675
+ ...o,
1676
+ pagination: {
1677
+ current: a,
1678
+ pageSize: c,
1679
+ total: d,
1680
+ totalPage: i,
1681
+ onChange: E(l),
1682
+ changeCurrent: E(u),
1683
+ changePageSize: E(g)
1684
+ }
1685
+ };
1686
+ }, _t = (e, t = 0) => {
1687
+ if (typeof requestAnimationFrame > "u")
1688
+ return {
1689
+ id: setInterval(e, t)
1690
+ };
1691
+ let n = Date.now();
1692
+ const r = {
1693
+ id: 0
1694
+ }, s = () => {
1695
+ Date.now() - n >= t && (e(), n = Date.now()), r.id = requestAnimationFrame(s);
1696
+ };
1697
+ return r.id = requestAnimationFrame(s), r;
1698
+ }, Ht = (e) => typeof cancelAnimationFrame > "u", zt = (e) => {
1699
+ if (Ht(e.id))
1700
+ return clearInterval(e.id);
1701
+ cancelAnimationFrame(e.id);
1702
+ };
1703
+ function Wn(e, t, n) {
1704
+ const r = n?.immediate, s = C(e), o = b(void 0), a = M(() => {
1705
+ o.current && zt(o.current);
1706
+ }, []);
1707
+ return D(() => {
1708
+ if (!(!H(t) || t < 0))
1709
+ return r && s.current(), o.current = _t(() => {
1710
+ s.current();
1711
+ }, t), a;
1712
+ }, [t]), a;
1713
+ }
1714
+ const jt = (e, t = 0) => {
1715
+ if (typeof requestAnimationFrame > "u")
1716
+ return {
1717
+ id: setTimeout(e, t)
1718
+ };
1719
+ const n = {
1720
+ id: 0
1721
+ }, r = Date.now(), s = () => {
1722
+ Date.now() - r >= t ? e() : n.id = requestAnimationFrame(s);
1723
+ };
1724
+ return n.id = requestAnimationFrame(s), n;
1725
+ }, It = (e) => typeof cancelAnimationFrame > "u", Yt = (e) => {
1726
+ if (It(e.id))
1727
+ return clearTimeout(e.id);
1728
+ cancelAnimationFrame(e.id);
1729
+ };
1730
+ function Gn(e, t) {
1731
+ const n = C(e), r = b(void 0), s = M(() => {
1732
+ r.current && Yt(r.current);
1733
+ }, []);
1734
+ return D(() => {
1735
+ if (!(!H(t) || t < 0))
1736
+ return r.current = jt(() => {
1737
+ n.current();
1738
+ }, t), s;
1739
+ }, [t]), s;
1740
+ }
1741
+ const Pe = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap();
1742
+ function Ye(e, t) {
1743
+ const n = Pe.get(e);
1744
+ if (n)
1745
+ return n;
1746
+ if (Ce.has(e))
1747
+ return e;
1748
+ const r = new Proxy(e, {
1749
+ get(s, o, a) {
1750
+ const c = Reflect.get(s, o, a), d = Reflect.getOwnPropertyDescriptor(s, o);
1751
+ return !d?.configurable && !d?.writable ? c : de(c) || Array.isArray(c) ? Ye(c, t) : c;
1752
+ },
1753
+ set(s, o, a) {
1754
+ const c = Reflect.set(s, o, a);
1755
+ return t(), c;
1756
+ },
1757
+ deleteProperty(s, o) {
1758
+ const a = Reflect.deleteProperty(s, o);
1759
+ return t(), a;
1760
+ }
1761
+ });
1762
+ return Pe.set(e, r), Ce.set(r, e), r;
1763
+ }
1764
+ function Kn(e) {
1765
+ const t = re(), n = b(e);
1766
+ return se(() => Ye(n.current, () => {
1767
+ t();
1768
+ }), []);
1769
+ }
1770
+ const Jn = (e) => {
1771
+ const t = b(e), n = se(
1772
+ () => z(t.current) ? t.current() : t.current,
1773
+ []
1774
+ ), [r, s] = T(n), o = E(() => {
1775
+ s(n);
1776
+ });
1777
+ return [r, s, o];
1778
+ }, te = /* @__PURE__ */ new Set();
1779
+ let U, ge = {
1780
+ xs: 0,
1781
+ sm: 576,
1782
+ md: 768,
1783
+ lg: 992,
1784
+ xl: 1200
1785
+ };
1786
+ function le() {
1787
+ const e = U;
1788
+ if (ve(), e !== U)
1789
+ for (const t of te)
1790
+ t();
1791
+ }
1792
+ let Z = !1;
1793
+ function ve() {
1794
+ const e = window.innerWidth, t = {};
1795
+ let n = !1;
1796
+ for (const r of Object.keys(ge))
1797
+ t[r] = e >= ge[r], t[r] !== U[r] && (n = !0);
1798
+ n && (U = t);
1799
+ }
1800
+ function Qn(e) {
1801
+ ge = e, U && ve();
1802
+ }
1803
+ function Zn() {
1804
+ V && !Z && (U = {}, ve(), window.addEventListener("resize", le), Z = !0);
1805
+ const [e, t] = T(U);
1806
+ return D(() => {
1807
+ if (!V)
1808
+ return;
1809
+ Z || window.addEventListener("resize", le);
1810
+ const n = () => {
1811
+ t(U);
1812
+ };
1813
+ return te.add(n), () => {
1814
+ te.delete(n), te.size === 0 && (window.removeEventListener("resize", le), Z = !1);
1815
+ };
1816
+ }, []), e;
1817
+ }
1818
+ const Xt = () => {
1819
+ const e = b(!1);
1820
+ return D(() => (e.current = !1, () => {
1821
+ e.current = !0;
1822
+ }), []), e;
1823
+ };
1824
+ function er(e) {
1825
+ const t = Xt(), [n, r] = T(e), s = M((o) => {
1826
+ t.current || r(o);
1827
+ }, []);
1828
+ return [n, s];
1829
+ }
1830
+ function tr(e, t = () => !0) {
1831
+ const [n, r] = pe(), s = C(t);
1832
+ return q(
1833
+ () => {
1834
+ const o = N(e, document);
1835
+ if (!o)
1836
+ return;
1837
+ const a = () => {
1838
+ let c;
1839
+ o === document ? document.scrollingElement ? c = {
1840
+ left: document.scrollingElement.scrollLeft,
1841
+ top: document.scrollingElement.scrollTop
1842
+ } : c = {
1843
+ left: Math.max(
1844
+ window.pageXOffset,
1845
+ document.documentElement.scrollLeft,
1846
+ document.body.scrollLeft
1847
+ ),
1848
+ top: Math.max(
1849
+ window.pageYOffset,
1850
+ document.documentElement.scrollTop,
1851
+ document.body.scrollTop
1852
+ )
1853
+ } : c = {
1854
+ left: o.scrollLeft,
1855
+ top: o.scrollTop
1856
+ }, s.current(c) && r(c);
1857
+ };
1858
+ return a(), o.addEventListener("scroll", a), () => {
1859
+ o.removeEventListener("scroll", a);
1860
+ };
1861
+ },
1862
+ [],
1863
+ e
1864
+ ), n;
1865
+ }
1866
+ function nr(e, t) {
1867
+ let n = [], r;
1868
+ Array.isArray(t) ? n = t : de(t) && (n = t?.defaultSelected ?? n, r = t?.itemKey ?? r);
1869
+ const s = (p) => z(r) ? r(p) : ne(r) && de(p) ? p[r] : p, [o, a] = T(n), c = _(() => {
1870
+ const p = /* @__PURE__ */ new Map();
1871
+ return Array.isArray(o) && o.forEach((f) => {
1872
+ p.set(s(f), f);
1873
+ }), p;
1874
+ }, [o]), d = (p) => c.has(s(p)), i = (p) => {
1875
+ c.set(s(p), p), a(Array.from(c.values()));
1876
+ }, l = (p) => {
1877
+ c.delete(s(p)), a(Array.from(c.values()));
1878
+ }, u = (p) => {
1879
+ d(p) ? l(p) : i(p);
1880
+ }, g = () => {
1881
+ e.forEach((p) => {
1882
+ c.set(s(p), p);
1883
+ }), a(Array.from(c.values()));
1884
+ }, v = () => {
1885
+ e.forEach((p) => {
1886
+ c.delete(s(p));
1887
+ }), a(Array.from(c.values()));
1888
+ }, y = _(
1889
+ () => e.every((p) => !c.has(s(p))),
1890
+ [e, c]
1891
+ ), m = _(
1892
+ () => e.every((p) => c.has(s(p))) && !y,
1893
+ [e, c, y]
1894
+ ), L = _(
1895
+ () => !y && !m,
1896
+ [y, m]
1897
+ ), A = () => m ? v() : g(), F = () => {
1898
+ c.clear(), a([]);
1899
+ };
1900
+ return {
1901
+ selected: o,
1902
+ noneSelected: y,
1903
+ allSelected: m,
1904
+ partiallySelected: L,
1905
+ setSelected: a,
1906
+ isSelected: d,
1907
+ select: E(i),
1908
+ unSelect: E(l),
1909
+ toggle: E(u),
1910
+ selectAll: E(g),
1911
+ unSelectAll: E(v),
1912
+ clearAll: E(F),
1913
+ toggleAll: E(A)
1914
+ };
1915
+ }
1916
+ const rr = je(
1917
+ () => V ? sessionStorage : void 0
1918
+ );
1919
+ function sr(e) {
1920
+ const t = () => new Set(e), [n, r] = T(t), s = (d) => {
1921
+ r((i) => d(new Set(i)));
1922
+ }, o = (d) => {
1923
+ n.has(d) || s((i) => (i.add(d), i));
1924
+ }, a = (d) => {
1925
+ n.has(d) && s((i) => (i.delete(d), i));
1926
+ }, c = () => r(t());
1927
+ return [
1928
+ n,
1929
+ {
1930
+ add: E(o),
1931
+ remove: E(a),
1932
+ reset: E(c)
1933
+ }
1934
+ ];
1935
+ }
1936
+ const or = (e) => {
1937
+ const [t, n] = T(e), r = E((s) => {
1938
+ n((o) => {
1939
+ const a = z(s) ? s(o) : s;
1940
+ return a ? { ...o, ...a } : o;
1941
+ });
1942
+ });
1943
+ return [t, r];
1944
+ }, Bt = Ze(he), Vt = V ? Bt : q;
1945
+ function qt(e) {
1946
+ const [t, n] = pe(() => {
1947
+ const r = N(e);
1948
+ return r ? { width: r.clientWidth, height: r.clientHeight } : void 0;
1949
+ });
1950
+ return Vt(
1951
+ () => {
1952
+ const r = N(e);
1953
+ if (!r)
1954
+ return;
1955
+ const s = new ResizeObserver((o) => {
1956
+ o.forEach((a) => {
1957
+ const { clientWidth: c, clientHeight: d } = a.target;
1958
+ n({ width: c, height: d });
1959
+ });
1960
+ });
1961
+ return s.observe(r), () => {
1962
+ s.disconnect();
1963
+ };
1964
+ },
1965
+ [],
1966
+ e
1967
+ ), t;
1968
+ }
1969
+ const Ut = () => {
1970
+ const e = V ? window.matchMedia("(prefers-color-scheme: dark)") : void 0, [t, n] = T(() => V && e?.matches ? "dark" : "light");
1971
+ return D(() => {
1972
+ const r = (s) => {
1973
+ s.matches ? n(
1974
+ "dark"
1975
+ /* DARK */
1976
+ ) : n(
1977
+ "light"
1978
+ /* LIGHT */
1979
+ );
1980
+ };
1981
+ return e?.addEventListener("change", r), () => {
1982
+ e?.removeEventListener("change", r);
1983
+ };
1984
+ }, []), t;
1985
+ };
1986
+ function cr(e = {}) {
1987
+ const { localStorageKey: t } = e, [n, r] = T(() => t?.length && localStorage.getItem(t) || "system"), s = (c) => {
1988
+ r(c), t?.length && localStorage.setItem(t, c);
1989
+ }, o = Ut();
1990
+ return {
1991
+ theme: n === "system" ? o : n,
1992
+ themeMode: n,
1993
+ setThemeMode: E(s)
1994
+ };
1995
+ }
1996
+ function Xe(e, t) {
1997
+ Q && (z(e) || console.error(
1998
+ `useThrottleFn expected parameter is a function, got ${typeof e}`
1999
+ ));
2000
+ const n = C(e), r = t?.wait ?? 1e3, s = _(
2001
+ () => Me(
2002
+ (...o) => n.current(...o),
2003
+ r,
2004
+ t
2005
+ ),
2006
+ []
2007
+ );
2008
+ return $(() => {
2009
+ s.cancel();
2010
+ }), {
2011
+ run: s,
2012
+ cancel: s.cancel,
2013
+ flush: s.flush
2014
+ };
2015
+ }
2016
+ function ar(e, t) {
2017
+ const [n, r] = T(e), { run: s } = Xe(() => {
2018
+ r(e);
2019
+ }, t);
2020
+ return D(() => {
2021
+ s();
2022
+ }, [e]), n;
2023
+ }
2024
+ function ur(e, t, n) {
2025
+ const [r, s] = T({}), { run: o } = Xe(() => {
2026
+ s({});
2027
+ }, n);
2028
+ D(() => o(), t), K(e, [r]);
2029
+ }
2030
+ const ir = (e, t) => {
2031
+ const n = E(e), r = b(null), s = M(() => {
2032
+ r.current && clearTimeout(r.current);
2033
+ }, []);
2034
+ return D(() => {
2035
+ if (!(!H(t) || t < 0))
2036
+ return r.current = setTimeout(n, t), s;
2037
+ }, [t]), s;
2038
+ }, $t = {
2039
+ restoreOnUnmount: !1
2040
+ };
2041
+ function lr(e, t = $t) {
2042
+ const n = b(V ? document.title : "");
2043
+ D(() => {
2044
+ document.title = e;
2045
+ }, [e]), $(() => {
2046
+ t.restoreOnUnmount && (document.title = n.current);
2047
+ });
2048
+ }
2049
+ const Wt = (e, t) => e ? e.map((n, r) => Object.is(e[r], t?.[r]) ? -1 : r).filter((n) => n >= 0) : t ? t.map((n, r) => r) : [], fr = (e, t) => {
2050
+ const n = b(void 0);
2051
+ D(() => {
2052
+ const r = Wt(n.current, t), s = n.current;
2053
+ return n.current = t, e(r, s, t);
2054
+ }, t);
2055
+ }, dr = tt(he), fe = rt, Gt = {
2056
+ parseNumbers: !1,
2057
+ parseBooleans: !1
2058
+ }, Kt = {
2059
+ skipNull: !1,
2060
+ skipEmptyString: !1
2061
+ }, mr = (e, t) => {
2062
+ const {
2063
+ navigateMode: n = "push",
2064
+ parseOptions: r,
2065
+ stringifyOptions: s
2066
+ } = t || {}, o = { ...Gt, ...r }, a = {
2067
+ ...Kt,
2068
+ ...s
2069
+ }, c = fe.useLocation(), d = fe.useHistory?.(), i = fe.useNavigate?.(), l = re(), u = b(
2070
+ typeof e == "function" ? e() : e || {}
2071
+ ), g = _(() => ae.parse(c.search, o), [c.search]), v = _(
2072
+ () => ({
2073
+ ...u.current,
2074
+ ...g
2075
+ }),
2076
+ [g]
2077
+ );
2078
+ return [v, E((m) => {
2079
+ const L = typeof m == "function" ? m(v) : m;
2080
+ l(), d && d[n](
2081
+ {
2082
+ hash: c.hash,
2083
+ search: ae.stringify(
2084
+ { ...g, ...L },
2085
+ a
2086
+ ) || "?"
2087
+ },
2088
+ c.state
2089
+ ), i && i(
2090
+ {
2091
+ hash: c.hash,
2092
+ search: ae.stringify(
2093
+ { ...g, ...L },
2094
+ a
2095
+ ) || "?"
2096
+ },
2097
+ {
2098
+ replace: n === "replace",
2099
+ state: c.state
2100
+ }
2101
+ );
2102
+ })];
2103
+ }, gr = (e, t) => {
2104
+ const { containerTarget: n, wrapperTarget: r, itemHeight: s, overscan: o = 5 } = t, a = C(s), c = qt(n), d = b(!1), [i, l] = T(
2105
+ []
2106
+ ), [u, g] = T({}), v = (p, f) => {
2107
+ if (H(a.current))
2108
+ return Math.ceil(p / a.current);
2109
+ let h = 0, S = 0;
2110
+ for (let R = f; R < e.length; R++) {
2111
+ const k = a.current(R, e[R]);
2112
+ if (h += k, S = R, h >= p)
2113
+ break;
2114
+ }
2115
+ return S - f;
2116
+ }, y = (p) => {
2117
+ if (H(a.current))
2118
+ return Math.floor(p / a.current);
2119
+ let f = 0, h = 0;
2120
+ for (let S = 0; S < e.length; S++) {
2121
+ const R = a.current(S, e[S]);
2122
+ if (f += R, f >= p) {
2123
+ h = S;
2124
+ break;
2125
+ }
2126
+ }
2127
+ return h + 1;
2128
+ }, m = (p) => H(a.current) ? p * a.current : e.slice(0, p).reduce(
2129
+ (h, S, R) => h + a.current(R, e[R]),
2130
+ 0
2131
+ ), L = _(() => H(a.current) ? e.length * a.current : e.reduce(
2132
+ (p, f, h) => p + a.current(h, e[h]),
2133
+ 0
2134
+ ), [e]), A = () => {
2135
+ const p = N(n);
2136
+ if (p) {
2137
+ const { scrollTop: f, clientHeight: h } = p, S = y(f), R = v(h, S), k = Math.max(0, S - o), w = Math.min(e.length, S + R + o), x = m(k);
2138
+ g({
2139
+ height: L - x + "px",
2140
+ marginTop: x + "px"
2141
+ }), l(
2142
+ e.slice(k, w).map((P, j) => ({
2143
+ data: P,
2144
+ index: j + k
2145
+ }))
2146
+ );
2147
+ }
2148
+ };
2149
+ return K(() => {
2150
+ const p = N(r);
2151
+ p && Object.keys(u).forEach(
2152
+ (f) => p.style[f] = u[f]
2153
+ );
2154
+ }, [u]), D(() => {
2155
+ !c?.width || !c?.height || A();
2156
+ }, [c?.width, c?.height, e]), X(
2157
+ "scroll",
2158
+ (p) => {
2159
+ if (d.current) {
2160
+ d.current = !1;
2161
+ return;
2162
+ }
2163
+ p.preventDefault(), A();
2164
+ },
2165
+ {
2166
+ target: n
2167
+ }
2168
+ ), [i, E((p) => {
2169
+ const f = N(n);
2170
+ f && (d.current = !0, f.scrollTop = m(p), A());
2171
+ })];
2172
+ };
2173
+ function hr(e, t = {}) {
2174
+ const {
2175
+ reconnectLimit: n = 3,
2176
+ reconnectInterval: r = 3 * 1e3,
2177
+ manual: s = !1,
2178
+ onOpen: o,
2179
+ onClose: a,
2180
+ onMessage: c,
2181
+ onError: d,
2182
+ protocols: i
2183
+ } = t, [l, u] = T(), [g, v] = T(
2184
+ 3
2185
+ /* Closed */
2186
+ ), y = C(o), m = C(a), L = C(c), A = C(d), F = C(g), p = b(0), f = b(void 0), h = b(void 0), S = () => {
2187
+ p.current < n && h.current?.readyState !== 1 && (f.current && clearTimeout(f.current), f.current = setTimeout(() => {
2188
+ R(), p.current++;
2189
+ }, r));
2190
+ }, R = () => {
2191
+ f.current && clearTimeout(f.current), h.current && h.current.close();
2192
+ const P = new WebSocket(e, i);
2193
+ v(
2194
+ 0
2195
+ /* Connecting */
2196
+ ), P.onerror = (j) => {
2197
+ h.current === P && (S(), A.current?.(j, P), v(
2198
+ P.readyState || 3
2199
+ /* Closed */
2200
+ ));
2201
+ }, P.onopen = (j) => {
2202
+ h.current === P && (y.current?.(j, P), p.current = 0, v(
2203
+ P.readyState || 1
2204
+ /* Open */
2205
+ ));
2206
+ }, P.onmessage = (j) => {
2207
+ h.current === P && (L.current?.(j, P), u(j));
2208
+ }, P.onclose = (j) => {
2209
+ m.current?.(j, P), h.current === P && S(), (!h.current || h.current === P) && v(
2210
+ P.readyState || 3
2211
+ /* Closed */
2212
+ );
2213
+ }, h.current = P;
2214
+ }, k = (P) => {
2215
+ if (F.current === 1)
2216
+ h.current?.send(P);
2217
+ else
2218
+ throw new Error("WebSocket disconnected");
2219
+ }, w = () => {
2220
+ p.current = 0, R();
2221
+ }, x = () => {
2222
+ f.current && clearTimeout(f.current), p.current = n, h.current?.close(), h.current = void 0;
2223
+ };
2224
+ return D(() => {
2225
+ !s && e && w();
2226
+ }, [e, s]), $(() => {
2227
+ x();
2228
+ }), {
2229
+ latestMessage: l,
2230
+ sendMessage: E(k),
2231
+ connect: E(w),
2232
+ disconnect: E(x),
2233
+ readyState: g,
2234
+ webSocketIns: h.current
2235
+ };
2236
+ }
2237
+ function pr(e, t) {
2238
+ const n = b({});
2239
+ D(() => {
2240
+ if (n.current) {
2241
+ const r = Object.keys({ ...n.current, ...t }), s = {};
2242
+ r.forEach((o) => {
2243
+ Object.is(n.current[o], t[o]) || (s[o] = {
2244
+ from: n.current[o],
2245
+ to: t[o]
2246
+ });
2247
+ }), Object.keys(s).length && console.log("[why-did-you-update]", e, s);
2248
+ }
2249
+ n.current = t;
2250
+ });
2251
+ }
2252
+ export {
2253
+ qt as $,
2254
+ xn as A,
2255
+ kn as B,
2256
+ zn as C,
2257
+ _n as D,
2258
+ jn as E,
2259
+ In as F,
2260
+ Yn as G,
2261
+ Xn as H,
2262
+ Bn as I,
2263
+ xe as J,
2264
+ Vn as K,
2265
+ qn as L,
2266
+ Un as M,
2267
+ $n as N,
2268
+ Wn as O,
2269
+ pe as P,
2270
+ Gn as Q,
2271
+ Kn as R,
2272
+ ke as S,
2273
+ Jn as T,
2274
+ Zn as U,
2275
+ er as V,
2276
+ tr as W,
2277
+ nr as X,
2278
+ rr as Y,
2279
+ sr as Z,
2280
+ or as _,
2281
+ Qn as a,
2282
+ cr as a0,
2283
+ ar as a1,
2284
+ ur as a2,
2285
+ Xe as a3,
2286
+ ir as a4,
2287
+ lr as a5,
2288
+ ot as a6,
2289
+ fr as a7,
2290
+ Xt as a8,
2291
+ dr as a9,
2292
+ mr as aa,
2293
+ gr as ab,
2294
+ hr as ac,
2295
+ pr as ad,
2296
+ ct as b,
2297
+ Hn as c,
2298
+ hn as d,
2299
+ pn as e,
2300
+ vn as f,
2301
+ yn as g,
2302
+ En as h,
2303
+ se as i,
2304
+ Sn as j,
2305
+ wn as k,
2306
+ Ne as l,
2307
+ bn as m,
2308
+ Rn as n,
2309
+ Tn as o,
2310
+ Ln as p,
2311
+ An as q,
2312
+ Pn as r,
2313
+ X as s,
2314
+ Cn as t,
2315
+ gn as u,
2316
+ Dn as v,
2317
+ Mn as w,
2318
+ Nn as x,
2319
+ On as y,
2320
+ Fn as z
2321
+ };