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