@unicom-cloud/ui 0.8.66 → 0.8.68

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 (708) hide show
  1. package/Affix.js +15 -124
  2. package/Alert.js +13 -110
  3. package/Anchor.js +2 -2
  4. package/AutoComplete.js +15 -146
  5. package/Avatar.js +4 -154
  6. package/BackTop.js +14 -83
  7. package/Badge.js +12 -176
  8. package/Breadcrumb.js +12 -138
  9. package/Button.js +12 -149
  10. package/Calendar.js +12 -569
  11. package/Card.js +10 -136
  12. package/Carousel.js +13 -380
  13. package/Cascader.js +2 -2
  14. package/Checkbox.js +2 -2
  15. package/Collapse.js +2 -2
  16. package/ColorPicker.js +14 -582
  17. package/Comment.js +10 -71
  18. package/ConfigProvider.js +5 -6
  19. package/Copy.js +12 -60
  20. package/DatePicker.js +11 -2042
  21. package/Descriptions.js +11 -176
  22. package/Divider.js +7 -38
  23. package/Draggable.js +7 -89
  24. package/Drawer.js +2 -2
  25. package/Dropdown.js +15 -199
  26. package/Empty.js +3 -3
  27. package/Form.js +16 -1416
  28. package/Grid.js +9 -252
  29. package/Icon.js +7 -55
  30. package/IconHover.js +2 -2
  31. package/Image.js +6 -5
  32. package/Input.js +11 -10
  33. package/InputNumber.js +9 -7
  34. package/InputTag.js +2 -2
  35. package/Layout.js +16 -56
  36. package/Link.js +9 -60
  37. package/List.js +18 -312
  38. package/Loading.js +4 -59
  39. package/Mentions.js +12 -163
  40. package/Menu.js +8 -7
  41. package/Message.js +9 -7
  42. package/Modal.js +2 -2
  43. package/Notice.js +13 -3
  44. package/Notification.js +10 -7
  45. package/OverflowEllipsis.js +8 -96
  46. package/PageHeader.js +13 -113
  47. package/Pagination.js +2 -2
  48. package/Picker.js +4 -3
  49. package/Popconfirm.js +13 -128
  50. package/Popover.js +10 -76
  51. package/Portal.js +5 -33
  52. package/Progress.js +11 -363
  53. package/Radio.js +5 -6
  54. package/Rate.js +14 -125
  55. package/ResizeBox.js +16 -555
  56. package/Result.js +14 -1434
  57. package/Select.js +4 -3
  58. package/SelectView.js +9 -406
  59. package/Skeleton.js +11 -94
  60. package/Slider.js +21 -773
  61. package/Space.js +11 -94
  62. package/SpeechSynthesis.js +48 -57
  63. package/Spin.js +11 -94
  64. package/Statistic.js +15 -192
  65. package/Steps.js +11 -148
  66. package/SuspenseFallbackTest.js +3 -10
  67. package/Switch.js +13 -114
  68. package/Table.js +16 -2032
  69. package/Tabs.js +4 -4
  70. package/Tag.js +13 -134
  71. package/TimePicker.js +7 -274
  72. package/Timeline.js +4 -4
  73. package/Tooltip.js +12 -136
  74. package/Transfer.js +14 -449
  75. package/Tree.js +4 -2
  76. package/TreeSelect.js +3 -4
  77. package/Trigger.js +21 -882
  78. package/Typography.js +10 -6
  79. package/Upload.js +4 -4
  80. package/VerificationCode.js +2 -2
  81. package/VirtualList.js +2 -2
  82. package/Watermark.js +2 -2
  83. package/affix/index.js +126 -0
  84. package/alert/index.js +112 -0
  85. package/alert/interface.js +1 -0
  86. package/anchor/Anchor.js +198 -0
  87. package/anchor/Link.js +52 -0
  88. package/anchor/context.js +14 -0
  89. package/anchor/index.js +4 -0
  90. package/anchor/interface.js +1 -0
  91. package/anchor/util.js +50 -0
  92. package/auto-complete/index.js +149 -0
  93. package/auto-complete/interface.js +1 -0
  94. package/avatar/Avatar.js +83 -0
  95. package/avatar/Group.js +82 -0
  96. package/avatar/context.js +5 -0
  97. package/avatar/index.js +7 -0
  98. package/avatar/interface.js +1 -0
  99. package/back-top/index.js +85 -0
  100. package/back-top/interface.js +1 -0
  101. package/badge/Count.js +35 -0
  102. package/badge/index.js +151 -0
  103. package/badge/interface.js +1 -0
  104. package/breadcrumb/Item.js +67 -0
  105. package/breadcrumb/index.js +81 -0
  106. package/breadcrumb/interface.js +1 -0
  107. package/button/Group.js +13 -0
  108. package/button/index.js +146 -0
  109. package/button/interface.js +1 -0
  110. package/calendar/Month.js +12 -0
  111. package/calendar/WeekList.js +24 -0
  112. package/calendar/Year.js +74 -0
  113. package/calendar/index.js +320 -0
  114. package/calendar/interface.js +1 -0
  115. package/card/Grid.js +25 -0
  116. package/card/Meta.js +30 -0
  117. package/card/index.js +99 -0
  118. package/card/interface.js +1 -0
  119. package/carousel/Arrow.js +55 -0
  120. package/carousel/Indicator.js +66 -0
  121. package/carousel/index.js +278 -0
  122. package/carousel/interface.js +1 -0
  123. package/cascader/Cascader.js +26 -0
  124. package/cascader/index.js +4 -0
  125. package/cascader/interface.js +1 -0
  126. package/cascader/util.js +14 -0
  127. package/checkbox/Checkbox.js +16 -0
  128. package/checkbox/Group.js +14 -0
  129. package/checkbox/IconCheck.js +19 -0
  130. package/checkbox/index.js +4 -0
  131. package/checkbox/interface.js +1 -0
  132. package/checkbox/useCheckbox.js +45 -0
  133. package/chunk/5_U1CBIu.js +8 -0
  134. package/chunk/{B8QV6E2b.js → AwZqeapI.js} +5 -5
  135. package/chunk/B2yFlXke.js +6 -0
  136. package/chunk/B4JiMp8I.js +764 -0
  137. package/chunk/B4YRLi8r.js +11 -0
  138. package/chunk/B5RFT17G.js +15 -0
  139. package/chunk/{BnSVm1YC.js → B6X4lnd0.js} +1 -1
  140. package/chunk/B7M-FGia.js +41 -0
  141. package/chunk/BBkdXHrJ.js +24 -0
  142. package/chunk/BDB0LByj.js +98 -0
  143. package/chunk/BFTV6myl.js +19 -0
  144. package/chunk/BJ1soa2K.js +178 -0
  145. package/chunk/BKKEev13.js +11 -0
  146. package/chunk/BKT9BFf4.js +11 -0
  147. package/chunk/BSCrLtfQ.js +10 -0
  148. package/chunk/{CPvvjMwZ.js → BSaQv6mx.js} +46 -43
  149. package/chunk/BXAeh0_V.js +16 -0
  150. package/chunk/Bfq4YEcr.js +23 -0
  151. package/chunk/Bg3uJGPu.js +10 -0
  152. package/chunk/{jhQQCFMn.js → Bi4UkwOR.js} +138 -126
  153. package/chunk/BibHFOCF.js +34 -0
  154. package/chunk/Biupwn8l.js +24 -0
  155. package/chunk/BjpUSKM3.js +629 -0
  156. package/chunk/{D_-UD4vO.js → Bl7BnD1R.js} +9 -9
  157. package/chunk/BrOW642m.js +130 -0
  158. package/chunk/BsY85n3_.js +14 -0
  159. package/chunk/C48SmsN-.js +38 -0
  160. package/chunk/C4OrxKE6.js +18 -0
  161. package/chunk/C98ks5S8.js +473 -0
  162. package/chunk/CC---6jO.js +110 -0
  163. package/chunk/{DUeHQKtx.js → CCv-5KFt.js} +78 -78
  164. package/chunk/{CZOP_ZHJ.js → CD3AUpzo.js} +24 -24
  165. package/chunk/CIRG541s.js +22 -0
  166. package/chunk/CKyu68pu.js +312 -0
  167. package/chunk/CQ_WOOmf.js +8 -0
  168. package/chunk/{CANaGbGR.js → CVYWxu00.js} +54 -53
  169. package/chunk/CYhxqVkn.js +9 -0
  170. package/chunk/CbLaCJmG.js +26 -0
  171. package/chunk/CdaT1b_F.js +20 -0
  172. package/chunk/Ce1j9KTi.js +6 -0
  173. package/chunk/CftuXmo_.js +6 -0
  174. package/chunk/CgurXnoy.js +569 -0
  175. package/chunk/Clo26EcR.js +34 -0
  176. package/chunk/ClqoGc3r.js +17 -0
  177. package/chunk/CmZzBtA4.js +16 -0
  178. package/chunk/CpGBWmuz.js +1461 -0
  179. package/chunk/CzQObzKd.js +1817 -0
  180. package/chunk/D-TPB2Do.js +56 -0
  181. package/chunk/D090jlwP.js +38 -0
  182. package/chunk/D0ZWT7db.js +5 -0
  183. package/chunk/DH7HTOV_.js +11 -0
  184. package/chunk/DKHXj8Kf.js +9 -0
  185. package/chunk/Dh7Osrvr.js +27 -0
  186. package/chunk/DonYzv30.js +14 -0
  187. package/chunk/DpoumMDw.js +50 -0
  188. package/chunk/Duezix3m.js +25 -0
  189. package/chunk/DxVvggX2.js +11 -0
  190. package/chunk/DzVH9IBy.js +1413 -0
  191. package/chunk/{CwhPMMWy.js → Ey4YJCkX.js} +7 -7
  192. package/chunk/JPPo5nY_.js +9 -0
  193. package/chunk/SSK90wgo.js +209 -0
  194. package/chunk/{CSC_V_25.js → URXCKjXr.js} +8 -8
  195. package/chunk/VSe_Wq1g.js +10 -0
  196. package/chunk/XTEsYGuF.js +17 -0
  197. package/chunk/b1e8awfs.js +31 -0
  198. package/chunk/hEWZQ8Zi.js +16 -0
  199. package/chunk/k-OUstoD.js +58 -0
  200. package/chunk/ll867Bf3.js +730 -0
  201. package/chunk/oopARUrq.js +10 -0
  202. package/chunk/tamGhTJp.js +186 -0
  203. package/chunk/{4-gvEY5y.js → uKZyjtff.js} +28 -28
  204. package/chunk/vmgkWLYf.js +843 -0
  205. package/chunk/yl4BU7Sd.js +1068 -0
  206. package/chunk/zmmqLCF4.js +20 -0
  207. package/collapse/Collapse.js +15 -0
  208. package/collapse/Item.js +11 -0
  209. package/collapse/index.js +4 -0
  210. package/collapse/interface.js +1 -0
  211. package/color-picker/ControlBar.js +63 -0
  212. package/color-picker/InputAlpha.js +22 -0
  213. package/color-picker/InputHex.js +55 -0
  214. package/color-picker/InputRgb.js +61 -0
  215. package/color-picker/Mode.js +10 -0
  216. package/color-picker/Palette.js +34 -0
  217. package/color-picker/Panel.js +268 -0
  218. package/color-picker/colors.js +37 -0
  219. package/color-picker/index.js +270 -0
  220. package/color-picker/interface.js +4 -0
  221. package/color-picker/utils.js +89 -0
  222. package/comment/index.js +73 -0
  223. package/comment/interface.js +1 -0
  224. package/config-provider/ConfigProvider.js +15 -0
  225. package/config-provider/context.js +8 -0
  226. package/config-provider/index.js +8 -0
  227. package/config-provider/interface.js +1 -0
  228. package/copy/index.js +63 -0
  229. package/copy/interface.js +1 -0
  230. package/date-picker/Picker.js +410 -0
  231. package/date-picker/PickerRange.js +24 -0
  232. package/date-picker/context.js +5 -0
  233. package/date-picker/index.js +50 -0
  234. package/date-picker/interface.js +1 -0
  235. package/date-picker/util.js +76 -0
  236. package/descriptions/index.js +178 -0
  237. package/descriptions/interface.js +1 -0
  238. package/divider/index.js +40 -0
  239. package/divider/interface.js +1 -0
  240. package/draggable/Item.js +67 -0
  241. package/draggable/index.js +32 -0
  242. package/draggable/interface.js +1 -0
  243. package/{chunk/BFipyA67.js → drawer/Drawer.js} +39 -39
  244. package/drawer/index.js +4 -0
  245. package/drawer/interface.js +1 -0
  246. package/dropdown/Button.js +11 -0
  247. package/dropdown/index.js +201 -0
  248. package/dropdown/interface.js +1 -0
  249. package/empty/index.js +9 -0
  250. package/empty/interface.js +1 -0
  251. package/form/Control.js +262 -0
  252. package/form/Form.js +160 -0
  253. package/form/FormItem.js +239 -0
  254. package/form/FormLabel.js +54 -0
  255. package/form/FormList.js +100 -0
  256. package/form/FormProvider.js +48 -0
  257. package/form/IconSymbol.js +20 -0
  258. package/form/context.js +43 -0
  259. package/form/index.js +107 -0
  260. package/form/interface.js +11 -0
  261. package/form/promisify.js +32 -0
  262. package/form/store.js +360 -0
  263. package/form/useForm.js +53 -0
  264. package/form/util.js +75 -0
  265. package/grid/Col.js +85 -0
  266. package/grid/Row.js +86 -0
  267. package/grid/context.js +9 -0
  268. package/grid/grid-item.js +75 -0
  269. package/grid/grid.js +103 -0
  270. package/grid/index.js +15 -0
  271. package/grid/interface.js +1 -0
  272. package/grid/util.js +51 -0
  273. package/hooks/index.js +51 -47
  274. package/hooks/useComputedState.js +2 -10
  275. package/hooks/useCreate.js +2 -7
  276. package/hooks/useForceUpdate.js +2 -7
  277. package/hooks/useId.js +2 -10
  278. package/hooks/useInView.js +2 -30
  279. package/hooks/useIntersectionObserver.js +2 -23
  280. package/hooks/useInterval.js +2 -17
  281. package/hooks/useIsFirstRender.js +2 -9
  282. package/hooks/useIsomorphicLayoutEffect.js +2 -5
  283. package/hooks/useKeyboardEvent.js +2 -16
  284. package/hooks/useMedia.js +2 -15
  285. package/hooks/useMergeProps.js +2 -18
  286. package/hooks/useMergeValue.js +2 -19
  287. package/hooks/useOnlineStatus.js +4 -0
  288. package/hooks/useOverflowHidden.js +2 -25
  289. package/hooks/useOverrideRef.js +2 -13
  290. package/hooks/usePersistCallback.js +2 -13
  291. package/hooks/usePrefersColorSchemeDark.js +4 -0
  292. package/hooks/usePrevious.js +2 -9
  293. package/hooks/useRefs.js +2 -9
  294. package/hooks/useResizeObserver.js +2 -15
  295. package/hooks/useStateCallback.js +2 -15
  296. package/hooks/useStateWithPromise.js +2 -24
  297. package/hooks/useUpdateEffect.js +2 -9
  298. package/hooks/useVerificationCode.js +73 -0
  299. package/hooks/useWatch.js +2 -10
  300. package/hooks/{use-watermark.js → useWatermark.js} +2 -1
  301. package/hooks/useWindowSize.js +2 -20
  302. package/icon/addFromIconFontCn.js +7 -0
  303. package/icon/index.js +57 -0
  304. package/icon-hover/index.js +7 -0
  305. package/image/Image.js +191 -0
  306. package/image/ImageFooter.js +8 -0
  307. package/image/ImagePreview.js +41 -0
  308. package/image/ImagePreviewArrow.js +46 -0
  309. package/image/ImagePreviewGroup.js +125 -0
  310. package/image/ImagePreviewToolbar.js +99 -0
  311. package/image/TriggerForToolbar.js +10 -0
  312. package/image/index.js +8 -0
  313. package/image/interface.js +1 -0
  314. package/image/previewGroupContext.js +17 -0
  315. package/index.js +604 -585
  316. package/input/Group.js +18 -0
  317. package/input/Input.js +688 -0
  318. package/input/InputElement.js +235 -0
  319. package/input/Number.js +4 -0
  320. package/input/Password.js +13 -0
  321. package/input/Search.js +14 -0
  322. package/input/Tag.js +4 -0
  323. package/input/Textarea.js +16 -0
  324. package/input/autoSizeTextAreaHeight.js +65 -0
  325. package/input/index.js +15 -0
  326. package/input/interface.js +1 -0
  327. package/input/useComposition.js +39 -0
  328. package/input-number/decimal.js +154 -0
  329. package/input-number/index.js +18 -0
  330. package/input-number/interface.js +1 -0
  331. package/input-number/useSelectionRange.js +26 -0
  332. package/input-number/util.js +57 -0
  333. package/{chunk/C6QWSzsM.js → input-tag/InputTag.js} +97 -89
  334. package/input-tag/index.js +4 -0
  335. package/input-tag/interface.js +1 -0
  336. package/layout/Content.js +13 -0
  337. package/layout/Footer.js +13 -0
  338. package/layout/Header.js +13 -0
  339. package/{chunk/CssIjN1g.js → layout/Sider.js} +12 -12
  340. package/layout/index.js +43 -0
  341. package/layout/interface.js +1 -0
  342. package/link/index.js +62 -0
  343. package/link/interface.js +1 -0
  344. package/list/Item.js +44 -0
  345. package/list/Meta.js +19 -0
  346. package/list/index.js +269 -0
  347. package/list/interface.js +1 -0
  348. package/loading/index.js +61 -0
  349. package/locale/en-US.js +4 -2
  350. package/locale/interface.js +1 -4
  351. package/locale/ja-JP.js +3 -1
  352. package/locale/tr-TR.js +1 -1
  353. package/locale/zh-CN.js +3 -1
  354. package/locale/zh-HK.js +3 -1
  355. package/locale/zh-TW.js +3 -1
  356. package/mentions/index.js +146 -0
  357. package/mentions/interface.js +1 -0
  358. package/mentions/util.js +26 -0
  359. package/menu/Indent.js +17 -0
  360. package/menu/Item.js +125 -0
  361. package/menu/ItemGroup.js +39 -0
  362. package/menu/Menu.js +26 -0
  363. package/menu/OverflowWrap.js +10 -0
  364. package/menu/context.js +5 -0
  365. package/menu/index.js +11 -0
  366. package/menu/interface.js +1 -0
  367. package/menu/util.js +80 -0
  368. package/message/index.js +14 -0
  369. package/message/interface.js +1 -0
  370. package/message/useMessage.js +7 -0
  371. package/modal/Confirm.js +13 -0
  372. package/modal/Modal.js +21 -0
  373. package/modal/config.js +25 -0
  374. package/modal/index.js +4 -0
  375. package/modal/interface.js +1 -0
  376. package/notice/index.js +24 -0
  377. package/notification/index.js +16 -0
  378. package/notification/interface.js +1 -0
  379. package/notification/useNotification.js +6 -0
  380. package/notification/withNotification.js +49 -0
  381. package/overflow-ellipsis/OverflowItem.js +35 -0
  382. package/overflow-ellipsis/index.js +74 -0
  383. package/package.json +1 -1
  384. package/page-header/index.js +115 -0
  385. package/page-header/interface.js +1 -0
  386. package/pagination/PageItem.js +119 -0
  387. package/pagination/PageJumper.js +60 -0
  388. package/pagination/PageOption.js +47 -0
  389. package/pagination/Pagination.js +245 -0
  390. package/pagination/index.js +4 -0
  391. package/pagination/interface.js +1 -0
  392. package/picker/Input.js +130 -0
  393. package/picker/InputRange.js +158 -0
  394. package/picker/index.js +6 -0
  395. package/popconfirm/index.js +130 -0
  396. package/popconfirm/interface.js +1 -0
  397. package/popover/index.js +78 -0
  398. package/popover/interface.js +1 -0
  399. package/portal/Portal.js +15 -0
  400. package/portal/index.js +17 -0
  401. package/progress/CircleProgress.js +117 -0
  402. package/progress/LineProgess.js +103 -0
  403. package/progress/StepProgress.js +74 -0
  404. package/progress/index.js +99 -0
  405. package/progress/interface.js +1 -0
  406. package/radio/Group.js +16 -0
  407. package/radio/Radio.js +15 -0
  408. package/radio/index.js +8 -0
  409. package/radio/interface.js +1 -0
  410. package/rate/index.js +127 -0
  411. package/rate/interface.js +1 -0
  412. package/resize-box/ResizeTrigger.js +78 -0
  413. package/resize-box/Split.js +130 -0
  414. package/resize-box/SplitGroup.js +202 -0
  415. package/resize-box/index.js +182 -0
  416. package/resize-box/interface.js +1 -0
  417. package/result/403.js +695 -0
  418. package/result/404.js +513 -0
  419. package/result/500.js +166 -0
  420. package/result/index.js +77 -0
  421. package/result/interface.js +1 -0
  422. package/select/OptGroup.js +20 -0
  423. package/select/Option.js +95 -0
  424. package/select/Select.js +549 -0
  425. package/select/index.js +8 -0
  426. package/select/interface.js +1 -0
  427. package/select/util.js +141 -0
  428. package/select-view/Core.js +370 -0
  429. package/select-view/index.js +67 -0
  430. package/select-view/interface.js +1 -0
  431. package/skeleton/Image.js +24 -0
  432. package/skeleton/Text.js +27 -0
  433. package/skeleton/index.js +57 -0
  434. package/skeleton/interface.js +1 -0
  435. package/slider/Button.js +159 -0
  436. package/slider/Dot.js +43 -0
  437. package/slider/Input.js +75 -0
  438. package/slider/Mark.js +28 -0
  439. package/slider/Tick.js +44 -0
  440. package/slider/index.js +429 -0
  441. package/slider/interface.js +1 -0
  442. package/slider/util.js +63 -0
  443. package/space/index.js +90 -0
  444. package/space/interface.js +1 -0
  445. package/space/toArray.js +11 -0
  446. package/speech-synthesis/index.js +109 -0
  447. package/spin/DotLoading.js +24 -0
  448. package/spin/index.js +79 -0
  449. package/spin/interface.js +1 -0
  450. package/statistic/Countdown.js +55 -0
  451. package/statistic/index.js +120 -0
  452. package/statistic/interface.js +1 -0
  453. package/statistic/util.js +33 -0
  454. package/steps/Step.js +68 -0
  455. package/steps/index.js +89 -0
  456. package/steps/interface.js +1 -0
  457. package/style.css +1 -1
  458. package/suspense-fallback-test/index.js +12 -0
  459. package/switch/index.js +116 -0
  460. package/switch/interface.js +1 -0
  461. package/table/ColGroup.js +59 -0
  462. package/table/Table.js +24 -0
  463. package/table/constant.js +42 -0
  464. package/table/index.js +103 -0
  465. package/table/interface.js +1 -0
  466. package/table/util.js +121 -0
  467. package/tabs/Tab.js +18 -0
  468. package/tabs/TabContent.js +8 -0
  469. package/tabs/TabPane.js +24 -0
  470. package/tabs/index.js +9 -0
  471. package/tabs/interface.js +1 -0
  472. package/tabs/util.js +22 -0
  473. package/tag/index.js +136 -0
  474. package/tag/interface.js +1 -0
  475. package/time-picker/Picker.js +219 -0
  476. package/time-picker/RangePicker.js +56 -0
  477. package/time-picker/TimeColumn.js +65 -0
  478. package/time-picker/TimePicker.js +240 -0
  479. package/time-picker/context.js +5 -0
  480. package/time-picker/index.js +20 -0
  481. package/time-picker/interface.js +1 -0
  482. package/time-picker/util.js +43 -0
  483. package/timeline/Item.js +92 -0
  484. package/timeline/Timeline.js +79 -0
  485. package/timeline/index.js +6 -0
  486. package/timeline/interface.js +1 -0
  487. package/tooltip/index.js +140 -0
  488. package/tooltip/interface.js +1 -0
  489. package/transfer/Item.js +106 -0
  490. package/transfer/List.js +186 -0
  491. package/transfer/index.js +182 -0
  492. package/transfer/interface.js +1 -0
  493. package/tree/Animation.js +11 -0
  494. package/tree/Context.js +5 -0
  495. package/tree/Node.js +16 -0
  496. package/tree/NodeList.js +82 -0
  497. package/tree/Tree.js +580 -0
  498. package/tree/index.js +6 -0
  499. package/tree/interface.js +1 -0
  500. package/tree/util.js +76 -0
  501. package/tree-select/List.js +124 -0
  502. package/tree-select/Select.js +395 -0
  503. package/tree-select/index.js +6 -0
  504. package/tree-select/interface.js +13 -0
  505. package/tree-select/util.js +9 -0
  506. package/trigger/getPopupStyle.js +192 -0
  507. package/trigger/index.js +626 -0
  508. package/trigger/interface.js +1 -0
  509. package/types/anchor/util.d.ts +1 -1
  510. package/types/button/index.d.ts +2 -2
  511. package/types/color-picker/ControlBar.d.ts +12 -5
  512. package/types/color-picker/Mode.d.ts +7 -0
  513. package/types/color-picker/Panel.d.ts +10 -2
  514. package/types/color-picker/hooks/useColorPicker.d.ts +15 -13
  515. package/types/color-picker/hooks/useControlBlock.d.ts +10 -3
  516. package/types/color-picker/index.d.ts +1 -1
  517. package/types/color-picker/interface.d.ts +19 -7
  518. package/types/color-picker/utils.d.ts +23 -0
  519. package/types/form/Control.d.ts +2 -1
  520. package/types/form/FormItem.d.ts +1 -1
  521. package/types/form/store.d.ts +0 -1
  522. package/types/hooks/index.d.ts +2 -0
  523. package/types/hooks/useComputedState.d.ts +1 -4
  524. package/types/hooks/useCreate.d.ts +1 -2
  525. package/types/hooks/useForceUpdate.d.ts +1 -2
  526. package/types/hooks/useId.d.ts +1 -2
  527. package/types/hooks/useInView.d.ts +1 -11
  528. package/types/hooks/useIntersectionObserver.d.ts +1 -7
  529. package/types/hooks/useInterval.d.ts +1 -2
  530. package/types/hooks/useIsFirstRender.d.ts +1 -2
  531. package/types/hooks/useIsomorphicLayoutEffect.d.ts +1 -3
  532. package/types/hooks/useKeyboardEvent.d.ts +1 -8
  533. package/types/hooks/useMedia.d.ts +1 -2
  534. package/types/hooks/useMergeProps.d.ts +1 -5
  535. package/types/hooks/useMergeValue.d.ts +1 -6
  536. package/types/hooks/useOnlineStatus.d.ts +1 -0
  537. package/types/hooks/useOverflowHidden.d.ts +1 -5
  538. package/types/hooks/useOverrideRef.d.ts +1 -6
  539. package/types/hooks/usePersistCallback.d.ts +1 -2
  540. package/types/hooks/usePrefersColorSchemeDark.d.ts +1 -0
  541. package/types/hooks/usePrevious.d.ts +1 -3
  542. package/types/hooks/useRefs.d.ts +1 -2
  543. package/types/hooks/useResizeObserver.d.ts +1 -6
  544. package/types/hooks/useStateCallback.d.ts +1 -5
  545. package/types/hooks/useStateWithPromise.d.ts +1 -2
  546. package/types/hooks/useUpdateEffect.d.ts +1 -3
  547. package/types/hooks/useWatch.d.ts +1 -3
  548. package/types/hooks/useWindowSize.d.ts +1 -5
  549. package/types/image/interface.d.ts +1 -0
  550. package/types/index.d.ts +156 -86
  551. package/types/input/Input.d.ts +1 -1
  552. package/types/input/Textarea.d.ts +2 -2
  553. package/types/locale/en-US.d.ts +2 -0
  554. package/types/locale/interface.d.ts +1 -2
  555. package/types/locale/ja-JP.d.ts +2 -0
  556. package/types/locale/zh-CN.d.ts +2 -0
  557. package/types/locale/zh-HK.d.ts +2 -0
  558. package/types/locale/zh-TW.d.ts +2 -0
  559. package/types/menu/context.d.ts +1 -1
  560. package/types/message/index.d.ts +14 -14
  561. package/types/message/interface.d.ts +2 -0
  562. package/types/modal/config.d.ts +0 -1
  563. package/types/modal/interface.d.ts +0 -1
  564. package/types/notice/index.d.ts +2 -27
  565. package/types/notification/index.d.ts +15 -16
  566. package/types/notification/interface.d.ts +2 -0
  567. package/types/notification/withNotification.d.ts +2 -0
  568. package/types/select/util.d.ts +1 -2
  569. package/types/select-view/interface.d.ts +2 -1
  570. package/types/speech-synthesis/index.d.ts +1 -1
  571. package/types/table/constant.d.ts +2 -0
  572. package/types/table/hook/useThResizable.d.ts +7 -0
  573. package/types/table/index.d.ts +10 -1
  574. package/types/table/style/index.d.ts +1 -0
  575. package/types/table/th-resizable/index.d.ts +2 -0
  576. package/types/table/thead/Column.d.ts +1 -2
  577. package/types/tree/Tree.d.ts +12 -67
  578. package/types/tree-select/Select.d.ts +2 -2
  579. package/types/trigger/index.d.ts +2 -120
  580. package/types/trigger/interface.d.ts +2 -1
  581. package/types/utils/CSSTransition.d.ts +2 -3
  582. package/types/utils/caseName.d.ts +1 -1
  583. package/types/utils/className.d.ts +1 -1
  584. package/types/utils/constant.d.ts +2 -2
  585. package/types/utils/copy.d.ts +1 -1
  586. package/types/utils/dayjs.d.ts +1 -21
  587. package/types/utils/dom.d.ts +1 -6
  588. package/types/utils/fileToURL.d.ts +1 -1
  589. package/types/utils/fillNBSP.d.ts +1 -1
  590. package/types/utils/getHighlightText.d.ts +1 -5
  591. package/types/utils/getHotkeyHandler.d.ts +1 -8
  592. package/types/utils/getStringLength.d.ts +1 -1
  593. package/types/utils/include.d.ts +1 -1
  594. package/types/utils/index.d.ts +3 -4
  595. package/types/utils/is.d.ts +1 -16
  596. package/types/utils/keyboardCode.d.ts +3 -0
  597. package/types/utils/lodash.d.ts +1 -17
  598. package/types/utils/mergeProps.d.ts +1 -1
  599. package/types/utils/mergedToString.d.ts +1 -1
  600. package/types/utils/omit.d.ts +1 -1
  601. package/types/utils/pad.d.ts +1 -2
  602. package/types/utils/pick.d.ts +2 -4
  603. package/types/utils/reactDOM.d.ts +1 -7
  604. package/types/utils/resizeObserverEffect.d.ts +2 -0
  605. package/types/utils/saveAs.d.ts +1 -1
  606. package/types/utils/screenfull.d.ts +2 -0
  607. package/types/utils/scrollIntoView.d.ts +1 -2
  608. package/types/utils/style.d.ts +1 -3
  609. package/types/utils/throttleByRaf.d.ts +1 -5
  610. package/types/utils/throttleByRaf2.d.ts +1 -0
  611. package/types/utils/warning.d.ts +1 -2
  612. package/types/version/index.d.ts +1 -1
  613. package/typography/Base.js +189 -0
  614. package/typography/EditContent.js +46 -0
  615. package/typography/Ellipsis.js +124 -0
  616. package/typography/Operations.js +78 -0
  617. package/typography/Paragraph.js +24 -0
  618. package/typography/Text.js +11 -0
  619. package/typography/Title.js +12 -0
  620. package/typography/Typography.js +13 -0
  621. package/typography/index.js +278 -0
  622. package/typography/interface.js +1 -0
  623. package/typography/useCssEllipsis.js +37 -0
  624. package/typography/useEllipsis.js +150 -0
  625. package/upload/TriggerNode.js +116 -0
  626. package/upload/Upload.js +627 -0
  627. package/upload/Uploader.js +206 -0
  628. package/upload/index.js +8 -0
  629. package/upload/interface.js +9 -0
  630. package/upload/request.js +51 -0
  631. package/upload/request_.js +64 -0
  632. package/upload/util.js +61 -0
  633. package/utils/CSSTransition.js +2 -6
  634. package/utils/className.js +2 -2
  635. package/utils/constant.js +8 -9
  636. package/utils/contextHolder.js +1 -1
  637. package/utils/copy.js +1 -1
  638. package/utils/dayjs.js +14 -173
  639. package/utils/dom.js +35 -31
  640. package/utils/fillNBSP.js +2 -4
  641. package/utils/getHighlightText.js +2 -38
  642. package/utils/getHotkeyHandler.js +2 -25
  643. package/utils/getStringLength.js +2 -7
  644. package/utils/include.js +2 -7
  645. package/utils/index.js +239 -242
  646. package/utils/is.js +116 -156
  647. package/utils/keyboardCode.js +27 -0
  648. package/utils/mergeProps.js +2 -9
  649. package/utils/mergedToString.js +2 -13
  650. package/utils/omit.js +2 -9
  651. package/utils/pick.js +4 -15
  652. package/utils/reactDOM.js +3 -54
  653. package/utils/resizeObserverEffect.js +4 -0
  654. package/utils/saveAs.js +1 -1
  655. package/utils/screenfull.js +4 -0
  656. package/utils/scrollIntoView.js +2 -21
  657. package/utils/style.js +2 -1
  658. package/utils/throttleByRaf.js +13 -12
  659. package/utils/throttleByRaf2.js +5 -0
  660. package/utils/warning.js +2 -1
  661. package/{chunk/BHgJ5Y3T.js → verification-code/VerificationCode.js} +24 -23
  662. package/verification-code/index.js +4 -0
  663. package/verification-code/interface.js +1 -0
  664. package/{Version.js → version/index.js} +1 -1
  665. package/virtual-list/Filler.js +31 -0
  666. package/virtual-list/VirtualList.js +493 -0
  667. package/virtual-list/index.js +4 -0
  668. package/{chunk/Bc7t9jkb.js → watermark/Watermark.js} +17 -16
  669. package/watermark/index.js +4 -0
  670. package/watermark/interface.js +1 -0
  671. package/NotificationBase.js +0 -53
  672. package/chunk/-zpSUpGE.js +0 -1501
  673. package/chunk/BAWsPQBM.js +0 -11
  674. package/chunk/BIT0j3HT.js +0 -269
  675. package/chunk/BbLKnaNO.js +0 -871
  676. package/chunk/Bfhv56O2.js +0 -638
  677. package/chunk/Bh23P4l7.js +0 -162
  678. package/chunk/C2lIz2F9.js +0 -60
  679. package/chunk/CHnFKgbk.js +0 -445
  680. package/chunk/CLBavO5c.js +0 -912
  681. package/chunk/CVkHTbic.js +0 -995
  682. package/chunk/CcV4wQB1.js +0 -968
  683. package/chunk/CeGEvXby.js +0 -278
  684. package/chunk/D3NFxdmG.js +0 -518
  685. package/chunk/DApXtulb.js +0 -1102
  686. package/chunk/DNAigumg.js +0 -166
  687. package/chunk/DPByB1ab.js +0 -698
  688. package/chunk/DQAot004.js +0 -824
  689. package/chunk/DTBtQQ2H.js +0 -334
  690. package/chunk/DV1Ab_cG.js +0 -284
  691. package/chunk/DnvO8A0Z.js +0 -518
  692. package/chunk/Du-bw6qA.js +0 -224
  693. package/chunk/dBnNCOIU.js +0 -778
  694. package/chunk/it8qlDZ3.js +0 -1032
  695. package/chunk/te_43YrB.js +0 -776
  696. package/chunk/znkyQ-HR.js +0 -243
  697. package/hooks/use-verification-code.js +0 -73
  698. package/types/notification-base/index.d.ts +0 -15
  699. package/types/notification-base/style/index.d.ts +0 -2
  700. package/types/style/index.d.ts +0 -1
  701. package/types/trigger/Portal.d.ts +0 -7
  702. package/types/utils/keyCode.d.ts +0 -45
  703. package/types/utils/raf.d.ts +0 -3
  704. package/types/utils/throttleByRafV2.d.ts +0 -5
  705. package/utils/keyCode.js +0 -12
  706. package/utils/raf.js +0 -19
  707. package/utils/throttleByRafV2.js +0 -16
  708. /package/{chunk/l0sNRNKZ.js → affix/interface.js} +0 -0
package/chunk/DApXtulb.js DELETED
@@ -1,1102 +0,0 @@
1
- /*!
2
- * decimal.js v10.4.3
3
- * An arbitrary-precision Decimal type for JavaScript.
4
- * https://github.com/MikeMcl/decimal.js
5
- * Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
6
- * MIT Licence
7
- */
8
- let V = 9e15, H = 1e9, cn = "0123456789abcdef", X = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", Y = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", ln = {
9
- // These values must be integers within the stated ranges (inclusive).
10
- // Most of these values can be changed at run-time using the `Decimal.config` method.
11
- // The maximum number of significant digits of the result of a calculation or base conversion.
12
- // E.g. `Decimal.config({ precision: 20 });`
13
- precision: 20,
14
- // 1 to MAX_DIGITS
15
- // The rounding mode used when rounding to `precision`.
16
- //
17
- // ROUND_UP 0 Away from zero.
18
- // ROUND_DOWN 1 Towards zero.
19
- // ROUND_CEIL 2 Towards +Infinity.
20
- // ROUND_FLOOR 3 Towards -Infinity.
21
- // ROUND_HALF_UP 4 Towards nearest neighbour. If equidistant, up.
22
- // ROUND_HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.
23
- // ROUND_HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.
24
- // ROUND_HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.
25
- // ROUND_HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.
26
- //
27
- // E.g.
28
- // `Decimal.rounding = 4;`
29
- // `Decimal.rounding = Decimal.ROUND_HALF_UP;`
30
- rounding: 4,
31
- // 0 to 8
32
- // The modulo mode used when calculating the modulus: a mod n.
33
- // The quotient (q = a / n) is calculated according to the corresponding rounding mode.
34
- // The remainder (r) is calculated as: r = a - n * q.
35
- //
36
- // UP 0 The remainder is positive if the dividend is negative, else is negative.
37
- // DOWN 1 The remainder has the same sign as the dividend (JavaScript %).
38
- // FLOOR 3 The remainder has the same sign as the divisor (Python %).
39
- // HALF_EVEN 6 The IEEE 754 remainder function.
40
- // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). Always positive.
41
- //
42
- // Truncated division (1), floored division (3), the IEEE 754 remainder (6), and Euclidian
43
- // division (9) are commonly used for the modulus operation. The other rounding modes can also
44
- // be used, but they may not give useful results.
45
- modulo: 1,
46
- // 0 to 9
47
- // The exponent value at and beneath which `toString` returns exponential notation.
48
- // JavaScript numbers: -7
49
- toExpNeg: -7,
50
- // 0 to -EXP_LIMIT
51
- // The exponent value at and above which `toString` returns exponential notation.
52
- // JavaScript numbers: 21
53
- toExpPos: 21,
54
- // 0 to EXP_LIMIT
55
- // The minimum exponent value, beneath which underflow to zero occurs.
56
- // JavaScript numbers: -324 (5e-324)
57
- minE: -V,
58
- // -1 to -EXP_LIMIT
59
- // The maximum exponent value, above which overflow to Infinity occurs.
60
- // JavaScript numbers: 308 (1.7976931348623157e+308)
61
- maxE: V,
62
- // 1 to EXP_LIMIT
63
- // Whether to use cryptographically-secure random number generation, if available.
64
- crypto: !1
65
- // true/false
66
- }, wn, L, w = !0, tn = "[DecimalError] ", C = tn + "Invalid argument: ", Nn = tn + "Precision limit exceeded", bn = tn + "crypto unavailable", En = "[object Decimal]", A = Math.floor, M = Math.pow, Pn = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, Rn = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, Tn = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, vn = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, T = 1e7, m = 7, _n = 9007199254740991, kn = X.length - 1, fn = Y.length - 1, a = { toStringTag: En };
67
- a.absoluteValue = a.abs = function() {
68
- let n = new this.constructor(this);
69
- return n.s < 0 && (n.s = 1), g(n);
70
- };
71
- a.ceil = function() {
72
- return g(new this.constructor(this), this.e + 1, 2);
73
- };
74
- a.clampedTo = a.clamp = function(n, t) {
75
- let e, r = this, i = r.constructor;
76
- if (n = new i(n), t = new i(t), !n.s || !t.s) return new i(NaN);
77
- if (n.gt(t)) throw Error(C + t);
78
- return e = r.cmp(n), e < 0 ? n : r.cmp(t) > 0 ? t : new i(r);
79
- };
80
- a.comparedTo = a.cmp = function(n) {
81
- let t, e, r, i, s = this, o = s.d, u = (n = new s.constructor(n)).d, l = s.s, c = n.s;
82
- if (!o || !u)
83
- return !l || !c ? NaN : l !== c ? l : o === u ? 0 : !o ^ l < 0 ? 1 : -1;
84
- if (!o[0] || !u[0]) return o[0] ? l : u[0] ? -c : 0;
85
- if (l !== c) return l;
86
- if (s.e !== n.e) return s.e > n.e ^ l < 0 ? 1 : -1;
87
- for (r = o.length, i = u.length, t = 0, e = r < i ? r : i; t < e; ++t)
88
- if (o[t] !== u[t]) return o[t] > u[t] ^ l < 0 ? 1 : -1;
89
- return r === i ? 0 : r > i ^ l < 0 ? 1 : -1;
90
- };
91
- a.cosine = a.cos = function() {
92
- let n, t, e = this, r = e.constructor;
93
- return e.d ? e.d[0] ? (n = r.precision, t = r.rounding, r.precision = n + Math.max(e.e, e.sd()) + m, r.rounding = 1, e = Ln(r, On(r, e)), r.precision = n, r.rounding = t, g(L == 2 || L == 3 ? e.neg() : e, n, t, !0)) : new r(1) : new r(NaN);
94
- };
95
- a.cubeRoot = a.cbrt = function() {
96
- let n, t, e, r, i, s, o, u, l, c, f = this, h = f.constructor;
97
- if (!f.isFinite() || f.isZero()) return new h(f);
98
- for (w = !1, s = f.s * M(f.s * f, 1 / 3), !s || Math.abs(s) == 1 / 0 ? (e = q(f.d), n = f.e, (s = (n - e.length + 1) % 3) && (e += s == 1 || s == -2 ? "0" : "00"), s = M(e, 1 / 3), n = A((n + 1) / 3) - (n % 3 == (n < 0 ? -1 : 2)), s == 1 / 0 ? e = "5e" + n : (e = s.toExponential(), e = e.slice(0, e.indexOf("e") + 1) + n), r = new h(e), r.s = f.s) : r = new h(s.toString()), o = (n = h.precision) + 3; ; )
99
- if (u = r, l = u.times(u).times(u), c = l.plus(f), r = v(c.plus(f).times(u), c.plus(l), o + 2, 1), q(u.d).slice(0, o) === (e = q(r.d)).slice(0, o))
100
- if (e = e.slice(o - 3, o + 1), e == "9999" || !i && e == "4999") {
101
- if (!i && (g(u, n + 1, 0), u.times(u).times(u).eq(f))) {
102
- r = u;
103
- break;
104
- }
105
- o += 4, i = 1;
106
- } else {
107
- (!+e || !+e.slice(1) && e.charAt(0) == "5") && (g(r, n + 1, 1), t = !r.times(r).times(r).eq(f));
108
- break;
109
- }
110
- return w = !0, g(r, n, h.rounding, t);
111
- };
112
- a.decimalPlaces = a.dp = function() {
113
- let n, t = this.d, e = NaN;
114
- if (t) {
115
- if (n = t.length - 1, e = (n - A(this.e / m)) * m, n = t[n], n) for (; n % 10 == 0; n /= 10) e--;
116
- e < 0 && (e = 0);
117
- }
118
- return e;
119
- };
120
- a.dividedBy = a.div = function(n) {
121
- return v(this, new this.constructor(n));
122
- };
123
- a.dividedToIntegerBy = a.divToInt = function(n) {
124
- let t = this, e = t.constructor;
125
- return g(
126
- v(t, new e(n), 0, 1, 1),
127
- e.precision,
128
- e.rounding
129
- );
130
- };
131
- a.equals = a.eq = function(n) {
132
- return this.cmp(n) === 0;
133
- };
134
- a.floor = function() {
135
- return g(new this.constructor(this), this.e + 1, 3);
136
- };
137
- a.greaterThan = a.gt = function(n) {
138
- return this.cmp(n) > 0;
139
- };
140
- a.greaterThanOrEqualTo = a.gte = function(n) {
141
- let t = this.cmp(n);
142
- return t == 1 || t === 0;
143
- };
144
- a.hyperbolicCosine = a.cosh = function() {
145
- let n, t, e, r, i, s = this, o = s.constructor, u = new o(1);
146
- if (!s.isFinite()) return new o(s.s ? 1 / 0 : NaN);
147
- if (s.isZero()) return u;
148
- e = o.precision, r = o.rounding, o.precision = e + Math.max(s.e, s.sd()) + 4, o.rounding = 1, i = s.d.length, i < 32 ? (n = Math.ceil(i / 3), t = (1 / rn(4, n)).toString()) : (n = 16, t = "2.3283064365386962890625e-10"), s = $(o, 1, s.times(t), new o(1), !0);
149
- let l, c = n, f = new o(8);
150
- for (; c--; )
151
- l = s.times(s), s = u.minus(l.times(f.minus(l.times(f))));
152
- return g(s, o.precision = e, o.rounding = r, !0);
153
- };
154
- a.hyperbolicSine = a.sinh = function() {
155
- let n, t, e, r, i = this, s = i.constructor;
156
- if (!i.isFinite() || i.isZero()) return new s(i);
157
- if (t = s.precision, e = s.rounding, s.precision = t + Math.max(i.e, i.sd()) + 4, s.rounding = 1, r = i.d.length, r < 3)
158
- i = $(s, 2, i, i, !0);
159
- else {
160
- n = 1.4 * Math.sqrt(r), n = n > 16 ? 16 : n | 0, i = i.times(1 / rn(5, n)), i = $(s, 2, i, i, !0);
161
- let o, u = new s(5), l = new s(16), c = new s(20);
162
- for (; n--; )
163
- o = i.times(i), i = i.times(u.plus(o.times(l.times(o).plus(c))));
164
- }
165
- return s.precision = t, s.rounding = e, g(i, t, e, !0);
166
- };
167
- a.hyperbolicTangent = a.tanh = function() {
168
- let n, t, e = this, r = e.constructor;
169
- return e.isFinite() ? e.isZero() ? new r(e) : (n = r.precision, t = r.rounding, r.precision = n + 7, r.rounding = 1, v(
170
- e.sinh(),
171
- e.cosh(),
172
- r.precision = n,
173
- r.rounding = t
174
- )) : new r(e.s);
175
- };
176
- a.inverseCosine = a.acos = function() {
177
- let n, t = this, e = t.constructor, r = t.abs().cmp(1), i = e.precision, s = e.rounding;
178
- return r !== -1 ? r === 0 ? (
179
- // |x| is 1
180
- t.isNeg() ? R(e, i, s) : new e(0)
181
- ) : (
182
- // |x| > 1 or x is NaN
183
- new e(NaN)
184
- ) : t.isZero() ? R(e, i + 4, s).times(0.5) : (e.precision = i + 6, e.rounding = 1, t = t.asin(), n = R(e, i + 4, s).times(0.5), e.precision = i, e.rounding = s, n.minus(t));
185
- };
186
- a.inverseHyperbolicCosine = a.acosh = function() {
187
- let n, t, e = this, r = e.constructor;
188
- return e.lte(1) ? new r(e.eq(1) ? 0 : NaN) : e.isFinite() ? (n = r.precision, t = r.rounding, r.precision = n + Math.max(Math.abs(e.e), e.sd()) + 4, r.rounding = 1, w = !1, e = e.times(e).minus(1).sqrt().plus(e), w = !0, r.precision = n, r.rounding = t, e.ln()) : new r(e);
189
- };
190
- a.inverseHyperbolicSine = a.asinh = function() {
191
- let n, t, e = this, r = e.constructor;
192
- return !e.isFinite() || e.isZero() ? new r(e) : (n = r.precision, t = r.rounding, r.precision = n + 2 * Math.max(Math.abs(e.e), e.sd()) + 6, r.rounding = 1, w = !1, e = e.times(e).plus(1).sqrt().plus(e), w = !0, r.precision = n, r.rounding = t, e.ln());
193
- };
194
- a.inverseHyperbolicTangent = a.atanh = function() {
195
- let n, t, e, r, i = this, s = i.constructor;
196
- return i.isFinite() ? i.e >= 0 ? new s(i.abs().eq(1) ? i.s / 0 : i.isZero() ? i : NaN) : (n = s.precision, t = s.rounding, r = i.sd(), Math.max(r, n) < 2 * -i.e - 1 ? g(new s(i), n, t, !0) : (s.precision = e = r - i.e, i = v(i.plus(1), new s(1).minus(i), e + n, 1), s.precision = n + 4, s.rounding = 1, i = i.ln(), s.precision = n, s.rounding = t, i.times(0.5))) : new s(NaN);
197
- };
198
- a.inverseSine = a.asin = function() {
199
- let n, t, e, r, i = this, s = i.constructor;
200
- return i.isZero() ? new s(i) : (t = i.abs().cmp(1), e = s.precision, r = s.rounding, t !== -1 ? t === 0 ? (n = R(s, e + 4, r).times(0.5), n.s = i.s, n) : new s(NaN) : (s.precision = e + 6, s.rounding = 1, i = i.div(new s(1).minus(i.times(i)).sqrt().plus(1)).atan(), s.precision = e, s.rounding = r, i.times(2)));
201
- };
202
- a.inverseTangent = a.atan = function() {
203
- let n, t, e, r, i, s, o, u, l, c = this, f = c.constructor, h = f.precision, d = f.rounding;
204
- if (c.isFinite()) {
205
- if (c.isZero())
206
- return new f(c);
207
- if (c.abs().eq(1) && h + 4 <= fn)
208
- return o = R(f, h + 4, d).times(0.25), o.s = c.s, o;
209
- } else {
210
- if (!c.s) return new f(NaN);
211
- if (h + 4 <= fn)
212
- return o = R(f, h + 4, d).times(0.5), o.s = c.s, o;
213
- }
214
- for (f.precision = u = h + 10, f.rounding = 1, e = Math.min(28, u / m + 2 | 0), n = e; n; --n) c = c.div(c.times(c).plus(1).sqrt().plus(1));
215
- for (w = !1, t = Math.ceil(u / m), r = 1, l = c.times(c), o = new f(c), i = c; n !== -1; )
216
- if (i = i.times(l), s = o.minus(i.div(r += 2)), i = i.times(l), o = s.plus(i.div(r += 2)), o.d[t] !== void 0) for (n = t; o.d[n] === s.d[n] && n--; ) ;
217
- return e && (o = o.times(2 << e - 1)), w = !0, g(o, f.precision = h, f.rounding = d, !0);
218
- };
219
- a.isFinite = function() {
220
- return !!this.d;
221
- };
222
- a.isInteger = a.isInt = function() {
223
- return !!this.d && A(this.e / m) > this.d.length - 2;
224
- };
225
- a.isNaN = function() {
226
- return !this.s;
227
- };
228
- a.isNegative = a.isNeg = function() {
229
- return this.s < 0;
230
- };
231
- a.isPositive = a.isPos = function() {
232
- return this.s > 0;
233
- };
234
- a.isZero = function() {
235
- return !!this.d && this.d[0] === 0;
236
- };
237
- a.lessThan = a.lt = function(n) {
238
- return this.cmp(n) < 0;
239
- };
240
- a.lessThanOrEqualTo = a.lte = function(n) {
241
- return this.cmp(n) < 1;
242
- };
243
- a.logarithm = a.log = function(n) {
244
- let t, e, r, i, s, o, u, l, c = this, f = c.constructor, h = f.precision, d = f.rounding, p = 5;
245
- if (n == null)
246
- n = new f(10), t = !0;
247
- else {
248
- if (n = new f(n), e = n.d, n.s < 0 || !e || !e[0] || n.eq(1)) return new f(NaN);
249
- t = n.eq(10);
250
- }
251
- if (e = c.d, c.s < 0 || !e || !e[0] || c.eq(1))
252
- return new f(e && !e[0] ? -1 / 0 : c.s != 1 ? NaN : e ? 0 : 1 / 0);
253
- if (t)
254
- if (e.length > 1)
255
- s = !0;
256
- else {
257
- for (i = e[0]; i % 10 === 0; ) i /= 10;
258
- s = i !== 1;
259
- }
260
- if (w = !1, u = h + p, o = I(c, u), r = t ? nn(f, u + 10) : I(n, u), l = v(o, r, u, 1), W(l.d, i = h, d))
261
- do
262
- if (u += 10, o = I(c, u), r = t ? nn(f, u + 10) : I(n, u), l = v(o, r, u, 1), !s) {
263
- +q(l.d).slice(i + 1, i + 15) + 1 == 1e14 && (l = g(l, h + 1, 0));
264
- break;
265
- }
266
- while (W(l.d, i += 10, d));
267
- return w = !0, g(l, h, d);
268
- };
269
- a.minus = a.sub = function(n) {
270
- let t, e, r, i, s, o, u, l, c, f, h, d, p = this, b = p.constructor;
271
- if (n = new b(n), !p.d || !n.d)
272
- return !p.s || !n.s ? n = new b(NaN) : p.d ? n.s = -n.s : n = new b(n.d || p.s !== n.s ? p : NaN), n;
273
- if (p.s != n.s)
274
- return n.s = -n.s, p.plus(n);
275
- if (c = p.d, d = n.d, u = b.precision, l = b.rounding, !c[0] || !d[0]) {
276
- if (d[0]) n.s = -n.s;
277
- else if (c[0]) n = new b(p);
278
- else return new b(l === 3 ? -0 : 0);
279
- return w ? g(n, u, l) : n;
280
- }
281
- if (e = A(n.e / m), f = A(p.e / m), c = c.slice(), s = f - e, s) {
282
- for (h = s < 0, h ? (t = c, s = -s, o = d.length) : (t = d, e = f, o = c.length), r = Math.max(Math.ceil(u / m), o) + 2, s > r && (s = r, t.length = 1), t.reverse(), r = s; r--; ) t.push(0);
283
- t.reverse();
284
- } else {
285
- for (r = c.length, o = d.length, h = r < o, h && (o = r), r = 0; r < o; r++)
286
- if (c[r] != d[r]) {
287
- h = c[r] < d[r];
288
- break;
289
- }
290
- s = 0;
291
- }
292
- for (h && (t = c, c = d, d = t, n.s = -n.s), o = c.length, r = d.length - o; r > 0; --r) c[o++] = 0;
293
- for (r = d.length; r > s; ) {
294
- if (c[--r] < d[r]) {
295
- for (i = r; i && c[--i] === 0; ) c[i] = T - 1;
296
- --c[i], c[r] += T;
297
- }
298
- c[r] -= d[r];
299
- }
300
- for (; c[--o] === 0; ) c.pop();
301
- for (; c[0] === 0; c.shift()) --e;
302
- return c[0] ? (n.d = c, n.e = en(c, e), w ? g(n, u, l) : n) : new b(l === 3 ? -0 : 0);
303
- };
304
- a.modulo = a.mod = function(n) {
305
- let t, e = this, r = e.constructor;
306
- return n = new r(n), !e.d || !n.s || n.d && !n.d[0] ? new r(NaN) : !n.d || e.d && !e.d[0] ? g(new r(e), r.precision, r.rounding) : (w = !1, r.modulo == 9 ? (t = v(e, n.abs(), 0, 3, 1), t.s *= n.s) : t = v(e, n, 0, r.modulo, 1), t = t.times(n), w = !0, e.minus(t));
307
- };
308
- a.naturalExponential = a.exp = function() {
309
- return hn(this);
310
- };
311
- a.naturalLogarithm = a.ln = function() {
312
- return I(this);
313
- };
314
- a.negated = a.neg = function() {
315
- let n = new this.constructor(this);
316
- return n.s = -n.s, g(n);
317
- };
318
- a.plus = a.add = function(n) {
319
- let t, e, r, i, s, o, u, l, c, f, h = this, d = h.constructor;
320
- if (n = new d(n), !h.d || !n.d)
321
- return !h.s || !n.s ? n = new d(NaN) : h.d || (n = new d(n.d || h.s === n.s ? h : NaN)), n;
322
- if (h.s != n.s)
323
- return n.s = -n.s, h.minus(n);
324
- if (c = h.d, f = n.d, u = d.precision, l = d.rounding, !c[0] || !f[0])
325
- return f[0] || (n = new d(h)), w ? g(n, u, l) : n;
326
- if (s = A(h.e / m), r = A(n.e / m), c = c.slice(), i = s - r, i) {
327
- for (i < 0 ? (e = c, i = -i, o = f.length) : (e = f, r = s, o = c.length), s = Math.ceil(u / m), o = s > o ? s + 1 : o + 1, i > o && (i = o, e.length = 1), e.reverse(); i--; ) e.push(0);
328
- e.reverse();
329
- }
330
- for (o = c.length, i = f.length, o - i < 0 && (i = o, e = f, f = c, c = e), t = 0; i; )
331
- t = (c[--i] = c[i] + f[i] + t) / T | 0, c[i] %= T;
332
- for (t && (c.unshift(t), ++r), o = c.length; c[--o] == 0; ) c.pop();
333
- return n.d = c, n.e = en(c, r), w ? g(n, u, l) : n;
334
- };
335
- a.precision = a.sd = function(n) {
336
- let t, e = this;
337
- if (n !== void 0 && n !== !!n && n !== 1 && n !== 0)
338
- throw Error(C + n);
339
- return e.d ? (t = xn(e.d), n && e.e + 1 > t && (t = e.e + 1)) : t = NaN, t;
340
- };
341
- a.round = function() {
342
- let n = this, t = n.constructor;
343
- return g(new t(n), n.e + 1, t.rounding);
344
- };
345
- a.sine = a.sin = function() {
346
- let n, t, e = this, r = e.constructor;
347
- return e.isFinite() ? e.isZero() ? new r(e) : (n = r.precision, t = r.rounding, r.precision = n + Math.max(e.e, e.sd()) + m, r.rounding = 1, e = In(r, On(r, e)), r.precision = n, r.rounding = t, g(L > 2 ? e.neg() : e, n, t, !0)) : new r(NaN);
348
- };
349
- a.squareRoot = a.sqrt = function() {
350
- let n, t, e, r, i, s, o = this, u = o.d, l = o.e, c = o.s, f = o.constructor;
351
- if (c !== 1 || !u || !u[0])
352
- return new f(!c || c < 0 && (!u || u[0]) ? NaN : u ? o : 1 / 0);
353
- for (w = !1, c = Math.sqrt(+o), c == 0 || c == 1 / 0 ? (t = q(u), (t.length + l) % 2 == 0 && (t += "0"), c = Math.sqrt(t), l = A((l + 1) / 2) - (l < 0 || l % 2), c == 1 / 0 ? t = "5e" + l : (t = c.toExponential(), t = t.slice(0, t.indexOf("e") + 1) + l), r = new f(t)) : r = new f(c.toString()), e = (l = f.precision) + 3; ; )
354
- if (s = r, r = s.plus(v(o, s, e + 2, 1)).times(0.5), q(s.d).slice(0, e) === (t = q(r.d)).slice(0, e))
355
- if (t = t.slice(e - 3, e + 1), t == "9999" || !i && t == "4999") {
356
- if (!i && (g(s, l + 1, 0), s.times(s).eq(o))) {
357
- r = s;
358
- break;
359
- }
360
- e += 4, i = 1;
361
- } else {
362
- (!+t || !+t.slice(1) && t.charAt(0) == "5") && (g(r, l + 1, 1), n = !r.times(r).eq(o));
363
- break;
364
- }
365
- return w = !0, g(r, l, f.rounding, n);
366
- };
367
- a.tangent = a.tan = function() {
368
- let n, t, e = this, r = e.constructor;
369
- return e.isFinite() ? e.isZero() ? new r(e) : (n = r.precision, t = r.rounding, r.precision = n + 10, r.rounding = 1, e = e.sin(), e.s = 1, e = v(e, new r(1).minus(e.times(e)).sqrt(), n + 10, 0), r.precision = n, r.rounding = t, g(L == 2 || L == 4 ? e.neg() : e, n, t, !0)) : new r(NaN);
370
- };
371
- a.times = a.mul = function(n) {
372
- let t, e, r, i, s, o, u, l, c, f = this, h = f.constructor, d = f.d, p = (n = new h(n)).d;
373
- if (n.s *= f.s, !d || !d[0] || !p || !p[0])
374
- return new h(
375
- !n.s || d && !d[0] && !p || p && !p[0] && !d ? (
376
- // Return NaN if either is NaN.
377
- // Return NaN if x is ±0 and y is ±Infinity, or y is ±0 and x is ±Infinity.
378
- NaN
379
- ) : (
380
- // Return ±Infinity if either is ±Infinity.
381
- // Return ±0 if either is ±0.
382
- !d || !p ? n.s / 0 : n.s * 0
383
- )
384
- );
385
- for (e = A(f.e / m) + A(n.e / m), l = d.length, c = p.length, l < c && (s = d, d = p, p = s, o = l, l = c, c = o), s = [], o = l + c, r = o; r--; ) s.push(0);
386
- for (r = c; --r >= 0; ) {
387
- for (t = 0, i = l + r; i > r; )
388
- u = s[i] + p[r] * d[i - r - 1] + t, s[i--] = u % T | 0, t = u / T | 0;
389
- s[i] = (s[i] + t) % T | 0;
390
- }
391
- for (; !s[--o]; ) s.pop();
392
- return t ? ++e : s.shift(), n.d = s, n.e = en(s, e), w ? g(n, h.precision, h.rounding) : n;
393
- };
394
- a.toBinary = function(n, t) {
395
- return an(this, 2, n, t);
396
- };
397
- a.toDecimalPlaces = a.toDP = function(n, t) {
398
- let e = this, r = e.constructor;
399
- return e = new r(e), n === void 0 ? e : (D(n, 0, H), t === void 0 ? t = r.rounding : D(t, 0, 8), g(e, n + e.e + 1, t));
400
- };
401
- a.toExponential = function(n, t) {
402
- let e, r = this, i = r.constructor;
403
- return n === void 0 ? e = _(r, !0) : (D(n, 0, H), t === void 0 ? t = i.rounding : D(t, 0, 8), r = g(new i(r), n + 1, t), e = _(r, !0, n + 1)), r.isNeg() && !r.isZero() ? "-" + e : e;
404
- };
405
- a.toFixed = function(n, t) {
406
- let e, r, i = this, s = i.constructor;
407
- return n === void 0 ? e = _(i) : (D(n, 0, H), t === void 0 ? t = s.rounding : D(t, 0, 8), r = g(new s(i), n + i.e + 1, t), e = _(r, !1, n + r.e + 1)), i.isNeg() && !i.isZero() ? "-" + e : e;
408
- };
409
- a.toFraction = function(n) {
410
- let t, e, r, i, s, o, u, l, c, f, h, d, p = this, b = p.d, N = p.constructor;
411
- if (!b) return new N(p);
412
- if (c = e = new N(1), r = l = new N(0), t = new N(r), s = t.e = xn(b) - p.e - 1, o = s % m, t.d[0] = M(10, o < 0 ? m + o : o), n == null)
413
- n = s > 0 ? t : c;
414
- else {
415
- if (u = new N(n), !u.isInt() || u.lt(c)) throw Error(C + u);
416
- n = u.gt(t) ? s > 0 ? t : c : u;
417
- }
418
- for (w = !1, u = new N(q(b)), f = N.precision, N.precision = s = b.length * m * 2; h = v(u, t, 0, 1, 1), i = e.plus(h.times(r)), i.cmp(n) != 1; )
419
- e = r, r = i, i = c, c = l.plus(h.times(i)), l = i, i = t, t = u.minus(h.times(i)), u = i;
420
- return i = v(n.minus(e), r, 0, 1, 1), l = l.plus(i.times(c)), e = e.plus(i.times(r)), l.s = c.s = p.s, d = v(c, r, s, 1).minus(p).abs().cmp(v(l, e, s, 1).minus(p).abs()) < 1 ? [c, r] : [l, e], N.precision = f, w = !0, d;
421
- };
422
- a.toHexadecimal = a.toHex = function(n, t) {
423
- return an(this, 16, n, t);
424
- };
425
- a.toNearest = function(n, t) {
426
- let e = this, r = e.constructor;
427
- if (e = new r(e), n == null) {
428
- if (!e.d) return e;
429
- n = new r(1), t = r.rounding;
430
- } else {
431
- if (n = new r(n), t === void 0 ? t = r.rounding : D(t, 0, 8), !e.d) return n.s ? e : n;
432
- if (!n.d)
433
- return n.s && (n.s = e.s), n;
434
- }
435
- return n.d[0] ? (w = !1, e = v(e, n, 0, t, 1).times(n), w = !0, g(e)) : (n.s = e.s, e = n), e;
436
- };
437
- a.toNumber = function() {
438
- return +this;
439
- };
440
- a.toOctal = function(n, t) {
441
- return an(this, 8, n, t);
442
- };
443
- a.toPower = a.pow = function(n) {
444
- let t, e, r, i, s, o, u = this, l = u.constructor, c = +(n = new l(n));
445
- if (!u.d || !n.d || !u.d[0] || !n.d[0]) return new l(M(+u, c));
446
- if (u = new l(u), u.eq(1)) return u;
447
- if (r = l.precision, s = l.rounding, n.eq(1)) return g(u, r, s);
448
- if (t = A(n.e / m), t >= n.d.length - 1 && (e = c < 0 ? -c : c) <= _n)
449
- return i = yn(l, u, e, r), n.s < 0 ? new l(1).div(i) : g(i, r, s);
450
- if (o = u.s, o < 0) {
451
- if (t < n.d.length - 1) return new l(NaN);
452
- if (n.d[t] & 1 || (o = 1), u.e == 0 && u.d[0] == 1 && u.d.length == 1)
453
- return u.s = o, u;
454
- }
455
- return e = M(+u, c), t = e == 0 || !isFinite(e) ? A(
456
- c * (Math.log("0." + q(u.d)) / Math.LN10 + u.e + 1)
457
- ) : new l(e + "").e, t > l.maxE + 1 || t < l.minE - 1 ? new l(t > 0 ? o / 0 : 0) : (w = !1, l.rounding = u.s = 1, e = Math.min(12, (t + "").length), i = hn(n.times(I(u, r + e)), r), i.d && (i = g(i, r + 5, 1), W(i.d, r, s) && (t = r + 10, i = g(
458
- hn(n.times(I(u, t + e)), t),
459
- t + 5,
460
- 1
461
- ), +q(i.d).slice(r + 1, r + 15) + 1 == 1e14 && (i = g(i, r + 1, 0)))), i.s = o, w = !0, l.rounding = s, g(i, r, s));
462
- };
463
- a.toPrecision = function(n, t) {
464
- let e, r = this, i = r.constructor;
465
- return n === void 0 ? e = _(r, r.e <= i.toExpNeg || r.e >= i.toExpPos) : (D(n, 1, H), t === void 0 ? t = i.rounding : D(t, 0, 8), r = g(new i(r), n, t), e = _(r, n <= r.e || r.e <= i.toExpNeg, n)), r.isNeg() && !r.isZero() ? "-" + e : e;
466
- };
467
- a.toSignificantDigits = a.toSD = function(n, t) {
468
- let e = this, r = e.constructor;
469
- return n === void 0 ? (n = r.precision, t = r.rounding) : (D(n, 1, H), t === void 0 ? t = r.rounding : D(t, 0, 8)), g(new r(e), n, t);
470
- };
471
- a.toString = function() {
472
- let n = this, t = n.constructor, e = _(n, n.e <= t.toExpNeg || n.e >= t.toExpPos);
473
- return n.isNeg() && !n.isZero() ? "-" + e : e;
474
- };
475
- a.truncated = a.trunc = function() {
476
- return g(new this.constructor(this), this.e + 1, 1);
477
- };
478
- a.valueOf = a.toJSON = function() {
479
- let n = this, t = n.constructor, e = _(n, n.e <= t.toExpNeg || n.e >= t.toExpPos);
480
- return n.isNeg() ? "-" + e : e;
481
- };
482
- function q(n) {
483
- let t, e, r, i = n.length - 1, s = "", o = n[0];
484
- if (i > 0) {
485
- for (s += o, t = 1; t < i; t++)
486
- r = n[t] + "", e = m - r.length, e && (s += U(e)), s += r;
487
- o = n[t], r = o + "", e = m - r.length, e && (s += U(e));
488
- } else if (o === 0)
489
- return "0";
490
- for (; o % 10 === 0; ) o /= 10;
491
- return s + o;
492
- }
493
- function D(n, t, e) {
494
- if (n !== ~~n || n < t || n > e)
495
- throw Error(C + n);
496
- }
497
- function W(n, t, e, r) {
498
- let i, s, o, u;
499
- for (s = n[0]; s >= 10; s /= 10) --t;
500
- return --t < 0 ? (t += m, i = 0) : (i = Math.ceil((t + 1) / m), t %= m), s = M(10, m - t), u = n[i] % s | 0, r == null ? t < 3 ? (t == 0 ? u = u / 100 | 0 : t == 1 && (u = u / 10 | 0), o = e < 4 && u == 99999 || e > 3 && u == 49999 || u == 5e4 || u == 0) : o = (e < 4 && u + 1 == s || e > 3 && u + 1 == s / 2) && (n[i + 1] / s / 100 | 0) == M(10, t - 2) - 1 || (u == s / 2 || u == 0) && (n[i + 1] / s / 100 | 0) == 0 : t < 4 ? (t == 0 ? u = u / 1e3 | 0 : t == 1 ? u = u / 100 | 0 : t == 2 && (u = u / 10 | 0), o = (r || e < 4) && u == 9999 || !r && e > 3 && u == 4999) : o = ((r || e < 4) && u + 1 == s || !r && e > 3 && u + 1 == s / 2) && (n[i + 1] / s / 1e3 | 0) == M(10, t - 3) - 1, o;
501
- }
502
- function Q(n, t, e) {
503
- let r, i = [0], s, o = 0, u = n.length;
504
- for (; o < u; ) {
505
- for (s = i.length; s--; ) i[s] *= t;
506
- for (i[0] += cn.indexOf(n.charAt(o++)), r = 0; r < i.length; r++)
507
- i[r] > e - 1 && (i[r + 1] === void 0 && (i[r + 1] = 0), i[r + 1] += i[r] / e | 0, i[r] %= e);
508
- }
509
- return i.reverse();
510
- }
511
- function Ln(n, t) {
512
- let e, r, i;
513
- if (t.isZero()) return t;
514
- r = t.d.length, r < 32 ? (e = Math.ceil(r / 3), i = (1 / rn(4, e)).toString()) : (e = 16, i = "2.3283064365386962890625e-10"), n.precision += e, t = $(n, 1, t.times(i), new n(1));
515
- for (let s = e; s--; ) {
516
- let o = t.times(t);
517
- t = o.times(o).minus(o).times(8).plus(1);
518
- }
519
- return n.precision -= e, t;
520
- }
521
- let v = /* @__PURE__ */ function() {
522
- function n(r, i, s) {
523
- let o, u = 0, l = r.length;
524
- for (r = r.slice(); l--; )
525
- o = r[l] * i + u, r[l] = o % s | 0, u = o / s | 0;
526
- return u && r.unshift(u), r;
527
- }
528
- function t(r, i, s, o) {
529
- let u, l;
530
- if (s != o)
531
- l = s > o ? 1 : -1;
532
- else
533
- for (u = l = 0; u < s; u++)
534
- if (r[u] != i[u]) {
535
- l = r[u] > i[u] ? 1 : -1;
536
- break;
537
- }
538
- return l;
539
- }
540
- function e(r, i, s, o) {
541
- let u = 0;
542
- for (; s--; )
543
- r[s] -= u, u = r[s] < i[s] ? 1 : 0, r[s] = u * o + r[s] - i[s];
544
- for (; !r[0] && r.length > 1; ) r.shift();
545
- }
546
- return function(r, i, s, o, u, l) {
547
- let c, f, h, d, p, b, N, Z, y, S, E, O, J, k, sn, z, j, on, P, G, K = r.constructor, un = r.s == i.s ? 1 : -1, F = r.d, x = i.d;
548
- if (!F || !F[0] || !x || !x[0])
549
- return new K(
550
- // Return NaN if either NaN, or both Infinity or 0.
551
- !r.s || !i.s || (F ? x && F[0] == x[0] : !x) ? NaN : (
552
- // Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0.
553
- F && F[0] == 0 || !x ? un * 0 : un / 0
554
- )
555
- );
556
- for (l ? (p = 1, f = r.e - i.e) : (l = T, p = m, f = A(r.e / p) - A(i.e / p)), P = x.length, j = F.length, y = new K(un), S = y.d = [], h = 0; x[h] == (F[h] || 0); h++) ;
557
- if (x[h] > (F[h] || 0) && f--, s == null ? (k = s = K.precision, o = K.rounding) : u ? k = s + (r.e - i.e) + 1 : k = s, k < 0)
558
- S.push(1), b = !0;
559
- else {
560
- if (k = k / p + 2 | 0, h = 0, P == 1) {
561
- for (d = 0, x = x[0], k++; (h < j || d) && k--; h++)
562
- sn = d * l + (F[h] || 0), S[h] = sn / x | 0, d = sn % x | 0;
563
- b = d || h < j;
564
- } else {
565
- for (d = l / (x[0] + 1) | 0, d > 1 && (x = n(x, d, l), F = n(F, d, l), P = x.length, j = F.length), z = P, E = F.slice(0, P), O = E.length; O < P; ) E[O++] = 0;
566
- G = x.slice(), G.unshift(0), on = x[0], x[1] >= l / 2 && ++on;
567
- do
568
- d = 0, c = t(x, E, P, O), c < 0 ? (J = E[0], P != O && (J = J * l + (E[1] || 0)), d = J / on | 0, d > 1 ? (d >= l && (d = l - 1), N = n(x, d, l), Z = N.length, O = E.length, c = t(N, E, Z, O), c == 1 && (d--, e(N, P < Z ? G : x, Z, l))) : (d == 0 && (c = d = 1), N = x.slice()), Z = N.length, Z < O && N.unshift(0), e(E, N, O, l), c == -1 && (O = E.length, c = t(x, E, P, O), c < 1 && (d++, e(E, P < O ? G : x, O, l))), O = E.length) : c === 0 && (d++, E = [0]), S[h++] = d, c && E[0] ? E[O++] = F[z] || 0 : (E = [F[z]], O = 1);
569
- while ((z++ < j || E[0] !== void 0) && k--);
570
- b = E[0] !== void 0;
571
- }
572
- S[0] || S.shift();
573
- }
574
- if (p == 1)
575
- y.e = f, wn = b;
576
- else {
577
- for (h = 1, d = S[0]; d >= 10; d /= 10) h++;
578
- y.e = h + f * p - 1, g(y, u ? s + y.e + 1 : s, o, b);
579
- }
580
- return y;
581
- };
582
- }();
583
- function g(n, t, e, r) {
584
- let i, s, o, u, l, c, f, h, d, p = n.constructor;
585
- n: if (t != null) {
586
- if (h = n.d, !h) return n;
587
- for (i = 1, u = h[0]; u >= 10; u /= 10) i++;
588
- if (s = t - i, s < 0)
589
- s += m, o = t, f = h[d = 0], l = f / M(10, i - o - 1) % 10 | 0;
590
- else if (d = Math.ceil((s + 1) / m), u = h.length, d >= u)
591
- if (r) {
592
- for (; u++ <= d; ) h.push(0);
593
- f = l = 0, i = 1, s %= m, o = s - m + 1;
594
- } else
595
- break n;
596
- else {
597
- for (f = u = h[d], i = 1; u >= 10; u /= 10) i++;
598
- s %= m, o = s - m + i, l = o < 0 ? 0 : f / M(10, i - o - 1) % 10 | 0;
599
- }
600
- if (r = r || t < 0 || h[d + 1] !== void 0 || (o < 0 ? f : f % M(10, i - o - 1)), c = e < 4 ? (l || r) && (e == 0 || e == (n.s < 0 ? 3 : 2)) : l > 5 || l == 5 && (e == 4 || r || e == 6 && // Check whether the digit to the left of the rounding digit is odd.
601
- (s > 0 ? o > 0 ? f / M(10, i - o) : 0 : h[d - 1]) % 10 & 1 || e == (n.s < 0 ? 8 : 7)), t < 1 || !h[0])
602
- return h.length = 0, c ? (t -= n.e + 1, h[0] = M(10, (m - t % m) % m), n.e = -t || 0) : h[0] = n.e = 0, n;
603
- if (s == 0 ? (h.length = d, u = 1, d--) : (h.length = d + 1, u = M(10, m - s), h[d] = o > 0 ? (f / M(10, i - o) % M(10, o) | 0) * u : 0), c)
604
- for (; ; )
605
- if (d == 0) {
606
- for (s = 1, o = h[0]; o >= 10; o /= 10) s++;
607
- for (o = h[0] += u, u = 1; o >= 10; o /= 10) u++;
608
- s != u && (n.e++, h[0] == T && (h[0] = 1));
609
- break;
610
- } else {
611
- if (h[d] += u, h[d] != T) break;
612
- h[d--] = 0, u = 1;
613
- }
614
- for (s = h.length; h[--s] === 0; ) h.pop();
615
- }
616
- return w && (n.e > p.maxE ? (n.d = null, n.e = NaN) : n.e < p.minE && (n.e = 0, n.d = [0])), n;
617
- }
618
- function _(n, t, e) {
619
- if (!n.isFinite()) return qn(n);
620
- let r, i = n.e, s = q(n.d), o = s.length;
621
- return t ? (e && (r = e - o) > 0 ? s = s.charAt(0) + "." + s.slice(1) + U(r) : o > 1 && (s = s.charAt(0) + "." + s.slice(1)), s = s + (n.e < 0 ? "e" : "e+") + n.e) : i < 0 ? (s = "0." + U(-i - 1) + s, e && (r = e - o) > 0 && (s += U(r))) : i >= o ? (s += U(i + 1 - o), e && (r = e - i - 1) > 0 && (s = s + "." + U(r))) : ((r = i + 1) < o && (s = s.slice(0, r) + "." + s.slice(r)), e && (r = e - o) > 0 && (i + 1 === o && (s += "."), s += U(r))), s;
622
- }
623
- function en(n, t) {
624
- let e = n[0];
625
- for (t *= m; e >= 10; e /= 10) t++;
626
- return t;
627
- }
628
- function nn(n, t, e) {
629
- if (t > kn)
630
- throw w = !0, e && (n.precision = e), Error(Nn);
631
- return g(new n(X), t, 1, !0);
632
- }
633
- function R(n, t, e) {
634
- if (t > fn) throw Error(Nn);
635
- return g(new n(Y), t, e, !0);
636
- }
637
- function xn(n) {
638
- let t = n.length - 1, e = t * m + 1;
639
- if (t = n[t], t) {
640
- for (; t % 10 == 0; t /= 10) e--;
641
- for (t = n[0]; t >= 10; t /= 10) e++;
642
- }
643
- return e;
644
- }
645
- function U(n) {
646
- let t = "";
647
- for (; n--; ) t += "0";
648
- return t;
649
- }
650
- function yn(n, t, e, r) {
651
- let i, s = new n(1), o = Math.ceil(r / m + 4);
652
- for (w = !1; ; ) {
653
- if (e % 2 && (s = s.times(t), pn(s.d, o) && (i = !0)), e = A(e / 2), e === 0) {
654
- e = s.d.length - 1, i && s.d[e] === 0 && ++s.d[e];
655
- break;
656
- }
657
- t = t.times(t), pn(t.d, o);
658
- }
659
- return w = !0, s;
660
- }
661
- function gn(n) {
662
- return n.d[n.d.length - 1] & 1;
663
- }
664
- function Mn(n, t, e) {
665
- let r, i = new n(t[0]), s = 0;
666
- for (; ++s < t.length; )
667
- if (r = new n(t[s]), r.s)
668
- i[e](r) && (i = r);
669
- else {
670
- i = r;
671
- break;
672
- }
673
- return i;
674
- }
675
- function hn(n, t) {
676
- let e, r, i, s, o, u, l, c = 0, f = 0, h = 0, d = n.constructor, p = d.rounding, b = d.precision;
677
- if (!n.d || !n.d[0] || n.e > 17)
678
- return new d(
679
- n.d ? n.d[0] ? n.s < 0 ? 0 : 1 / 0 : 1 : n.s ? n.s < 0 ? 0 : n : NaN
680
- );
681
- for (t == null ? (w = !1, l = b) : l = t, u = new d(0.03125); n.e > -2; )
682
- n = n.times(u), h += 5;
683
- for (r = Math.log(M(2, h)) / Math.LN10 * 2 + 5 | 0, l += r, e = s = o = new d(1), d.precision = l; ; ) {
684
- if (s = g(s.times(n), l, 1), e = e.times(++f), u = o.plus(v(s, e, l, 1)), q(u.d).slice(0, l) === q(o.d).slice(0, l)) {
685
- for (i = h; i--; ) o = g(o.times(o), l, 1);
686
- if (t == null)
687
- if (c < 3 && W(o.d, l - r, p, c))
688
- d.precision = l += 10, e = s = u = new d(1), f = 0, c++;
689
- else
690
- return g(o, d.precision = b, p, w = !0);
691
- else
692
- return d.precision = b, o;
693
- }
694
- o = u;
695
- }
696
- }
697
- function I(n, t) {
698
- let e, r, i, s, o, u, l, c, f, h, d, p = 1, b = 10, N = n, Z = N.d, y = N.constructor, S = y.rounding, E = y.precision;
699
- if (N.s < 0 || !Z || !Z[0] || !N.e && Z[0] == 1 && Z.length == 1)
700
- return new y(Z && !Z[0] ? -1 / 0 : N.s != 1 ? NaN : Z ? 0 : N);
701
- if (t == null ? (w = !1, f = E) : f = t, y.precision = f += b, e = q(Z), r = e.charAt(0), Math.abs(s = N.e) < 15e14) {
702
- for (; r < 7 && r != 1 || r == 1 && e.charAt(1) > 3; )
703
- N = N.times(n), e = q(N.d), r = e.charAt(0), p++;
704
- s = N.e, r > 1 ? (N = new y("0." + e), s++) : N = new y(r + "." + e.slice(1));
705
- } else
706
- return c = nn(y, f + 2, E).times(s + ""), N = I(new y(r + "." + e.slice(1)), f - b).plus(c), y.precision = E, t == null ? g(N, E, S, w = !0) : N;
707
- for (h = N, l = o = N = v(N.minus(1), N.plus(1), f, 1), d = g(N.times(N), f, 1), i = 3; ; ) {
708
- if (o = g(o.times(d), f, 1), c = l.plus(v(o, new y(i), f, 1)), q(c.d).slice(0, f) === q(l.d).slice(0, f))
709
- if (l = l.times(2), s !== 0 && (l = l.plus(nn(y, f + 2, E).times(s + ""))), l = v(l, new y(p), f, 1), t == null)
710
- if (W(l.d, f - b, S, u))
711
- y.precision = f += b, c = o = N = v(h.minus(1), h.plus(1), f, 1), d = g(N.times(N), f, 1), i = u = 1;
712
- else
713
- return g(l, y.precision = E, S, w = !0);
714
- else
715
- return y.precision = E, l;
716
- l = c, i += 2;
717
- }
718
- }
719
- function qn(n) {
720
- return String(n.s * n.s / 0);
721
- }
722
- function dn(n, t) {
723
- let e, r, i;
724
- for ((e = t.indexOf(".")) > -1 && (t = t.replace(".", "")), (r = t.search(/e/i)) > 0 ? (e < 0 && (e = r), e += +t.slice(r + 1), t = t.substring(0, r)) : e < 0 && (e = t.length), r = 0; t.charCodeAt(r) === 48; r++) ;
725
- for (i = t.length; t.charCodeAt(i - 1) === 48; --i) ;
726
- if (t = t.slice(r, i), t) {
727
- if (i -= r, n.e = e = e - r - 1, n.d = [], r = (e + 1) % m, e < 0 && (r += m), r < i) {
728
- for (r && n.d.push(+t.slice(0, r)), i -= m; r < i; ) n.d.push(+t.slice(r, r += m));
729
- t = t.slice(r), r = m - t.length;
730
- } else
731
- r -= i;
732
- for (; r--; ) t += "0";
733
- n.d.push(+t), w && (n.e > n.constructor.maxE ? (n.d = null, n.e = NaN) : n.e < n.constructor.minE && (n.e = 0, n.d = [0]));
734
- } else
735
- n.e = 0, n.d = [0];
736
- return n;
737
- }
738
- function Un(n, t) {
739
- let e, r, i, s, o, u, l, c, f;
740
- if (t.indexOf("_") > -1) {
741
- if (t = t.replace(/(\d)_(?=\d)/g, "$1"), vn.test(t)) return dn(n, t);
742
- } else if (t === "Infinity" || t === "NaN")
743
- return +t || (n.s = NaN), n.e = NaN, n.d = null, n;
744
- if (Rn.test(t))
745
- e = 16, t = t.toLowerCase();
746
- else if (Pn.test(t))
747
- e = 2;
748
- else if (Tn.test(t))
749
- e = 8;
750
- else
751
- throw Error(C + t);
752
- for (s = t.search(/p/i), s > 0 ? (l = +t.slice(s + 1), t = t.substring(2, s)) : t = t.slice(2), s = t.indexOf("."), o = s >= 0, r = n.constructor, o && (t = t.replace(".", ""), u = t.length, s = u - s, i = yn(r, new r(e), s, s * 2)), c = Q(t, e, T), f = c.length - 1, s = f; c[s] === 0; --s) c.pop();
753
- return s < 0 ? new r(n.s * 0) : (n.e = en(c, f), n.d = c, w = !1, o && (n = v(n, i, u * 4)), l && (n = n.times(Math.abs(l) < 54 ? M(2, l) : B.pow(2, l))), w = !0, n);
754
- }
755
- function In(n, t) {
756
- let e, r = t.d.length;
757
- if (r < 3)
758
- return t.isZero() ? t : $(n, 2, t, t);
759
- e = 1.4 * Math.sqrt(r), e = e > 16 ? 16 : e | 0, t = t.times(1 / rn(5, e)), t = $(n, 2, t, t);
760
- let i, s = new n(5), o = new n(16), u = new n(20);
761
- for (; e--; )
762
- i = t.times(t), t = t.times(s.plus(i.times(o.times(i).minus(u))));
763
- return t;
764
- }
765
- function $(n, t, e, r, i) {
766
- let s, o, u, l, c = n.precision, f = Math.ceil(c / m);
767
- for (w = !1, l = e.times(e), u = new n(r); ; ) {
768
- if (o = v(u.times(l), new n(t++ * t++), c, 1), u = i ? r.plus(o) : r.minus(o), r = v(o.times(l), new n(t++ * t++), c, 1), o = u.plus(r), o.d[f] !== void 0) {
769
- for (s = f; o.d[s] === u.d[s] && s--; ) ;
770
- if (s == -1) break;
771
- }
772
- s = u, u = r, r = o, o = s;
773
- }
774
- return w = !0, o.d.length = f + 1, o;
775
- }
776
- function rn(n, t) {
777
- let e = n;
778
- for (; --t; ) e *= n;
779
- return e;
780
- }
781
- function On(n, t) {
782
- let e, r = t.s < 0, i = R(n, n.precision, 1), s = i.times(0.5);
783
- if (t = t.abs(), t.lte(s))
784
- return L = r ? 4 : 1, t;
785
- if (e = t.divToInt(i), e.isZero())
786
- L = r ? 3 : 2;
787
- else {
788
- if (t = t.minus(e.times(i)), t.lte(s))
789
- return L = gn(e) ? r ? 2 : 3 : r ? 4 : 1, t;
790
- L = gn(e) ? r ? 1 : 4 : r ? 3 : 2;
791
- }
792
- return t.minus(i).abs();
793
- }
794
- function an(n, t, e, r) {
795
- let i, s, o, u, l, c, f, h, d, p = n.constructor, b = e !== void 0;
796
- if (b ? (D(e, 1, H), r === void 0 ? r = p.rounding : D(r, 0, 8)) : (e = p.precision, r = p.rounding), !n.isFinite())
797
- f = qn(n);
798
- else {
799
- for (f = _(n), o = f.indexOf("."), b ? (i = 2, t == 16 ? e = e * 4 - 3 : t == 8 && (e = e * 3 - 2)) : i = t, o >= 0 && (f = f.replace(".", ""), d = new p(1), d.e = f.length - o, d.d = Q(_(d), 10, i), d.e = d.d.length), h = Q(f, 10, i), s = l = h.length; h[--l] == 0; ) h.pop();
800
- if (!h[0])
801
- f = b ? "0p+0" : "0";
802
- else {
803
- if (o < 0 ? s-- : (n = new p(n), n.d = h, n.e = s, n = v(n, d, e, r, 0, i), h = n.d, s = n.e, c = wn), o = h[e], u = i / 2, c = c || h[e + 1] !== void 0, c = r < 4 ? (o !== void 0 || c) && (r === 0 || r === (n.s < 0 ? 3 : 2)) : o > u || o === u && (r === 4 || c || r === 6 && h[e - 1] & 1 || r === (n.s < 0 ? 8 : 7)), h.length = e, c)
804
- for (; ++h[--e] > i - 1; )
805
- h[e] = 0, e || (++s, h.unshift(1));
806
- for (l = h.length; !h[l - 1]; --l) ;
807
- for (o = 0, f = ""; o < l; o++) f += cn.charAt(h[o]);
808
- if (b) {
809
- if (l > 1)
810
- if (t == 16 || t == 8) {
811
- for (o = t == 16 ? 4 : 3, --l; l % o; l++) f += "0";
812
- for (h = Q(f, i, t), l = h.length; !h[l - 1]; --l) ;
813
- for (o = 1, f = "1."; o < l; o++) f += cn.charAt(h[o]);
814
- } else
815
- f = f.charAt(0) + "." + f.slice(1);
816
- f = f + (s < 0 ? "p" : "p+") + s;
817
- } else if (s < 0) {
818
- for (; ++s; ) f = "0" + f;
819
- f = "0." + f;
820
- } else if (++s > l) for (s -= l; s--; ) f += "0";
821
- else s < l && (f = f.slice(0, s) + "." + f.slice(s));
822
- }
823
- f = (t == 16 ? "0x" : t == 2 ? "0b" : t == 8 ? "0o" : "") + f;
824
- }
825
- return n.s < 0 ? "-" + f : f;
826
- }
827
- function pn(n, t) {
828
- if (n.length > t)
829
- return n.length = t, !0;
830
- }
831
- function Cn(n) {
832
- return new this(n).abs();
833
- }
834
- function Hn(n) {
835
- return new this(n).acos();
836
- }
837
- function Bn(n) {
838
- return new this(n).acosh();
839
- }
840
- function Vn(n, t) {
841
- return new this(n).plus(t);
842
- }
843
- function $n(n) {
844
- return new this(n).asin();
845
- }
846
- function jn(n) {
847
- return new this(n).asinh();
848
- }
849
- function Wn(n) {
850
- return new this(n).atan();
851
- }
852
- function Jn(n) {
853
- return new this(n).atanh();
854
- }
855
- function zn(n, t) {
856
- n = new this(n), t = new this(t);
857
- let e, r = this.precision, i = this.rounding, s = r + 4;
858
- return !n.s || !t.s ? e = new this(NaN) : !n.d && !t.d ? (e = R(this, s, 1).times(t.s > 0 ? 0.25 : 0.75), e.s = n.s) : !t.d || n.isZero() ? (e = t.s < 0 ? R(this, r, i) : new this(0), e.s = n.s) : !n.d || t.isZero() ? (e = R(this, s, 1).times(0.5), e.s = n.s) : t.s < 0 ? (this.precision = s, this.rounding = 1, e = this.atan(v(n, t, s, 1)), t = R(this, s, 1), this.precision = r, this.rounding = i, e = n.s < 0 ? e.minus(t) : e.plus(t)) : e = this.atan(v(n, t, s, 1)), e;
859
- }
860
- function Gn(n) {
861
- return new this(n).cbrt();
862
- }
863
- function Kn(n) {
864
- return g(n = new this(n), n.e + 1, 2);
865
- }
866
- function Qn(n, t, e) {
867
- return new this(n).clamp(t, e);
868
- }
869
- function Xn(n) {
870
- if (!n || typeof n != "object")
871
- throw Error(tn + "Object expected");
872
- let t, e, r, i = n.defaults === !0, s = [
873
- "precision",
874
- 1,
875
- H,
876
- "rounding",
877
- 0,
878
- 8,
879
- "toExpNeg",
880
- -V,
881
- 0,
882
- "toExpPos",
883
- 0,
884
- V,
885
- "maxE",
886
- 0,
887
- V,
888
- "minE",
889
- -V,
890
- 0,
891
- "modulo",
892
- 0,
893
- 9
894
- ];
895
- for (t = 0; t < s.length; t += 3)
896
- if (e = s[t], i && (this[e] = ln[e]), (r = n[e]) !== void 0)
897
- if (A(r) === r && r >= s[t + 1] && r <= s[t + 2]) this[e] = r;
898
- else throw Error(C + e + ": " + r);
899
- if (e = "crypto", i && (this[e] = ln[e]), (r = n[e]) !== void 0)
900
- if (r === !0 || r === !1 || r === 0 || r === 1)
901
- if (r)
902
- if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
903
- this[e] = !0;
904
- else
905
- throw Error(bn);
906
- else
907
- this[e] = !1;
908
- else
909
- throw Error(C + e + ": " + r);
910
- return this;
911
- }
912
- function Yn(n) {
913
- return new this(n).cos();
914
- }
915
- function nt(n) {
916
- return new this(n).cosh();
917
- }
918
- function Fn(n) {
919
- let t, e, r;
920
- function i(s) {
921
- let o, u, l, c = this;
922
- if (!(c instanceof i)) return new i(s);
923
- if (c.constructor = i, mn(s)) {
924
- c.s = s.s, w ? !s.d || s.e > i.maxE ? (c.e = NaN, c.d = null) : s.e < i.minE ? (c.e = 0, c.d = [0]) : (c.e = s.e, c.d = s.d.slice()) : (c.e = s.e, c.d = s.d ? s.d.slice() : s.d);
925
- return;
926
- }
927
- if (l = typeof s, l === "number") {
928
- if (s === 0) {
929
- c.s = 1 / s < 0 ? -1 : 1, c.e = 0, c.d = [0];
930
- return;
931
- }
932
- if (s < 0 ? (s = -s, c.s = -1) : c.s = 1, s === ~~s && s < 1e7) {
933
- for (o = 0, u = s; u >= 10; u /= 10) o++;
934
- w ? o > i.maxE ? (c.e = NaN, c.d = null) : o < i.minE ? (c.e = 0, c.d = [0]) : (c.e = o, c.d = [s]) : (c.e = o, c.d = [s]);
935
- return;
936
- } else if (s * 0 !== 0) {
937
- s || (c.s = NaN), c.e = NaN, c.d = null;
938
- return;
939
- }
940
- return dn(c, s.toString());
941
- } else if (l !== "string")
942
- throw Error(C + s);
943
- return (u = s.charCodeAt(0)) === 45 ? (s = s.slice(1), c.s = -1) : (u === 43 && (s = s.slice(1)), c.s = 1), vn.test(s) ? dn(c, s) : Un(c, s);
944
- }
945
- if (i.prototype = a, i.ROUND_UP = 0, i.ROUND_DOWN = 1, i.ROUND_CEIL = 2, i.ROUND_FLOOR = 3, i.ROUND_HALF_UP = 4, i.ROUND_HALF_DOWN = 5, i.ROUND_HALF_EVEN = 6, i.ROUND_HALF_CEIL = 7, i.ROUND_HALF_FLOOR = 8, i.EUCLID = 9, i.config = i.set = Xn, i.clone = Fn, i.isDecimal = mn, i.abs = Cn, i.acos = Hn, i.acosh = Bn, i.add = Vn, i.asin = $n, i.asinh = jn, i.atan = Wn, i.atanh = Jn, i.atan2 = zn, i.cbrt = Gn, i.ceil = Kn, i.clamp = Qn, i.cos = Yn, i.cosh = nt, i.div = tt, i.exp = et, i.floor = rt, i.hypot = it, i.ln = st, i.log = ot, i.log10 = ct, i.log2 = ut, i.max = lt, i.min = ft, i.mod = ht, i.mul = dt, i.pow = at, i.random = gt, i.round = pt, i.sign = mt, i.sin = wt, i.sinh = Nt, i.sqrt = bt, i.sub = Et, i.sum = vt, i.tan = xt, i.tanh = yt, i.trunc = Mt, n === void 0 && (n = {}), n && n.defaults !== !0)
946
- for (r = [
947
- "precision",
948
- "rounding",
949
- "toExpNeg",
950
- "toExpPos",
951
- "maxE",
952
- "minE",
953
- "modulo",
954
- "crypto"
955
- ], t = 0; t < r.length; )
956
- Object.prototype.hasOwnProperty.call(n, e = r[t++]) || (n[e] = this[e]);
957
- return i.config(n), i;
958
- }
959
- function tt(n, t) {
960
- return new this(n).div(t);
961
- }
962
- function et(n) {
963
- return new this(n).exp();
964
- }
965
- function rt(n) {
966
- return g(n = new this(n), n.e + 1, 3);
967
- }
968
- function it() {
969
- let n, t, e = new this(0);
970
- for (w = !1, n = 0; n < arguments.length; )
971
- if (t = new this(arguments[n++]), t.d)
972
- e.d && (e = e.plus(t.times(t)));
973
- else {
974
- if (t.s)
975
- return w = !0, new this(1 / 0);
976
- e = t;
977
- }
978
- return w = !0, e.sqrt();
979
- }
980
- function mn(n) {
981
- return n instanceof B || n && n.toStringTag === En || !1;
982
- }
983
- function st(n) {
984
- return new this(n).ln();
985
- }
986
- function ot(n, t) {
987
- return new this(n).log(t);
988
- }
989
- function ut(n) {
990
- return new this(n).log(2);
991
- }
992
- function ct(n) {
993
- return new this(n).log(10);
994
- }
995
- function lt() {
996
- return Mn(this, arguments, "lt");
997
- }
998
- function ft() {
999
- return Mn(this, arguments, "gt");
1000
- }
1001
- function ht(n, t) {
1002
- return new this(n).mod(t);
1003
- }
1004
- function dt(n, t) {
1005
- return new this(n).mul(t);
1006
- }
1007
- function at(n, t) {
1008
- return new this(n).pow(t);
1009
- }
1010
- function gt(n) {
1011
- let t, e, r, i, s = 0, o = new this(1), u = [];
1012
- if (n === void 0 ? n = this.precision : D(n, 1, H), r = Math.ceil(n / m), this.crypto)
1013
- if (crypto.getRandomValues)
1014
- for (t = crypto.getRandomValues(new Uint32Array(r)); s < r; )
1015
- i = t[s], i >= 429e7 ? t[s] = crypto.getRandomValues(new Uint32Array(1))[0] : u[s++] = i % 1e7;
1016
- else if (crypto.randomBytes) {
1017
- for (t = crypto.randomBytes(r *= 4); s < r; )
1018
- i = t[s] + (t[s + 1] << 8) + (t[s + 2] << 16) + ((t[s + 3] & 127) << 24), i >= 214e7 ? crypto.randomBytes(4).copy(t, s) : (u.push(i % 1e7), s += 4);
1019
- s = r / 4;
1020
- } else
1021
- throw Error(bn);
1022
- else for (; s < r; ) u[s++] = Math.random() * 1e7 | 0;
1023
- for (r = u[--s], n %= m, r && n && (i = M(10, m - n), u[s] = (r / i | 0) * i); u[s] === 0; s--) u.pop();
1024
- if (s < 0)
1025
- e = 0, u = [0];
1026
- else {
1027
- for (e = -1; u[0] === 0; e -= m) u.shift();
1028
- for (r = 1, i = u[0]; i >= 10; i /= 10) r++;
1029
- r < m && (e -= m - r);
1030
- }
1031
- return o.e = e, o.d = u, o;
1032
- }
1033
- function pt(n) {
1034
- return g(n = new this(n), n.e + 1, this.rounding);
1035
- }
1036
- function mt(n) {
1037
- return n = new this(n), n.d ? n.d[0] ? n.s : 0 * n.s : n.s || NaN;
1038
- }
1039
- function wt(n) {
1040
- return new this(n).sin();
1041
- }
1042
- function Nt(n) {
1043
- return new this(n).sinh();
1044
- }
1045
- function bt(n) {
1046
- return new this(n).sqrt();
1047
- }
1048
- function Et(n, t) {
1049
- return new this(n).sub(t);
1050
- }
1051
- function vt() {
1052
- let n = 0, t = arguments, e = new this(t[n]);
1053
- for (w = !1; e.s && ++n < t.length; ) e = e.plus(t[n]);
1054
- return w = !0, g(e, this.precision, this.rounding);
1055
- }
1056
- function xt(n) {
1057
- return new this(n).tan();
1058
- }
1059
- function yt(n) {
1060
- return new this(n).tanh();
1061
- }
1062
- function Mt(n) {
1063
- return g(n = new this(n), n.e + 1, 1);
1064
- }
1065
- a[Symbol.for("nodejs.util.inspect.custom")] = a.toString;
1066
- a[Symbol.toStringTag] = "Decimal";
1067
- let B = a.constructor = Fn(ln);
1068
- X = new B(X);
1069
- Y = new B(Y);
1070
- function An(n, t) {
1071
- return new B(n).plus(t).toNumber();
1072
- }
1073
- function Zn(n, t) {
1074
- return new B(n).minus(t).toNumber();
1075
- }
1076
- function Dn(n, t) {
1077
- return new B(n).times(t).toNumber();
1078
- }
1079
- function Sn(n, t) {
1080
- return new B(n).div(t).toNumber();
1081
- }
1082
- const qt = An, Ot = Zn, Ft = Dn, At = Sn, Zt = {
1083
- plus: An,
1084
- minus: Zn,
1085
- times: Dn,
1086
- div: Sn,
1087
- add: qt,
1088
- subtract: Ot,
1089
- multiply: Ft,
1090
- divide: At
1091
- };
1092
- export {
1093
- Ft as c,
1094
- At as d,
1095
- Zn as i,
1096
- Zt as l,
1097
- Ot as m,
1098
- Dn as o,
1099
- Sn as r,
1100
- qt as s,
1101
- An as u
1102
- };