@unicom-cloud/utils 0.1.24 → 0.1.25
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/case-name/index.js +1 -1
- package/caseName.js +1 -1
- package/class-name/index.js +1 -1
- package/className.js +1 -1
- package/clipboard-copy/index.js +1 -1
- package/clipboardCopy.js +1 -1
- package/constant/address.js +1 -1
- package/constant/chineseCharacters.js +1 -1
- package/constant/constellations.js +1 -1
- package/constant/domain.js +1 -1
- package/constant/emoji.js +1 -1
- package/constant/identity.js +1 -1
- package/constant/index.js +1 -1
- package/constant/keyboardCode.js +1 -1
- package/constant/licensePlate.js +1 -1
- package/constant/name.js +1 -1
- package/constant/platform.js +1 -1
- package/constant/protocol.js +1 -1
- package/constant/ui.js +1 -1
- package/constant.js +1 -1
- package/content-disposition/index.js +1 -1
- package/contentDisposition.js +1 -1
- package/cookie/index.js +1 -1
- package/cookie/src/index.js +1 -1
- package/cookie.js +1 -1
- package/date/convertTime.js +1 -1
- package/date/convertToDuration.js +1 -1
- package/date/index.js +1 -1
- package/date.js +1 -1
- package/decimal/decimal.js +22 -22
- package/decimal/index.js +1 -1
- package/decimal.js +1 -1
- package/dom-helpers/activeElement.js +1 -1
- package/dom-helpers/addClass.js +1 -1
- package/dom-helpers/addEventListener.js +1 -1
- package/dom-helpers/animate.js +1 -1
- package/dom-helpers/animationFrame.js +1 -1
- package/dom-helpers/attribute.js +1 -1
- package/dom-helpers/camelize.js +1 -1
- package/dom-helpers/camelizeStyle.js +1 -1
- package/dom-helpers/canUseDOM.js +1 -1
- package/dom-helpers/childElements.js +1 -1
- package/dom-helpers/childNodes.js +1 -1
- package/dom-helpers/clear.js +1 -1
- package/dom-helpers/closest.js +1 -1
- package/dom-helpers/collectElements.js +1 -1
- package/dom-helpers/collectSiblings.js +1 -1
- package/dom-helpers/contains.js +1 -1
- package/dom-helpers/css.js +1 -1
- package/dom-helpers/filterEventHandler.js +1 -1
- package/dom-helpers/getComputedStyle.js +1 -1
- package/dom-helpers/getScrollAccessor.js +1 -1
- package/dom-helpers/hasClass.js +1 -1
- package/dom-helpers/height.js +1 -1
- package/dom-helpers/hyphenate.js +1 -1
- package/dom-helpers/hyphenateStyle.js +1 -1
- package/dom-helpers/index.js +1 -1
- package/dom-helpers/insertAfter.js +1 -1
- package/dom-helpers/isDocument.js +1 -1
- package/dom-helpers/isInput.js +1 -1
- package/dom-helpers/isTransform.js +1 -1
- package/dom-helpers/isVisible.js +1 -1
- package/dom-helpers/isWindow.js +1 -1
- package/dom-helpers/listen.js +1 -1
- package/dom-helpers/matches.js +1 -1
- package/dom-helpers/nextUntil.js +1 -1
- package/dom-helpers/offset.js +1 -1
- package/dom-helpers/offsetParent.js +1 -1
- package/dom-helpers/ownerDocument.js +1 -1
- package/dom-helpers/ownerWindow.js +1 -1
- package/dom-helpers/parents.js +1 -1
- package/dom-helpers/position.js +1 -1
- package/dom-helpers/prepend.js +1 -1
- package/dom-helpers/querySelectorAll.js +1 -1
- package/dom-helpers/reflow.js +1 -1
- package/dom-helpers/remove.js +1 -1
- package/dom-helpers/removeClass.js +1 -1
- package/dom-helpers/removeEventListener.js +1 -1
- package/dom-helpers/scrollLeft.js +1 -1
- package/dom-helpers/scrollParent.js +1 -1
- package/dom-helpers/scrollTo.js +1 -1
- package/dom-helpers/scrollTop.js +1 -1
- package/dom-helpers/scrollbarSize.js +1 -1
- package/dom-helpers/siblings.js +1 -1
- package/dom-helpers/text.js +1 -1
- package/dom-helpers/toggleClass.js +1 -1
- package/dom-helpers/transitionEnd.js +1 -1
- package/dom-helpers/triggerEvent.js +1 -1
- package/dom-helpers/types.js +5 -1
- package/dom-helpers/width.js +1 -1
- package/domHelpers.js +1 -1
- package/emitter/index.js +1 -1
- package/emitter/src/index.js +1 -1
- package/emitter.js +1 -1
- package/file/fileToURL.js +1 -1
- package/file/index.js +1 -1
- package/file/saveAs.js +1 -1
- package/file.js +1 -1
- package/idb/index.js +1 -1
- package/idb.js +1 -1
- package/index.js +1 -1
- package/invariant/index.js +1 -1
- package/invariant.js +1 -1
- package/is/index.js +1 -1
- package/is.js +1 -1
- package/js-cookie/index.js +1 -1
- package/js-cookie/src/api.js +1 -1
- package/js-cookie/src/assign.js +1 -1
- package/js-cookie/src/converter.js +1 -1
- package/jsCookie.js +1 -1
- package/lunar/index.js +1 -1
- package/lunar/lib/Holiday.js +1 -1
- package/lunar/lib/HolidayUtil.js +1 -1
- package/lunar/lib/I18n.js +1 -1
- package/lunar/lib/JieQi.js +1 -1
- package/lunar/lib/Lunar.js +1 -1
- package/lunar/lib/LunarMonth.js +1 -1
- package/lunar/lib/LunarTime.js +1 -1
- package/lunar/lib/LunarUtil.js +1 -1
- package/lunar/lib/LunarYear.js +1 -1
- package/lunar/lib/ShouXingUtil.js +1 -1
- package/lunar/lib/Solar.js +1 -1
- package/lunar/lib/SolarHalfYear.js +1 -1
- package/lunar/lib/SolarMonth.js +1 -1
- package/lunar/lib/SolarSeason.js +1 -1
- package/lunar/lib/SolarUtil.js +1 -1
- package/lunar/lib/SolarWeek.js +1 -1
- package/lunar/lib/SolarYear.js +1 -1
- package/lunar/lib/index.js +1 -1
- package/lunar.js +1 -1
- package/math/index.js +1 -1
- package/math.js +1 -1
- package/md5/index.js +1 -1
- package/md5.js +1 -1
- package/mock/MockWebSocket.js +1 -1
- package/mock/MockXMLHttpRequest.js +1 -1
- package/mock/index.js +1 -1
- package/mock.js +1 -1
- package/normalize-wheel/ExecutionEnvironment.js +1 -1
- package/normalize-wheel/UserAgent_DEPRECATED.js +1 -1
- package/normalize-wheel/index.js +1 -1
- package/normalize-wheel/isEventSupported.js +10 -14
- package/normalizeWheel.js +1 -1
- package/number-to-chinese/index.js +1 -1
- package/numberToChinese.js +1 -1
- package/nzh/cn.js +1 -1
- package/nzh/hk.js +1 -1
- package/nzh/index.js +1 -1
- package/nzh/nzh.js +1 -1
- package/nzh/src/autoGet.js +1 -1
- package/nzh/src/index.js +1 -1
- package/nzh/src/langs/cn_b.js +1 -1
- package/nzh/src/langs/cn_s.js +1 -1
- package/nzh/src/langs/hk_b.js +1 -1
- package/nzh/src/langs/hk_s.js +1 -1
- package/nzh/src/utils.js +1 -1
- package/nzh.js +1 -1
- package/object-keys-sort/index.js +1 -1
- package/objectKeysSort.js +1 -1
- package/package.json +1 -1
- package/pinyin/index.js +1 -1
- package/pinyin/simplified.js +1 -1
- package/pinyin/src/core.js +1 -1
- package/pinyin/src/simplified.js +1 -1
- package/pinyin/src/simplified_dict.js +1 -1
- package/pinyin/src/traditional.js +1 -1
- package/pinyin/src/traditional_dict.js +1 -1
- package/pinyin/traditional.js +1 -1
- package/pinyin.js +1 -1
- package/query-string/base.js +1 -1
- package/query-string/index.js +1 -1
- package/query-string/splitOnFirst.js +1 -1
- package/queryString.js +1 -1
- package/random/address.js +1 -1
- package/random/constellation.js +1 -1
- package/random/image.js +1 -1
- package/random/index.js +1 -1
- package/random/licensePlate.js +1 -1
- package/random/name.js +1 -1
- package/random/number.js +1 -1
- package/random/text.js +1 -1
- package/random/time.js +1 -1
- package/random/web.js +1 -1
- package/random.js +1 -1
- package/screenfull/index.js +1 -1
- package/screenfull.js +1 -1
- package/sleep/index.js +1 -1
- package/sleep.js +1 -1
- package/snapdom/index.js +1 -1
- package/snapdom/src/api/preCache.js +51 -49
- package/snapdom/src/api/snapdom.js +171 -67
- package/snapdom/src/core/cache.js +2 -2
- package/snapdom/src/core/capture.js +249 -234
- package/snapdom/src/core/clone.js +151 -120
- package/snapdom/src/core/context.js +10 -8
- package/snapdom/src/core/plugins.js +69 -0
- package/snapdom/src/core/prepare.js +2 -2
- package/snapdom/src/exporters/download.js +1 -1
- package/snapdom/src/exporters/toBlob.js +1 -1
- package/snapdom/src/exporters/toCanvas.js +40 -40
- package/snapdom/src/exporters/toImg.js +1 -1
- package/snapdom/src/modules/CSSVar.js +66 -40
- package/snapdom/src/modules/background.js +39 -23
- package/snapdom/src/modules/changeCSS.js +1 -1
- package/snapdom/src/modules/counter.js +100 -86
- package/snapdom/src/modules/fonts.js +4 -4
- package/snapdom/src/modules/iconFonts.js +98 -14
- package/snapdom/src/modules/images.js +1 -1
- package/snapdom/src/modules/lineClamp.js +1 -1
- package/snapdom/src/modules/pseudo.js +147 -138
- package/snapdom/src/modules/rasterize.js +1 -1
- package/snapdom/src/modules/snapFetch.js +1 -1
- package/snapdom/src/modules/styles.js +1 -1
- package/snapdom/src/modules/svgDefs.js +86 -39
- package/snapdom/src/utils/browser.js +1 -1
- package/snapdom/src/utils/css.js +1 -1
- package/snapdom/src/utils/helpers.js +1 -1
- package/snapdom/src/utils/image.js +1 -1
- package/snapdom/types/snapdom.d.ts +253 -184
- package/snapdom.js +1 -1
- package/tinycolor/index.js +1 -1
- package/tinycolor/src/conversion.js +1 -1
- package/tinycolor/src/css-color-names.js +1 -1
- package/tinycolor/src/format-input.js +1 -1
- package/tinycolor/src/from-ratio.js +1 -1
- package/tinycolor/src/index.js +1 -1
- package/tinycolor/src/random.js +1 -1
- package/tinycolor/src/readability.js +1 -1
- package/tinycolor/src/to-ms-filter.js +1 -1
- package/tinycolor/src/utils.js +1 -1
- package/tinycolor.js +1 -1
- package/tree/index.js +1 -1
- package/tree/search/index.js +1 -1
- package/tree.js +1 -1
- package/tween/index.js +8 -0
- package/tween/src/easing.js +62 -0
- package/tween/src/tween.js +46 -0
- package/tween.js +8 -0
- package/types/dom-helpers/types.d.ts +2 -0
- package/types/normalize-wheel/index.d.ts +1 -1
- package/types/snapdom/src/api/snapdom.d.ts +4 -0
- package/types/snapdom/src/core/capture.d.ts +4 -18
- package/types/snapdom/src/core/context.d.ts +4 -4
- package/types/snapdom/src/core/exporters.d.ts +33 -0
- package/types/snapdom/src/core/plugins.d.ts +59 -0
- package/types/snapdom/src/modules/CSSVar.d.ts +3 -7
- package/types/snapdom/src/modules/iconFonts.d.ts +34 -0
- package/types/snapdom/src/modules/svgDefs.d.ts +9 -15
- package/types/tween/index.d.ts +1 -0
- package/types/tween/src/easing.d.ts +22 -0
- package/types/tween/src/index.d.ts +3 -0
- package/types/tween/src/tween.d.ts +22 -0
- package/types/validate/index.d.ts +3 -0
- package/types/validate/src/index.d.ts +39 -0
- package/types/validate/src/interface.d.ts +53 -0
- package/types/validate/src/locale/en-US.d.ts +47 -0
- package/types/validate/src/locale/zh-CN.d.ts +47 -0
- package/types/validate/src/message.d.ts +2 -0
- package/types/validate/src/rules/array.d.ts +12 -0
- package/types/validate/src/rules/base.d.ts +25 -0
- package/types/validate/src/rules/boolean.d.ts +8 -0
- package/types/validate/src/rules/custom.d.ts +7 -0
- package/types/validate/src/rules/number.d.ts +12 -0
- package/types/validate/src/rules/object.d.ts +9 -0
- package/types/validate/src/rules/string.d.ts +12 -0
- package/types/validate/src/rules/type.d.ts +9 -0
- package/types/validate/src/utils.d.ts +3 -0
- package/ui-color/compareColorByRange.js +1 -1
- package/ui-color/index.js +1 -1
- package/uiColor.js +1 -1
- package/url-toolkit/index.js +1 -1
- package/url-toolkit/src/url-toolkit.js +1 -1
- package/urlToolkit.js +1 -1
- package/validate/index.js +28 -0
- package/validate/src/index.js +106 -0
- package/validate/src/locale/en-US.js +50 -0
- package/validate/src/locale/zh-CN.js +50 -0
- package/validate/src/message.js +5 -0
- package/validate/src/rules/array.js +73 -0
- package/validate/src/rules/base.js +69 -0
- package/validate/src/rules/boolean.js +29 -0
- package/validate/src/rules/custom.js +26 -0
- package/validate/src/rules/number.js +54 -0
- package/validate/src/rules/object.js +39 -0
- package/validate/src/rules/string.js +54 -0
- package/validate/src/rules/type.js +35 -0
- package/validate/src/utils.js +8 -0
- package/validate.js +28 -0
- package/version/index.js +1 -1
- package/version.js +1 -1
package/case-name/index.js
CHANGED
package/caseName.js
CHANGED
package/class-name/index.js
CHANGED
package/className.js
CHANGED
package/clipboard-copy/index.js
CHANGED
package/clipboardCopy.js
CHANGED
package/constant/address.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 2025-
|
|
1
|
+
/* 2025-11-03 10:27:31 */
|
|
2
2
|
const t = "的一是在不了有和人这中大为上个国我以要他时来用们生到作地于出就分对成会可主发年动同工也能下过子说产种面而方后多定行学法所民得经十三之进着等部度家电力里如水化高自二理起小物现实加量都两体制机当使点从业本去把性好应开它合还因由其些然前外天政四日那社义事平形相全表间样与关各重新线内数正心反你明看原又么利比或但质气第向道命此变条只没结解问意建月公无系军很情者最立代想已通并提直题党程展五果料象员革位入常文总次品式活设及管特件长求老头基资边流路级少图山统接知较将组见计别她手角期根论运农指几九区强放决西被干做必战先回则任取据处队南给色光门即保治北造百规热领七海口东导器压志世金增争济阶油思术极交受联什认六共权收证改清己美再采转更单风切打白教速花带安场身车例真务具万每目至达走积示议声报斗完类八离华名确才科张信马节话米整空元况今集温传土许步群广石记需段研界拉林律叫且究观越织装影算低持音众书布复容儿须际商非验连断深难近矿千周委素技备半办青省列习响约支般史感劳便团往酸历市克何除消构府称太准精值号率族维划选标写存候毛亲快效斯院查江型眼王按格养易置派层片始却专状育厂京识适属圆包火住调满县局照参红细引听该铁价严龙飞";
|
|
3
3
|
export {
|
|
4
4
|
t as default
|
package/constant/domain.js
CHANGED
package/constant/emoji.js
CHANGED
package/constant/identity.js
CHANGED
package/constant/index.js
CHANGED
package/constant/keyboardCode.js
CHANGED
package/constant/licensePlate.js
CHANGED
package/constant/name.js
CHANGED
package/constant/platform.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 2025-
|
|
1
|
+
/* 2025-11-03 10:27:31 */
|
|
2
2
|
const i = navigator.userAgent.toLowerCase(), s = window.__wxjs_environment === "miniprogram" || !!window.wx?.getSystemInfoSync, a = /micromessenger/i.test(i), d = /dingtalk/i.test(i), r = /alipay|aliapp/i.test(i), n = /ipad|iphone|ipod/i.test(i), o = /android/i.test(i), w = /openharmony/i.test(i), t = /macintosh|mac os x/i.test(i), c = n || t, m = /windows|win32|win64|wow64/i.test(
|
|
3
3
|
i
|
|
4
4
|
), p = (n || o || /windows phone|blackberry|mobile|webos|iemobile|opera (mini|mobi)/i.test(
|
package/constant/protocol.js
CHANGED
package/constant/ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 2025-
|
|
1
|
+
/* 2025-11-03 10:27:31 */
|
|
2
2
|
const _ = "pc", E = "mobile", M = "pqbc", t = "pqb-common", I = "pqbc-theme-light", c = "pqbc-theme-dark", o = "pqb", e = "pqb-pc", n = "pqb-theme-light", p = "pqb-theme-dark", A = "pqbm", C = "pqb-mobile", b = "pqbm-theme-light", s = "pqbm-theme-dark";
|
|
3
3
|
export {
|
|
4
4
|
E as MOBILE_KEY,
|
package/constant.js
CHANGED
package/contentDisposition.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 2025-
|
|
1
|
+
/* 2025-11-03 10:27:31 */
|
|
2
2
|
import "lodash/isString";
|
|
3
3
|
import { default as r, getContentDispositionFromHeader as i, getContentDispositionParametersFilenameFromHeader as n, getContentDispositionParametersFromHeader as a } from "./content-disposition/index.js";
|
|
4
4
|
export {
|
package/cookie/index.js
CHANGED
package/cookie/src/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 2025-
|
|
1
|
+
/* 2025-11-03 10:27:31 */
|
|
2
2
|
const w = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, g = /^[\u0021-\u003A\u003C-\u007E]*$/, p = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, S = /^[\u0020-\u003A\u003D-\u007E]*$/, E = Object.prototype.toString, v = /* @__PURE__ */ (() => {
|
|
3
3
|
const t = function() {
|
|
4
4
|
};
|
package/cookie.js
CHANGED
package/date/convertTime.js
CHANGED
package/date/index.js
CHANGED
package/date.js
CHANGED
package/decimal/decimal.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 2025-
|
|
1
|
+
/* 2025-11-03 10:27:31 */
|
|
2
2
|
/*!
|
|
3
3
|
* decimal.js v10.5.0
|
|
4
4
|
* An arbitrary-precision Decimal type for JavaScript.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
7
7
|
* MIT Licence
|
|
8
8
|
*/
|
|
9
|
-
var G = 9e15,
|
|
9
|
+
var G = 9e15, V = 1e9, fe = "0123456789abcdef", y = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", ee = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", ce = {
|
|
10
10
|
// These values must be integers within the stated ranges (inclusive).
|
|
11
11
|
// Most of these values can be changed at run-time using the `Decimal.config` method.
|
|
12
12
|
// The maximum number of significant digits of the result of a calculation or base conversion.
|
|
@@ -64,7 +64,7 @@ var G = 9e15, $ = 1e9, fe = "0123456789abcdef", y = "2.3025850929940456840179914
|
|
|
64
64
|
// Whether to use cryptographically-secure random number generation, if available.
|
|
65
65
|
crypto: !1
|
|
66
66
|
// true/false
|
|
67
|
-
}, _, we, b, m = !0, ne = "[DecimalError] ",
|
|
67
|
+
}, _, we, b, m = !0, ne = "[DecimalError] ", $ = `${ne}Invalid argument: `, me = `${ne}Precision limit exceeded`, Ne = `${ne}crypto unavailable`, ve = "[object Decimal]", L = Math.floor, C = Math.pow, Ae = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, Le = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, Fe = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, Ee = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, R = 1e7, w = 7, Oe = 9007199254740991, De = y.length - 1, le = ee.length - 1, d = { toStringTag: ve };
|
|
68
68
|
d.absoluteValue = d.abs = function() {
|
|
69
69
|
var e = new this.constructor(this);
|
|
70
70
|
return e.s < 0 && (e.s = 1), p(e);
|
|
@@ -75,7 +75,7 @@ d.ceil = function() {
|
|
|
75
75
|
d.clampedTo = d.clamp = function(e, i) {
|
|
76
76
|
var n, r = this, s = r.constructor;
|
|
77
77
|
if (e = new s(e), i = new s(i), !e.s || !i.s) return new s(NaN);
|
|
78
|
-
if (e.gt(i)) throw Error(
|
|
78
|
+
if (e.gt(i)) throw Error($ + i);
|
|
79
79
|
return n = r.cmp(e), n < 0 ? e : r.cmp(i) > 0 ? i : new s(r);
|
|
80
80
|
};
|
|
81
81
|
d.comparedTo = d.cmp = function(e) {
|
|
@@ -334,7 +334,7 @@ d.plus = d.add = function(e) {
|
|
|
334
334
|
d.precision = d.sd = function(e) {
|
|
335
335
|
var i, n = this;
|
|
336
336
|
if (e !== void 0 && e !== !!e && e !== 1 && e !== 0)
|
|
337
|
-
throw Error(
|
|
337
|
+
throw Error($ + e);
|
|
338
338
|
return n.d ? (i = ke(n.d), e && n.e + 1 > i && (i = n.e + 1)) : i = NaN, i;
|
|
339
339
|
};
|
|
340
340
|
d.round = function() {
|
|
@@ -395,15 +395,15 @@ d.toBinary = function(e, i) {
|
|
|
395
395
|
};
|
|
396
396
|
d.toDecimalPlaces = d.toDP = function(e, i) {
|
|
397
397
|
var n = this, r = n.constructor;
|
|
398
|
-
return n = new r(n), e === void 0 ? n : (O(e, 0,
|
|
398
|
+
return n = new r(n), e === void 0 ? n : (O(e, 0, V), i === void 0 ? i = r.rounding : O(i, 0, 8), p(n, e + n.e + 1, i));
|
|
399
399
|
};
|
|
400
400
|
d.toExponential = function(e, i) {
|
|
401
401
|
var n, r = this, s = r.constructor;
|
|
402
|
-
return e === void 0 ? n = Z(r, !0) : (O(e, 0,
|
|
402
|
+
return e === void 0 ? n = Z(r, !0) : (O(e, 0, V), i === void 0 ? i = s.rounding : O(i, 0, 8), r = p(new s(r), e + 1, i), n = Z(r, !0, e + 1)), r.isNeg() && !r.isZero() ? "-" + n : n;
|
|
403
403
|
};
|
|
404
404
|
d.toFixed = function(e, i) {
|
|
405
405
|
var n, r, s = this, t = s.constructor;
|
|
406
|
-
return e === void 0 ? n = Z(s) : (O(e, 0,
|
|
406
|
+
return e === void 0 ? n = Z(s) : (O(e, 0, V), i === void 0 ? i = t.rounding : O(i, 0, 8), r = p(new t(s), e + s.e + 1, i), n = Z(r, !1, e + r.e + 1)), s.isNeg() && !s.isZero() ? "-" + n : n;
|
|
407
407
|
};
|
|
408
408
|
d.toFraction = function(e) {
|
|
409
409
|
var i, n, r, s, t, o, u, c, f, l, a, h, g = this, v = g.d, N = g.constructor;
|
|
@@ -411,7 +411,7 @@ d.toFraction = function(e) {
|
|
|
411
411
|
if (f = n = new N(1), r = c = new N(0), i = new N(r), t = i.e = ke(v) - g.e - 1, o = t % w, i.d[0] = C(10, o < 0 ? w + o : o), e == null)
|
|
412
412
|
e = t > 0 ? i : f;
|
|
413
413
|
else {
|
|
414
|
-
if (u = new N(e), !u.isInt() || u.lt(f)) throw Error(
|
|
414
|
+
if (u = new N(e), !u.isInt() || u.lt(f)) throw Error($ + u);
|
|
415
415
|
e = u.gt(i) ? t > 0 ? i : f : u;
|
|
416
416
|
}
|
|
417
417
|
for (m = !1, u = new N(P(v)), l = N.precision, N.precision = t = v.length * w * 2; a = k(u, i, 0, 1, 1), s = n.plus(a.times(r)), s.cmp(e) != 1; )
|
|
@@ -461,11 +461,11 @@ d.toPower = d.pow = function(e) {
|
|
|
461
461
|
};
|
|
462
462
|
d.toPrecision = function(e, i) {
|
|
463
463
|
var n, r = this, s = r.constructor;
|
|
464
|
-
return e === void 0 ? n = Z(r, r.e <= s.toExpNeg || r.e >= s.toExpPos) : (O(e, 1,
|
|
464
|
+
return e === void 0 ? n = Z(r, r.e <= s.toExpNeg || r.e >= s.toExpPos) : (O(e, 1, V), i === void 0 ? i = s.rounding : O(i, 0, 8), r = p(new s(r), e, i), n = Z(r, e <= r.e || r.e <= s.toExpNeg, e)), r.isNeg() && !r.isZero() ? "-" + n : n;
|
|
465
465
|
};
|
|
466
466
|
d.toSignificantDigits = d.toSD = function(e, i) {
|
|
467
467
|
var n = this, r = n.constructor;
|
|
468
|
-
return e === void 0 ? (e = r.precision, i = r.rounding) : (O(e, 1,
|
|
468
|
+
return e === void 0 ? (e = r.precision, i = r.rounding) : (O(e, 1, V), i === void 0 ? i = r.rounding : O(i, 0, 8)), p(new r(n), e, i);
|
|
469
469
|
};
|
|
470
470
|
d.toString = function() {
|
|
471
471
|
var e = this, i = e.constructor, n = Z(e, e.e <= i.toExpNeg || e.e >= i.toExpPos);
|
|
@@ -491,7 +491,7 @@ function P(e) {
|
|
|
491
491
|
}
|
|
492
492
|
function O(e, i, n) {
|
|
493
493
|
if (e !== ~~e || e < i || e > n)
|
|
494
|
-
throw Error(
|
|
494
|
+
throw Error($ + e);
|
|
495
495
|
}
|
|
496
496
|
function J(e, i, n, r) {
|
|
497
497
|
var s, t, o, u;
|
|
@@ -743,7 +743,7 @@ function _e(e, i) {
|
|
|
743
743
|
else if (Fe.test(i))
|
|
744
744
|
n = 8;
|
|
745
745
|
else
|
|
746
|
-
throw Error(
|
|
746
|
+
throw Error($ + i);
|
|
747
747
|
for (t = i.search(/p/i), t > 0 ? (c = +i.slice(t + 1), i = i.substring(2, t)) : i = i.slice(2), t = i.indexOf("."), o = t >= 0, r = e.constructor, o && (i = i.replace(".", ""), u = i.length, t = u - t, s = Me(r, new r(n), t, t * 2)), f = z(i, n, R), l = f.length - 1, t = l; f[t] === 0; --t) f.pop();
|
|
748
748
|
return t < 0 ? new r(e.s * 0) : (e.e = re(f, l), e.d = f, m = !1, o && (e = k(e, s, u * 4)), c && (e = e.times(Math.abs(c) < 54 ? C(2, c) : _.pow(2, c))), m = !0, e);
|
|
749
749
|
}
|
|
@@ -786,7 +786,7 @@ function Pe(e, i) {
|
|
|
786
786
|
}
|
|
787
787
|
function he(e, i, n, r) {
|
|
788
788
|
var s, t, o, u, c, f, l, a, h, g = e.constructor, v = n !== void 0;
|
|
789
|
-
if (v ? (O(n, 1,
|
|
789
|
+
if (v ? (O(n, 1, V), r === void 0 ? r = g.rounding : O(r, 0, 8)) : (n = g.precision, r = g.rounding), !e.isFinite())
|
|
790
790
|
l = Ce(e);
|
|
791
791
|
else {
|
|
792
792
|
for (l = Z(e), o = l.indexOf("."), v ? (s = 2, i == 16 ? n = n * 4 - 3 : i == 8 && (n = n * 3 - 2)) : s = i, o >= 0 && (l = l.replace(".", ""), h = new g(1), h.e = l.length - o, h.d = z(Z(h), 10, s), h.e = h.d.length), a = z(l, 10, s), t = c = a.length; a[--c] == 0; ) a.pop();
|
|
@@ -839,10 +839,10 @@ function Be(e) {
|
|
|
839
839
|
function He(e) {
|
|
840
840
|
return new this(e).asinh();
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function $e(e) {
|
|
843
843
|
return new this(e).atan();
|
|
844
844
|
}
|
|
845
|
-
function
|
|
845
|
+
function Ve(e) {
|
|
846
846
|
return new this(e).atanh();
|
|
847
847
|
}
|
|
848
848
|
function Ge(e, i) {
|
|
@@ -865,7 +865,7 @@ function Ke(e) {
|
|
|
865
865
|
var i, n, r, s = e.defaults === !0, t = [
|
|
866
866
|
"precision",
|
|
867
867
|
1,
|
|
868
|
-
|
|
868
|
+
V,
|
|
869
869
|
"rounding",
|
|
870
870
|
0,
|
|
871
871
|
8,
|
|
@@ -888,7 +888,7 @@ function Ke(e) {
|
|
|
888
888
|
for (i = 0; i < t.length; i += 3)
|
|
889
889
|
if (n = t[i], s && (this[n] = ce[n]), (r = e[n]) !== void 0)
|
|
890
890
|
if (L(r) === r && r >= t[i + 1] && r <= t[i + 2]) this[n] = r;
|
|
891
|
-
else throw Error(
|
|
891
|
+
else throw Error($ + n + ": " + r);
|
|
892
892
|
if (n = "crypto", s && (this[n] = ce[n]), (r = e[n]) !== void 0)
|
|
893
893
|
if (r === !0 || r === !1 || r === 0 || r === 1)
|
|
894
894
|
if (r)
|
|
@@ -899,7 +899,7 @@ function Ke(e) {
|
|
|
899
899
|
else
|
|
900
900
|
this[n] = !1;
|
|
901
901
|
else
|
|
902
|
-
throw Error(
|
|
902
|
+
throw Error($ + n + ": " + r);
|
|
903
903
|
return this;
|
|
904
904
|
}
|
|
905
905
|
function Qe(e) {
|
|
@@ -937,9 +937,9 @@ function Se(e) {
|
|
|
937
937
|
return (u = t.charCodeAt(0)) === 45 ? (t = t.slice(1), f.s = -1) : (u === 43 && (t = t.slice(1)), f.s = 1), Ee.test(t) ? x(f, t) : _e(f, t);
|
|
938
938
|
if (c === "bigint")
|
|
939
939
|
return t < 0 ? (t = -t, f.s = -1) : f.s = 1, x(f, t.toString());
|
|
940
|
-
throw Error(
|
|
940
|
+
throw Error($ + t);
|
|
941
941
|
}
|
|
942
|
-
if (s.prototype = d, 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 = Ke, s.clone = Se, s.isDecimal = ge, s.abs = Te, s.acos = Ze, s.acosh = Ue, s.add = be, s.asin = Be, s.asinh = He, s.atan =
|
|
942
|
+
if (s.prototype = d, 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 = Ke, s.clone = Se, s.isDecimal = ge, s.abs = Te, s.acos = Ze, s.acosh = Ue, s.add = be, s.asin = Be, s.asinh = He, s.atan = $e, s.atanh = Ve, s.atan2 = Ge, s.cbrt = We, s.ceil = Xe, s.clamp = Je, s.cos = Qe, s.cosh = Ye, s.div = je, s.exp = ze, s.floor = xe, s.hypot = ye, s.ln = ei, s.log = ii, s.log10 = ri, s.log2 = ni, s.max = ti, s.min = si, s.mod = oi, s.mul = ui, s.pow = fi, s.random = ci, s.round = li, s.sign = ai, s.sin = hi, s.sinh = di, s.sqrt = pi, s.sub = gi, s.sum = wi, s.tan = mi, s.tanh = Ni, s.trunc = vi, e === void 0 && (e = {}), e && e.defaults !== !0)
|
|
943
943
|
for (r = [
|
|
944
944
|
"precision",
|
|
945
945
|
"rounding",
|
|
@@ -1006,7 +1006,7 @@ function fi(e, i) {
|
|
|
1006
1006
|
}
|
|
1007
1007
|
function ci(e) {
|
|
1008
1008
|
var i, n, r, s, t = 0, o = new this(1), u = [];
|
|
1009
|
-
if (e === void 0 ? e = this.precision : O(e, 1,
|
|
1009
|
+
if (e === void 0 ? e = this.precision : O(e, 1, V), r = Math.ceil(e / w), this.crypto)
|
|
1010
1010
|
if (crypto.getRandomValues)
|
|
1011
1011
|
for (i = crypto.getRandomValues(new Uint32Array(r)); t < r; )
|
|
1012
1012
|
s = i[t], s >= 429e7 ? i[t] = crypto.getRandomValues(new Uint32Array(1))[0] : u[t++] = s % 1e7;
|
package/decimal/index.js
CHANGED
package/decimal.js
CHANGED
package/dom-helpers/addClass.js
CHANGED
package/dom-helpers/animate.js
CHANGED
package/dom-helpers/attribute.js
CHANGED
package/dom-helpers/camelize.js
CHANGED
package/dom-helpers/canUseDOM.js
CHANGED
package/dom-helpers/clear.js
CHANGED
package/dom-helpers/closest.js
CHANGED
package/dom-helpers/contains.js
CHANGED
package/dom-helpers/css.js
CHANGED
package/dom-helpers/hasClass.js
CHANGED
package/dom-helpers/height.js
CHANGED
package/dom-helpers/hyphenate.js
CHANGED
package/dom-helpers/index.js
CHANGED
package/dom-helpers/isInput.js
CHANGED